Skip to content

feat(config): publish JSON schema for editor autocomplete - #197

Merged
stephenleo merged 1 commit into
mainfrom
feat/config-schema
Jul 27, 2026
Merged

feat(config): publish JSON schema for editor autocomplete#197
stephenleo merged 1 commit into
mainfrom
feat/config-schema

Conversation

@stephenleo

Copy link
Copy Markdown
Owner

Summary

  • Adds a cship config-schema subcommand (via schemars) that emits a JSON Schema for the [cship] config section.
  • Publishes the generated schema as docs/public/config-schema.json, served at https://cship.dev/config-schema.json once the docs site redeploys — usable via "$schema" = 'https://cship.dev/config-schema.json' in cship.toml/starship.toml for editor autocomplete (mirrors Starship's config-schema.json).
  • CI now diffs a freshly generated schema against the committed one so it can't silently drift from src/config.rs.
  • Docs: new "Editor Schema" section in docs/configuration.md.

Closes #196

Test plan

  • cargo fmt --check
  • cargo clippy -- -D warnings
  • cargo test (591 passed)
  • cargo build --release
  • cargo run -- config-schema | diff - docs/public/config-schema.json (matches, same check CI runs)

🤖 Generated with Claude Code

Adds a `cship config-schema` subcommand (via schemars) that emits a JSON
Schema for the `[cship]` config section, and publishes it as
docs/public/config-schema.json so it's served at
https://cship.dev/config-schema.json — usable via
`"$schema" = 'https://cship.dev/config-schema.json'` in cship.toml /
starship.toml. CI diffs the committed schema against a fresh generation
to catch drift.

Closes #196

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@stephenleo
stephenleo merged commit 248e2a2 into main Jul 27, 2026
3 checks passed
@stephenleo
stephenleo deleted the feat/config-schema branch July 27, 2026 01:29
@stephenleo stephenleo mentioned this pull request Jul 27, 2026
@stephenleo stephenleo mentioned this pull request Aug 4, 2026
stephenleo added a commit that referenced this pull request Aug 4, 2026
Bumps to 1.8.1 and closes out the Unreleased section, adding the
missing changelog entries for the config JSON schema (#197) and the
model family_style map (#195).

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
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.

Provide config schema

1 participant