https://github.com/simplifynet/simplify.web.swagger
Swagger generation for Simplify.Web web-framework controllers
https://github.com/simplifynet/simplify.web.swagger
c-sharp c-sharp-library dotnet-core dotnetcore simplify simplify-web swagger
Last synced: 2 months ago
JSON representation
Swagger generation for Simplify.Web web-framework controllers
- Host: GitHub
- URL: https://github.com/simplifynet/simplify.web.swagger
- Owner: SimplifyNet
- License: lgpl-3.0
- Created: 2020-01-29T17:01:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-05T16:01:51.000Z (about 1 year ago)
- Last Synced: 2025-02-08T10:21:14.582Z (4 months ago)
- Topics: c-sharp, c-sharp-library, dotnet-core, dotnetcore, simplify, simplify-web, swagger
- Language: C#
- Homepage:
- Size: 234 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Simplify.Web.Swagger
[](https://www.nuget.org/packages/Simplify.Web.Swagger/)
[](https://www.nuget.org/packages/Simplify.Web.Swagger/)
[](https://github.com/SimplifyNet/Simplify.Web.Swagger/actions/workflows/build.yml)
[](https://libraries.io/nuget/Simplify.Web.Swagger)
[](https://www.codefactor.io/repository/github/simplifynet/Simplify.Web.Swagger)

[](http://makeapullrequest.com)`Simplify.Web.Swagger` is a package which provides Swagger generation for [Simplify.Web](https://github.com/SimplifyNet/Simplify.Web) web-framework controllers.
## Quick Start
1. Add `Simplify.Web.Swagger`, `Swashbuckle.AspNetCore.SwaggerGen` and `Swashbuckle.AspNetCore.SwaggerUI` packages to your project
```xml
```
1. Add `AddSimplifyWebSwagger` in `AddSwaggerGen` registration and `Simplify.Web` controllers will be scanned during Swagger generation process.
```csharp
var builder = WebApplication.CreateBuilder(args);builder.Services.AddEndpointsApiExplorer()
.AddSwaggerGen(x => x.AddSimplifyWebSwagger());
```3. Use Swagger as in regular ASP.NET Core project
```csharp
var app = builder.Build();app.UseSwagger();
app.UseSwaggerUI();app.UseSimplifyWeb();
await app.RunAsync();
```4. Add controller Swagger attributes (if needed)
```csharp
[Get("/api/v1/users/{id}")]
[ApiVersion("1.0")]
[ProducesResponse(StatusCodes.Status200OK, "application/json")]
[ProducesResponse(StatusCodes.Status500InternalServerError)]
public class GetController : Controller2
{
...
}
```5. After application started go to or to see generated Swagger
## Example application
Below is the example of Swagger generated by `Simplify.Web.Swagger`:

## Contributing
There are many ways in which you can participate in the project. Like most open-source software projects, contributing code is just one of many outlets where you can help improve. Some of the things that you could help out with are:
- Documentation (both code and features)
- Bug reports
- Bug fixes
- Feature requests
- Feature implementations
- Test coverage
- Code quality
- Sample applications## Related Projects
Additional extensions to Simplify.Web live in their own repositories on GitHub. For example:
- [Simplify.Web.Json](https://github.com/SimplifyNet/Simplify.Web.Json) - JSON serialization/deserialization
- [Simplify.Web.Postman](https://github.com/SimplifyNet/Simplify.Web.Postman) - Postman collection and environment generation
- [Simplify.Web.Multipart](https://github.com/SimplifyNet/Simplify.Web.Multipart) - multipart form model binder
- [Simplify.Web.MessageBox](https://github.com/SimplifyNet/Simplify.Web.MessageBox) - non-interactive server side message box
- [Simplify.Web.Templates](https://github.com/SimplifyNet/Simplify.Web.Templates) - .NET projects templates## License
Licensed under the GNU LESSER GENERAL PUBLIC LICENSE