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
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
Structural error at components.schemas.IndicatorSearchRequest.properties.sorting.items
should NOT have additional properties
additionalProperty: prefixItems
Jump to line 6282
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:
additionalProperty: const
const
property is part of OpenAPI 3.1 specification.Invalid
type
value:type: 'null'
is supported part of OpenAPI 3.1.additionalProperty: prefixItems
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.