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
100 stars 47 forks source link

Bug: Codegen of multiple level embedded object is not working #74

Closed JasCodes closed 1 year ago

JasCodes commented 1 year ago

@Carapacik

Please find codegen on left and the schema on the right.

2023-09-12_09-44

Carapacik commented 1 year ago

Could you attach a part of the swagger json schema

JasCodes commented 1 year ago

components -> schema

"DashboardResponse": {
        "type": "object",
        "properties": {
          "exams": {
            "type": "number"
          },
          "homeworks": {
            "type": "number"
          },
          "feedbacks": {
            "type": "number"
          },
          "timetable": {
            "type": "number"
          },
          "calendar": {
            "type": "object",
            "properties": {
              "events": {
                "required": true,
                "type": "number"
              },
              "classes": {
                "required": true,
                "type": "number"
              }
            }
          },
          "recordClasses": {
            "type": "object",
            "properties": {
              "live": {
                "required": true,
                "type": "number"
              },
              "record": {
                "required": true,
                "type": "number"
              }
            }
          },
          "school": {
            "$ref": "#/components/schemas/SchoolResponse"
          }
        },
        "required": [
          "exams",
          "homeworks",
          "feedbacks",
          "timetable",
          "calendar",
          "recordClasses",
          "school"
        ]
      }