Extension Settings¶
Configure the BerryCrush extension to match your project setup.
Accessing Settings¶
- Settings UI: File → Preferences → Settings (Ctrl+,)
- Search for "berrycrush"
- Or edit
settings.jsondirectly
Available Settings¶
OpenAPI Configuration¶
berrycrush.openapi.path¶
Path to your OpenAPI specification file (relative to workspace root).
Type: string
Default: ""
berrycrush.openapi.paths¶
Paths to multiple OpenAPI spec files for multi-spec projects.
Type: array of strings
Default: []
Fragment Configuration¶
berrycrush.fragmentsPath¶
Path to search for fragment files (relative to workspace root).
Type: string
Default: "src/test/resources"
Formatting Configuration¶
berrycrush.formatting.indentSize¶
Number of spaces per indentation level.
Type: number
Default: 2
Range: 1-8
berrycrush.formatting.alignTables¶
Align columns in parameter tables.
Type: boolean
Default: true
Extension Commands¶
Available commands (access via Command Palette - Ctrl+Shift+P):
| Command | Description |
|---|---|
| BerryCrush: Refresh OpenAPI | Reload OpenAPI specification |
| BerryCrush: Refresh Fragments | Rescan fragment files |
| BerryCrush: Refresh Custom Steps | Reload custom step definitions |
Workspace Settings¶
Configure settings per-project in .vscode/settings.json:
{
"berrycrush.openapi.path": "api/spec.yaml",
"berrycrush.fragmentsPath": "src/test/resources/fragments",
"berrycrush.formatting.indentSize": 2,
"berrycrush.formatting.alignTables": true
}
User Settings¶
Configure global defaults in user settings:
- Open Settings (Ctrl+,)
- Select "User" tab
- Search for "berrycrush"
- Configure settings
Recommended Settings¶
For API Testing Projects¶
{
"berrycrush.openapi.path": "api/openapi.yaml",
"berrycrush.fragmentsPath": "src/test/resources",
"berrycrush.formatting.indentSize": 2,
"berrycrush.formatting.alignTables": true,
"editor.formatOnSave": true,
"[berrycrush-scenario]": {
"editor.formatOnSave": true
},
"[berrycrush-fragment]": {
"editor.formatOnSave": true
}
}
For Multi-Spec Projects¶
{
"berrycrush.openapi.paths": [
"services/user-service/api.yaml",
"services/product-service/api.yaml",
"services/order-service/api.yaml"
],
"berrycrush.fragmentsPath": "src/test/resources"
}
Troubleshooting¶
Settings Not Taking Effect¶
- Reload the window: Ctrl+Shift+P → "Developer: Reload Window"
- Run refresh commands from the Command Palette
- Check for syntax errors in settings.json
OpenAPI Not Loading¶
- Verify the path is correct and the file exists
- Check the file is valid YAML/JSON
- Look at Output → BerryCrush for error messages
Fragments Not Found¶
- Verify the fragmentsPath setting
- Ensure fragment files have
.fragmentextension - Run "BerryCrush: Refresh Fragments"