-
Notifications
You must be signed in to change notification settings - Fork 22
Add information on using JSON schemas #90
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
Conversation
📝 WalkthroughWalkthroughThe pull request introduces updates to two documentation files: Changes
Possibly related PRs
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (2)
json-rpc-settings.md (2)
186-191
: Consider enhancing the JSON Schema section with additional context.The section effectively explains how to enable JSON Schema support. Consider these enhancements to make it even more helpful:
- Add a brief introduction explaining the benefits of JSON Schema (e.g., "JSON Schema provides real-time validation, auto-completion, and documentation while editing your settings file").
- Make the
#
requirement more prominent, perhaps in a separate note or warning block.### JSON Schema + +JSON Schema provides real-time validation, auto-completion, and documentation while editing your settings file, helping you avoid errors and discover available options. + Add the following line at the beginning of your `SettingsTemplate.yaml` file to enable validation and auto-completion in your IDE. Unfortunately, this feature is supported only in JetBrains IDEs (WebStorm, PhpStorm, Rider, etc.) and does not work in Visual Studio or Visual Studio Code. Please note that it must start with `#` as it must be a comment, otherwise Flow Launcher won't be able to parse the file. +> **Important:** The `$schema` line must start with `#` to be treated as a comment. Without the `#` prefix, Flow Launcher will fail to parse the file. + ```yaml #$schema: https://www.flowlauncher.com/schemas/settings-template.schema.json<details> <summary>🧰 Tools</summary> <details> <summary>🪛 LanguageTool</summary> [typographical] ~187-~187: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence. Context: ... it must start with `#` as it must be a comment, otherwise Flow Launcher won't be able to parse th... (THUS_SENTENCE) </details> </details> --- `187-187`: **Improve sentence structure for clarity.** The current sentence structure could be improved by properly separating the clauses. ```diff -Please note that it must start with `#` as it must be a comment, otherwise Flow Launcher won't be able to parse the file. +Please note that it must start with `#` to be treated as a comment. Otherwise, Flow Launcher won't be able to parse the file.
🧰 Tools
🪛 LanguageTool
[typographical] ~187-~187: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ... it must start with#
as it must be a comment, otherwise Flow Launcher won't be able to parse th...(THUS_SENTENCE)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (2)
json-rpc-settings.md
(1 hunks)plugin.json.md
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
json-rpc-settings.md
[typographical] ~187-~187: The word “otherwise” is an adverb that can’t be used like a conjunction, and therefore needs to be separated from the sentence.
Context: ... it must start with #
as it must be a comment, otherwise Flow Launcher won't be able to parse th...
(THUS_SENTENCE)
🔇 Additional comments (3)
plugin.json.md (2)
21-32
: Documentation looks good and provides clear guidance!
The new section effectively explains the purpose and usage of JSON schema, with good IDE coverage and a clear example.
26-26
: Verify the schema URL accessibility
Let's ensure the schema URL is accessible and properly hosted.
✅ Verification successful
Schema URL is accessible and returns valid JSON Schema
The schema URL https://www.flowlauncher.com/schemas/plugin.schema.json
is accessible, returns a valid JSON Schema document, and is properly hosted. The verification was successful, confirming that the schema reference in the plugin.json is correct and functional.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the schema URL is accessible and returns valid JSON Schema
# Test schema URL accessibility and validate JSON content
curl -s -f -L https://www.flowlauncher.com/schemas/plugin.schema.json | jq 'has("$schema")' || echo "Schema URL not accessible or invalid JSON Schema"
# Look for any references to schema hosting setup in the repository
rg -l "plugin.schema.json" --type md
Length of output: 150
json-rpc-settings.md (1)
190-190
: Verify the JSON Schema URL is accessible and valid.
Let's ensure the schema URL is accessible and contains a valid JSON Schema.
✅ Verification successful
Schema URL is accessible and contains a valid JSON Schema
The schema URL is accessible and contains a valid JSON Schema:
- Confirms presence of
$schema
property - Uses JSON Schema Draft-07
- Has correct root type of "object"
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify that the JSON Schema URL is accessible and contains valid schema
# Check if the schema URL is accessible and contains valid JSON
curl -s https://www.flowlauncher.com/schemas/settings-template.schema.json | jq 'has("$schema")'
# Verify schema version and type
curl -s https://www.flowlauncher.com/schemas/settings-template.schema.json | jq '.["$schema"], .type'
Length of output: 258
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
This PR adds information on using JSON schemas for IDE validation and auto-complete in
plugin.json
andSettingsTemplate.yaml
files.