api-reference/README.md
We use the openapi specification for the api reference. The openapi file is generated from the code base openapi_spec_v1.json.
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
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
docs.json existscd api-reference
mint dev
If you have added new routes to the openapi. Then in order for them to be displayed on the mintlify, run the following commands
cd api-reference
npx @mintlify/scraping@latest openapi-file v1/openapi_spec_v1.json -o v1
This will generate files in api-reference folder. These routes should be added to the mint.json file under navigation, under respective group.
NOTE: For working with V2 API reference, replace every occurrence of v1 with v2 in above commands