Compiles the JSON schemas of a single OpenAPI operation into pre-resolved ExJsonSchema schemas
for use by Openapi.ValidatorPlug and Openapi.ResponseValidatorPlug.
This is called at route-generation time (from Openapi.Definition.phoenix_routes/1),
so the resulting schemas are embedded directly into each route's private.openapi
metadata at compile time.
For an operation, it extracts:
- The
requestBodyschema forapplication/jsoncontent - All
parametersentries with their schemas - The
responsesschemas per status code (forapplication/jsoncontent)
All $ref pointers (e.g. #/components/schemas/Pet) are resolved inline against the
full definition before being passed to ExJsonSchema.Schema.resolve/1, producing
self-contained, pre-resolved schemas with zero per-request overhead.
Summary
Functions
Compiles the request body, parameter, and response schemas of a single OpenAPI operation.