Created
December 17, 2020 19:21
-
-
Save AbubakarSiddiq/f7f4bd9326fa5e755b44cd9753440b31 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddControllers(); | |
services.AddApiVersioning(config => | |
{ | |
config.DefaultApiVersion = new ApiVersion(1, 0); | |
config.AssumeDefaultVersionWhenUnspecified = true; | |
config.ReportApiVersions = true; | |
}); | |
services.AddSwaggerGen(c => | |
{ | |
c.SwaggerDoc("v1", new OpenApiInfo { Title = "AspNetCore5WebAPIVersioning", Version = "v1" }); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment