Documentation
¶
Overview ¶
Package build flattens parsed specs into fully-resolved view models. It is the only codegen stage that inspects the spec model; every naming and type decision funnels through here (via the naming package) so templates stay decision-free.
Presence rules: required keys become value fields, optional keys become pointers (or nil-able slices/maps) tagged omitempty. Constraints (rangelist, range, format, repetition, subtypes) become statements in the generated Validate method.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SharedTypes ¶
type SharedTypes struct {
// contains filtered or unexported fields
}
SharedTypes tracks every named nested struct emitted in one package, keyed by name with a shape signature. It serves two purposes: subkeytype reuse across specs (first definition wins, later references reuse), and shape-aware dedup — identical (name, shape) pairs collapse to one type, while a name collision with a different shape gets a numeric suffix.
func NewSharedTypes ¶
func NewSharedTypes() *SharedTypes
NewSharedTypes returns an empty per-package shared-type registry.