rust-lang / rust-lang/mdBook

Support JSON Schema

Open
#3,136 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-enhancement
Dominant language
Rust
Stars
22.2k
Forks
1.9k
PR merge metrics
PR metrics pending

Description

Problem

Is it possible to generate a JSON Schema for book.toml and register it with SchemaStore?

An issue regarding this has been raised in Tombi, but I believe it would be better to handle this on the mdbook side.

https://github.com/tombi-toml/tombi/issues/1944

Proposed Solution

We will use schemars to enable the automatic generation of a JSON Schema from a struct that parses book.toml.

Notes

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the Rust struct that parses book.toml and review how mdBook represents its configuration. Then investigate schemars-based schema generation and SchemaStore registration. Done means mdBook can generate a JSON Schema for book.toml and the schema is registered with SchemaStore.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
64/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.