You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
cli+engine: let a caller lower the severity of parser findings that don't affect lowering #691
Parser findings arrive at the parser's severity, and an error fails the run. Some of them don't affect what the compiler produces: a path parameter written required: false is lowered as required anyway, an invalid contact.email changes nothing, a callback key the parser misreads is kept regardless. For those, exit 1 is stricter than the document's problems warrant, and a user can only work around it by post-processing output.
Proposal
Per-code severity overrides alongside the allowlist #79 describes, keyed by diagnostic code (and optionally entity), never by message text. Ship a documented lenient profile that lists the parser rules whose findings don't change lowering. The default stays strict.
Re-ranked from P4 to P1 on a new measure of what this proposal decides.
#1226 keeps a security requirement naming a scheme the document does not hold, and leaves the finding an error, since the specification requires the name to correspond to a scheme. It gives that error a code of its own, openapi/unresolved-security-scheme, so an override can name exactly it, and nothing the IR lost goes with it. On the golden spec that code is now the only error:
The engine starts an emitter only on a run that has not failed (docs/architecture.md section 4), so reaching one on the golden spec takes --fail-on none today, which also passes any other error a later spec revision draws. A per-code override reaches it and keeps the gate for everything else, and Document.Auth gives an entity-keyed entry an ID to name (auth/unresolved/components/securitySchemes/<name>), which the allowlist in docs/architecture.md section 4 and #79 describes.
The proposal above speaks of parser findings that do not affect lowering. This finding does affect what an SDK does, and the IR states it, so the lenient profile should not be assumed to take it: which default a profile sets is a separate choice from being able to name the code.
Priority: P1, rule 5 (direct impact: a pipeline decision that decides whether the golden spec's document reaches an emitter, with --fail-on none as the workaround, so not P0). morphic compile openapi.json; echo $? → 1, with 9 error openapi/unresolved-security-scheme and no other error (spec @319dc756, morphic @1e6f323f).
Activity
OmarAlJarrah commentedon Nov 1, 2026
Re-ranked from P4 to P1 on a new measure of what this proposal decides.
#1226 keeps a security requirement naming a scheme the document does not hold, and leaves the finding an error, since the specification requires the name to correspond to a scheme. It gives that error a code of its own,
openapi/unresolved-security-scheme, so an override can name exactly it, and nothing the IR lost goes with it. On the golden spec that code is now the only error:The engine starts an emitter only on a run that has not failed (
docs/architecture.mdsection 4), so reaching one on the golden spec takes--fail-on nonetoday, which also passes any other error a later spec revision draws. A per-code override reaches it and keeps the gate for everything else, andDocument.Authgives an entity-keyed entry an ID to name (auth/unresolved/components/securitySchemes/<name>), which the allowlist indocs/architecture.mdsection 4 and #79 describes.The proposal above speaks of parser findings that do not affect lowering. This finding does affect what an SDK does, and the IR states it, so the lenient profile should not be assumed to take it: which default a profile sets is a separate choice from being able to name the code.
Priority: P1, rule 5 (direct impact: a pipeline decision that decides whether the golden spec's document reaches an emitter, with
--fail-on noneas the workaround, so not P0).morphic compile openapi.json; echo $?→ 1, with 9error openapi/unresolved-security-schemeand no other error (spec @319dc756, morphic @1e6f323f).