[Feature request]: FlattenInheritanceHierarchy support in AspNetCore
sander1095 opened this issue · 0 comments
sander1095 commented
Is your feature request related to a specific problem? Or an existing feature?
My API models use inheritance but I do not want it to generate the base classes. It should just generate all the properties as part of the single class:
class A : B
{
public string Prop { get; set; }
}
class B
{
public string Prop2 {get;set;}
}
I know FlattenInheritanceHierarchy
exists, but this is only for generating your client with NSwag.
I use openapi-typescript
and this doesn't have such a feature. Therefore I'd like to be able to tell NSwag to not use inheritance in its model, something that Swashbuckle
also doesn't.
Describe the solution you'd like
I'd like the result to be an OpenAPI schema component that defines an entity A
with 2 properties: Prop
and Prop2
. Entity B
should not be defined in the OpenAPI document
Additional context
No response