Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Here are the high-level steps to host a Swagger static site on an Azure Java function app:

  1. Create an Azure Java function app: Create a new Azure Java function app from the Azure portal or using Azure CLI.

  2. Add Swagger static site files: Add Swagger static site files to your function app's deployment package. You can use tools like Swagger UI or ReDoc to generate static HTML files that you can host in your function app.

  3. Update function.json: In your function app project, update the function.json file to include the following binding metadata:

a) "name": Name of the function binding.

b) "type": Type of function binding. For hosting Swagger static sites, set the type to "staticFile".

c) "path": Path to the directory that contains your Swagger static site files.

  1. Deploy your function app: Deploy your function app to Azure using your preferred deployment method, such as Azure CLI, Visual Studio Code, or Azure DevOps.

  2. Configure custom domain: If you want to use a custom domain name, configure the domain using Azure portal.

  3. Configure HTTPS: Configure HTTPS for your function app using Azure portal.

  4. Test your Swagger static site: Browse to the Swagger static site URL in a browser, and verify that you can access the Swagger documentation.