OpenAPITools / openapi-generator

OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
https://openapi-generator.tech
Apache License 2.0
21.58k stars 6.52k forks source link

[REQ] openapi 3.1.0 support? #8987

Open davidmoten opened 3 years ago

davidmoten commented 3 years ago

I see OpenApi spec 3.1.0 has been out since mid-2020. Does this project support that version? If it does perhaps update the README.md to indicate that because it only mentions support for 3.0.

jaumard commented 3 years ago

Would be nice to support that new version http://spec.openapis.org/oas/v3.1.0

For example the multipart considerations are quite useful http://spec.openapis.org/oas/v3.1.0#special-considerations-for-multipart-content

tymonx commented 2 years ago

After setting the openapi field to 3.1.0 value in my OpenAPI YAML file I got an error from the openapi-generator-cli command:

[main] ERROR i.s.parser.SwaggerCompatConverter - failed to read resource listing
com.fasterxml.jackson.core.JsonParseException: Unexpected character ('#' (code 35)): expected a valid value (JSON String, Number, Array, Object or token 'null', 'true' or 'false')
 at [Source: (String)"

It seems that it tries to parse provided API specification using JSON parser even if I provide openapi.yml or openapi.yaml. Setting the openapi field to 3.0.x works. I have tested it with version 5.3.0.