Skip to content

config: commit the JSON schema and point the example at it - #1006

Open
michalhosna wants to merge 1 commit into
mh/config-schema-requiredfrom
mh/config-schema-file
Open

michalhosna wants to merge 1 commit into
mh/config-schema-requiredfrom
mh/config-schema-file

Conversation

@michalhosna

@michalhosna michalhosna commented Nov 17, 2026 •

Copy link
Copy Markdown
Member
  • Editors with YAML schema support (yaml-language-server) read the modeline in config.example.yaml.

This change is Reviewable

@michalhosna
michalhosna added this pull request to stack #1007 November 17, 2026 23:13
@coderabbitai

coderabbitai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The pull request adds a JSON Schema for relay configuration, links it from the example YAML and documentation, and adds a test that checks the committed schema against generated output.

Changes: Configuration schema

Layer / File(s) Summary
Publish and reference the configuration schema
config.schema.json, config.example.yaml, docs/config.md, changelog.d/added/config-schema-file.md
Adds a Draft 2020-12 schema for relay configuration. The example YAML and configuration documentation reference the schema. A changelog entry records the addition.
Check committed schema freshness
test/CMakeLists.txt, test/config/LoaderTest.cpp, docs/dev/config.md
Passes the schema path to the test target. The test compares the committed schema with generated output. Developer documentation describes schema updates and regeneration.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related issues

  • openmoq/moqx#1004 reports optional fields listed as required in the generated schema. The committed schema has required lists that appear to address this objective, but the supplied context does not verify the generator fix.

Possibly related PRs

  • openmoq/moqx#1005 changes schema generation behavior that affects the committed schema in this pull request.
Merge Risk: Minimal · up to 29725

This change adds a committed JSON schema for editor support and a test that fails when the schema is stale. It does not change runtime behavior, and no merge-blocking issue was found.

Pre-merge checks: Passed 5

Check name Status Explanation
Title check Passed The title names the two main changes: committing the JSON schema file (config.schema.json) and updating config.example.yaml to reference it. The changeset matches both parts, so the title reflects the…
Description check Passed The description states that editors with yaml-language-server read the modeline in config.example.yaml. This relates directly to the changeset, which adds that modeline and the schema file, so the des…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Changelog Entry Passed The PR adds a user-visible change and includes a matching changelog entry. The PR ships config.schema.json and adds a YAML schema modeline to config.example.yaml. Editors with YAML schema support …
Full details: Title check

Explanation

The title names the two main changes: committing the JSON schema file (config.schema.json) and updating config.example.yaml to reference it. The changeset matches both parts, so the title reflects the main change.

Full details: Description check

Explanation

The description states that editors with yaml-language-server read the modeline in config.example.yaml. This relates directly to the changeset, which adds that modeline and the schema file, so the description is on-topic.

Full details: Changelog Entry

Explanation

The PR adds a user-visible change and includes a matching changelog entry. The PR ships config.schema.json and adds a YAML schema modeline to config.example.yaml. Editors with YAML schema support can now load the schema. This is an operator-facing addition, so the changelog rule applies. The diff adds changelog.d/added/config-schema-file.md (new file, one line): - [config.schema.json](/docs/config.md#tooling), the config's JSON schema, ships in the repo; editors with YAML schema support load it by path or by its raw GitHub URL at the release tag. This follows changelog.d/README.md: - The section added is valid. - The file name config-schema-file has no dot and is unique in its section. - The file holds a single list item without a PR link. It also follows CONTRIBUTING.md#changelog. The entry describes what an operator can observe, names the config file, and links the doc section that covers the change (docs/config.md#tooling). No further entry is needed.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Automatic approval policy

Commit: 2972540cb254.

Setting Effective value Source
Automatic approvals Enabled Global configuration
Merge risk Low Global configuration
Security risk Not set Global configuration

Not set means no limit was configured after inheritance. Use @coderabbitai configuration to inspect the resolved settings and their sources.

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 04254a5 and 2972540.

Files selected for processing: 3

  • changelog.d/added/config-schema-file.md
  • config.example.yaml
  • docs/config.md
Files skipped from review as they are similar to previous changes: 3

  • changelog.d/added/config-schema-file.md
  • config.example.yaml
  • docs/config.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@afrind

afrind commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

- Editors with YAML schema support (yaml-language-server) read the
  modeline in config.example.yaml.
- The modeline path is relative to the example file.
- At any tag or branch, it names the schema of the same commit.
- No release asset is needed.
- A config outside the repo replaces the modeline path with the raw
  GitHub URL at its release tag: the first modeline wins.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Reviewed-by: Codex (gpt-6.1-sol)
Reviewed-by: Codex (gpt-6.2-sol)
@michalhosna
michalhosna force-pushed the mh/config-schema-file branch from 04254a5 to 2972540 Compare November 20, 2026 23:07

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants