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 config/settings_schema.json JSON schema #536

Merged
merged 3 commits 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
22 changes: 22 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"json.schemas": [
{
"fileMatch": [
"tests/fixtures/section-*.json"
],
"url": "./schemas/theme/section.json"
},
{
"fileMatch": [
"tests/fixtures/translations-*.json"
],
"url": "./schemas/theme/translations.json"
},
{
"fileMatch": [
"tests/fixtures/theme-settings-*.json"
],
"url": "./schemas/theme/theme_settings.json"
}
]
Comment on lines +2 to +21
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is how we can have VS Code do the intellisense automatically in the fixtures folder. Makes dev-ing things rather easy :)

}
9 changes: 8 additions & 1 deletion schemas/manifest_theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@
"fileMatch": ["sections/*.liquid"]
},
{
"uri": "theme/input_settings.json"
"uri": "theme/theme_settings.json",
"fileMatch": ["config/settings_schema.json"]
},
{
"uri": "theme/settings.json"
},
{
"uri": "theme/setting.json"
}
]
}
337 changes: 0 additions & 337 deletions schemas/theme/input_settings.json

This file was deleted.

6 changes: 2 additions & 4 deletions schemas/theme/section.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
"maximum": 2
},
"settings": {
"description": "Section specific settings.",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK, we display the markdownDescription on hover - where would the description provided here render?


Followup -> It seems like it will go with

  1. $ref -> markdownDescription
  2. $ref -> description
  3. description from this file

"$ref": "./input_settings.json"
"$ref": "./settings.json"
},
"max_blocks": {
"type": "integer",
Expand All @@ -49,8 +48,7 @@
"description": "The block type."
},
"settings": {
"description": "Block settings.",
"$ref": "./input_settings.json"
"$ref": "./settings.json"
}
},
"if": {
Expand Down
Loading
Loading