openapi-generator-dart
openapi-generator-dart copied to clipboard
Broken generated code location_inner
HI base example of fastapi example generate broken code
api/lib/model/location_inner.dart
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
get: ^4.6.3
openapi_generator_annotations: ^4.0.0
BackendAPI:
path: 'api'
dev_dependencies:
flutter_test:
sdk: flutter
openapi_generator: ^4.0.0
build_runner: ^2.1.7
minimal schema example
{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/hello/{name}":{"get":{"summary":"Say Hello","operationId":"say_hello_hello__name__get","parameters":[{"required":true,"schema":{"title":"Name","type":"string"},"name":"name","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}