schema

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package schema provides embedded JSON Schema files for structured requirements documents. These schemas can be used for validation and documentation purposes.

Index

Constants

View Source
const (
	// PRDSchemaID is the canonical ID for the PRD schema.
	PRDSchemaID = "https://github.com/grokify/prism-roadmap/schema/prd.schema.json"

	// MRDSchemaID is the canonical ID for the MRD schema (placeholder).
	MRDSchemaID = "https://github.com/grokify/prism-roadmap/schema/mrd.schema.json"

	// TRDSchemaID is the canonical ID for the TRD schema (placeholder).
	TRDSchemaID = "https://github.com/grokify/prism-roadmap/schema/trd.schema.json"

	// OKRSchemaID is the canonical ID for the OKR schema.
	OKRSchemaID = "https://github.com/grokify/prism-roadmap/schema/okr.schema.json"

	// V2MOMSchemaID is the canonical ID for the V2MOM schema.
	V2MOMSchemaID = "https://github.com/grokify/prism-roadmap/schema/v2mom.schema.json"

	// CanvasSchemaID is the canonical ID for the Canvas wrapper schema.
	CanvasSchemaID = "https://github.com/grokify/prism-roadmap/schema/canvas.schema.json"

	// BMCSchemaID is the canonical ID for the Business Model Canvas schema.
	BMCSchemaID = "https://github.com/grokify/prism-roadmap/schema/bmc.schema.json"

	// OpportunitySchemaID is the canonical ID for the Opportunity Canvas schema.
	OpportunitySchemaID = "https://github.com/grokify/prism-roadmap/schema/opportunity.schema.json"

	// FeatureSchemaID is the canonical ID for the Feature Canvas schema.
	FeatureSchemaID = "https://github.com/grokify/prism-roadmap/schema/feature.schema.json"

	// LeanUXSchemaID is the canonical ID for the Lean UX Canvas schema.
	LeanUXSchemaID = "https://github.com/grokify/prism-roadmap/schema/leanux.schema.json"

	// OSTSchemaID is the canonical ID for the Opportunity Solution Tree schema.
	OSTSchemaID = "https://github.com/grokify/prism-roadmap/schema/ost.schema.json"

	// ShapeUpPitchSchemaID is the canonical ID for the Shape Up Pitch schema.
	ShapeUpPitchSchemaID = "https://github.com/grokify/prism-roadmap/schema/shapeup-pitch.schema.json"

	// ShapeUpBetSchemaID is the canonical ID for the Shape Up Bet schema.
	ShapeUpBetSchemaID = "https://github.com/grokify/prism-roadmap/schema/shapeup-bet.schema.json"

	// ShapeUpScopeSchemaID is the canonical ID for the Shape Up Scope schema.
	ShapeUpScopeSchemaID = "https://github.com/grokify/prism-roadmap/schema/shapeup-scope.schema.json"

	// DiscoverySnapshotSchemaID is the canonical ID for the Discovery Snapshot schema.
	DiscoverySnapshotSchemaID = "https://github.com/grokify/prism-roadmap/schema/discovery-snapshot.schema.json"

	// AssumptionMapSchemaID is the canonical ID for the Assumption Map schema.
	AssumptionMapSchemaID = "https://github.com/grokify/prism-roadmap/schema/assumption-map.schema.json"

	// ExperienceMapSchemaID is the canonical ID for the Experience Map schema.
	ExperienceMapSchemaID = "https://github.com/grokify/prism-roadmap/schema/experience-map.schema.json"

	// LeanStartupSchemaID is the canonical ID for the Lean Startup schema.
	LeanStartupSchemaID = "https://github.com/grokify/prism-roadmap/schema/leanstartup.schema.json"

	// DesignThinkingSchemaID is the canonical ID for the Design Thinking schema.
	DesignThinkingSchemaID = "https://github.com/grokify/prism-roadmap/schema/designthinking.schema.json"

	// JTBDSchemaID is the canonical ID for the JTBD schema.
	JTBDSchemaID = "https://github.com/grokify/prism-roadmap/schema/jtbd.schema.json"
)

SchemaID constants for referencing schemas.

Variables

View Source
var OKRSchemaJSON []byte
View Source
var PRDSchemaJSON []byte
View Source
var V2MOMSchemaJSON []byte

Functions

func OKRSchema

func OKRSchema() string

OKRSchema returns the OKR JSON Schema as a string.

func OKRSchemaBytes

func OKRSchemaBytes() []byte

OKRSchemaBytes returns the OKR JSON Schema as a byte slice.

func PRDSchema

func PRDSchema() string

PRDSchema returns the PRD JSON Schema as a string.

func PRDSchemaBytes

func PRDSchemaBytes() []byte

PRDSchemaBytes returns the PRD JSON Schema as a byte slice.

func V2MOMSchema

func V2MOMSchema() string

