Open juliansteenbakker opened 6 months ago
I tried the fixes and it mostly works, except on nullable lists.
I updated my project's pubspec.yaml
entry for swagger_dart_code_generator to
# swagger_dart_code_generator: ^2.15.2
swagger_dart_code_generator:
git:
url: https://github.com/juliansteenbakker/swagger-dart-code-generator.git
ref: openapi-3.1-fix
And I was able to build the client library without error for resources that had a list of types that included null
, like:
...
"account": {
"type": [
"string",
"null"
],
"format": "iri-reference",
"example": "https://example.com/"
},
...
This got rid of the "type 'List
I'm having some issues using the generated json to generate API endpoint for Flutter using the this package. It seems to fail on the notation for nullable types.
It seems as if the following notation for a nullable value (expires_at) which is valid in the openAPI 3.1 editor, is not being generated correctly.
when i change the type to
type: string
, everything works as expected error:Swagger specification link 3.1.0
Library version used: 2.15.2