Service stack API behind Azure APIM: how to expose metadata endpoint?

Hi, we are putting some of our API behind Azure APIM., we import into the APIM the API endpoints thorugh the openapi metadata generated by service stack.

We would like to expose the metadata endpoint page through the APIM.
If I add manually a /metadata endpoint in the API registration, it does work …
however is there a “better way” ?
ideally /metadata endpoint should be exposed as a get endpoint in the swagger definition.

thank you
enrico

Metadata isn’t a Service so it’s not included in any metadata description. You can try adding a dummy [Route(“/metadata”)] Route otherwise you’d need to use the filters on the OpenApiFeature plugin to manually add the Route, but if you’ve already found a working solution I’d just use that.