gibahjoe / openapi-generator-dart

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

Feature Request: info version #55

Closed mars3142 closed 2 years ago

mars3142 commented 3 years ago

My OpenAPI json does include a property info->version.

Is it possible to expose the info data within the generated classes? I need it to send it to my backend for frontend, so we can create a versioned API.

I would like to create a PR, if someone point me into the right direction, where I can add this.

gibahjoe commented 3 years ago

Hi, could you please elaborate on this?

mars3142 commented 3 years ago

We generate with OpenAPI a JSON and this is converted into dart classes. Within the JSON we see a property "version", which can be set by the JSON creators. But I can't find any reference to this field within the dart code. That's why I asked, if it's possible to generate an info object with that version (and other data).

For more information see https://swagger.io/specification/#info-object and because the version is required, it's save to include it into the generated classes.

gibahjoe commented 2 years ago

Hi, Please raise feature requests with the original author of the generator here