gibahjoe / openapi-generator-dart

Openapi Generator for Dart/Flutter
BSD 3-Clause "New" or "Revised" License
128 stars 34 forks source link

Object as query parameter #62

Closed jpunz closed 3 years ago

jpunz commented 3 years ago

Hi,

just found an issue when using an Object as Query-Parameter. When using e.g. swagger-codegen (Java), it's possible to do the following:

/xyz:
    get:
      parameters:
      - in: query
        required: false
        name: someBoolean
        schema:
          type: boolean
      - in: query
        name: someObject
        required: false
        schema:
          $ref: '#/components/schemas/SomeObjectDto'

In this case e.g. Swagger uses all properties of SomeObjectDto as Query Parameter.

In your lib the toString-Method of each Object is used as query parameter. E.g.:

@override
String toString() => 'SomeObjectDto[propA=$propA, propB=$propB]';

I think this should get corrected :)

Regards, Jürgen

gibahjoe commented 3 years ago

Hi @jpunz , Thank you for reaching out. However, this library is a wrapper around the dart implementation of the generator by OpenApiTools. You can raise with them here for better support.