-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
[plugin-api-docs] Support OpenAPI 3.1 #8090
Comments
Makes sense! Is this something you might be able to work on? |
I see that we depend on |
Yep, would make sense to update to the latest stable release, regardless of whether we get support for 3.1. Opening that up to contributions in case anyone wants to beat us to it 😁 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
So, Hey - since it'd be rather important to me (and the company) to get some movement on the OAS 3.1 front going, I've spent some time looking into this. The news is a bit bleak though:
This unfortunately means either one of two things:
Anyway, this issue therefore should probably no be a good first contribution 😉. Cheers ❤️ |
(I also should've realized that @johanneswuerbach mentioned most of this in the original issue description, mea culpa 🤦) |
In an effort to provide a tiny bit more substance, here is a branch where I switched out The result needs styling, obviously, but works rather nice, even with OAS 3.1: Note of course that the spotify example is OAS 3.0.1, to test this out, I switched the OAS for the petstore to a OAS 3.1 version. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still relevant 👍 |
Is anyone looking into this? |
not actively, as I don't really have time myself. Switching out the OpenAPI Explorer is easy, but I am no CSS magician, so it'd look like 💩. |
…aggerUI with openapi-explorer Signed-off-by: Brian McManus <bmcmanus@gmail.com>
…aggerUI with openapi-explorer Signed-off-by: Brian McManus <bmcmanus@gmail.com>
Personal opinion: Tests in Backstage are intended for React components making openapi-explorer hard to test since it is a 'Lit' component (Google.) I was able to integrate it and make it look good but I was unable to fiddle with it enough to get all tests passing. Swagger.io intends to have OpenAPI3.1 compatibility in swagger-ui this Quarter. I think we should wait a few weeks and implement the upcoming version of swagger-ui. https://swagger.io/blog/swagger-support-for-openapi-3-0-and-openapi-3-1/
|
My implementation is here if anyone would like to do something with it: backstage/plugins/api-docs/src/components/OpenApiDefinitionWidget/OpenApiDefinition.tsx Line 27 in 88443dc
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
nudging to appease the stalebot |
FYI: swagger-ui v5.0.0 was released 2h ago.
|
Bump dependency `swagger-ui-react` to v5.0.0 which includes support for OpenAPI Specification (OAS) v3.1.0. `@types/swagger-ui-react` v4.18.0 seems still compatible. Closes: backstage#8090 Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
In case you didn't see it yet, the linked PR will resolve this issue. It contains two 3.1.0 examples as well. A release of the type package was not necessary, they are still compatible. If reviews go through, it should be part of next week's main release. |
Feature Suggestion
Support rendering
openapi: 3.1.x
API definitions in Backstage. OpenAPI 3.1.0 was released as stable in the beginning of the year.Possible Implementation
This likely depends on swagger-ui supporting OpenAPI 3.1, which it doesn't yet swagger-api/swagger-ui#5891, but it might be a good preparation to update to swagger-ui v4 already as only v4 will get OpenAPI 3.1 support.
Context
Current backstage view when looking at an OpenAPI 3.1 schema:
The text was updated successfully, but these errors were encountered: