JSON Schemas for Tooling
This directory contains JSON Schemas generated from the repository's validation scripts. These schemas can be used to configure IDEs (like VS Code, IntelliJ, etc.) to provide validation, autocompletion, and hover documentation for your YAML files.
Available Schemas
| Schema File | Description | Source Script |
|---|---|---|
prompt.schema.json |
Validates .prompt.yaml files. |
tools/scripts/validate_prompt_schema.py |
How to Configure VS Code
To enable schema validation and Intellisense in VS Code for .prompt.yaml files:
- Open your workspace settings (
.vscode/settings.json) or global settings. - Add the
yaml.schemasconfiguration:
Note: You may need to install the Red Hat YAML extension for this to work.
How to Configure JetBrains IDEs (IntelliJ, PyCharm)
- Go to Settings/Preferences > Languages & Frameworks > Schemas and DTDs > JSON Schema Mappings.
- Click
+to add a new mapping. - Name: "Prompt Schema".
- Schema file or URL: Select the
docs/schemas/prompt.schema.jsonfile in your project. - Schema version: JSON Schema version 7.
- File path pattern:
**/*.prompt.yaml.
Updating the Schema
If you modify the PromptSchema class in tools/scripts/validate_prompt_schema.py, you must regenerate the schema file: