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
96 stars 43 forks source link

special case of dictionary type #124

Closed theoolee closed 11 months ago

theoolee commented 11 months ago

See this example:

{
  "definitions": {
    "Example": {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "description": "data",
          "allowEmptyValue": false,
          "additionalProperties": { "type": "object" }
        }
      }
    }
  }
}

"type": "object" inside additionalProperties can't be parsed.

theoolee commented 11 months ago

For dart, the data property should be parsed as Map<String, dynamic>.