Carapacik / swagger_parser

Dart package that takes an OpenApi definition file and generates REST clients based on retrofit and data classes for your project.
https://pub.dev/packages/swagger_parser
MIT License
94 stars 43 forks source link

nullable Array not generated correctly #43

Closed ankiimation closed 1 year ago

ankiimation commented 1 year ago

Example

 {
   "orderItems": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/OrderItem"
            },
            "nullable": true
          }
}

Expect

MyModel({
    required List<OrderItem>? orderItems,
  })

Actual

MyModel({
    required List<OrderItem> orderItems, // it lost the '?' operator
  })