When we define API methods like
builder.AddMethod(Method.Define("obj").HandleGet(qr => "list of objs")); builder.AddMethod(Method.Define("obj/{id}").WithParameter("id", isInQuery: false).HandleGet(qr => "single obj"));
we encounter the error message (while compiling):
Duplicate operationIds in the swagger definition at VI.ApiDesigner.CodeGen.SwaggerGen.<DoAsync>d__4.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at CompositionApiToSwagger.SwaggerDocumentContainer.<CreateAsync>d__7.MoveNext() at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at CompositionApiToSwagger.SwaggerDocumentContainer.<AddRoutesAsync>d__9.MoveNext()
I tried to remove the first definition and treat the empty id inside the handler - but then the "empty" call "/obj/" does not exists anymore (404) - even with an arbitrary default value. So I think this is broken.
Is there another way to define the methods as described (even swagger defines that as best practice https://swagger.io/resources/articles/best-practices-in-api-design/ ) - so I think the error comes from a step before.