Skip to content

Files

Latest commit

 

History

History

api-reference

Api Reference

We use the openapi specification for the api reference. The openapi file is generated from the code base openapi_spec.json.

How to generate the file

This file is automatically generated from our CI pipeline when the PR is raised. However if you want to generate it manually, the following command can be used

cargo r -p openapi --features v1

Render the generated openapi spec file

In order to render the openapi spec file, we use a tool called mintlify. Local setup instructions can be found here. Once the cli is installed, Run the following command to render the openapi spec

  • Navigate to the directory where mint.json exists
cd api-reference
  • Run the cli
mintlify dev

Add new routes to openapi

If you have added new routes to the openapi. Then in order for them to be displayed on the mintlify, run the following commands

  • Switch to the directory where api reference ( mint.json ) exists
cd api-reference
  • Run the following command to generate the route files
npx @mintlify/scraping@latest openapi-file openapi_spec.json  -o api-reference

This will generate files in api-reference folder. These routes should be added to the mint.json file under navigation, under respective group.