Forum Discussion

shoaibalam's avatar
shoaibalam
New Contributor
7 years ago

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.

 

No RepliesBe the first to reply