-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generated swagger/redoc page doesn't respect inherited descriptions #48982
Comments
This looks like a dupe of domaindrivendev/Swashbuckle.AspNetCore#2597. At the moment, we don't support generating OpenAPI descriptions from XML by default in the framework. We've got #39927 but this will have to be fixed in Swashbuckle.AspNetCore for now. The issue linked above seems to indicate that NSwag has the correct behavior here. Have you given that a try? |
I haven't yet tried out NSwag, but I'd prefer to use Swashbuckle.AspNetCore if possible, since NSwag seems to rely on Newtonsoft.Json. I'm trying to use |
Understandable. For now, I think it's best to file an issue on the Swashbuckle.AspNetCore repo since the fix will need to be made there. |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Hi all, We've outlined our future plans for the OpenAPI area in ASP.NET Core in this announcement issue. Moving forward, we're hoping to add OpenAPI document generation support as a first-class feature in ASP.NET Core and eventually add support for XML doc comments as outlined above. With this in mind, I'm going to close this issue and use the existing XML issue to track work in this area. |
Discussed in #48978
Originally posted by @senketsu03 June 23, 2023
Consider writing an
abstract class
/interface
and adding summary to a method like so:Implementing it method with all needed attributes works as expected, but the docs are not visible on swagger/redoc pages, even when
<inheritdoc/>
is added.I've also tried experimenting with writing sharable API in form of library/nuget package. Let's say it has a complete controller in this library:
Then, referencing this library from
webapi
server will show all referenced controllers and methods on a swagger page, but again -- they lack documentationThe text was updated successfully, but these errors were encountered: