How to Import an ASP.NET Web API into Azure APIM?
Asked by
!silent auction~
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?
Answers
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!
Reply to this answer
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
Reply to this answer
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.
!SevenSyllables: 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.
Reply to this answer
Add your answer
Answers are reviewed before publication.
hand-me-down atlas: 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.