-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add vendor extension support for API lifecycle annotations #1399
Comments
In a similar vein, I think it would be great to have a unified way to mark fields and endpoints as deprecated. |
related issues on the OpenAPI specification: |
I know this is already supported as you can see here when an endpoint is deprecated. http://redocly.github.io/redoc/#operation/findPetsByTags This is somewhat how I got my inspiration. |
Ha! I didn't realize that deprecation was already supported. Thanks for pointing it out. |
@RomanHotsiy Thoughts on this? We would like to get started as soon as we can. |
I'm not sure about this one @JSSAggie -- it seems like we may want more of a lifecycle standard? When I read the above, I wonder, why is this limited to lifecycle. What if I wanted other badges?
I feel like it's prescribing a use for some functionality which is not necessarily limited to that. If the x-lifecycleAnnotation was some kind of standard that was used by API gateways, etc... I think it would make more sense to leave it as it is. Thoughts? |
@JSSAggie I find your proposal to be too narrow and too specific for redoc. I was considering closing this issue as out of scope. But I agree with @adamaltman. It may work if we change it to something more generic like What do you think? |
@RomanHotsiy that was the reason for me posting here is because we want to build something that makes sense for everyone to benefit from. @adamaltman I am totally on-board with the name change if we think it makes it more generic. Do we think that having a setup section is needed or should we define all the badge information within each operation? I thought the setup solution will make it less verbose but not sure how open the team is to having more vendor extentions. We could also not required the setup section and just use defaults if nothing is defined. |
I like the global setup especially if you can define a description that appears when you hover over the badge. For my use case, I want to define the lifecycle per operation, per parameter or per body property. In the case of the deprecated status I want to provide additional data such as the deprecation date and suggested migration path. That is more specific than I would expect ReDoc to provide but I'll put it out there. |
I would like to +1 badge. There are some attributes and endpoints in our internal API docs which I would like to document as being something not ever intended to publicly document (e.g., identifiers which will never be useful because they are references used by systems we never intend on opening up, but we still want them in our internal docs). The "Deprecated" badge, but with control over the color and text is all I actually need, and |
+1 for Having a badge be a combination of simply a text and color seems like it would cover things in a generic way. My requirement would be met by having the badge applied at the operation level. Also, just thinking out loud -- I don't have a critical need for multiple badges for an operation, but would definitely be able to put that to use if an |
Created a draft PR for review if anyone is open: #1947 Went with Thoughts? (mentioning @RomanHotsiy directly as you seemed open to the idea of |
bump @RomanHotsiy or @adamaltman -- looking for input on the approach in this draft PR |
We use redoc for our internal developer portal as well as our external public-facing developer portal. We have a need to display additional information about the lifecycle of an API. We could always add that information in the description but we want more. We want something more visible and called out. I am referring to calling them out as annotations.
There are a few ways we can go about this.
The result would be something like the image below. Ignore the mock as we were just hacking around to show an example:
I prefer option 1 but it does include two different vendor extensions. We would also like to build something that we can give back to the rest of the community. What are people's thoughts on this and how can we tailor it to meet a more general need?
My team will contribute to this effort but I want to make sure there is a desire to support this type of vendor extension in redoc.
The text was updated successfully, but these errors were encountered: