-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Way to denote inactive/beta endpoint? #432
Comments
There's only a way to denote an operation as deprecated, which is the post step, not the pre ;) |
Hmm, maybe it could be called |
There's no direct way to do that in the spec right now. Would you like to mark it as a feature request for future consideration? As a workaround for now, you can use your own vendor extension to specify that on an operation ( |
@webron yes, I think it's something that could make sense in the next version. I'll use an extension for now. |
a label as experimental is what I was looking for. Just for consideration. |
I would prefer either @webron Could you reopen this one? |
👍 to reopen and add this. This would be an extremely useful addition and IMO can be added in a backwards compatible way. |
We've adopted the MethodObject field |
@BelfordZ yeah, |
@bkabrda Just for clarification, what changes in generated code would you expect for a beta or unstable operation? An annotation, logging etc? |
@MikeRalphson what we do is quite opinionated - we do a downstream patch of openapi-generator templates that make the unstable operations raise exception unless they were explicitly enabled in the code that uses the generated client library. This is our mechanism of getting user consent on the fact that the unstable API might break. We also always log a warning when an unstable method is called (even when explicitly enabled). I think the right approach to unstable operations is debatable, but openapi-generator allows parametrizing how the templates are rendered and that would give us enough space to do different things based on options given during code generation. So given how strict you want to be with your generated client library, you might want to use annotations or logging or requiring explicit user consent - or a combination of these. |
Hi. Are there any plans for introducing this use case into the specification? As @MikeRalphson said the usage should be opinionated. For example, I would expect perhaps something like this in my swagger ui display to indicate that a particular version of the API is still |
I'd like to have the granularity to mark paths or fields in objects as experimental or beta. I don't expect it to impact the library but would be handy to highlight in documentation services. IMO would be useful to formalize x-beta -> beta or experimental |
I would prefer "experimental" as the term for unstable items (paths, operations, properties). |
I still want this feature, at the operation, parameter and schema level. Wherever In particular, we are using https://github.com/OpenAPITools/openapi-diff (somebody earlier in the thread mentioned swagger-brake which was its spiritual predecessor, I believe) and we would like it to skip alerting if an experimental operation has changed. |
Noting that I also found this thread because I am trying to work out how to mark something at experimental, so customers know that field/endpoint may mutate until we decide to support it long-term. |
For now, I will probably just document the endpoint as |
I have the exact same use case. For now, I'll attempt to use my custom |
This feature would be very helpful. Either a beta or experimental tag. |
I am also in need of a "beta" feature (we call it "under construction") |
Same here, we really need "Beta" tag for the new unstable endpoints. |
👍 Upvote for a beta/experimental tag! |
Experimental would also be helpful for us! We have a fully open-source app at https://transport.data.gouv.fr, and sometimes the internal APIs get gradually exposed on our SwaggerUI page (https://transport.data.gouv.fr/swaggerui), in which case we prefer to mark them explicitly as experimental/internal/unstable. This issue is closed, I wonder if something else would fit the bill! |
With OpenAPI 3.0 I just add tag |
It is a shame they keep closing this issue. |
"They" don't "keep closing" this issue. The issue was closed six years ago by the person who filed it. Why do people keep commenting on closed issues? BTW, a proposal for an If you want to discuss a different feature, open a new discussion or issue. Don't comment on closed ones that we don't monitor, except to lock them when people won't stop commenting on them. Which doesn't mean no one wants to talk about it, it just means that we don't recycle old issues that were correctly closed many years ago. |
Hoping there is/will be a way to define the endpoint using Swagger, but denote that it has not been released yet. Have people thought of this already and just made the responses error out?
The text was updated successfully, but these errors were encountered: