oatpp / oatpp-swagger

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

Support example values on DTO level #55

Open PetFeld-ed opened 2 years ago

PetFeld-ed commented 2 years ago

Hello.

In the discussion of https://github.com/oatpp/oatpp-swagger/pull/36 is described how to document example values for endpoint responses or inputs.

The consequence of this approach is that when reusing the same DTO in different endpoints (or in request and response) you must copy/paste the examples for these DTOs. It would add convenience if it was possible to add example values to the DTO_FIELD_INFO. Those information could then be reused by the ENDPOINT_INFO automatically.

Kind regards.