Skip to content

SwaggerGen Not picking up Endpoints #1

Open
@xizzor77

Description

@xizzor77

Hi

I am trying to add SwaggerGen to your project to automatically generate the UI with all the Endpoints that are automatically added.

This is normaly enough if the normal MapGet provided by Microsoft is beeing used.

var builder = WebApplication.CreateBuilder(args);

builder.Services.AddApiServices();
builder.AddEndpointsApiExplorer(); 
builder.AddSwaggerGen();

var app = builder.Build();
if (app.Environment.IsDevelopment())
{
    app.UseSwagger();
    app.UseSwaggerUI();
}


Expected
Swagger UI shows all routes with their parameters

Actual
Swagger Ui does not pickup the Routes and the passed parameters. I wonder what swagger needs to find all the missing parts.
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions