Overview
RapiDoc is an OpenAPI-genereted API reference documentation generator that can be used to produce documentation for your APIs quickly.
In the dev portal, RapiDoc
can be used to create the API documentations just setting up the link to your OpenAPI specification.
Microservice creation for RapiDoc
To create an instance of RapiDoc
:
- Go to the
Microservices
section; - Create a new microservice using the
Microlc RapiDoc Plugin
in theDev Portal
category of the marketplace; - Configure the microservice with a custom name and description;
- Complete the creation to deploy an instance of
RapiDoc
.
RapiDoc endpoint configuration
- Create a new endpoint;
- Define the
Base path
where you want to exposeRapiDoc
(e.g./plugin-rapidoc
); - As type, use
Microservice
; - Select the microservice name used for
RapiDoc
; - Complete the creation.
After that, the situation should be similar to the following:
RapiDoc configuration
Like all the plugins of micro-lc
you should refer to the core configuration section
for the setup and to correctly configure RapiDoc you must set one props
:
- openApiSpecUrl : the url to your
Swagger
orOpenApi
specification injson
format.
Here follows a full configuration example:
{
"id": "rapidoc-plugin",
"label": "RapiDoc",
"icon": "fas fa-link",
"order": 4,
"integrationMode": "qiankun",
"pluginRoute": "/rapidoc/",
"pluginUrl": "https://plugin-url.com",
"props": {
"openApiSpecUrl": "http://petstore.swagger.io/v2/swagger.json"
}
}
Result
After a deployment, your new Dev Portal should be exposed at the /
path of your host (e.g. https://your-host-com/
),
and should be similar to the following:
We suggest to use RapiDoc to set up the Dev Portal, but in case of small (<~300kb)
OpenApi specification file you can consider to use Redoc; for this plugin, we highly suggest to read the ReDoc Documentation