aspnet-api-versioning
Swashbuckle.AspNetCore
Our great sponsors
aspnet-api-versioning | Swashbuckle.AspNetCore | |
---|---|---|
10 | 14 | |
2,660 | 4,762 | |
3.0% | - | |
9.4 | 6.4 | |
11 days ago | 12 days ago | |
C# | C# | |
MIT License | 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.
aspnet-api-versioning
-
Angular, ASP.NET core web api, and DTOs
- The DTOs on the server should generally not change without warning. A deprecation cycle should ideally be in place so consumers can keep up over time and front end development doesn't have to be lock-step with the services the consume. Ideally some period of time between service v1 being deprecated and service v2 being required to allow consumers to react ( in this case, you're the consumer, so be kind to yourself ). Deets: https://github.com/dotnet/aspnet-api-versioning
-
8 quick tips to improve your .NET API
This API versioning can be parameterized with some options, including the default version or even how the versioning will be done, whether by URL, header or media type. For more details, you can access the official documentation.
-
.NET Core — API Versioning
A lista completa pode ser vista aqui: https://github.com/microsoft/aspnet-api-versioning/wiki/Version-Format
-
What every ASP.NET Core Web API project needs - Part 2 - API versioning and Swagger
Check out the official API versioning Github repository to find out more information.
Swashbuckle.AspNetCore
-
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
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.
cqrs-with-net-core-mediatr
opentelemetry-specification - Specifications for OpenTelemetry
MediatR - Simple, unambitious mediator implementation in .NET
SpaceEmporium - Simple API Versioning in ASP.NET Core
CleanArchitectureApp - Clean Architecture Application Design from Scratch using Dotnet Core 5 WebApi and Angular 11 FrontEnd
CleanArchitecture - Clean Architecture Solution Template for .NET 7
nocode - The best way to write secure and reliable applications. Write nothing; deploy nowhere.
SPA-Identity-Server-Authenticate-Sample - SPA Identity Server Authenticate Sample