Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve enum error message #7506

Merged
merged 2 commits into from Sep 19, 2023
Merged

Improve enum error message #7506

merged 2 commits into from Sep 19, 2023

Conversation

hramezani
Copy link
Member

Fixes #7502

@cloudflare-pages
Copy link

cloudflare-pages bot commented Sep 19, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 18f3a46
Status: ✅  Deploy successful!
Preview URL: https://b95182a7.pydantic-docs2.pages.dev
Branch Preview URL: https://improve-enum-error-msg.pydantic-docs2.pages.dev

View logs

@jaap3
Copy link

jaap3 commented Sep 19, 2023

Thanks for the quick follow up, I was looking into patching this myself but you are much quicker 🙂.

Seems fastapi is checking against this error message. I had a similar test for our code based using pydantic 1, that's actually how I noticed that the formatting was off. Not sure that this failing test means the formatting cannot be changed?

@hramezani hramezani enabled auto-merge (squash) September 19, 2023 15:59
@hramezani hramezani merged commit 02f963c into main Sep 19, 2023
48 checks passed
@hramezani hramezani deleted the improve-enum-error-msg branch September 19, 2023 16:05
@hramezani
Copy link
Member Author

Thanks for the quick follow up, I was looking into patching this myself but you are much quicker 🙂.

Thanks for reporting this 🙏

Seems fastapi is checking against this error message. I had a similar test for our code based using pydantic 1, that's actually how I noticed that the formatting was off. Not sure that this failing test means the formatting cannot be changed?

Yes, I've created a PR on fastapi, So, it will fix the failing test after new release of Pydantic

@davidhewitt davidhewitt added the relnotes-fix Used for bugfixes. label Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
relnotes-fix Used for bugfixes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing spaces between enum members in ValidationError
3 participants