|
| 1 | +{ |
| 2 | + "$schema": "http://json-schema.org/draft-07/schema#", |
| 3 | + "$id": "https://raw.githubusercontent.com/bashandbone/submod/main/schemas/submod.json", |
| 4 | + "title": "submod configuration", |
| 5 | + "description": "Configuration file for submod, a git submodule management CLI.\nhttps://docs.rs/", |
| 6 | + "type": "object", |
| 7 | + "properties": { |
| 8 | + "schema_version": { |
| 9 | + "type": "string", |
| 10 | + "pattern": "^v?\\d+(\\.\\d+){0,2}$", |
| 11 | + "description": "The version of the submod configuration schema in use. Accepts \"1\", \"1.0\", or \"1.0.0\" format.\nhttps://docs.rs/submod" |
| 12 | + }, |
| 13 | + "defaults": { |
| 14 | + "type": "object", |
| 15 | + "description": "Global defaults applied to all submodules. Git has no native global submodule configuration; submod resolves this by applying these settings across all submodule entries. Any settings you set for an individual submodule will override these defaults.\nhttps://docs.rs/submod/latest/submod/options/", |
| 16 | + "properties": { |
| 17 | + "ignore": { "$ref": "#/$defs/ignoreValue" }, |
| 18 | + "update": { "$ref": "#/$defs/updateValue" }, |
| 19 | + "fetch": { "$ref": "#/$defs/fetchValue" }, |
| 20 | + "" |
| 21 | + }, |
| 22 | + "additionalProperties": false |
| 23 | + } |
| 24 | + }, |
| 25 | + "additionalProperties": { |
| 26 | + "$ref": "#/$defs/submodule" |
| 27 | + }, |
| 28 | + "$defs": { |
| 29 | + "ignoreValue": { |
| 30 | + "type": "string", |
| 31 | + "enum": ["all", "dirty", "untracked", "none"], |
| 32 | + "default": "none", |
| 33 | + "description": "Controls which changes cause a submodule to appear as modified in git status.\n- \"none\": report all changes (default)\n- \"untracked\": ignore untracked files\n- \"dirty\": ignore all working tree changes, only track commits\n- \"all\": always ignore the submodule\nhttps://docs.rs/submod/latest/submod/options/" |
| 34 | + }, |
| 35 | + "updateValue": { |
| 36 | + "type": "string", |
| 37 | + "enum": ["checkout", "rebase", "merge", "none"], |
| 38 | + "default": "checkout", |
| 39 | + "description": "How to update the submodule when the superproject moves to a new commit.\n- \"checkout\": detach HEAD at the recorded commit (default)\n- \"rebase\": rebase current branch onto the recorded commit\n- \"merge\": merge the recorded commit into the current branch\n- \"none\": do not update\nhttps://docs.rs/submod/latest/submod/options/" |
| 40 | + }, |
| 41 | + "fetchValue": { |
| 42 | + "type": "string", |
| 43 | + "enum": ["on-demand", "always", "never"], |
| 44 | + "default": "on-demand", |
| 45 | + "description": "When to fetch submodule updates from the remote.\n- \"on-demand\": fetch only when needed (default)\n- \"always\": fetch on every operation\n- \"never\": never fetch automatically\nhttps://docs.rs/submod/latest/submod/options/" |
| 46 | + }, |
| 47 | + "submodule": { |
| 48 | + "type": "object", |
| 49 | + "description": "Configuration for a single submodule. The section name is your local alias for the submodule; submod maps it to the full relative path in .gitmodules and .git/config.", |
| 50 | + "required": ["url"], |
| 51 | + "properties": { |
| 52 | + "url": { |
| 53 | + "type": "string", |
| 54 | + "description": "Required. The submodule repository URL. Accepts remote URLs (https, ssh) or local paths (absolute or relative). Use the same value as in .gitmodules or .git/config." |
| 55 | + }, |
| 56 | + "path": { |
| 57 | + "type": "string", |
| 58 | + "description": "Path where the submodule is checked out, relative to the superproject root. Defaults to the submodule name in the repository root." |
| 59 | + }, |
| 60 | + "branch": { |
| 61 | + "type": "string", |
| 62 | + "description": "Branch to track in the submodule. Defaults to the submodule's default branch (usually main or master).\nUse \".\" or the aliases \"current\", \"current-in-superproject\", \"superproject\", or \"super\" to track the superproject's current branch. **Do not use these strings as actual branch names in the submodule repository.** If you need to track a branch with one of these names, use the full branch name (e.g., \"refs/heads/current\")." |
| 63 | + }, |
| 64 | + "sparse_paths": { |
| 65 | + "type": "array", |
| 66 | + "items": { "type": "string" }, |
| 67 | + "description": "Relative paths or glob patterns to include in a sparse checkout. If omitted, all files are checked out.\nWhen set, git prepends:\n /*\n !/*/\nThis includes only root-level files by default. To include subdirectories, add paths like \"src/\". To exclude root files, prefix with \"!\" (e.g., \"!/README.md\")." |
| 68 | + }, |
| 69 | + "shallow": { |
| 70 | + "type": "boolean", |
| 71 | + "default": false, |
| 72 | + "description": "If true, performs a shallow clone (only the most recent commit). Useful for large repositories where full history is not needed." |
| 73 | + }, |
| 74 | + "ignore": { "$ref": "#/$defs/ignoreValue" }, |
| 75 | + "update": { "$ref": "#/$defs/updateValue" }, |
| 76 | + "fetch": { "$ref": "#/$defs/fetchValue" } |
| 77 | + }, |
| 78 | + "additionalProperties": false |
| 79 | + } |
| 80 | + } |
| 81 | +} |
0 commit comments