V2MOMSchema returns the V2MOM JSON Schema as a string.

func V2MOMSchemaBytes

func V2MOMSchemaBytes() []byte

V2MOMSchemaBytes returns the V2MOM JSON Schema as a byte slice.

Types

type Generator

type Generator struct {
	// Reflector is the jsonschema reflector used for generation.
	Reflector *jsonschema.Reflector
}

Generator creates JSON Schema files from Go types.

func NewGenerator

func NewGenerator() *Generator

NewGenerator creates a new schema generator with default settings.

func (*Generator) GenerateAll

func (g *Generator) GenerateAll(dir string) error

GenerateAll generates all schema files to the specified directory.

func (*Generator) GenerateAssumptionMapSchema added in v0.14.0

func (g *Generator) GenerateAssumptionMapSchema() (*jsonschema.Schema, error)

GenerateAssumptionMapSchema generates JSON Schema for the AssumptionMap type.

func (*Generator) GenerateAssumptionMapSchemaJSON added in v0.14.0

func (g *Generator) GenerateAssumptionMapSchemaJSON() ([]byte, error)

GenerateAssumptionMapSchemaJSON generates JSON Schema for AssumptionMap and returns it as JSON bytes.

func (*Generator) GenerateCanvasSchemas added in v0.14.0

func (g *Generator) GenerateCanvasSchemas(dir string) error

GenerateCanvasSchemas generates all canvas schemas to the specified directory.

func (*Generator) GenerateDesignThinkingSchema added in v0.14.0

func (g *Generator) GenerateDesignThinkingSchema() (*jsonschema.Schema, error)

GenerateDesignThinkingSchema generates JSON Schema for the DesignThinkingCanvas type.

func (*Generator) GenerateDesignThinkingSchemaJSON added in v0.14.0

func (g *Generator) GenerateDesignThinkingSchemaJSON() ([]byte, error)

GenerateDesignThinkingSchemaJSON generates JSON Schema for DesignThinking and returns it as JSON bytes.

func (*Generator) GenerateDiscoverySnapshotSchema added in v0.14.0

func (g *Generator) GenerateDiscoverySnapshotSchema() (*jsonschema.Schema, error)

GenerateDiscoverySnapshotSchema generates JSON Schema for the DiscoverySnapshot type.

func (*Generator) GenerateDiscoverySnapshotSchemaJSON added in v0.14.0

func (g *Generator) GenerateDiscoverySnapshotSchemaJSON() ([]byte, error)

GenerateDiscoverySnapshotSchemaJSON generates JSON Schema for DiscoverySnapshot and returns it as JSON bytes.

func (*Generator) GenerateExperienceMapSchema added in v0.14.0

func (g *Generator) GenerateExperienceMapSchema() (*jsonschema.Schema, error)

GenerateExperienceMapSchema generates JSON Schema for the ExperienceMap type.

func (*Generator) GenerateExperienceMapSchemaJSON added in v0.14.0

func (g *Generator) GenerateExperienceMapSchemaJSON() ([]byte, error)

GenerateExperienceMapSchemaJSON generates JSON Schema for ExperienceMap and returns it as JSON bytes.

func (*Generator) GenerateJTBDSchema added in v0.14.0

func (g *Generator) GenerateJTBDSchema() (*jsonschema.Schema, error)

GenerateJTBDSchema generates JSON Schema for the JTBDCanvas type.

func (*Generator) GenerateJTBDSchemaJSON added in v0.14.0

func (g *Generator) GenerateJTBDSchemaJSON() ([]byte, error)

GenerateJTBDSchemaJSON generates JSON Schema for JTBD and returns it as JSON bytes.

func (*Generator) GenerateLeanStartupSchema added in v0.14.0

func (g *Generator) GenerateLeanStartupSchema() (*jsonschema.Schema, error)

GenerateLeanStartupSchema generates JSON Schema for the LeanStartupCanvas type.

func (*Generator) GenerateLeanStartupSchemaJSON added in v0.14.0

func (g *Generator) GenerateLeanStartupSchemaJSON() ([]byte, error)

GenerateLeanStartupSchemaJSON generates JSON Schema for LeanStartup and returns it as JSON bytes.

func (*Generator) GenerateOKRSchema

func (g *Generator) GenerateOKRSchema() (*jsonschema.Schema, error)

GenerateOKRSchema generates JSON Schema for the OKR Document type.

func (*Generator) GenerateOKRSchemaJSON

func (g *Generator) GenerateOKRSchemaJSON() ([]byte, error)

GenerateOKRSchemaJSON generates JSON Schema for OKR and returns it as JSON bytes.

func (*Generator) GeneratePRDSchema

func (g *Generator) GeneratePRDSchema() (*jsonschema.Schema, error)

GeneratePRDSchema generates JSON Schema for the PRD Document type.

func (*Generator) GeneratePRDSchemaJSON

