Documentation
¶
Overview ¶
Package biscuit converts an OpenAPI 3.x spec into a complete CLI repository. The CLI (cmd/biscuit) is the first consumer of this API. Generate is a pure function — no disk I/O, no side effects; writing the plan is the separate FilePlan.Write step. That split is what yields --dry-run for free and keeps a future hosted service a thin wrapper.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
Config is the parsed biscuit.yaml. LoadConfig reads and validates one; unknown keys are rejected so a malformed config never mis-generates.
func LoadConfig ¶
LoadConfig reads dir/biscuit.yaml; a missing file yields an empty config.
type Document ¶
type Document struct {
// contains filtered or unexported fields
}
Document is a parsed, validated OpenAPI 3.x spec ready for generation.
func Load ¶
Load reads, parses, and resolves the spec at path. Blocking correctness problems (unparseable spec, unresolvable $refs, duplicate operationIds) fail the load; advisory findings are available via Diagnostics.
func (*Document) Diagnostics ¶
Diagnostics returns advisory findings that degrade generated-CLI quality but never block generation.
func (*Document) Operations ¶
Operations returns the number of path operations (webhooks not included).
type FilePlan ¶
type FilePlan struct {
Files []PlannedFile // sorted by Path; empty until the rendering epic lands
}
FilePlan is the complete set of files a generation run would write.
type PlannedFile ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
biscuit
command
|
|
|
internal
|
|
|
config
Package config loads and validates biscuit.yaml, the canonical override surface.
|
Package config loads and validates biscuit.yaml, the canonical override surface. |
|
ir
Package ir is biscuit's intermediate representation: the immutable, deterministic shape between spec and templates.
|
Package ir is biscuit's intermediate representation: the immutable, deterministic shape between spec and templates. |
|
lint
Package lint grades a spec with vacuum and translates rule hits into generation impact: what each finding does to the generated CLI and how to fix it — in the spec if you own it, in biscuit.yaml if you don't.
|
Package lint grades a spec with vacuum and translates rule hits into generation impact: what each finding does to the generated CLI and how to fix it — in the spec if you own it, in biscuit.yaml if you don't. |
|
mapping
Package mapping builds the IR from a loaded spec.
|
Package mapping builds the IR from a loaded spec. |
|
spec
Package spec loads an OpenAPI 3.x document into libopenapi's model, classifying failures per biscuit's contract: blocking correctness problems (unparseable spec, unresolvable $refs, duplicate operationIds) surface as *InvalidError, while advisory findings (circular refs, $refs inside vendor extensions, resolver noise) land in Document.Diagnostics.
|
Package spec loads an OpenAPI 3.x document into libopenapi's model, classifying failures per biscuit's contract: blocking correctness problems (unparseable spec, unresolvable $refs, duplicate operationIds) surface as *InvalidError, while advisory findings (circular refs, $refs inside vendor extensions, resolver noise) land in Document.Diagnostics. |
|
spike
module
|