oatpp / oatpp-swagger

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

Inherited fields not visible in schema documentation #37

Closed sholmp closed 3 years ago

sholmp commented 3 years ago

When a DTO inherits from a parent DTO, the inherited fields are not visible in the generated swagger schema documentation. Is this intentional?

lganzzzo commented 3 years ago

Hey @sholmp ,

Please post your DTO declaration code.

I assume you just missed to inherit fields.

class MyChildDto : public MyParentDto {

  DTO_INIT(MyChildDto, MyParentDto /* Extends */) //<---- Don't miss this

}
sholmp commented 3 years ago

Yep you are right. I did exactly what you mentioned: inherited but did not DTO_INIT correctly... :smile:

lganzzzo commented 3 years ago

:) Ok, closing this issue then