cool-webapi
Swashbuckle.AspNetCore
Our great sponsors
cool-webapi | Swashbuckle.AspNetCore | |
---|---|---|
6 | 15 | |
50 | 5,060 | |
- | - | |
1.3 | 0.0 | |
about 1 year ago | about 1 month ago | |
C# | C# | |
- | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
cool-webapi
-
What every ASP.NET Core Web API project needs - Part 3 - Exception handling middleware
In the previous article, I wrote about API versioning and how to add Swagger to the sample project with support of API versioning. In this article, I show how to add custom middleware to handle exceptions globally and create a custom response when an error occurred.
-
What every ASP.NET Core Web API project needs - Part 2 - API versioning and Swagger
Open the cool-webpi project and Install Microsoft.AspNetCore.Mvc.Versioning.ApiExplorer package
-
What every ASP.NET Core Web API project needs - Part 1 - Serilog
Source code for this walkthrough could found on the Github.
Swashbuckle.AspNetCore
-
Advantages and disadvantages of FastEndpoints
It isn't where it needs to be. Notably, it cannot out-of-the-box handle open generic data types. There's also plenty of issues logged for this library. - Personally, that makes me think the approach is overly complicated and doesn't do its job as well as it should.
-
Authenticate Next.js SPA with ASP.NET 6 Identity and Duende Identity Server Part 1
Swashbuckle Github repo
-
A Developer's Guide to CQRS Using .NET Core and MediatR
Swashbuckle Swagger
-
Organize code by concepts, not layers
That’s exactly what I meant. There’s about 0 maintenance required most of the time. Take a look at their official nuget GitHub page. This should work out of the box with ASP.NET core 3.0 and greater. For 5.0 onwards, the MVC template comes pre-configured with it.
-
Auto Generate Client From OpenAPI Specification (Swagger)
When you run your web api app, you can access the swagger.json at http://localhost:/swagger/v1/swagger.json. Now either you can pass the link to swagger.json or make it accessible from file system. If you go the former route then you need to ensure your web api is up somewhere and updated or spin it up locally. I went ahead with downloading the file into file system using Swashbuckle.AspNetCore.Cli which can generate swagger.json from your web api assembly.
-
What every ASP.NET Core Web API project needs - Part 2 - API versioning and Swagger
/// /// Represents the Swagger/Swashbuckle operation filter used to document the implicit API version parameter. /// /// This is only required due to bugs in the . /// Once they are fixed and published, this class can be removed. public class SwaggerDefaultValues : IOperationFilter { /// /// Applies the filter to the specified operation using the given context. /// /// The operation to apply the filter to. /// The current operation filter context. public void Apply(OpenApiOperation operation, OperationFilterContext context) { var apiDescription = context.ApiDescription; operation.Deprecated |= apiDescription.IsDeprecated(); // REF: https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/1752#issue-663991077 foreach (var responseType in context.ApiDescription.SupportedResponseTypes) { // REF: https://github.com/domaindrivendev/Swashbuckle.AspNetCore/blob/b7cf75e7905050305b115dd96640ddd6e74c7ac9/src/Swashbuckle.AspNetCore.SwaggerGen/SwaggerGenerator/SwaggerGenerator.cs#L383-L387 var responseKey = responseType.IsDefaultResponse ? "default" : responseType.StatusCode.ToString(); var response = operation.Responses[responseKey]; foreach (var contentType in response.Content.Keys) if (responseType.ApiResponseFormats.All(x => x.MediaType != contentType)) response.Content.Remove(contentType); } if (operation.Parameters == null) return; // REF: https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/412 // REF: https://github.com/domaindrivendev/Swashbuckle.AspNetCore/pull/413 foreach (var parameter in operation.Parameters) { var description = apiDescription.ParameterDescriptions.First(p => p.Name == parameter.Name); parameter.Description ??= description.ModelMetadata.Description; if (parameter.Schema.Default == null && description.DefaultValue != null) { // REF: https://github.com/Microsoft/aspnet-api-versioning/issues/429#issuecomment-605402330 var json = JsonSerializer.Serialize(description.DefaultValue, description.ModelMetadata.ModelType); parameter.Schema.Default = OpenApiAnyFactory.CreateFromJson(json); } parameter.Required |= description.IsRequired; } } }
-
.Net Framework için Swagger ve JWT Authentication
domaindrivendev/Swashbuckle.AspNetCore
-
AWS Systems Manager Parameter Store for Managing Configuration and Retrieve at Runtime using C#
Swashbuckle.AspNetCore.Swagger
-
ASP.NET Core API - Path Versioning
Now we'll focus on getting versioning working with Swagger Generation and Swashbuckle.
What are some alternatives?
swagger-core - Examples and server integrations for generating the Swagger API Specification, which enables easy access to your REST API
api-guidelines - Microsoft REST API Guidelines
SPA-Identity-Server-Authenticate-Sample - SPA Identity Server Authenticate Sample
swagger-petstore - swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
opentelemetry-specification - Specifications for OpenTelemetry
cqrs-with-net-core-mediatr
SpaceEmporium - Simple API Versioning in ASP.NET Core
MediatR - Simple, unambitious mediator implementation in .NET
aspnet-api-versioning - Provides a set of libraries which add service API versioning to ASP.NET Web API, OData with ASP.NET Web API, and ASP.NET Core.
CleanArchitectureApp - Clean Architecture Application Design from Scratch using Dotnet Core 5 WebApi and Angular 11 FrontEnd
nocode - The best way to write secure and reliable applications. Write nothing; deploy nowhere.