swagger-ui
swagger-ui copied to clipboard
Validation Error: openapi: 3.1.0 Not Accepted by Swagger Editor
I used dependency
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.8.8</version>
</dependency>
from https://springdoc.org/
openapi: 3.1.0 is not supported
Error
Structural error at openapi
should match pattern "^3\.0\.\d(-.+)?$"
pattern: ^3\.0\.\d(-.+)?$
Jump to line 1
Environment
- Browser: Brave
- Search Engine: DuckDuckGo
- Tool: Swagger Editor (online at https://editor.swagger.io)
- OpenAPI Spec Version: 3.1.0
I recently ran into the same issue.
OpenAPI 3.1.0 is supported in the new swagger editor https://editor-next.swagger.io/ From https://swagger.io/blog/introducing-the-new-swagger-editor/
Looks like the existing editor will soon enter "maintenance mode", so consider switching to the new editor version (which supports OpenAPI 3.1+, as mentioned by @b-gutzmann).
Source: https://swagger.io/blog/swagger-editor-a-new-era-begins/