-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Support for OpenAPI Specification 3.1.0 #2638
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
Comments
Now, OpenAPI Specification 3.1.0 support Security Scheme Object type mutualTLS |
Very awaited feature, to be able to use 3.1 features like comments on "$ref", null values (mentioned here) ... etc |
For reference, 3.1.0 was released 7 months ago (Feb 2021). |
FYI: it's in the short term roadmap but that's for Swagger Core and Swagger Parser It seems release 4.x.x of the UI is also preparing for OpenApi 3.1
More information can be found here: https://swagger.io/blog/api-design/what%E2%80%99s-ahead-for-swaggerui-v4-and-swaggereditor-v4/ Github release tag: https://github.com/swagger-api/swagger-editor/releases/tag/v4.0.0-rc.0 |
I just tried V4 and it still balks at OpenAPI 3.1 documents. |
Any update? |
Poke 🙏🏼 |
This is preventing up from moving to 3.1 as well, and there is a nice feature with postman that will allow importing of 3.1 openapi directly therefore we won't need to maintain both sets of api docs anymore, hope this can get finished soon, thanks for all you do! |
Hi folks, here's a general update on the work towards OpenAPI 3.1 support across the tool suite: |
I am a bit confused. The swagger editor still doesn't support 3.1 but there's an editor at https://editor-next.swagger.io/ which apparently does support 3.1 but I checked the |
Hi @jashanbhullar, SwaggerEditor is now released under two major release channels:
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 future.
We would need more information. What particular about the keyword doesn't work? The linting, rendering or other? What is the definition you used? |
For type number you can select the bounds by using By using While with Same behaviour is observed in swagger 3.0 and in the editor https://editor.swagger.io/ so I guess this has always been there. The syntax of Check the spec below openapi: 3.1.0
info:
title: FastAPI
version: 0.1.0
paths:
/:
get:
summary: Read Root
operationId: read_root__get
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
/number-with-no-equal:
get:
summary: Read Item
operationId: read_item_number_with_no_equal_get
parameters:
- name: num
in: query
required: true
schema:
type: integer
exclusiveMaximum: 100
exclusiveMinimum: 0
description: Enter a number between 0 and 100
title: Num
description: Enter a number between 0 and 100
example: 1
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
properties:
detail:
items:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
type: array
title: Detail
type: object
title: HTTPValidationError
/number-with-equal:
get:
summary: Read Item
operationId: read_item_number_with_equal_get
parameters:
- name: num
in: query
required: true
schema:
type: integer
maximum: 100
minimum: 0
description: Enter a number between 0 and 100
title: Num
description: Enter a number between 0 and 100
example: 1
responses:
'200':
description: Successful Response
content:
application/json:
schema: {}
'422':
description: Validation Error
content:
application/json:
schema:
properties:
detail:
items:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
type: array
title: Detail
type: object
title: HTTPValidationError
components:
schemas:
HTTPValidationError:
properties:
detail:
items:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
type: array
title: Detail
type: object
title: HTTPValidationError
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError |
@jashanbhullar thanks for clarification. You're steps of reproduction have been extracted into separate issue: swagger-api/swagger-ui#9134. Simply said, SwaggerUI contains JSON Schema Draft 4/5 related primitive value validation. This validation needs to take into account that in OpenAPI 3.1.0 the used schema version is JSON Schema 2020-12. |
@jashanbhullar hopefully I've removed the v4 vs v5 confusion in #4367. |
Closing this issue. The OpenAPI 3.1.0 support landed in SwaggerEditor@5. More info in #2638 (comment) |
I think this is the old editor |
Here is an excerpt from the main https://github.com/swagger-api/swagger-editor/blob/master/README.md |
Uh oh!
There was an error while loading. Please reload this page.
Hi, some time back OpenAPI Specification 3.1.0 was released which supports JsonSchema
2020-12
Draft by default.Would be great if support could be provided for this.
There are some major changes like null in type
The text was updated successfully, but these errors were encountered: