oatpp / oatpp-swagger

OpenApi 3.0.0 docs + Swagger UI for oatpp services
https://oatpp.io/
Apache License 2.0
90 stars 51 forks source link

Description for Fields using Enums not used in swagger documentation #56

Open PetFeld-ed opened 2 years ago

PetFeld-ed commented 2 years ago

When the info->description property is defined for a field of a DTO and the field is of type Enum<T> (or any specification like ::AsString) then the description is not shown in the generated swagger documentation.

This example

  DTO_FIELD_INFO(color) {
    info->description = "Color the object is displayed with";
  }
  DTO_FIELD(Enum<Color>::AsString , color);

results in this swagger documentation:

Color_String string
  Enum:[ red, green, blue ]

The expected output would be something like this:

Color the object is displayed with
Color_String string
  Enum:[ red, green, blue ]