0

I have manually deployed a WAR (on Tomcat) containing the implementation of a REST API which exposes a Swagger 2.0 end point. The REST API is developed using the Restlet framework in Java. The folder structure on the app host looks like the following:

/site/wwwroot/webapps/myapp.war
/site/wwwroot/apiapp.json

The content of apiapp.json is:

{
    "$schema": "http://json-schema.org/schemas/2014-11-01/apiapp.json#",
    "id": "myapp.apiapp",
    "namespace": "<myusername>.onmicrosoft.com",
    "gateway": "2015-01-14",
    "version": "1.0.0",
    "title": "Title",
    "summary": "",
    "author": "Author",
    "endpoints": {
        "apiDefinition": "/myapp/api-docs",
        "status": null
    }
}

I am able to get the swagger json by navigating to https://<myapphost>.azurewebsites.net/myapp/api-docs

However when I attempt to view the API definition on Azure Portal I see a blank table and then get the following error:

The gateway did not receive a response from 'Microsoft.AppService' within the specified time period.
Santosh
  • 660
  • 7
  • 13
  • 1. Are you on the "free" plan? There might be some limits in terms of what you can and cannot do. Can you upgrade to standard? 2. Are you up to date on all packages and SDK's? – jdruid Sep 02 '15 at 15:31
  • @jdruid, I am on the trial subscription and using a Standard S1 service plan. I have got the latest Azure SDK for Java - as I said the API is working fine and I can talk to it. It's the API definition part that's not working. – Santosh Sep 03 '15 at 04:28

1 Answers1

0

Operator error :-) I thought I was serving up Swagger 2.0 while in reality I still had the old Swagger 1.2 being served up. After updating the spec to Swagger 2.0 I can now see the definitions being listed on the Azure portal. I wish the error was more meaningful than a 'gateway timeout'!

Santosh
  • 660
  • 7
  • 13