I'm looking for a straightforward way to import an ASP.NET Web API into Azure API Management (APIM). The developer mentioned that they can't enable Swagger, which makes it tricky. Is there any way around this?
3 Answers
Do they even have an API specification? Without one, how can APIM manage the API properly? If your Web API is in Azure, you could set up a new API from an existing resource like a function app or web app, but it might lack operation details since APIM won’t know the specifics of the requests coming in.
You might want to check Microsoft's docs on this. They have a guide about importing APIs from OpenAPI specs that could be helpful: https://learn.microsoft.com/en-us/azure/api-management/import-api-from-oas?tabs=powershell
If the developer can't enable Swagger, they're really missing out. An OpenAPI spec (which is effectively Swagger) should be the minimum they provide. It's essential for API management to understand the API structure. Just saying they can't help is not a good excuse!
I get that, but it’s often not a good idea to have Swagger enabled in production environments. You can still generate the Swagger specs in your CI/CD pipeline though and push them through.
Yep, it’s running on an Azure VM and is publicly accessible. I could try to set up the APIM manually, but I’m totally lost on endpoint names and operations. Our DevOps team isn’t offering any help, so we’re kind of stuck figuring this out ourselves.