Skip to content

About

Swashbuckle adapter to generate Open Api responses to action that returns HttpResults type

Resources

Stars

13 stars

Watchers

2 watching

Forks

Latest commit

 

History

20 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vernou.Swashbuckle.HttpResultsAdapter

Vernou.Swashbuckle.HttpResultsAdapter is a NuGet package that extend Swashbuckle.AspNetCore to generate Open Api responses to action that returns type from the namespace Microsoft.AspNetCore.Http.HttpResult.

Why?

.NET 7 introduce Typed Http Results, but Swashbuckle don't generate the Open Api Response from this types.\

See this issue for more detail :
TypedResults metadata are not inferred for API Controllers

Getting started

Install the package Vernou.Swashbuckle.HttpResultsAdapter :

dotnet add package Vernou.Swashbuckle.HttpResultsAdapter

Add the operation filter like :

builder.Services
    .AddSwaggerGen(options =>
    {
        ...
        options.OperationFilter<HttpResultsOperationFilter>();
    });

Enjoy convenient Typed Http Results.

Contributing

This project welcomes contributions and suggestions.

License

Vernou.Swashbuckle.HttpResultsAdapter is licensed under the MIT license.

About

Swashbuckle adapter to generate Open Api responses to action that returns HttpResults type

Resources

Stars

13 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages