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

chore: update json schema url docs #104

Merged
merged 1 commit into from
Apr 9, 2024
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
23 changes: 21 additions & 2 deletions docs/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Use the `$schema` property in the configuration file to specify the JSON schema

```json empiricalrc.json
{
"$schema": "https://assets.empirical.run/config/schema/v1.14.json",
"$schema": "https://assets.empirical.run/config/schema/latest.json",
"runs": [
// ...
],
Expand All @@ -37,6 +37,25 @@ Use the `$schema` property in the configuration file to specify the JSON schema
}
```

The above URL will always point to the JSON schema for the latest CLI version.
If you want to specify JSON schema for a particular CLI version, you can replace "latest" with the version number.

```json empiricalrc.json
{
// https://assets.empirical.run/config/schema/v{CLI_VERSION_NUMBER}.json
"$schema": "https://assets.empirical.run/config/schema/v0.4.0.json",
"runs": [
// ...
],
"dataset": {
// ...
}
}
```

The easiest way to detect the CLI version is by running `npx @empiricalrun/cli -V` which will print the currently installed version number.
You can then use that version number in the schema URL.

### Visual Studio Code

Add the `json.schemas` property to your VS Code configuration (user or workspace). This maps
Expand All @@ -49,7 +68,7 @@ the `empiricalrc.json` file to use the JSON schema.
"fileMatch": [
"empiricalrc.json"
],
"url": "https://assets.empirical.run/config/schema/v1.14.json"
"url": "https://assets.empirical.run/config/schema/latest.json"
}
]
}
Expand Down
Loading