-
Notifications
You must be signed in to change notification settings - Fork 9.1k
[Operation Object] - contain Deprecated field why isn't a [Schema Object] contain such #524
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
Comments
I don't really see the use case of deprecating models. APIs are driven by operations, and it makes sense that you may want to declare a given operation as deprecated. When would you end up deprecating a model without deprecating what uses it? |
I agree, but API's are not only driven by Operations, It is the Operations + Models put together. Models can potentially get shared across operations. My use-case was specifically around when the API's(Operations/Models/Models Properties) get's versioned. We should be able to deprecate just a field in a Model. That doesn't necessarily mean anything to the Operation. |
Okay, so you're not talking about deprecating the model, you're talking about deprecating the fields, and that can make sense. I want to say there's already a feature request for it, but can't find it right now. Marking this one as potential for the next version, thanks for the suggestion. |
It would certainly be helpful to be able to mark a parameter as deprecated (i.e. deprecate at a more granular level). |
Hi,
I was able to deprecate the operations using the deprecated field name from the Operation Object.
When I tried to deprecated the model/some fields/properties of a model. The Swagger Spec's Schema Object doesn't seem to have a way to accommodate it.
Any inputs will be helpful. I bumped into this issue on the Springfox project - springfox/springfox#1098
The text was updated successfully, but these errors were encountered: