We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Im using .net core v5 and the json file returns 404.
No errors founds...
my startup.cs looks like:
// Services services.AddSwaggerGen(opts => { opts.AddSecurityDefinition("Bearer", new OpenApiSecurityScheme { Description = "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"", Name = "Authorization", BearerFormat = "JWT", Scheme = "Bearer", In = ParameterLocation.Header, Type = SecuritySchemeType.Http, }); opts.AddSecurityRequirement(new OpenApiSecurityRequirement { { new OpenApiSecurityScheme { Reference = new OpenApiReference { Type = ReferenceType.SecurityScheme, Id = "Bearer" } }, new string[] { } } }); }); services.AddSwaggerGenWithConventionalRoutes(options => { options.SkipDefaults = true; });
// Configure app.UseSwagger(); // Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.), // specifying the Swagger JSON endpoint. app.UseSwaggerUI(c => { c.SwaggerEndpoint("v1/swagger.json", "Endurance V1"); }); app.UseEndpoints(endpoints => { endpoints.MapControllers(); endpoints.MapAreaControllerRoute( name: "ficha", areaName: "Ficha", pattern: "{controller}/{id}", defaults: new { controller = "Ficha", action = "Index" }, constraints: new { id = @"\d+" } ); endpoints.MapControllerRoute( name: "default", pattern: "{controller=Home}/{action=Index}/{id?}"); ConventionalRoutingSwaggerGen.UseRoutes(endpoints); });
Any suggestion? Thanks!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Im using .net core v5 and the json file returns 404.
No errors founds...
my startup.cs looks like:
Any suggestion? Thanks!
The text was updated successfully, but these errors were encountered: