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
Implement deprecated field in json schema #9298
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #9298 will not alter performanceComparing Summary
|
Please review |
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.
Nice work, as always! Just one minor change request, but looks great otherwise!
if hasattr(cls, '__deprecated__'): | ||
json_schema['deprecated'] = True | ||
|
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.
Just one thought here - we probably want to check if cls.__deprecated__
is True
or a str
, right? You can imagine a case where someone sets __deprecated__
to False
on a model and this would lead to unexpected behavior. We maybe also want to check for None
.
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.
Oops, meant to 'request changes'
Change Summary
Reflect model depreciation in json schema
Related issue number
Related to #8922
Checklist
Selected Reviewer: @Kludex