diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a728ac2e9..d4b3f7020 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -10,8 +10,8 @@ Unreleased .. vendor-insert-here -- Update vendored schemas: azure-pipelines, bamboo-spec, buildkite, drone-ci, - github-workflows, gitlab-ci, meltano, mergify, renovate, woodpecker-ci (2025-10-12) +- Update vendored schemas: azure-pipelines, bamboo-spec, buildkite, circle-ci, drone-ci, + github-workflows, gitlab-ci, meltano, mergify, renovate, woodpecker-ci (2025-10-13) 0.34.0 ------ diff --git a/src/check_jsonschema/builtin_schemas/vendor/circle-ci.json b/src/check_jsonschema/builtin_schemas/vendor/circle-ci.json index dc444992a..7fced709c 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/circle-ci.json +++ b/src/check_jsonschema/builtin_schemas/vendor/circle-ci.json @@ -1,7 +1,3017 @@ { - "$schema": "http://json-schema.org/draft-06/schema#", - "$id": "https://json.schemastore.org/circleciconfig.json", - "$ref": "https://raw.githubusercontent.com/CircleCI-Public/circleci-yaml-language-server/refs/heads/main/schema.json", - "title": "CircleCI Config", - "type": "object" -} + "$schema": "http://json-schema.org/draft-07/schema#", + "title": "CircleCI Config", + "definitions": { + "jobDefinition": { + "oneOf": [ + { + "type": "string", + "description": "Job may be a string reference to another job" + }, + { + "type": "object", + "description": "Job definition object", + "properties": { + "type": { + "enum": [ + "build", + "release", + "lock", + "unlock", + "approval", + "no-op" + ], + "description": "The job type. If not specified, defaults to build." + } + }, + "if": { + "required": [ + "type" + ], + "properties": { + "type": { + "const": "release" + } + } + }, + "then": { + "description": "Release job.", + "required": [ + "plan_name" + ], + "properties": { + "plan_name": { + "type": "string", + "description": "Required plan name for release jobs." + } + }, + "additionalProperties": true + }, + "else": { + "if": { + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "lock", + "unlock" + ] + } + } + }, + "then": { + "description": "A lock/unlock job", + "required": [ + "key" + ], + "properties": { + "key": { + "type": "string", + "description": "Required key for lock/unlock jobs." + } + }, + "additionalProperties": true + }, + "else": { + "if": { + "required": [ + "type" + ], + "properties": { + "type": { + "enum": [ + "approval", + "no-op" + ] + } + } + }, + "then": { + "description": "Approval/no-op jobs primarily act as workflow markers. Other keys like `steps:` are permitted but will be ignored in the final pipeline.", + "additionalProperties": true + }, + "else": { + "if": { + "description": "Condition: The job must be of type 'build' or have no type specified.", + "anyOf": [ + { + "not": { + "required": [ + "type" + ] + } + }, + { + "required": [ + "type" + ], + "properties": { + "type": { + "const": "build" + } + } + } + ] + }, + "then": { + "description": "Validation: The job must adhere to the structure of a build job.", + "properties": { + "description": { + "type": "string" + }, + "type": { + "const": "build", + "description": "The job type. If not specified, defaults to build." + }, + "parallelism": { + "description": "A integer or a parameter evaluating to a integer", + "anyOf": [ + { + "oneOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "string", + "pattern": " *<< *pipeline.parameters.([^ ]+) *>> *" + } + ] + }, + { + "type": "integer" + } + ] + }, + "macos": { + "type": "object", + "properties": { + "xcode": { + "type": [ + "string", + "number" + ] + }, + "resource_class": { + "type": "string" + }, + "shell": { + "type": "string" + } + }, + "required": [ + "xcode" + ], + "additionalProperties": false + }, + "resource_class": { + "type": "string" + }, + "docker": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "image": { + "type": "string" + }, + "name": { + "type": "string" + }, + "entrypoint": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "command": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "user": { + "type": "string" + }, + "environment": { + "oneOf": [ + { + "description": "Allow null to account for empty `environment:` declarations.", + "type": [ + "string", + "null" + ] + }, + { + "description": "An array of strings in the form KEY=VALUE", + "type": "array", + "items": { + "$ref": "#/definitions/environment" + } + }, + { + "type": "object", + "description": "The value should be a string, but we allow null, boolean and numbers too. Examples: `FOO: true` and `BAR: 2` `BAZ:`", + "additionalProperties": { + "type": [ + "string", + "boolean", + "number", + "null" + ] + } + } + ] + }, + "aws_auth": { + "oneOf": [ + { + "type": "object", + "properties": { + "aws_access_key_id": { + "type": "string" + }, + "aws_secret_access_key": { + "type": "string" + } + }, + "required": [ + "aws_access_key_id", + "aws_secret_access_key" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "oidc_role_arn": { + "type": "string" + } + }, + "required": [ + "oidc_role_arn" + ], + "additionalProperties": false + } + ] + }, + "auth": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "username", + "password" + ], + "additionalProperties": false + } + }, + "required": [ + "image" + ], + "additionalProperties": false + } + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/definitions/step" + }, + "minItems": 1 + }, + "working_directory": { + "type": "string" + }, + "retention": { + "type": "object", + "properties": { + "caches": { + "type": "string", + "pattern": "^([1-9]|1[0-5])d$" + } + }, + "additionalProperties": false + }, + "circleci_ip_ranges": { + "type": "boolean" + }, + "machine": { + "description": "Machine must be a boolean or a map", + "oneOf": [ + { + "description": "A boolean or a template parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + { + "type": "object", + "properties": { + "enabled": { + "description": "A boolean or a template parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "image": { + "type": "string" + }, + "docker_layer_caching": { + "description": "A boolean or a template parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "resource_class": { + "type": "string" + }, + "shell": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "environment": { + "oneOf": [ + { + "description": "Allow null to account for empty `environment:` declarations.", + "type": [ + "string", + "null" + ] + }, + { + "description": "An array of strings in the form KEY=VALUE", + "type": "array", + "items": { + "$ref": "#/definitions/environment" + } + }, + { + "type": "object", + "description": "The value should be a string, but we allow null, boolean and numbers too. Examples: `FOO: true` and `BAR: 2` `BAZ:`", + "additionalProperties": { + "type": [ + "string", + "boolean", + "number", + "null" + ] + } + } + ] + }, + "executor": { + "oneOf": [ + { + "type": "string", + "description": "short executor invocation, name of executor" + }, + { + "type": "object", + "description": "executor invocation with arguments, i.e. parameters", + "minProperties": 1, + "additionalProperties": true, + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + }, + "shell": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "parameters": { + "description": "Parameters given to a job.", + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "boolean", + "string", + "steps", + "enum", + "executor", + "integer", + "env_var_name" + ] + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/step" + } + } + ] + }, + "description": { + "type": "string" + }, + "enum": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "minProperties": 1 + } + }, + "required": [ + "steps" + ], + "additionalProperties": false, + "anyOf": [ + { + "description": "A job must have one of `docker`, `machine`, `macos` or `executor` (which can provide docker/machine/macos information).", + "type": "object", + "required": [ + "executor" + ] + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "machine" + ] + }, + { + "type": "object", + "required": [ + "docker" + ] + }, + { + "type": "object", + "required": [ + "macos" + ] + } + ] + } + ] + }, + "else": false + } + } + } + } + ] + }, + "orb": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "jobs": { + "description": "Any string key is allowed as job name.", + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z\\s\\d_-]*$" + }, + "additionalProperties": { + "$ref": "#/definitions/jobDefinition" + } + }, + "commands": { + "type": "object", + "propertyNames": { + "pattern": "^[a-z][a-z\\d_-]*$" + }, + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "parameters": { + "description": "Parameters given to a step.", + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "boolean", + "string", + "steps", + "enum", + "executor", + "integer", + "env_var_name" + ] + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/step" + } + } + ] + }, + "description": { + "type": "string" + }, + "enum": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "minProperties": 1 + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/definitions/step" + }, + "minItems": 1 + } + }, + "required": [ + "steps" + ], + "additionalProperties": false + }, + { + "type": "string", + "description": "Command may be a string reference to another command" + } + ] + } + }, + "executors": { + "type": "object", + "propertyNames": { + "pattern": "^[a-z][a-z\\d_-]*$" + }, + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "macos": { + "type": "object", + "properties": { + "xcode": { + "type": [ + "string", + "number" + ] + }, + "resource_class": { + "type": "string" + }, + "shell": { + "type": "string" + } + }, + "required": [ + "xcode" + ], + "additionalProperties": false + }, + "resource_class": { + "type": "string" + }, + "docker": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "image": { + "type": "string" + }, + "name": { + "type": "string" + }, + "entrypoint": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "command": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "user": { + "type": "string" + }, + "environment": { + "oneOf": [ + { + "description": "Allow null to account for empty `environment:` declarations.", + "type": [ + "string", + "null" + ] + }, + { + "description": "An array of strings in the form KEY=VALUE", + "type": "array", + "items": { + "$ref": "#/definitions/environment" + } + }, + { + "type": "object", + "description": "The value should be a string, but we allow null, boolean and numbers too. Examples: `FOO: true` and `BAR: 2` `BAZ:`", + "additionalProperties": { + "type": [ + "string", + "boolean", + "number", + "null" + ] + } + } + ] + }, + "aws_auth": { + "oneOf": [ + { + "type": "object", + "properties": { + "aws_access_key_id": { + "type": "string" + }, + "aws_secret_access_key": { + "type": "string" + } + }, + "required": [ + "aws_access_key_id", + "aws_secret_access_key" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "oidc_role_arn": { + "type": "string" + } + }, + "required": [ + "oidc_role_arn" + ], + "additionalProperties": false + } + ] + }, + "auth": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "username", + "password" + ], + "additionalProperties": false + } + }, + "required": [ + "image" + ], + "additionalProperties": false + } + }, + "working_directory": { + "type": "string" + }, + "machine": { + "description": "Machine must be a boolean or a map", + "oneOf": [ + { + "description": "A boolean or a template parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + { + "type": "object", + "properties": { + "enabled": { + "description": "A boolean or a template parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "image": { + "type": "string" + }, + "docker_layer_caching": { + "description": "A boolean or a template parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "resource_class": { + "type": "string" + }, + "shell": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "environment": { + "oneOf": [ + { + "description": "Allow null to account for empty `environment:` declarations.", + "type": [ + "string", + "null" + ] + }, + { + "description": "An array of strings in the form KEY=VALUE", + "type": "array", + "items": { + "$ref": "#/definitions/environment" + } + }, + { + "type": "object", + "description": "The value should be a string, but we allow null, boolean and numbers too. Examples: `FOO: true` and `BAR: 2` `BAZ:`", + "additionalProperties": { + "type": [ + "string", + "boolean", + "number", + "null" + ] + } + } + ] + }, + "shell": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "parameters": { + "description": "Parameters given to a job.", + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "boolean", + "string", + "steps", + "enum", + "executor", + "integer", + "env_var_name" + ] + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/step" + } + } + ] + }, + "description": { + "type": "string" + }, + "enum": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "minProperties": 1 + } + }, + "additionalProperties": false + }, + { + "type": "string", + "description": "Executor may be a string reference to another executor" + } + ] + } + }, + "orbs": { + "$ref": "#/properties/orbs" + } + } + } + ] + }, + "environment": { + "oneOf": [ + { + "description": "Allow null to account for empty `environment:` declarations.", + "type": [ + "string", + "null" + ] + }, + { + "description": "An array of strings in the form KEY=VALUE", + "type": "array", + "items": { + "$ref": "#/definitions/environment" + } + }, + { + "type": "object", + "description": "The value should be a string, but we allow null, boolean and numbers too. Examples: `FOO: true` and `BAR: 2` `BAZ:`", + "additionalProperties": { + "type": [ + "string", + "boolean", + "number", + "null" + ] + } + } + ] + }, + "logic": { + "oneOf": [ + { + "description": "A boolean or a pipeline parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *pipeline.parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + { + "type": "object", + "description": "This is the object that represents the logical/comparison operators", + "minProperties": 1, + "maxProperties": 1, + "additionalProperties": false, + "properties": { + "and": { + "type": "array", + "items": { + "$ref": "#/definitions/logic" + }, + "minItems": 1 + }, + "or": { + "type": "array", + "items": { + "$ref": "#/definitions/logic" + }, + "minItems": 1 + }, + "not": { + "$ref": "#/definitions/logic" + }, + "equal": { + "type": "array", + "items": { + "$ref": "#/definitions/logic" + }, + "minItems": 1 + }, + "matches": { + "type": "object", + "additionalProperties": false, + "properties": { + "pattern": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "pattern", + "value" + ] + } + } + }, + { + "type": "object", + "description": "This is the object operand", + "propertyNames": { + "not": { + "pattern": "^(and|or|not|equal|matches)$" + } + } + } + ] + }, + "step": { + "oneOf": [ + { + "type": "string", + "description": "Shorthand commands, like `checkout`" + }, + { + "type": "object", + "description": "long form commands like `run:`", + "propertyNames": { + "pattern": "^[a-z][a-z\\d\/_-]*$", + "not": { + "pattern": "^(when|unless)$" + } + }, + "minProperties": 1, + "maxProperties": 1, + "properties": { + "run": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "command": { + "type": "string" + } + }, + "required": [ + "command" + ] + } + ] + } + }, + "additionalProperties": { + "type": [ + "object", + "string" + ] + } + }, + { + "type": "object", + "description": "`when`/`unless` step", + "additionalProperties": false, + "minProperties": 1, + "maxProperties": 1, + "properties": { + "when": { + "type": "object", + "required": [ + "condition", + "steps" + ], + "properties": { + "condition": { + "$ref": "#/definitions/logic" + }, + "steps": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/step" + } + }, + { + "$ref": "#/definitions/step" + } + ] + } + } + }, + "unless": { + "type": "object", + "required": [ + "condition", + "steps" + ], + "properties": { + "condition": { + "$ref": "#/definitions/logic" + }, + "steps": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/step" + } + }, + { + "$ref": "#/definitions/step" + } + ] + } + } + } + } + } + ] + } + }, + "type": "object", + "properties": { + "executors": { + "type": [ + "object", + "null" + ], + "propertyNames": { + "pattern": "^[a-z][a-z\\d_-]*$" + }, + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "macos": { + "type": "object", + "properties": { + "xcode": { + "type": [ + "string", + "number" + ] + }, + "resource_class": { + "type": "string" + }, + "shell": { + "type": "string" + } + }, + "required": [ + "xcode" + ], + "additionalProperties": false + }, + "resource_class": { + "type": "string" + }, + "docker": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "image": { + "type": "string" + }, + "name": { + "type": "string" + }, + "entrypoint": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "command": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "user": { + "type": "string" + }, + "environment": { + "oneOf": [ + { + "description": "Allow null to account for empty `environment:` declarations.", + "type": [ + "string", + "null" + ] + }, + { + "description": "An array of strings in the form KEY=VALUE", + "type": "array", + "items": { + "$ref": "#/definitions/environment" + } + }, + { + "type": "object", + "description": "The value should be a string, but we allow null, boolean and numbers too. Examples: `FOO: true` and `BAR: 2` `BAZ:`", + "additionalProperties": { + "type": [ + "string", + "boolean", + "number", + "null" + ] + } + } + ] + }, + "aws_auth": { + "oneOf": [ + { + "type": "object", + "properties": { + "aws_access_key_id": { + "type": "string" + }, + "aws_secret_access_key": { + "type": "string" + } + }, + "required": [ + "aws_access_key_id", + "aws_secret_access_key" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "oidc_role_arn": { + "type": "string" + } + }, + "required": [ + "oidc_role_arn" + ], + "additionalProperties": false + } + ] + }, + "auth": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "username", + "password" + ], + "additionalProperties": false + } + }, + "required": [ + "image" + ], + "additionalProperties": false + } + }, + "working_directory": { + "type": "string" + }, + "machine": { + "description": "Machine must be a boolean or a map", + "oneOf": [ + { + "description": "A boolean or a template parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + { + "type": "object", + "properties": { + "enabled": { + "description": "A boolean or a template parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "image": { + "type": "string" + }, + "docker_layer_caching": { + "description": "A boolean or a template parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "resource_class": { + "type": "string" + }, + "shell": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "environment": { + "oneOf": [ + { + "description": "Allow null to account for empty `environment:` declarations.", + "type": [ + "string", + "null" + ] + }, + { + "description": "An array of strings in the form KEY=VALUE", + "type": "array", + "items": { + "$ref": "#/definitions/environment" + } + }, + { + "type": "object", + "description": "The value should be a string, but we allow null, boolean and numbers too. Examples: `FOO: true` and `BAR: 2` `BAZ:`", + "additionalProperties": { + "type": [ + "string", + "boolean", + "number", + "null" + ] + } + } + ] + }, + "shell": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "parameters": { + "description": "Parameters given to a job.", + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "boolean", + "string", + "steps", + "enum", + "executor", + "integer", + "env_var_name" + ] + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/step" + } + } + ] + }, + "description": { + "type": "string" + }, + "enum": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "minProperties": 1 + } + }, + "additionalProperties": false + }, + { + "type": "string", + "description": "Executor may be a string reference to another executor" + } + ] + } + }, + "experimental": { + "type": "object", + "properties": { + "notify": { + "type": "object", + "properties": { + "branches": { + "type": "object", + "properties": { + "only": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "ignore": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "additionalProperties": false + } + }, + "required": [ + "branches" + ], + "additionalProperties": false + } + }, + "additionalProperties": false, + "required": [ + "notify" + ] + }, + "workflows": { + "type": "object", + "properties": { + "version": { + "type": [ + "number", + "string" + ] + } + }, + "propertyNames": { + "pattern": ".+" + }, + "additionalProperties": { + "type": "object", + "properties": { + "triggers": { + "type": "array", + "items": { + "type": "object", + "properties": { + "schedule": { + "type": "object", + "properties": { + "cron": { + "type": "string" + }, + "filters": { + "type": "object", + "properties": { + "branches": { + "type": "object", + "properties": { + "only": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "ignore": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + } + } + } + }, + "additionalProperties": false + } + }, + "max_auto_reruns": { + "type": "integer", + "minimum": 1, + "maximum": 5 + }, + "when": { + "$ref": "#/definitions/logic" + }, + "unless": { + "$ref": "#/definitions/logic" + }, + "jobs": { + "type": "array", + "minItems": 1, + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "maxProperties": 1, + "minProperties": 0, + "additionalProperties": { + "type": "object", + "properties": { + "requires": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "minProperties": 1, + "maxProperties": 1, + "patternProperties": { + "^[A-Za-z][A-Za-z\\s\\d_-]*$": { + "oneOf": [ + { + "type": "string", + "enum": [ + "success", + "failed", + "canceled" + ] + }, + { + "type": "array", + "minLength": 1, + "items": { + "type": "string", + "enum": [ + "success", + "failed", + "canceled" + ] + } + } + ] + } + } + } + ] + } + }, + "filters": { + "type": "object", + "description": "This is similar to to other `filters` in config, but has an additional key, `tags`", + "properties": { + "branches": { + "type": "object", + "properties": { + "only": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "ignore": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "additionalProperties": false + }, + "tags": { + "type": "object", + "properties": { + "only": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "ignore": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + } + }, + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "context": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "type": { + "type": "string" + }, + "pre-steps": { + "steps": { + "type": "array", + "items": { + "$ref": "#/definitions/step" + }, + "minItems": 1 + } + }, + "post-steps": { + "steps": { + "type": "array", + "items": { + "$ref": "#/definitions/step" + }, + "minItems": 1 + } + }, + "matrix": { + "type": "object", + "required": [ + "parameters" + ], + "properties": { + "parameters": { + "type": "object" + }, + "exclude": { + "type": "array", + "items": { + "type": "object" + } + }, + "alias": { + "type": "string" + } + } + }, + "serial-group": { + "type": "string", + "minLength": 1 + }, + "override-with": { + "type": "string" + } + } + } + } + ] + } + } + }, + "required": [ + "jobs" + ], + "not": { + "description": "cannot use both 'when' and 'unless'", + "allOf": [ + { + "required": [ + "when" + ] + }, + { + "required": [ + "unless" + ] + } + ] + } + } + }, + "jobs": { + "description": "Any string key is allowed as job name.", + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z\\s\\d_-]*$" + }, + "additionalProperties": { + "$ref": "#/definitions/jobDefinition" + } + }, + "orbs": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "properties": { + "jobs": { + "description": "Any string key is allowed as job name.", + "type": "object", + "propertyNames": { + "type": "string", + "pattern": "^[A-Za-z][A-Za-z\\s\\d_-]*$" + }, + "additionalProperties": { + "oneOf": [ + { + "title": "CircleCI Orb: Jobs", + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "parallelism": { + "description": "A integer or a parameter evaluating to a integer", + "anyOf": [ + { + "oneOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "string", + "pattern": " *<< *pipeline.parameters.([^ ]+) *>> *" + } + ] + }, + { + "type": "integer" + } + ] + }, + "macos": { + "type": "object", + "properties": { + "xcode": { + "type": [ + "string", + "number" + ] + }, + "resource_class": { + "type": "string" + }, + "shell": { + "type": "string" + } + }, + "required": [ + "xcode" + ], + "additionalProperties": false + }, + "resource_class": { + "type": "string" + }, + "docker": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "image": { + "type": "string" + }, + "name": { + "type": "string" + }, + "entrypoint": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "command": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "user": { + "type": "string" + }, + "environment": { + "oneOf": [ + { + "description": "Allow null to account for empty `environment:` declarations.", + "type": [ + "string", + "null" + ] + }, + { + "description": "An array of strings in the form KEY=VALUE", + "type": "array", + "items": { + "$ref": "#/definitions/environment" + } + }, + { + "type": "object", + "description": "The value should be a string, but we allow null, boolean and numbers too. Examples: `FOO: true` and `BAR: 2` `BAZ:`", + "additionalProperties": { + "type": [ + "string", + "boolean", + "number", + "null" + ] + } + } + ] + }, + "aws_auth": { + "oneOf": [ + { + "type": "object", + "properties": { + "aws_access_key_id": { + "type": "string" + }, + "aws_secret_access_key": { + "type": "string" + } + }, + "required": [ + "aws_access_key_id", + "aws_secret_access_key" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "oidc_role_arn": { + "type": "string" + } + }, + "required": [ + "oidc_role_arn" + ], + "additionalProperties": false + } + ] + }, + "auth": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "username", + "password" + ], + "additionalProperties": false + } + }, + "required": [ + "image" + ], + "additionalProperties": false + } + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/definitions/step" + }, + "minItems": 1 + }, + "working_directory": { + "type": "string" + }, + "circleci_ip_ranges": { + "type": "boolean" + }, + "machine": { + "description": "Machine must be a boolean or a map", + "oneOf": [ + { + "description": "A boolean or a template parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + { + "type": "object", + "properties": { + "enabled": { + "description": "A boolean or a template parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "image": { + "type": "string" + }, + "docker_layer_caching": { + "description": "A boolean or a template parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "resource_class": { + "type": "string" + }, + "shell": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "environment": { + "oneOf": [ + { + "description": "Allow null to account for empty `environment:` declarations.", + "type": [ + "string", + "null" + ] + }, + { + "description": "An array of strings in the form KEY=VALUE", + "type": "array", + "items": { + "$ref": "#/definitions/environment" + } + }, + { + "type": "object", + "description": "The value should be a string, but we allow null, boolean and numbers too. Examples: `FOO: true` and `BAR: 2` `BAZ:`", + "additionalProperties": { + "type": [ + "string", + "boolean", + "number", + "null" + ] + } + } + ] + }, + "executor": { + "oneOf": [ + { + "type": "string", + "description": "short executor invocation, name of executor" + }, + { + "type": "object", + "description": "executor invocation with arguments, i.e. parameters", + "minProperties": 1, + "additionalProperties": true, + "properties": { + "name": { + "type": "string" + } + }, + "required": [ + "name" + ] + } + ] + }, + "shell": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "parameters": { + "description": "Parameters given to a job.", + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "boolean", + "string", + "steps", + "enum", + "executor", + "integer", + "env_var_name" + ] + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/step" + } + } + ] + }, + "description": { + "type": "string" + }, + "enum": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "minProperties": 1 + } + }, + "required": [ + "steps" + ], + "additionalProperties": false, + "anyOf": [ + { + "description": "A job must have one of `docker`, `machine`, `macos` or `executor` (which can provide docker/machine/macos information).", + "type": "object", + "required": [ + "executor" + ] + }, + { + "oneOf": [ + { + "type": "object", + "required": [ + "machine" + ] + }, + { + "type": "object", + "required": [ + "docker" + ] + }, + { + "type": "object", + "required": [ + "macos" + ] + } + ] + } + ] + }, + { + "type": "string", + "description": "Job may be a string reference to another job" + } + ] + } + }, + "commands": { + "type": "object", + "propertyNames": { + "pattern": "^[a-z][a-z\\d_-]*$" + }, + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "parameters": { + "description": "Parameters given to a step.", + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "boolean", + "string", + "steps", + "enum", + "executor", + "integer", + "env_var_name" + ] + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/step" + } + } + ] + }, + "description": { + "type": "string" + }, + "enum": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "minProperties": 1 + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/definitions/step" + }, + "minItems": 1 + } + }, + "required": [ + "steps" + ], + "additionalProperties": false + }, + { + "type": "string", + "description": "Command may be a string reference to another command" + } + ] + } + }, + "executors": { + "type": "object", + "propertyNames": { + "pattern": "^[a-z][a-z\\d_-]*$" + }, + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "macos": { + "type": "object", + "properties": { + "xcode": { + "type": [ + "string", + "number" + ] + }, + "resource_class": { + "type": "string" + }, + "shell": { + "type": "string" + } + }, + "required": [ + "xcode" + ], + "additionalProperties": false + }, + "resource_class": { + "type": "string" + }, + "docker": { + "type": "array", + "minItems": 1, + "items": { + "type": "object", + "properties": { + "image": { + "type": "string" + }, + "name": { + "type": "string" + }, + "entrypoint": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "command": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "user": { + "type": "string" + }, + "environment": { + "oneOf": [ + { + "description": "Allow null to account for empty `environment:` declarations.", + "type": [ + "string", + "null" + ] + }, + { + "description": "An array of strings in the form KEY=VALUE", + "type": "array", + "items": { + "$ref": "#/definitions/environment" + } + }, + { + "type": "object", + "description": "The value should be a string, but we allow null, boolean and numbers too. Examples: `FOO: true` and `BAR: 2` `BAZ:`", + "additionalProperties": { + "type": [ + "string", + "boolean", + "number", + "null" + ] + } + } + ] + }, + "aws_auth": { + "oneOf": [ + { + "type": "object", + "properties": { + "aws_access_key_id": { + "type": "string" + }, + "aws_secret_access_key": { + "type": "string" + } + }, + "required": [ + "aws_access_key_id", + "aws_secret_access_key" + ], + "additionalProperties": false + }, + { + "type": "object", + "properties": { + "oidc_role_arn": { + "type": "string" + } + }, + "required": [ + "oidc_role_arn" + ], + "additionalProperties": false + } + ] + }, + "auth": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "username", + "password" + ], + "additionalProperties": false + } + }, + "required": [ + "image" + ], + "additionalProperties": false + } + }, + "working_directory": { + "type": "string" + }, + "machine": { + "description": "Machine must be a boolean or a map", + "oneOf": [ + { + "description": "A boolean or a template parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + { + "type": "object", + "properties": { + "enabled": { + "description": "A boolean or a template parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "image": { + "type": "string" + }, + "docker_layer_caching": { + "description": "A boolean or a template parameter evaluating to a boolean", + "anyOf": [ + { + "type": "string", + "pattern": " *<< *parameters.([^ ]+) *>> *" + }, + { + "type": "boolean" + }, + { + "type": "number" + }, + { + "type": "string" + } + ] + }, + "resource_class": { + "type": "string" + }, + "shell": { + "type": "string" + } + }, + "additionalProperties": false + } + ] + }, + "environment": { + "oneOf": [ + { + "description": "Allow null to account for empty `environment:` declarations.", + "type": [ + "string", + "null" + ] + }, + { + "description": "An array of strings in the form KEY=VALUE", + "type": "array", + "items": { + "$ref": "#/definitions/environment" + } + }, + { + "type": "object", + "description": "The value should be a string, but we allow null, boolean and numbers too. Examples: `FOO: true` and `BAR: 2` `BAZ:`", + "additionalProperties": { + "type": [ + "string", + "boolean", + "number", + "null" + ] + } + } + ] + }, + "shell": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "array", + "items": { + "type": "string" + } + } + ] + }, + "parameters": { + "description": "Parameters given to a job.", + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "boolean", + "string", + "steps", + "enum", + "executor", + "integer", + "env_var_name" + ] + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/step" + } + } + ] + }, + "description": { + "type": "string" + }, + "enum": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "minProperties": 1 + } + }, + "additionalProperties": false + }, + { + "type": "string", + "description": "Executor may be a string reference to another executor" + } + ] + } + }, + "orbs": { + "$ref": "#/properties/orbs" + } + } + } + ] + } + }, + "commands": { + "type": [ + "object", + "null" + ], + "propertyNames": { + "pattern": "^[a-z][a-z\\d_-]*$" + }, + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "parameters": { + "description": "Parameters given to a step.", + "type": "object", + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "boolean", + "string", + "steps", + "enum", + "executor", + "integer", + "env_var_name" + ] + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "array", + "items": { + "$ref": "#/definitions/step" + } + } + ] + }, + "description": { + "type": "string" + }, + "enum": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "type" + ] + }, + "minProperties": 1 + }, + "steps": { + "type": "array", + "items": { + "$ref": "#/definitions/step" + }, + "minItems": 1 + } + }, + "required": [ + "steps" + ], + "additionalProperties": false + }, + { + "type": "string", + "description": "Command may be a string reference to another command" + } + ] + } + }, + "examples": { + "type": "object", + "propertyNames": { + "pattern": "^[a-z][a-z\\d_-]*$" + }, + "additionalProperties": { + "type": "object", + "properties": { + "description": { + "type": "string" + }, + "usage": { + "type": "object" + }, + "result": { + "type": "object" + } + }, + "required": [ + "usage" + ], + "additionalProperties": false + } + }, + "display": { + "type": "object", + "properties": { + "home_url": { + "type": "string" + }, + "source_url": { + "type": "string" + } + } + }, + "version": { + "enum": [ + "2.1", + 2.1 + ] + }, + "parameters": { + "type": [ + "object", + "null" + ], + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "boolean", + "string", + "enum", + "integer" + ] + }, + "default": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "boolean" + }, + { + "type": "integer" + } + ] + }, + "description": { + "type": "string" + }, + "enum": { + "type": "array", + "items": { + "type": "string" + } + } + }, + "additionalProperties": false, + "required": [ + "default", + "type" + ] + } + } + }, + "required": [ + "version" + ] +} \ No newline at end of file diff --git a/src/check_jsonschema/builtin_schemas/vendor/sha256/circle-ci.sha256 b/src/check_jsonschema/builtin_schemas/vendor/sha256/circle-ci.sha256 index 2f283a809..08ba0e3db 100644 --- a/src/check_jsonschema/builtin_schemas/vendor/sha256/circle-ci.sha256 +++ b/src/check_jsonschema/builtin_schemas/vendor/sha256/circle-ci.sha256 @@ -1 +1 @@ -ff44ba737e404a5bb3cd78d2be654edd2a990237521200fede86e996777f6e37 \ No newline at end of file +a88f73a58fbaf5fc6e804fca9eb0cea69aeffb9dc3e90f74309542391a4d5025 \ No newline at end of file diff --git a/src/check_jsonschema/catalog.py b/src/check_jsonschema/catalog.py index fbc541444..c81dc99e2 100644 --- a/src/check_jsonschema/catalog.py +++ b/src/check_jsonschema/catalog.py @@ -76,7 +76,9 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str: }, }, "circle-ci": { - "url": "https://json.schemastore.org/circleciconfig.json", + "url": _githubusercontent_url( + "CircleCI-Public", "circleci-yaml-language-server", "main", "schema.json" + ), "hook_config": { "name": "Validate CircleCI config", "description": ( @@ -238,8 +240,7 @@ def _githubusercontent_url(owner: str, repo: str, ref: str, path: str) -> str: "hook_config": { "name": "Validate ReadTheDocs Config", "description": ( - "Validate ReadTheDocs config against the schema " - "provided by ReadTheDocs" + "Validate ReadTheDocs config against the schema provided by ReadTheDocs" ), "files": r"^\.readthedocs\.(yml|yaml)$", "types": "yaml",