Ask a Question

SwaggerHub integration with Azure

shoaibalam
New Contributor

SwaggerHub integration with Azure

I integrate SwaggerHub with Azure API management service and publish my API to Azure. I modified the  API policy as follows:

 

<policies>
 <inbound>
  <return-response>
   <set-status code="200" reason="OK" />
   <set-body>
       { "name":"John", "age":30}
   </set-body>
  </return-response>
  <base />
 </inbound>
 <backend>
  <base />
 </backend>
 <outbound>
  <base />
 </outbound>
</policies>

 

When I execute it from SwaggerHub instead of response body as JSON string it shows a download file link. Content of the file contains actual JSON string.

 

2018-03-29_13-56-03.png

cancel
Showing results for 
Search instead for 
Did you mean: