diff --git a/crates/tombi-comment-directive/src/root.rs b/crates/tombi-comment-directive/src/root.rs index e26c6f8e..d954c64d 100644 --- a/crates/tombi-comment-directive/src/root.rs +++ b/crates/tombi-comment-directive/src/root.rs @@ -4,6 +4,10 @@ use tombi_toml_version::TomlVersion; #[serde(deny_unknown_fields)] #[serde(rename_all = "kebab-case")] #[cfg_attr(feature = "jsonschema", derive(schemars::JsonSchema))] +#[cfg_attr(feature = "jsonschema", schemars(extend("$id" = "tombi://json.tombi.dev/root-comment-directive.json")))] pub struct RootCommentDirective { + /// # TOML version. + /// + /// This directive specifies the TOML version of this document, with the highest priority. pub toml_version: Option, } diff --git a/json.tombi.dev/api/json/catalog.json b/json.tombi.dev/api/json/catalog.json index 8852056f..3c8ff348 100644 --- a/json.tombi.dev/api/json/catalog.json +++ b/json.tombi.dev/api/json/catalog.json @@ -1,5 +1,6 @@ { - "$schema": "tombi://json.tombi.dev/api/json/catalog.json", + "$id": "tombi://json.tombi.dev/api/json/catalog.json", + "$schema": "http://json-schema.org/draft-07/schema#", "version": 1, "schemas": [ { diff --git a/json.tombi.dev/root-comment-directive.json b/json.tombi.dev/root-comment-directive.json index 9fcad0b0..48e8f4cb 100644 --- a/json.tombi.dev/root-comment-directive.json +++ b/json.tombi.dev/root-comment-directive.json @@ -1,9 +1,12 @@ { - "$schema": "tombi://json.tombi.dev/root-comment-directive.json", + "$id": "tombi://json.tombi.dev/root-comment-directive.json", + "$schema": "http://json-schema.org/draft-07/schema#", "title": "RootCommentDirective", "type": "object", "properties": { "toml-version": { + "title": "TOML version.", + "description": "This directive specifies the TOML version of this document, with the highest priority.", "anyOf": [ { "$ref": "#/definitions/TomlVersion" @@ -19,7 +22,10 @@ "TomlVersion": { "title": "TOML version.", "type": "string", - "enum": ["v1.0.0", "v1.1.0-preview"] + "enum": [ + "v1.0.0", + "v1.1.0-preview" + ] } } } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 1b20557a..f00afab3 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,3 @@ -# tombi: toml-version = "v1.0.0" - [toolchain] channel = "stable" components = ["clippy", "rust-analyzer", "rustfmt"]