oatpp-swagger icon indicating copy to clipboard operation
oatpp-swagger copied to clipboard

Description for Fields using Enums not used in swagger documentation

Open PetFeld-ed opened this issue 3 years ago • 0 comments

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 ]

PetFeld-ed avatar Jan 28 '22 11:01 PetFeld-ed