Skip to content

Read field_info per body param instead of assuming it to be all equal.#9410

Closed
jsg921019 wants to merge 2 commits into
fastapi:masterfrom
jsg921019:master
Closed

Read field_info per body param instead of assuming it to be all equal.#9410
jsg921019 wants to merge 2 commits into
fastapi:masterfrom
jsg921019:master

Conversation

@jsg921019

Copy link
Copy Markdown

fixes #9116

@github-actions

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 6185a92 at: https://643fe0d2fa9fcc0df5f30784--fastapi.netlify.app

@github-actions

Copy link
Copy Markdown
Contributor

📝 Docs preview for commit 38ac252 at: https://643fe3243ab0c51023852f41--fastapi.netlify.app

@alejsdev alejsdev added investigate p3 bug Something isn't working p2 and removed investigate p3 labels Jan 10, 2024
YuriiMotov

This comment was marked as outdated.

@YuriiMotov YuriiMotov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

After applying changes I mentioned I will be ready to approve this PR

def test_post_form_no_body():
response = client.post("/files/")
assert response.status_code == 422, response.text
assert response.json() == file_and_token_required

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This fails in current version of Pydantic.
Error message format was changed.
I world suggest removing this line (and in other tests with response.status_code == 422)

client = TestClient(app)

openapi_schema = {
"openapi": "3.0.2",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
"openapi": "3.0.2",
"openapi": "3.1.0",

Current version is 3.1.0

@thomasleveil

Copy link
Copy Markdown
Contributor

@jsg921019 I took the liberty to resubmit your fix in #11194 so that it includes the latest FastAPI changes

@github-actions

Copy link
Copy Markdown
Contributor

As this PR has been waiting for the original user for a while but seems to be inactive, it's now going to be closed. But if there's anyone interested, feel free to create a new PR.

@github-actions github-actions Bot closed this Jun 21, 2025
@YuriiMotov

Copy link
Copy Markdown
Member

@jsg921019, sorry, it was closed automatically.
We can re-open it if you are ready to continue working on it.
Thanks for your interest in FastAPI!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working p2 waiting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants