IDE Setup
Configure VS Code for the best Plyson development experience with autocompletion and validation.
One of Plyson's most powerful features is its JSON Schema-driven development. By correctly configuring your IDE, you get full autocompletion, real-time validation, and documentation tooltips for every field in your test files.
VS Code Integration
We recommend using Visual Studio Code for the best experience.
1. Enable JSON Schema Support
Plyson test files include a $schema property that points to a local schema file. VS Code detects this automatically and provides:
- Autocomplete: Press
Ctrl + Spaceto see available fields (likemethod,endpoint,assertions). - Validation: If you misspell a field or provide the wrong data type (e.g., a string instead of a number for status code), you'll see a red underline immediately.
- Tooltips: Hover over any field to see its description and allowed values.
2. Sync Your Schemas
To ensure your IDE has the latest definitions for your specific project (especially for request auto-filling), run the sync command whenever you change your project structure:
npx plyson sync-project-schemas3. Recommended Extensions
While not required, these extensions make working with JSON even better:
- JSON Language Features: (Built-in to VS Code) - Provides the core schema support.
- Prettier: Ensures your JSON test files are always perfectly formatted.
- Error Lens: Highlights validation errors directly in the line of code.
Troubleshooting Intellisense
If you're not seeing autocompletion:
- Check the
$schemapath: Ensure the$schemaproperty in your.test.jsonfile correctly points to theProject-schemafolder (usually../Project-schema/...). - Restart the VS Code language server: Sometimes VS Code needs a nudge to reload schemas. You can do this by running the "Developer: Reload Window" command from the Command Palette (
Ctrl+Shift+P). - Run Sync Command: Make sure you've run
npx plyson sync-project-schemasat least once in your project root.