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
feat: add optional Pydantic / JSON schema hooks for OpenAPI body #9
openapi_add_path produces a bare 200 with no content. Users expect application/json schemas for bodies.
Options
Python-only: at route time, pass optional body_model=MyPydanticModel to the decorator; Rust only stores a JSON Schema string generated in Python (model_json_schema()) in RouteEntry; merge into the OpenAPI document on freeze().
Rust-only: stay minimal. Prefer (1) to avoid reimplementing Pydantic in Rust.
Acceptance criteria
/openapi.json includes requestBody for at least one POST route.
Research
Pydantic v2 JSON schema $defs; size of inline vs $ref in OAS 3.0.3.
Context
openapi_add_pathproduces a bare200with nocontent. Users expectapplication/jsonschemas for bodies.Options
body_model=MyPydanticModelto the decorator; Rust only stores a JSON Schema string generated in Python (model_json_schema()) inRouteEntry; merge into the OpenAPI document onfreeze().Acceptance criteria
/openapi.jsonincludesrequestBodyfor at least one POST route.Research
$defs; size of inline vs$refin OAS 3.0.3.