Skip to content

Fix OpenAPI GET schema for nested Pydantic models in Depends (#11037)#18

Open
LuminaX-alt wants to merge 1 commit intomasterfrom
LuminaX-alt-patch-18
Open

Fix OpenAPI GET schema for nested Pydantic models in Depends (#11037)#18
LuminaX-alt wants to merge 1 commit intomasterfrom
LuminaX-alt-patch-18

Conversation

@LuminaX-alt
Copy link
Copy Markdown
Owner

Fix: Avoid request body in GET when using nested Pydantic models with Depends

  • Prevents OpenAPI from requiring a body for GET when nested Pydantic models are used
  • Treats nested models as query parameters instead
  • Added regression test for nested Pydantic models with Depends

Fixes fastapi#11037

…#11037)

Fix: Avoid request body in GET when using nested Pydantic models with Depends

- Prevents OpenAPI from requiring a body for GET when nested Pydantic models are used
- Treats nested models as query parameters instead
- Added regression test for nested Pydantic models with Depends

Fixes fastapi#11037
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.

[BUG] Using Nested Pydantic models and params: MyModel = Depends() forces OpenAPI docs GET methods to require a request body.

1 participant