- Run:
git clone https://<YOUR-PAS>@github.com/logzio/logz-api.git
- Cd to the root folder:
cd logz-api
- Add Docusaurus api plugin:
yarn add docusaurus-plugin-openapi-docs
yarn add docusaurus-theme-openapi-docs
- Start local build:
yarn start
-
Follow local deployment instructions
-
Update the api spec under examples/logzio-public-api.yml
-
Delete the relevant mdx file which you updated in the spec
-
Run plugin generate command
yarn docusaurus gen-api-docs logz
-
Follow local deployment instructions
-
Edit the API spec at
examples/logzio-public-api.yml. Split sections with headers like# ::::: NAME. For each new endpoint, set a unique path (/v1/account-management/time-based-accounts:) or HTTP methods (get,put, etc.), addsummary, andoperationId. -
Add the new page or category to
sidebar.js. Use"type":"category"for a new category, and"type":"doc"for a new page. ID and label must be unique. The page name should match the operationId you set in the.yml, for example,operationId: updateTimeBasedAccountshould be added to sidebar.js like this:{"type":"doc","id":"logz/update-time-based-account","label":"Update an account","className":"api-method put"} -
Save your changes and run the plugin generate command
yarn docusaurus gen-api-docs logzto generate the new page you created.