Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated server handlers can now return
OpenAPI.Reply(status, body)to choose a documented status while retaining schema validation and encoding. This supports distinct typed 200/202 results, typed errors, and multiple statuses sharing one body type. Exact status takes precedence over a range and thendefault; undocumented statuses fail with a clear operation/status error. Plain results and rawHTTP.Responsereturns retain their existing behavior.Compatibility: the shared generated-code contract advances from 3 to 4. All stored clients and servers must be regenerated, including applications that do not use
Reply. The existing exact contract guard rejects mixed versions with a regeneration message.Replyaccepts final HTTP statuses 200–599 in both constructor forms. It adds no exports, dependencies, or header overrides. Generated handler comments now describe the return behavior instead of advertising a misleading union of every documented body type. A schema namedReplystill works because the wrapper is referenced throughOpenAPI.Reply.Validation:
Replyconstruction passes actual JuliaC--trim=safecompile/run on 1.12 and 1.13 with runtime code generation disabled. A separate native selector control passes exact/range/default cases. Full generated response encoding remains outside this proof: the same bounded fixture reports 153 verifier errors on unchanged main, patched plain returns, and patched explicit replies.Hosted CI is green on the published head: minimum/current Julia, the full OpenAPI corpus, and documentation (four jobs).
Fixes #119.
Co-authored by Codex