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
87 stars 33 forks source link

components.responses are not being take into account #240

Open konarskis opened 2 weeks ago

konarskis commented 2 weeks ago

Steps to reproduce

Use the provided snippet to generate something

Expected results

The generator can use the components.responses part which are referenced in paths.

Actual results

The responses are not take into account and the code is not able to parse the actual response.

Your OpenApi snippet

  responses:
    HttpErrorResponse:
      description: The request has failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DefaultError'

Code sample

No response

Logs

No response

Dart version and used packages versions

3.4.3 ```console dart run swagger_parser ```
1.8.0 ```console dart run swagger_parser ```