Open shaunpearsondev opened 1 year ago
Its not generating a way to enter param1 because you haven't passed param1 to the second route's parameters. it should be
var root = app.MapGroup("/first/{param1}")
.RequireAuthorization();
root.MapGroup("second")
.MapGet("{param2}", IResult(string param1, string param2)
=> TypedResults.Ok(param2));
Thanks Matt,
I think there was a subtle nuance to this that doesn't appear to be caught in the post... I swapped to swashbuckle for the use case as it did work there.
Away on holiday this week so will double check when I'm back.
When using Nested Groups in minimal api's like below
the swagger is generating a route of
/first//second/{param2}
instead of/first/{param1}/second/{param2}
and is also not generating a way to enter a value for {param1}
I did a little bit of further digging and when trying to add a custom OperationProcessor it appear as though the OpenApiOperationDescription is not being formed correctly.
Please let me know if you need any more information