func (g *Generator) GeneratePRDSchemaJSON() ([]byte, error)

GeneratePRDSchemaJSON generates JSON Schema for PRD and returns it as JSON bytes.

func (*Generator) GenerateShapeUpBetSchema added in v0.14.0

func (g *Generator) GenerateShapeUpBetSchema() (*jsonschema.Schema, error)

GenerateShapeUpBetSchema generates JSON Schema for the ShapeUpBet type.

func (*Generator) GenerateShapeUpBetSchemaJSON added in v0.14.0

func (g *Generator) GenerateShapeUpBetSchemaJSON() ([]byte, error)

GenerateShapeUpBetSchemaJSON generates JSON Schema for ShapeUpBet and returns it as JSON bytes.

func (*Generator) GenerateShapeUpPitchSchema added in v0.14.0

func (g *Generator) GenerateShapeUpPitchSchema() (*jsonschema.Schema, error)

GenerateShapeUpPitchSchema generates JSON Schema for the ShapeUpPitch type.

func (*Generator) GenerateShapeUpPitchSchemaJSON added in v0.14.0

func (g *Generator) GenerateShapeUpPitchSchemaJSON() ([]byte, error)

GenerateShapeUpPitchSchemaJSON generates JSON Schema for ShapeUpPitch and returns it as JSON bytes.

func (*Generator) GenerateShapeUpScopeSchema added in v0.14.0

func (g *Generator) GenerateShapeUpScopeSchema() (*jsonschema.Schema, error)

GenerateShapeUpScopeSchema generates JSON Schema for the ShapeUpScope type.

func (*Generator) GenerateShapeUpScopeSchemaJSON added in v0.14.0

func (g *Generator) GenerateShapeUpScopeSchemaJSON() ([]byte, error)

GenerateShapeUpScopeSchemaJSON generates JSON Schema for ShapeUpScope and returns it as JSON bytes.

func (*Generator) GenerateV2MOMSchema

func (g *Generator) GenerateV2MOMSchema() (*jsonschema.Schema, error)

GenerateV2MOMSchema generates JSON Schema for the V2MOM Document type.

func (*Generator) GenerateV2MOMSchemaJSON

func (g *Generator) GenerateV2MOMSchemaJSON() ([]byte, error)

GenerateV2MOMSchemaJSON generates JSON Schema for V2MOM and returns it as JSON bytes.

func (*Generator) WriteAssumptionMapSchema added in v0.14.0

func (g *Generator) WriteAssumptionMapSchema(path string) error

WriteAssumptionMapSchema generates and writes the AssumptionMap schema to a file.

func (*Generator) WriteDesignThinkingSchema added in v0.14.0

func (g *Generator) WriteDesignThinkingSchema(path string) error

WriteDesignThinkingSchema generates and writes the DesignThinking schema to a file.

func (*Generator) WriteDiscoverySnapshotSchema added in v0.14.0

func (g *Generator) WriteDiscoverySnapshotSchema(path string) error

WriteDiscoverySnapshotSchema generates and writes the DiscoverySnapshot schema to a file.

func (*Generator) WriteExperienceMapSchema added in v0.14.0

func (g *Generator) WriteExperienceMapSchema(path string) error

WriteExperienceMapSchema generates and writes the ExperienceMap schema to a file.

func (*Generator) WriteJTBDSchema added in v0.14.0

func (g *Generator) WriteJTBDSchema(path string) error

WriteJTBDSchema generates and writes the JTBD schema to a file.

func (*Generator) WriteLeanStartupSchema added in v0.14.0

func (g *Generator) WriteLeanStartupSchema(path string) error

WriteLeanStartupSchema generates and writes the LeanStartup schema to a file.

func (*Generator) WriteOKRSchema

func (g *Generator) WriteOKRSchema(path string) error

WriteOKRSchema generates and writes the OKR schema to a file.

func (*Generator) WritePRDSchema

func (g *Generator) WritePRDSchema(path string) error

WritePRDSchema generates and writes the PRD schema to a file.

func (*Generator) WriteShapeUpBetSchema added in v0.14.0

func (g *Generator) WriteShapeUpBetSchema(path string) error

WriteShapeUpBetSchema generates and writes the ShapeUpBet schema to a file.

func (*Generator) WriteShapeUpPitchSchema added in v0.14.0

func (g *Generator) WriteShapeUpPitchSchema(path string) error

WriteShapeUpPitchSchema generates and writes the ShapeUpPitch schema to a file.

func (*Generator) WriteShapeUpScopeSchema added in v0.14.0

func (g *Generator) WriteShapeUpScopeSchema(path string) error

WriteShapeUpScopeSchema generates and writes the ShapeUpScope schema to a file.

func (*Generator) WriteV2MOMSchema

func (g *Generator) WriteV2MOMSchema(path string) error

WriteV2MOMSchema generates and writes the V2MOM schema to a file.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL