domaindrivendev / Swashbuckle.AspNetCore

Swagger tools for documenting API's built on ASP.NET Core
MIT License
5.18k stars 1.28k forks source link

Generic base classes #1981

Closed qsdfplkj closed 5 days ago

qsdfplkj commented 3 years ago

When I have

public class Base
{
    public int BaseProperty { get; set; }
}

public class Generic<T> : Base
{
    public T GenericProperty { get; set; }
}

public class Final : Generic<int>
{
    public int FinalProperty { get; set; }
}

The generated swagger.json doesn't have a reference to Base. After enabling 'UseAllOfForInheritance' it still doesn't work? When I takeout either the Base class or Generic in both cases it works fine. But the combined case as presented above doesn't work.

Now when I use NSwag studio to generate a client the Final class no longer derives from the base class.

MikeFH commented 3 years ago

I would like to work on that if it's ok.

github-actions[bot] commented 3 weeks ago

This issue is stale because it has been open for 60 days with no activity. It will be automatically closed in 14 days if no further updates are made.

github-actions[bot] commented 5 days ago

This issue was closed because it has been inactive for 14 days since being marked as stale.