diff --git a/src/schemas/json/cargo.json b/src/schemas/json/cargo.json index 6fcfdbabcd3..2a16fe4a7a3 100644 --- a/src/schemas/json/cargo.json +++ b/src/schemas/json/cargo.json @@ -248,6 +248,7 @@ } } }, + "additionalProperties": false, "x-tombi-table-keys-order": "ascending" }, "Edition": { @@ -811,6 +812,7 @@ } } }, + "additionalProperties": false, "x-tombi-table-keys-order": "schema" }, "BuildOverride": { @@ -842,6 +844,7 @@ "$ref": "#/definitions/Profile" } }, + "additionalProperties": false, "x-tombi-table-keys-order": "schema" } ] @@ -935,6 +938,7 @@ } } }, + "additionalProperties": false, "x-tombi-table-keys-order": "schema" }, "Profiles": { @@ -1217,6 +1221,7 @@ } } }, + "additionalProperties": false, "x-tombi-table-keys-order": "schema" }, "Workspace": { @@ -1224,11 +1229,14 @@ "description": "The `[workspace]` table in `Cargo.toml` defines which packages are members of\nthe workspace:\n\n```toml\n[workspace]\nmembers = [\"member1\", \"path/to/member2\", \"crates/*\"]\nexclude = [\"crates/foo\", \"path/to/other\"]\n```\n\nAn empty `[workspace]` table can be used with a `[package]` to conveniently\ncreate a workspace with the package and all of its path dependencies.\n\nAll [`path` dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-path-dependencies) residing in the workspace directory automatically\nbecome members. Additional members can be listed with the `members` key, which\nshould be an array of strings containing directories with `Cargo.toml` files.\n\nThe `members` list also supports [globs](https://docs.rs/glob/0.3.0/glob/struct.Pattern.html) to match multiple paths, using\ntypical filename glob patterns like `*` and `?`.\n\nThe `exclude` key can be used to prevent paths from being included in a\nworkspace. This can be useful if some path dependencies aren't desired to be\nin the workspace at all, or using a glob pattern and you want to remove a\ndirectory.\n\nAn empty `[workspace]` table can be used with a `[package]` to conveniently\ncreate a workspace with the package and all of its path dependencies.", "type": "object", "properties": { - "default-members": { - "description": "The optional `default-members` key can be specified to set the members to\noperate on when in the workspace root and the package selection flags are not\nused:\n\n```toml\n[workspace]\nmembers = [\"path/to/member1\", \"path/to/member2\", \"path/to/member3/*\"]\ndefault-members = [\"path/to/member2\", \"path/to/member3/foo\"]\n```\n\nWhen specified, `default-members` must expand to a subset of `members`.", + "resolver": { + "$ref": "#/definitions/Resolver" + }, + "members": { + "description": "All [`path` dependencies] residing in the workspace directory automatically\nbecome members. Additional members can be listed with the `members` key, which\nshould be an array of strings containing directories with `Cargo.toml` files.\n\nThe `members` list also supports [globs] to match multiple paths, using\ntypical filename glob patterns like `*` and `?`.", "type": "array", "items": { - "description": "The optional `default-members` key can be specified to set the members to\noperate on when in the workspace root and the package selection flags are not\nused:\n\n```toml\n[workspace]\nmembers = [\"path/to/member1\", \"path/to/member2\", \"path/to/member3/*\"]\ndefault-members = [\"path/to/member2\", \"path/to/member3/foo\"]\n```\n\nWhen specified, `default-members` must expand to a subset of `members`.", + "description": "All [`path` dependencies] residing in the workspace directory automatically\nbecome members. Additional members can be listed with the `members` key, which\nshould be an array of strings containing directories with `Cargo.toml` files.\n\nThe `members` list also supports [globs] to match multiple paths, using\ntypical filename glob patterns like `*` and `?`.", "type": "string", "x-taplo": { "links": { @@ -1243,19 +1251,6 @@ } } }, - "dependencies": { - "description": "The `workspace.dependencies` table is where you define dependencies to be\ninherited by members of a workspace.\n\nSpecifying a workspace dependency is similar to [package dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html) except:\n- Dependencies from this table cannot be declared as `optional`\n- [`features`][features] declared in this table are additive with the `features` from `[dependencies]`\n\nYou can then [inherit the workspace dependency as a package dependency](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#inheriting-a-dependency-from-a-workspace)\n\nExample:\n```toml\n# [PROJECT_DIR]/Cargo.toml\n[workspace]\nmembers = [\"bar\"]\n\n[workspace.dependencies]\ncc = \"1.0.73\"\nrand = \"0.8.5\"\nregex = { version = \"1.6.0\", default-features = false, features = [\"std\"] }\n```\n\n```toml\n# [PROJECT_DIR]/bar/Cargo.toml\n[package]\nname = \"bar\"\nversion = \"0.2.0\"\n\n[dependencies]\nregex = { workspace = true, features = [\"unicode\"] }\n\n[build-dependencies]\ncc.workspace = true\n\n[dev-dependencies]\nrand.workspace = true\n```", - "type": "object", - "additionalProperties": { - "$ref": "#/definitions/Dependency" - }, - "x-tombi-table-keys-order": "ascending", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section" - } - } - }, "exclude": { "description": "The `exclude` key can be used to prevent paths from being included in a\nworkspace. This can be useful if some path dependencies aren't desired to be\nin the workspace at all, or using a glob pattern and you want to remove a\ndirectory.", "type": "array", @@ -1275,20 +1270,11 @@ } } }, - "lints": { - "$ref": "#/definitions/Lints", - "description": "The `workspace.lints` table is where you define lint configuration to be inherited by members of a workspace.", - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section" - } - } - }, - "members": { - "description": "All [`path` dependencies] residing in the workspace directory automatically\nbecome members. Additional members can be listed with the `members` key, which\nshould be an array of strings containing directories with `Cargo.toml` files.\n\nThe `members` list also supports [globs] to match multiple paths, using\ntypical filename glob patterns like `*` and `?`.", + "default-members": { + "description": "The optional `default-members` key can be specified to set the members to\noperate on when in the workspace root and the package selection flags are not\nused:\n\n```toml\n[workspace]\nmembers = [\"path/to/member1\", \"path/to/member2\", \"path/to/member3/*\"]\ndefault-members = [\"path/to/member2\", \"path/to/member3/foo\"]\n```\n\nWhen specified, `default-members` must expand to a subset of `members`.", "type": "array", "items": { - "description": "All [`path` dependencies] residing in the workspace directory automatically\nbecome members. Additional members can be listed with the `members` key, which\nshould be an array of strings containing directories with `Cargo.toml` files.\n\nThe `members` list also supports [globs] to match multiple paths, using\ntypical filename glob patterns like `*` and `?`.", + "description": "The optional `default-members` key can be specified to set the members to\noperate on when in the workspace root and the package selection flags are not\nused:\n\n```toml\n[workspace]\nmembers = [\"path/to/member1\", \"path/to/member2\", \"path/to/member3/*\"]\ndefault-members = [\"path/to/member2\", \"path/to/member3/foo\"]\n```\n\nWhen specified, `default-members` must expand to a subset of `members`.", "type": "string", "x-taplo": { "links": { @@ -1303,28 +1289,21 @@ } } }, - "metadata": { - "description": "The `workspace.metadata` table is ignored by Cargo and will not be warned\nabout. This section can be used for tools that would like to store workspace\nconfiguration in `Cargo.toml`. For example:\n\n```toml\n[workspace]\nmembers = [\"member1\", \"member2\"]\n\n[workspace.metadata.webcontents]\nroot = \"path/to/webproject\"\ntool = [\"npm\", \"run\", \"build\"]\n# ...\n```\n\nThere is a similar set of tables at the package level at\n`package.metadata`. While cargo does not specify a\nformat for the content of either of these tables, it is suggested that\nexternal tools may wish to use them in a consistent fashion, such as referring\nto the data in `workspace.metadata` if data is missing from `package.metadata`,\nif that makes sense for the tool in question.\n", - "type": "object", - "additionalProperties": true, - "x-taplo": { - "links": { - "key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section" - } - } - }, - "resolver": { - "$ref": "#/definitions/Resolver" - }, "package": { "description": "The `workspace.package` table is where you define keys that can be\ninherited by members of a workspace. These keys can be inherited by\ndefining them in the member package with `{key}.workspace = true`.\n\nKeys that are supported:\n\n| | |\n|----------------|-----------------|\n| `authors` | `categories` |\n| `description` | `documentation` |\n| `edition` | `exclude` |\n| `homepage` | `include` |\n| `keywords` | `license` |\n| `license-file` | `publish` |\n| `readme` | `repository` |\n| `rust-version` | `version` |\n\n- `license-file` and `readme` are relative to the workspace root\n- `include` and `exclude` are relative to your package root\n\nExample:\n```toml\n# [PROJECT_DIR]/Cargo.toml\n[workspace]\nmembers = [\"bar\"]\n\n[workspace.package]\nversion = \"1.2.3\"\nauthors = [\"Nice Folks\"]\ndescription = \"A short description of my package\"\ndocumentation = \"https://example.com/bar\"\n```\n\n```toml\n# [PROJECT_DIR]/bar/Cargo.toml\n[package]\nname = \"bar\"\nversion.workspace = true\nauthors.workspace = true\ndescription.workspace = true\ndocumentation.workspace = true\n```", "type": "object", "properties": { + "version": { + "$ref": "#/definitions/SemVer" + }, "authors": { "$ref": "#/definitions/Authors" }, - "categories": { - "$ref": "#/definitions/Categories" + "edition": { + "$ref": "#/definitions/Edition" + }, + "rust-version": { + "$ref": "#/definitions/RustVersion" }, "description": { "$ref": "#/definitions/Description" @@ -1332,20 +1311,14 @@ "documentation": { "$ref": "#/definitions/Documentation" }, - "edition": { - "$ref": "#/definitions/Edition" - }, - "exclude": { - "$ref": "#/definitions/Exclude" + "readme": { + "$ref": "#/definitions/Readme" }, "homepage": { "$ref": "#/definitions/Homepage" }, - "include": { - "$ref": "#/definitions/Include" - }, - "keywords": { - "$ref": "#/definitions/Keywords" + "repository": { + "$ref": "#/definitions/Repository" }, "license": { "$ref": "#/definitions/License" @@ -1353,29 +1326,64 @@ "license-file": { "$ref": "#/definitions/LicenseFile" }, - "publish": { - "$ref": "#/definitions/Publish" + "keywords": { + "$ref": "#/definitions/Keywords" }, - "readme": { - "$ref": "#/definitions/Readme" + "categories": { + "$ref": "#/definitions/Categories" }, - "repository": { - "$ref": "#/definitions/Repository" + "exclude": { + "$ref": "#/definitions/Exclude" }, - "rust-version": { - "$ref": "#/definitions/RustVersion" + "include": { + "$ref": "#/definitions/Include" }, - "version": { - "$ref": "#/definitions/SemVer" + "publish": { + "$ref": "#/definitions/Publish" } }, + "additionalProperties": false, + "x-tombi-table-keys-order": "schema", "x-taplo": { "links": { "key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-package-table" } } + }, + "dependencies": { + "description": "The `workspace.dependencies` table is where you define dependencies to be\ninherited by members of a workspace.\n\nSpecifying a workspace dependency is similar to [package dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html) except:\n- Dependencies from this table cannot be declared as `optional`\n- [`features`][features] declared in this table are additive with the `features` from `[dependencies]`\n\nYou can then [inherit the workspace dependency as a package dependency](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#inheriting-a-dependency-from-a-workspace)\n\nExample:\n```toml\n# [PROJECT_DIR]/Cargo.toml\n[workspace]\nmembers = [\"bar\"]\n\n[workspace.dependencies]\ncc = \"1.0.73\"\nrand = \"0.8.5\"\nregex = { version = \"1.6.0\", default-features = false, features = [\"std\"] }\n```\n\n```toml\n# [PROJECT_DIR]/bar/Cargo.toml\n[package]\nname = \"bar\"\nversion = \"0.2.0\"\n\n[dependencies]\nregex = { workspace = true, features = [\"unicode\"] }\n\n[build-dependencies]\ncc.workspace = true\n\n[dev-dependencies]\nrand.workspace = true\n```", + "type": "object", + "additionalProperties": { + "$ref": "#/definitions/Dependency" + }, + "x-tombi-table-keys-order": "ascending", + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section" + } + } + }, + "lints": { + "$ref": "#/definitions/Lints", + "description": "The `workspace.lints` table is where you define lint configuration to be inherited by members of a workspace.", + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section" + } + } + }, + "metadata": { + "description": "The `workspace.metadata` table is ignored by Cargo and will not be warned\nabout. This section can be used for tools that would like to store workspace\nconfiguration in `Cargo.toml`. For example:\n\n```toml\n[workspace]\nmembers = [\"member1\", \"member2\"]\n\n[workspace.metadata.webcontents]\nroot = \"path/to/webproject\"\ntool = [\"npm\", \"run\", \"build\"]\n# ...\n```\n\nThere is a similar set of tables at the package level at\n`package.metadata`. While cargo does not specify a\nformat for the content of either of these tables, it is suggested that\nexternal tools may wish to use them in a consistent fashion, such as referring\nto the data in `workspace.metadata` if data is missing from `package.metadata`,\nif that makes sense for the tool in question.\n", + "type": "object", + "additionalProperties": true, + "x-taplo": { + "links": { + "key": "https://doc.rust-lang.org/cargo/reference/workspaces.html#the-workspace-section" + } + } } }, + "additionalProperties": false, "x-tombi-table-keys-order": "schema", "x-taplo": { "links": {