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.

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.