Skip to main content

Use AI to Generate API Documentation

Step 1: Sign in

In your VS Code Editor, click on the Dev-Docs Icon on the left sidebar. Find and click the Sign In button.

In your VS Code Editor

Select your org from the dropdown.

Step 2: Edit Your Dev-Docs.json

Find or create Your dev-docs.json, it should be at the root of your VS Code workspace. Here we are going to add AI functionality by editing this JSON to add the ai object with the API key set to true. Look at this code for reference


{
"ai": {
"onSave": false,
"API": true
},
}

Step 3: Generate the API Config

In your VS Code Editor, find a code file with visible API Routes. Then run shift command a

Step 4: Check the Config

After a couple of minutes you should see two files create dev-docs-collection.json and the dev-docs-openapi-collection.yaml.

Post Collection

Openapi Yaml

Dev-Docs AI Bot

Circular button