Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add how to install in JetBrains #56

Merged
merged 3 commits into from
Mar 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,36 @@ This repository contains schemata for:
}
```

## Installation in JetBrains

IDEs by JetBrains like PyCharm and IntelliJ enable us to use the JSON Schema, using [the JSON schema mapping feature](https://www.jetbrains.com/help/idea/json.html#ws_json_schema_add_custom).

1. Open the preferences of JSON schema mapping in JetBrains
2. Add custom schema mappings

There is no way to add the preferences with a configuration file like VS Code.
As we have to manually configure them one by one, we just describe values of the configurations below.
If you want to know the details, the [dbt YAML validator in JetBrains article](https://yu-ishikawa.medium.com/dbt-yaml-validator-in-jetbrains-b5ef25e9253e) describes how to configure the JSON schema mapping in details.

- Project definition files
- URL: `https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/dbt_project.json`
- Schema version: JSON schema version 7
- Mapping: `dbt_project.yml`
- Package files
- URL: `https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/packages.json`
- Schema version: JSON schema version 7
- Mapping: `packages.yml`
- Selectors files
- URL: `https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/selector.json`
- Schema version: JSON schema version 7
- Mapping: `selector.yml`
- Property files
- URL: `https://raw.githubusercontent.com/dbt-labs/dbt-jsonschema/main/schemas/dbt_yml_files.json`
- Schema version: JSON schema version 7
- Mapping: `models/**/*.yml`, `analysis/**/*.yml`, `snapshots/**/*.yml`

![A screenshot of a JetBrains Preferences panel showing the correct mapping of the dbt_yml_files JSON Schema](/jetbrains-config.png)

_Do you use a different IDE which also supports JSON Schema? Please open a PR with setup instructions and links to any extensions!_

## Contributing
Expand Down
Binary file added jetbrains-config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.