Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
morphic
command
Command morphic is the Morphic CLI: it lowers an API spec into Morphic IR.
|
Command morphic is the Morphic CLI: it lowers an API spec into Morphic IR. |
|
morphic-harness
command
Command morphic-harness sweeps API specs through Morphic's bug-catching oracles (no panic/error, IR invariants, JSON round-trip, determinism) and writes a combined report to stdout.
|
Command morphic-harness sweeps API specs through Morphic's bug-catching oracles (no panic/error, IR invariants, JSON round-trip, determinism) and writes a combined report to stdout. |
|
Package compilers defines the contract between spec compilers and the engine: a Compiler lowers source documents of its formats into an ir.Document plus diagnostics, purely and reentrantly.
|
Package compilers defines the contract between spec compilers and the engine: a Compiler lowers source documents of its formats into an ir.Document plus diagnostics, purely and reentrantly. |
|
compile
Package compile holds the state every spec compiler needs and the invariants that state carries, so each compiler does not reimplement them.
|
Package compile holds the state every spec compiler needs and the invariants that state carries, so each compiler does not reimplement them. |
|
openapi
Package openapi lowers OpenAPI 3.0/3.1/3.2 documents into the Morphic IR.
|
Package openapi lowers OpenAPI 3.0/3.1/3.2 documents into the Morphic IR. |
|
openapi/internal/annotation
Package annotation reads the documentation-adjacent facts a schema or a carrier declares — descriptions, deprecation, visibility, XML hints, extensions — and the validation-only JSON Schema keywords the IR keeps verbatim rather than models.
|
Package annotation reads the documentation-adjacent facts a schema or a carrier declares — descriptions, deprecation, visibility, XML hints, extensions — and the validation-only JSON Schema keywords the IR keeps verbatim rather than models. |
|
openapi/internal/auth
Package auth lowers what a document says about authentication: the security schemes it declares, and the requirements that name them.
|
Package auth lowers what a document says about authentication: the security schemes it declares, and the requirements that name them. |
|
openapi/internal/diag
Package diag holds the OpenAPI compiler's diagnostic vocabulary: the stable codes it reports under, and the single constructor that builds a diagnostic from them.
|
Package diag holds the OpenAPI compiler's diagnostic vocabulary: the stable codes it reports under, and the single constructor that builds a diagnostic from them. |
|
openapi/internal/ids
Package ids builds the RFC 6901 pointer that names a position — a jsontext.Pointer from construction on, read back through its methods, never split on '/' — and derives IR identifiers and namespaces from it.
|
Package ids builds the RFC 6901 pointer that names a position — a jsontext.Pointer from construction on, read back through its methods, never split on '/' — and derives IR identifiers and namespaces from it. |
|
openapi/internal/load
Package load turns one source document into a parsed, reference-resolved OpenAPI document plus the identity metadata the rest of the compiler stamps into the IR.
|
Package load turns one source document into a parsed, reference-resolved OpenAPI document plus the identity metadata the rest of the compiler stamps into the IR. |
|
openapi/internal/lowering
Package lowering holds the immutable context every OpenAPI lowering reads.
|
Package lowering holds the immutable context every OpenAPI lowering reads. |
|
openapi/internal/merge
Package merge reconciles the properties more than one allOf branch declares: either folding two declarations into one or reporting that they disagree.
|
Package merge reconciles the properties more than one allOf branch declares: either folding two declarations into one or reporting that they disagree. |
|
openapi/internal/nodeview
Package nodeview reads a YAML mapping the way the resolver will: through aliases, through `<<` merge keys, and with duplicate keys resolved the way the parser resolves them.
|
Package nodeview reads a YAML mapping the way the resolver will: through aliases, through `<<` merge keys, and with duplicate keys resolved the way the parser resolves them. |
|
openapi/internal/openapitest
Package openapitest holds the test scaffolding every test package under compilers/openapi would otherwise carry as its own copy.
|
Package openapitest holds the test scaffolding every test package under compilers/openapi would otherwise carry as its own copy. |
|
openapi/internal/operation
Package operation lowers what a document says an API does: its path items, webhooks and callbacks, the parameters merged onto each operation, and the content of every request body, response and header.
|
Package operation lowers what a document says an API does: its path items, webhooks and callbacks, the parameters merged onto each operation, and the content of every request body, response and header. |
|
openapi/internal/overlay
Package overlay applies an OpenAPI Overlay document to the parsed node tree, and records which positions in the result the overlay is answerable for.
|
Package overlay applies an OpenAPI Overlay document to the parsed node tree, and records which positions in the result the overlay is answerable for. |
|
openapi/internal/resolve
Package resolve answers what a $ref names: which same-document pointer it addresses, which interned type, if any, already lives there, and — for the components that are not schemas — which concrete value and declaration site a reference-or-inline entry stands for.
|
Package resolve answers what a $ref names: which same-document pointer it addresses, which interned type, if any, already lives there, and — for the components that are not schemas — which concrete value and declaration site a reference-or-inline entry stands for. |
|
openapi/internal/scan
Package scan refuses a source document before any of it is lowered.
|
Package scan refuses a source document before any of it is lowered. |
|
openapi/internal/schema
Package schema lowers OpenAPI schemas into IR types: the shape walk itself, the compositions written around it, the references that reach other schemas, and the preservation of what the IR has no field for.
|
Package schema lowers OpenAPI schemas into IR types: the shape walk itself, the compositions written around it, the references that reach other schemas, and the preservation of what the IR has no field for. |
|
openapi/internal/sourceindex
Package sourceindex answers, in one walk, the questions asked of a decoded source tree before any of it is lowered.
|
Package sourceindex answers, in one walk, the questions asked of a decoded source tree before any of it is lowered. |
|
openapi/internal/value
Package value lowers source scalars into ir.Value, keeping numeric literals as their exact source text so nothing rounds through float64.
|
Package value lowers source scalars into ir.Value, keeping numeric literals as their exact source text so nothing rounds through float64. |
|
openapi/internal/ynode
Package ynode spells yaml.v3 nodes: the tag a resolved `<<` merge key carries, the constructors for the node kinds a parse produces, and the merge chain the compiler's depth bounds are measured against.
|
Package ynode spells yaml.v3 nodes: the tag a resolved `<<` merge key carries, the constructors for the node kinds a parse produces, and the merge chain the compiler's depth bounds are measured against. |
|
Package engine orchestrates the Morphic pipeline: it asks the registered compilers which of them recognizes the source, dispatches to that one, and runs IR passes.
|
Package engine orchestrates the Morphic pipeline: it asks the registered compilers which of them recognizes the source, dispatches to that one, and runs IR passes. |
|
internal
|
|
|
harness
Package harness compiles OpenAPI specs and applies the bug-catching oracles (no panic/error, irverify invariants, JSON round-trip, determinism), returning a structured Result per spec.
|
Package harness compiles OpenAPI specs and applies the bug-catching oracles (no panic/error, irverify invariants, JSON round-trip, determinism), returning a structured Result per spec. |
|
leakcheck
Package leakcheck fails a test binary whose tests leave a goroutine behind.
|
Package leakcheck fails a test binary whose tests leave a goroutine behind. |
|
testspec
Package testspec holds the OpenAPI fixture spec strings that engine, cmd/morphic, cmd/morphic-harness, and internal/harness tests would otherwise each carry as byte-identical copies.
|
Package testspec holds the OpenAPI fixture spec strings that engine, cmd/morphic, cmd/morphic-harness, and internal/harness tests would otherwise each carry as byte-identical copies. |
|
Package ir defines Morphic's spec-agnostic intermediate representation: the single contract between spec compilers and generator emitters.
|
Package ir defines Morphic's spec-agnostic intermediate representation: the single contract between spec compilers and generator emitters. |
|
irtest
Package irtest provides golden-snapshot helpers for IR documents.
|
Package irtest provides golden-snapshot helpers for IR documents. |
|
irverify
Package irverify checks a compiled ir.Document against the structural invariants every compiler must uphold: stable IDs, no two nodes claiming one identity, no dangling references, neutral naming, routable Unmodeled entries, in-range provenance, a readable schema stamp, and more besides.
|
Package irverify checks a compiled ir.Document against the structural invariants every compiler must uphold: stable IDs, no two nodes claiming one identity, no dangling references, neutral naming, routable Unmodeled entries, in-range provenance, a readable schema stamp, and more besides. |
|
Package pass hosts Morphic's IR-to-IR passes: pure analyses and transforms that consume an ir.Document and emit diagnostics (or, in later passes, a rewritten document).
|
Package pass hosts Morphic's IR-to-IR passes: pure analyses and transforms that consume an ir.Document and emit diagnostics (or, in later passes, a rewritten document). |
Click to show internal directories.
Click to hide internal directories.