Skip to content
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

Swagger Editor show Structural error at openapi for 3.1.0 #4798

Closed
Spenhouet opened this issue Feb 5, 2024 · 6 comments
Closed

Swagger Editor show Structural error at openapi for 3.1.0 #4798

Spenhouet opened this issue Feb 5, 2024 · 6 comments
Labels

Comments

@Spenhouet
Copy link

Q&A (please complete the following information)

  • Swagger-Editor version: Unknown
  • Swagger/OpenAPI version: 3.1.0

Content & configuration

My Swagger/OpenAPI definition contains the version 3.1.0 as openapi version:

{
    "openapi": "3.1.0",
    "paths": {},
    "info": {
      "title": "Bug Report",
      "version": "1.0.0"
    },
}

Describe the bug you're encountering

When opened in https://editor.swagger.io/, it shows the error:

Structural error at openapi
should match pattern "^3\.0\.\d(-.+)?$"
pattern: ^3\.0\.\d(-.+)?$
Jump to line 2

Expected behavior

Using version 3.1.0 should not yield any validation error.

Screenshots

image

@JonhyOliveira
Copy link

I'm having the same issue. I wouldn't mind opening up a fix for this, as it looks like a fairly simple one.

@hbirkdale
Copy link

Same issue here

@frankkilcommins
Copy link
Contributor

The current version of SwaggerEditor (v4) deployed to https://editor.swagger.io does not support OAS 3.1. If you're looking for 3.1 support, then please utilize SwaggerEditor (v5) which is deployed to https://editor-next.swagger.io/

@Spenhouet
Copy link
Author

@frankkilcommins as far as I can see, https://editor-next.swagger.io/ does not support URL parameters, which is crucial, hence the reliance on https://editor.swagger.io.

@frankkilcommins
Copy link
Contributor

@Spenhouet nice spot. Thanks! We've created #4806 for that specific issue.

Note: Only SwaggerEditor@5 supports OpenAPI 3.1.0. SwaggerEditor@4 will not receive OpenAPI 3.1.0 support and is considered legacy at this point. The plan is to continually migrate fully to SwaggerEditor@5 and deprecate the SwaggerEditor@4 in the future, meaning that v5 will eventually be what's deployed to https://editor.swagger.io.

I'll close this issue as a result and we can track support of the URL query param via #4806

@martinbonnin
Copy link

The current version of SwaggerEditor (v4) deployed to https://editor.swagger.io does not support OAS 3.1. If you're looking for 3.1 support, then please utilize SwaggerEditor (v5) which is deployed to https://editor-next.swagger.io/

Isn't 3.1.0 the latest stable version though? Could the logic be updated?

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

No branches or pull requests

5 participants