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 OpenAPI 3.0 not supported #1160

Open
udgover opened this issue Oct 30, 2024 · 0 comments
Open

Swagger OpenAPI 3.0 not supported #1160

udgover opened this issue Oct 30, 2024 · 0 comments

Comments

@udgover
Copy link
Collaborator

udgover commented Oct 30, 2024

Description

OpenAPI specs served by FastAPI is not handled by Swagger 3.0 used to generate client in targeted language.

Steps to Reproduce

Download http://yeti_host/openapi.json and load it in Swagger online editor. Notice the different errors after loading.

Identified errors

OpenAPI version:

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

additionalProperty: const

Structural error at components.schemas.Certificate-Output.properties.type
should NOT have additional properties
additionalProperty: const
Jump to line 3340

const property is part of OpenAPI 3.1 specification.

Invalid type value:

Structural error at paths./api/v2/tasks/{task_name}/run.post.requestBody.content.application/json.schema.anyOf.1.type
should be equal to one of the allowed values
allowedValues: array, boolean, integer, number, object, string
Jump to line 1595

type: 'null' is supported part of OpenAPI 3.1.

additionalProperty: prefixItems

Structural error at components.schemas.IndicatorSearchRequest.properties.sorting.items
should NOT have additional properties
additionalProperty: prefixItems
Jump to line 6282

prefixItems property is part of OpenAPI >=3.1 specification

Fix

We must mention in the documentation that OpenAPI versions prior to 3.1 are not supported.

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

No branches or pull requests

1 participant