{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/snyk/main/json-schema/snyk-custom-base-image-patch-request-schema.json", "title": "CustomBaseImagePatchRequest", "x-generated": "2026-10-04", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/snyk-custom-base-images-api-openapi.yml#/components/schemas/CustomBaseImagePatchRequest", "additionalProperties": false, "properties": { "data": { "additionalProperties": false, "properties": { "attributes": { "additionalProperties": false, "minProperties": 1, "properties": { "include_in_recommendations": { "type": "boolean" }, "versioning_schema": { "$ref": "#/$defs/VersioningSchema" } }, "type": "object" }, "id": { "description": "The ID of the custom base image that should be updated. (Same one used in the URI)", "format": "uuid", "type": "string" }, "type": { "description": "This should always be \"custom_base_image\"", "type": "string" } }, "required": [ "type", "attributes" ], "type": "object" } }, "required": [ "data" ], "type": "object", "$defs": { "VersioningSchema": { "allOf": [ { "oneOf": [ { "$ref": "#/$defs/VersioningSchemaSemverType" }, { "$ref": "#/$defs/VersioningSchemaCustomType" }, { "$ref": "#/$defs/VersioningSchemaSingleSelectionType" } ] } ], "description": "The versioning scheme used by images in the repository.\n\nA versioning schema is a system for identifying and organizing different versions of a project. \nIt is used to track changes and updates to the project over time, and to help users identify which version they are using. \nA versioning schema typically consists of a series of numbers or labels that are incremented to reflect the progression of versions. \nFor example, a versioning schema might use a series of numbers, such as \"1.0\", \"1.1\", \"2.0\", and so on, to indicate major and minor releases of a product. \nA consistent and well-defined versioning schema helps users and tools understand and track the development of a project.\n" }, "VersioningSchemaCustomType": { "additionalProperties": false, "description": "The Custom Schema type is a way for Snyk to understand your company’s container image tag versioning scheme,\nenabling Snyk to give more accurate base image upgrade recommendations.\n\nThis schema type is essentially a regular expression that groups the different parts of an image’s tag into comparable sections.\n\nIf your container image's tags follow a versioning scheme other than Semantic Versioning (SemVer), \nit is highly recommended that you select the \"Custom Versioning\" schema for your image repositories.\n", "properties": { "expression": { "description": "The regular expression used to describe the format of tags.\nKeep in mind that backslashes in the expression need to be escaped due to being encompassed in a JSON string.\n", "type": "string" }, "label": { "description": "A customizable string that can be set for a custom versioning schema to describe its meaning.\nThis label has no function.\n", "type": "string" }, "type": { "enum": [ "custom" ], "type": "string" } }, "required": [ "type", "expression" ], "type": "object" }, "VersioningSchemaSemverType": { "additionalProperties": false, "properties": { "type": { "enum": [ "semver" ], "type": "string" } }, "required": [ "type" ], "type": "object" }, "VersioningSchemaSingleSelectionType": { "additionalProperties": false, "description": "The Single Selection Versioning Schema allows manual setting of which image should be given as a recommendation.\n\nOnly one image can be set as the current recommendation. If no images are set as the current selection, \nno recommendation will be given.\n\nIt is recommended to use this versioning schema if your repository's tags aren't supported by the other schemas.\n", "properties": { "is_selected": { "description": "Whether this image should be the recommendation. Only one image can be selected at a given time. Setting this\nas true will remove previous selection.\n", "type": "boolean" }, "type": { "enum": [ "single-selection" ], "type": "string" } }, "required": [ "type", "is_selected" ], "type": "object" } } }