To generate the API documentation, you need the API specification file. You can upload the API specification file as a URL.

We support OpenAPI 2.0 and OpenAPI 3.0 specifications.


How to generate the API documentation with URL?

You can upload the API specification file as a URL in this method.

  1. Go to the desired project in the Knowledge base portal
  2. Click API documentation in the left menu bar
  3. Click + New API button at the bottom left
  4. Select the URL checkbox and click Next
  5. Type or paste the URL from which you want to import the API
  6. Click Add API reference
  7. If there are any errors, alerts, or warnings in uploading the file, it appears in the window
  8. If required, update the file and upload it again
  9. Click Add API reference
  10. To publish all the articles, click Publish
    (or)
    To keep all the articles in the draft state, click Close

How to generate the API documentation with an OpenAPI definition file?

You can upload the API specification file as a JSON or YAML in this method.

  1. Go to the desired project in the Knowledge base portal
  2. Click API documentation in the left menu bar
  3. Click + New API button at the bottom left
  4. Select the OpenAPI Definition checkbox and click Next
  5. Drag and drop the JSON or YAML file from your local storage into the Drop file here section
    (or)
    Click the Click here to upload link, and the file manager of your local device appears. Select the desired file from which you want to import the API and click Open
  6. Click Add API reference
  7. If there are any errors, alerts, and warnings in uploading the file, it appears in the window
  8. If required, update the file and upload it again
  9. Click Add API reference
  10. To publish all the uploaded API endpoint articles, click Publish
    (or)
    To keep all the articles in the draft state, click Close

How to generate API documentation with CI/CD flow

Pre-requisites

  • Ensure that Node.js (v14) is installed on your system.
  • In the command prompt, install the d360 npm with the following command: npm install d360 -g
Helpful links
  1. Go to the desired project in the Knowledge base portal
  2. Click API documentation in the left menu bar
  3. Click + New API button at the bottom left
  4. Select the CI/CD Flow checkbox and click Next
  5. Copy the command available in the blade
  1. Paste the copied command in the command prompt
  2. Choose the spec file path
    • For JSON/YAML file: Type your spec file's directory path in the "--path" parameter
    • For URL: Type your spec file URL in the "--path" parameter
  3. Your spec file will be imported, and API documentation will be generated

Related blogs

Introducing API Documentation: Enhance your API Experience - Click to read