Pure-julia OpenAPI internals rewrite - #103
Open
quinnj wants to merge 2 commits into
Open
Conversation
Replace the legacy generated-client and server implementation with the normalized OpenAPI 3.0, 3.1, and 3.2 pipeline. Keep the provisional JSON Schema engine isolated inside OpenAPI. Generate clients against that engine until its API is ready to move upstream. Keep HTTP optional through an extension. Leave server framework integration to downstream packages such as Servo. Add adversarial, conformance, external-corpus, runtime HTTP, and JuliaC trim-compilation coverage. BREAKING CHANGE: The legacy OpenAPI 0.2 API is replaced by the namespaced document and client-generation API.
Add OpenAPI.serverplan and OpenAPI.server(source; framework, name, path), mirroring the plan/client pipeline. Split the generated runtime into a direction-agnostic common segment plus client and server segments; the server segment adds the inverse codecs (path/query/cookie style decoders, form-urlencoded and multipart/form-data request readers, and a descriptor-driven response encoder) with request-direction schema validation and structured 400/415 error responses. Framework glue is dispatched through the new OpenAPI.server_source extension seam: OpenAPIHTTPExt emits HTTP.Router modules whose register!(router, impl; path_prefix, middleware) entry point and handler contract match the shape OpenAPI.jl 0.2.x julia-server users implement stubs against (register alias included). Server planning rejects what cannot be decoded faithfully: non-form-data multipart request bodies and operations with more than one exploded object query or cookie parameter. Parameter descriptors gain a shape field and media descriptors a fields element so single-valued exploded arrays decode as arrays; header scalar error messages are direction-neutral now that both directions share them. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Replace the legacy generated-client and server implementation with the normalized OpenAPI 3.0, 3.1, and 3.2 pipeline.
Keep the provisional JSON Schema engine isolated inside OpenAPI. Generate clients against that engine until its API is ready to move upstream.
Keep HTTP optional through an extension. Leave server framework integration to downstream packages such as Servo.
Add adversarial, conformance, external-corpus, runtime HTTP, and JuliaC trim-compilation coverage.
BREAKING CHANGE: The legacy OpenAPI 0.2 API is replaced by the namespaced document and client-generation API.