3Scale Developer Portal Docs Per Application
Using this open source platform, we to create a more effective version of your API documentation, allowing devs to only see that docs that are relevant to their work.
Join the DZone community and get the full member experience.Join For Free
First, you will want to make sure you have Swagger JSON defined on a per-application basis. For example, take these 3 JSON files and ensure they are published somewhere on the web with no header, footer, etc.
An easy way to do this is to navigate to the Developer Portal tab in your 3Scale Admin Console and select “New Page.” Name your page and give it a path like
/<applicationName>.json. Also, ensure no layout is selected. Then save and publish the page. Note: You may have to go to the drafts page to publish the page. Do this for all applications. You can also host these on any external site if you wish.
- The active docs tag must be present to ensure the swagger libraries are loaded. However, a service name does not need to be specified in the tag.
divwith a different ID must be defined for each application. If this is not done only the last application’s Swagger UI will load since it will get continually overwritten.
- You can use any layout you want with this code.
- Adjust the logs to your liking.
Published at DZone with permission of Mary Cochran, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.