Unmasking your swagger with proxies in Azure Functions

In my post Testing Azure Functions with Postman and Swagger I showed how to use the API Specification capabilities in Azure Functions and then take the endpoint url and test the API using Postman.

Notice the url that is provided for the API. It isn't human readable, nor something I could rattle off to another developer over the phone or easy re-type.

api url

Creating a proxy

A feature in Azure Function is proxies. Using this feature we can establish a new proxy for our function to point a "nice" url to the "no-so-friendly" API Definition.


Now you can share the shorter more reasonable url, even use the test Swagger UI at http://petstore.swagger.io. Be sure to add http://petstore.swagger.io to your CORS settings first.

Tweet Post Share Update Email RSS

Hi, I'm Shayne Boyer, I write this site, work on ASP.NET Core content and Open Source, speak at national and community events while helping teams architect web and cloud applications.

azure azuredev azure-functions swagger