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/structured-requirements/schema/prd.schema.json" // MRDSchemaID is the canonical ID for the MRD schema (placeholder). MRDSchemaID = "https://github.com/grokify/structured-requirements/schema/mrd.schema.json" // TRDSchemaID is the canonical ID for the TRD schema (placeholder). TRDSchemaID = "https://github.com/grokify/structured-requirements/schema/trd.schema.json" )
SchemaID constants for referencing schemas.
Variables ¶
View Source
var PRDSchemaJSON []byte
Functions ¶
func PRDSchemaBytes ¶
func PRDSchemaBytes() []byte
PRDSchemaBytes returns the PRD 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 ¶
GenerateAll generates all schema files to the specified directory.
func (*Generator) GeneratePRDSchema ¶
func (g *Generator) GeneratePRDSchema() (*jsonschema.Schema, error)
GeneratePRDSchema generates JSON Schema for the PRD Document type.
func (*Generator) GeneratePRDSchemaJSON ¶
GeneratePRDSchemaJSON generates JSON Schema for PRD and returns it as JSON bytes.
func (*Generator) WritePRDSchema ¶
WritePRDSchema generates and writes the PRD schema to a file.
Click to show internal directories.
Click to hide internal directories.