Add a API Documentation Schema and Swagger UI plugin
This sample step-by-step configuration is to expand your services data in configure8 with documentation. It can be adapted to extend your services with other types of data.
Last updated
This sample step-by-step configuration is to expand your services data in configure8 with documentation. It can be adapted to extend your services with other types of data.
Last updated
Copyright © 2023 configure8, Inc. All rights reserved.
Creating a new schema to define documentation and link it with the service would be best.
Full JSON for the "From JSON Schema"
We will configure how to display this information in the API Docs table.
We need to add the relation between the Service and API Docs.
In this sample, we are using Many to Many as one document can belong to multiple services, but maybe that's not the case in your organization.
Finally, click Save and Create your schema.
Enter the newly created schema again to add a new tab displaying the embedded SwaggerUI with the API Documentation.
Create a new Tab called "API Doc", and under that tab, a new widget called API Doc with the following content:
If you want to see the API Docs embedded in a tab on your services page, extend your service schema and add a tab with a widget like the above. In the "schema" field you'll need to add the relation name you added above, in this example "apiDocs".
Now, you can add new API Docs to your catalog. Click on the documentation item to go to the API Docs list page.
Press the Add New Entity button. You must fill in the data by selecting your service(s) and pressing the add button.
After successfully creating the entity you will need to navigate to its page:
You can see three tabs on this entity page. The first one contains entity details, the second one lists the services that are attached to this documentation, and the third one shows the embedded view of that API Docs:
Seeing the API Docs inside a the service page after adding the tab and widget to services schema: