Last active
June 10, 2018 06:35
-
-
Save wellingtonjhn/03f3245b309a15ba77ea1dfaac8cd57f to your computer and use it in GitHub Desktop.
Swagger Basic Configuration
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.AddSwaggerGen(options => | |
| { | |
| options.SwaggerDoc("v1", | |
| new Info | |
| { | |
| Title = "Demo Jwt", | |
| Version = "v1", | |
| Description = "Projeto de demonstração ASP.Net Core", | |
| Contact = new Contact | |
| { | |
| Name = "Wellington Nascimento", | |
| Url = "https://github.com/wellingtonjhn" | |
| } | |
| }); | |
| }); | |
| } | |
| public void Configure(IApplicationBuilder app) | |
| { | |
| app.UseSwagger(); | |
| app.UseSwaggerUI(c => | |
| { | |
| c.RoutePrefix = "swagger"; | |
| c.SwaggerEndpoint("/swagger/v1/swagger.json", "Demo JWT Api"); | |
| }); | |
| app.UseMvc(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment