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

Support mark field deprecated #415

Closed
elonzh opened this issue Jun 2, 2021 · 5 comments
Closed

Support mark field deprecated #415

elonzh opened this issue Jun 2, 2021 · 5 comments
Labels
enhancement New feature or request fix confirmation pending issue has been fixed and confirmation from issue reporter is pending

Comments

@elonzh
Copy link

elonzh commented Jun 2, 2021

See https://spec.openapis.org/oas/v3.1.0#parameter-object

@tfranzel
Copy link
Owner

tfranzel commented Jun 2, 2021

parameter:

deprecated: bool = False,

operation:

deprecated: Optional[bool] = None,

however it looks like we are missing a way to mark a field as deprecated.

@elonzh
Copy link
Author

elonzh commented Jun 2, 2021

Yep, marking a field as deprecated is just what I need. 🤣

@tfranzel tfranzel changed the title Support mark parameter or field deprecated Support mark field deprecated Jun 2, 2021
@tfranzel tfranzel added the enhancement New feature or request label Jun 2, 2021
tfranzel added a commit that referenced this issue Jun 10, 2021
@tfranzel tfranzel added the fix confirmation pending issue has been fixed and confirmation from issue reporter is pending label Jun 10, 2021
@tfranzel
Copy link
Owner

closing this issue for now. feel free to comment if anything is missing or not working and we will follow-up.

@marianhlavac
Copy link

feel free to comment if anything is missing or not working and we will follow-up.

Documenting this feature would be nice. Haven't found any resource on how to use this, apart from reading the commit diff.

@tfranzel
Copy link
Owner

tfranzel commented Apr 9, 2023

it is documented here: https://drf-spectacular.readthedocs.io/en/latest/drf_spectacular.html#drf_spectacular.utils.extend_schema_serializer

Other than that, is is difficult to document every single feature in spectacular with an example. I would count that one as one of the self-documenting ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fix confirmation pending issue has been fixed and confirmation from issue reporter is pending
Projects
None yet
Development

No branches or pull requests

3 participants