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
✨ Do not allow duplicate tag names in the OpenAPI metadata (OpenAPI object) #5553
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5553 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 540 541 +1
Lines 13969 13963 -6
=========================================
- Hits 13969 13963 -6 ☔ View full report in Codecov by Sentry. |
📝 Docs preview for commit e3a9696 at: https://635baffd10db8521b195f853--fastapi.netlify.app |
Failing because of an issue already addressed in PR #5547 |
fastapi/openapi/models.py
Outdated
@@ -400,6 +400,14 @@ class OpenAPI(BaseModel): | |||
class Config: | |||
extra = "allow" | |||
|
|||
@validator("tags") | |||
def check_foo(cls, v): # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add descriptive names? Ref: https://google.github.io/styleguide/pyguide.html#316-naming
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about that, that was a lazy copy-paste error from the pydantic docs :) fixed
Nice catch @aradipe ! Thanks for creating a PR for it! |
Addresses issue tiangolo#5552
e3a9696
to
f7c318c
Compare
📝 Docs preview for commit f7c318c at: https://635c3a0a12f8e340e6979ffe--fastapi.netlify.app |
📝 Docs preview for commit 68dd7f6 at: https://635ff79a0ea6b9005760c57a--fastapi.netlify.app |
📝 Docs preview for commit 4b4f6ab at: https://639cc80bb5df5c0d4c670358--fastapi.netlify.app |
📝 Docs preview for commit 68dba62 at: https://6456a319e9789a56b7fa4f50--fastapi.netlify.app |
Addresses issue #5552