heldersepu / Swagger-Net

Seamlessly adds a swagger to WebApi projects!
BSD 3-Clause "New" or "Revised" License
144 stars 42 forks source link

Including types that are not used in the definition #101

Closed Steveiwonder closed 4 years ago

Steveiwonder commented 4 years ago

Heya,

How does one include a type that is not currently used, I have an enum which i'd like output in the swagger json but it's not in use on any models so it doesn't get included in the generate?

Thanks

S

heldersepu commented 4 years ago

Ye, look into IDocumentFilter here is an example: https://github.com/heldersepu/Swagger-Net-Test/blob/master/Swagger_Test/App_Start/SwaggerConfig.cs#L579