Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: about 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 (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-05T16:01:51.000Z (7 months ago)
- Last Synced: 2024-06-05T18:04:17.919Z (7 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
[![Nuget Version](https://img.shields.io/nuget/v/Simplify.Web.Swagger)](https://www.nuget.org/packages/Simplify.Web.Swagger/)
[![Nuget Download](https://img.shields.io/nuget/dt/Simplify.Web.Swagger)](https://www.nuget.org/packages/Simplify.Web.Swagger/)
[![Build Package](https://github.com/SimplifyNet/Simplify.Web.Swagger/actions/workflows/build.yml/badge.svg)](https://github.com/SimplifyNet/Simplify.Web.Swagger/actions/workflows/build.yml)
[![Libraries.io dependency status for latest release](https://img.shields.io/librariesio/release/nuget/Simplify.Web.Swagger)](https://libraries.io/nuget/Simplify.Web.Swagger)
[![CodeFactor Grade](https://img.shields.io/codefactor/grade/github/SimplifyNet/Simplify.Web.Swagger)](https://www.codefactor.io/repository/github/simplifynet/Simplify.Web.Swagger)
![Platform](https://img.shields.io/badge/platform-.NET%206.0%20%7C%20.NET%20Standard%202.0-lightgrey)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen)](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`:
![Simplify](https://raw.githubusercontent.com/SimplifyNet/Simplify.Web.Swagger/master/images/screenshots/generated-swagger-example.png)
## 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