Skip to content

Commit

Permalink
Add how to install in JetBrains (#56)
Browse files Browse the repository at this point in the history
* Add how to install in JetBrains

Signed-off-by: Yu ISHIKAWA <[email protected]>

* Add example screenshot and small text tweaks

* forgot a slash

---------

Signed-off-by: Yu ISHIKAWA <[email protected]>
Co-authored-by: Joel Labes <[email protected]>
  • Loading branch information
yu-iskw and joellabes authored Mar 6, 2023
1 parent 195c63b commit 9c334f4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
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.

0 comments on commit 9c334f4

Please sign in to comment.