0

I am looking into using the Swashbuckle.AspNetCore v4.0.1 NuGet package in my ASP.Net Core project to generate a SwaggerUI documentation endpoint for my web API that will be used by various teams internal to my company. My API consumes and emits a handful of message bus events and commands that I'd like to include as part of that documentation.

Are there any custom settings in Swashbuckle's middleware that would allow me to document input/output objects not associated with API endpoints?

Ryan Renne
  • 91
  • 5

1 Answers1

0

That the endpoint emits a a service bus event is an internal implementation detail and should not need to be documented.

If you want to provide documentation for an endpoint you can write XML documentation and configure Swashbuckle to expose that documentation using the IncludeXmlComments method.

Microsoft explains how to configure Swagger this way in their Get started with Swashbuckle and ASP.NET Core article.

Fred
  • 12,086
  • 7
  • 60
  • 83
  • Using Swashbuckle/Swagger for API documentation is quite straightforward and not the topic of this question. We have a number of teams that need to communicate their message bus events and a tool that could generate documentation of these events would be very helpful, even internally. – Ryan Renne Nov 05 '19 at 04:12
  • You can customize the `index.html` file using the `IndexStream`. https://github.com/domaindrivendev/Swashbuckle.AspNetCore#customize-indexhtml – Fred Nov 05 '19 at 09:27