Skip to content

[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

Closed
rajeshkamal5050 opened this issue Dec 15, 2015 · 5 comments

Comments

@rajeshkamal5050
Copy link

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

@webron
Copy link
Member

webron commented Dec 15, 2015

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?

@rajeshkamal5050
Copy link
Author

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.
-- Deprecating an Operation doesn't necessarily have to mean that it's associated Model should also get deprecated. The Model could very well be used/referenced in another Operation.
-- I might not be interested in deprecating an Operation, but I would want to deprecate just some properties/fields of a Model alone.

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.

@webron
Copy link
Member

webron commented Dec 15, 2015

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.

@MikeRalphson
Copy link
Member

It would certainly be helpful to be able to mark a parameter as deprecated (i.e. deprecate at a more granular level).

@fehguy
Copy link
Contributor

fehguy commented Mar 1, 2016

Parent issues #560, #579

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants