Skip to content

feat: OpenAPI requestBody from Pydantic body_model (issue #9) - #34

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue-9-openapi-body-schema
Apr 26, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
issue-9-openapi-body-schema

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Summary

  • App.post / put / patch accept optional body_model= (Pydantic v2 BaseModel); JSON Schema is embedded in the built OpenAPI under requestBody.content.application/json.schema.
  • Rust: body_schema_json on add_route, parse and merge in openapi_add_path.
  • pydantic>=2 in [project.optional-dependencies] dev; test with importorskip.
  • docs/openapi.md + uv.lock updated.

Closes #9

- Python: body_model with model_json_schema JSON string to Rust
- openapi_add_path merges application/json schema; add_route body_schema_json
- dev dep pydantic>=2; test + docs

Closes #9

@ZhuchkaTriplesix ZhuchkaTriplesix left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

123

@ZhuchkaTriplesix ZhuchkaTriplesix self-assigned this Apr 26, 2026
@ZhuchkaTriplesix ZhuchkaTriplesix linked an issue Apr 26, 2026 that may be closed by this pull request
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 4a1a162 into dev Apr 26, 2026
16 checks passed
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue-9-openapi-body-schema branch April 26, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add optional Pydantic / JSON schema hooks for OpenAPI body

1 participant