{ "$comment": "This file was automatically generated, do not modify it by hand. Instead, modify the source Typescript file, and run `pnpm types build:software-catalog-schemas`.", "$id": "software-catalog-itd.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "Software Catalog item type definition", "description": "An entity used to extend the Software Catalog beyond its built-in capabilities defining a new type of items.", "type": "object", "properties": { "apiVersion": { "description": "The versioned schema of this representation of an object.", "const": "software-catalog.mia-platform.eu/v1" }, "kind": { "description": "The family of resources this object belongs to.", "const": "item-type-definition" }, "metadata": { "description": "Descriptive properties referring to this object.", "type": "object", "properties": { "namespace": { "description": "The namespace this object belongs to. Within this namespace, the `.metadata.name` of this object must be unique. Read-only.", "type": "object", "properties": { "scope": { "description": "The hierarchical level of the namespace.", "const": "tenant" }, "id": { "description": "The identifier of the tenant.", "type": "string", "minLength": 1 } }, "additionalProperties": false, "required": [ "scope", "id" ], "examples": [ { "scope": "tenant", "id": "my-company" } ] }, "name": { "description": "A string that uniquely identifies this object within its namespace (`.metadata.namespace`). Must be equal to the `.spec.type` of this object. Read-only.", "type": "string", "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", "minLength": 1, "maxLength": 63, "examples": [ "plugin", "custom-workload", "ai-agent" ] }, "visibility": { "description": "The visibility on this object. It can be public (i.e., visible to all tenants of the Console installation), or private (i.e., only visible to the namespace this object belongs to).", "oneOf": [ { "type": "object", "properties": { "scope": { "description": "The hierarchical level at which this object is visible.", "const": "console" } }, "required": [ "scope" ] }, { "type": "object", "properties": { "scope": { "description": "The hierarchical level at which this object is visible.", "const": "tenant" }, "ids": { "description": "A list of identifiers of the tenants with visibility on this object. It can contain only one item that must be equal to the `.metadata.namespace.id` of this object.", "type": "array", "items": { "type": "string" }, "minItems": 1, "maxItems": 1 } }, "required": [ "scope", "ids" ] } ], "examples": [ { "scope": "console" }, { "scope": "tenant", "ids": [ "my-company" ] } ] }, "displayName": { "description": "The human-readable title of this object. Clients may use it as the title associated with the items of the defined type. Defaults to the `.metadata.name` of this object.", "type": "string", "minLength": 1, "examples": [ "Plugin", "Custom Workload", "AI Agent" ] }, "description": { "description": "A brief description of this object. Clients may use it as the description associated with the items of the defined type.", "type": "string" }, "icon": { "description": "An icon associated with this object. Clients may use it as the icon associated with the items of the defined type.", "type": "object", "properties": { "mediaType": { "description": "The MIME type of the image.", "type": "string", "enum": [ "image/png", "image/svg+xml" ] }, "base64Data": { "description": "The image data encoded in Base64 format.", "type": "string" } }, "additionalProperties": false, "required": [ "mediaType", "base64Data" ], "examples": [ { "mediaType": "image/png", "base64Data": "iVBORw==" }, { "mediaType": "image/svg+xml", "base64Data": "w0KGgoAA" } ] }, "documentation": { "description": "A reference to the documentation regarding this object. Clients may use it as the documentation associated with the items of the defined type.", "type": "object", "properties": { "type": { "description": "The type of documentation.", "const": "external" }, "url": { "description": "The URL of the documentation page.", "type": "string", "pattern": "^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_+.~#?&\\/=]*)$" } }, "additionalProperties": false, "required": [ "type", "url" ], "examples": [ { "type": "external", "url": "https://example.com" } ] }, "labels": { "description": "A map of string keys and values that can be used to organize and categorize (scope and select) objects.", "type": "object", "patternProperties": { "^([a-zA-Z0-9][a-zA-Z0-9\\.\\-]{0,253}[\\/])?([a-zA-Z0-9][a-zA-Z0-9\\.\\-]{0,63}[a-zA-Z0-9]?)$": { "type": "string", "pattern": "^$|^[a-zA-Z0-9](?:[a-zA-Z0-9._-]{0,61}[a-zA-Z0-9])?$", "maxLength": 63 } }, "additionalProperties": false, "examples": [ { "environment": "dev", "mia-platform.eu/tenant": "my-company", "track": "" } ] }, "annotations": { "description": "An unstructured key value map that may be set by external tools to store and retrieve arbitrary metadata. They are not queryable and should be preserved when modifying this object.", "type": "object", "patternProperties": { "^([a-zA-Z0-9][a-zA-Z0-9\\.\\-]{0,253}[\\/])?([a-zA-Z0-9][a-zA-Z0-9\\.\\-]{0,63}[a-zA-Z0-9]?)$": { "type": "string", "maxLength": 262144 } }, "additionalProperties": false, "examples": [ { "imageregistry": "https://hub.docker.com/", "mia-platform.eu/version": "14.0.0" } ] }, "tags": { "description": "A list of single-valued strings.", "type": "array", "items": { "type": "string", "pattern": "^[a-z0-9:+#]+(-[a-z0-9:+#]+)*$", "minLength": 1, "maxLength": 63 }, "examples": [ [ "ai", "production" ] ] }, "links": { "description": "A list of external hyperlinks.", "type": "array", "items": { "type": "object", "properties": { "url": { "description": "The URL in standard URI format.", "type": "string", "pattern": "https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_+.~#?&\\/=]*)$" }, "displayName": { "description": "A user-friendly title for the link.", "type": "string" } }, "additionalProperties": false, "required": [ "url" ], "examples": [ { "url": "https://mia-platform.eu/", "displayName": "Mia-Platform" }, { "url": "https://example.com" } ] } }, "maintainers": { "description": "A list of organizational entities maintaining this object.", "type": "array", "items": { "type": "object", "properties": { "name": { "description": "The display name of the maintainer.", "type": "string", "minLength": 1 }, "email": { "description": "A contact email of the maintainer.", "type": "string", "format": "email", "minLength": 1 } }, "additionalProperties": false, "required": [ "name" ], "examples": [ { "name": "John Doe", "email": "john.doe@mail.com" }, { "name": "Mia-Platform core team" } ] } }, "publisher": { "description": "The entity providing this object.", "type": "object", "properties": { "name": { "description": "The display name of the publisher.", "type": "string", "minLength": 1 }, "url": { "description": "A link to a publisher webpage.", "type": "string", "minLength": 1 }, "image": { "description": "A logo or relevant image of the publisher.", "type": "object", "properties": { "mediaType": { "description": "The MIME type of the image.", "type": "string", "enum": [ "image/png", "image/svg+xml" ] }, "base64Data": { "description": "The image data encoded in Base64 format.", "type": "string" } }, "additionalProperties": false, "required": [ "mediaType", "base64Data" ], "examples": [ { "mediaType": "image/png", "base64Data": "iVBORw==" }, { "mediaType": "image/svg+xml", "base64Data": "w0KGgoAA" } ] } }, "additionalProperties": false, "required": [ "name" ], "examples": [ { "name": "Mia-Platform", "url": "https://mia-platform.eu/", "image": { "mediaType": "image/svg+xml", "base64Data": "w0KGgoAA" } }, { "name": "John Doe" } ] } }, "additionalProperties": true, "required": [ "namespace", "name", "visibility" ] }, "spec": { "description": "The specification of the desired state of this object.", "type": "object", "properties": { "type": { "description": "The item type defined by this object. It must match the `.metadata.name` of this object. Read-only.", "type": "string", "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", "minLength": 1, "maxLength": 63, "examples": [ "plugin", "custom-workload", "ai-agent" ] }, "scope": { "description": "The scope where items of the defined type should be managed.", "type": "string", "enum": [ "tenant" ] }, "isVersioningSupported": { "description": "A flag stating whether the items of the defined type should support versioning.", "type": "boolean" }, "validation": { "description": "The JSON schema against which the `.resources` of the items of the defined type should be validated.", "type": "object", "properties": { "mechanism": { "description": "The validation mechanism.", "const": "json-schema" }, "schema": { "description": "The validation JSON Schema. It must be a valid JSON Schema draft 07.", "type": "object", "additionalProperties": true } }, "additionalProperties": false, "required": [ "mechanism", "schema" ], "examples": [ { "mechanism": "json-schema", "schema": { "type": "object", "properties": { "name": { "type": "string" } }, "required": [ "name" ] } } ] }, "controlledFields": { "description": "A list of fields managed by the server when changing the version of an item of the defined type.", "type": "array", "items": { "description": "The information needed to access a specific value of the item.", "type": "object", "properties": { "jsonPath": { "description": "The JSON path to access the item value.", "type": "string" }, "key": { "description": "The unique name of the field.", "type": "string" } }, "additionalProperties": false, "required": [ "key", "jsonPath" ] }, "examples": [ [ { "key": "apiVersion", "jsonPath": "meta.apiVersion" } ] ] } }, "additionalProperties": true, "required": [ "type", "scope", "validation" ] }, "__v": { "description": "The opaque value that represents the internal version of this object. Clients may not set this value and must treat it as opaque. Read-only.", "type": "integer", "minimum": 0 }, "$schema": { "type": "string" } }, "additionalProperties": false, "required": [ "apiVersion", "kind", "metadata", "spec" ], "examples": [ { "apiVersion": "software-catalog.mia-platform.eu/v1", "kind": "item-type-definition", "metadata": { "namespace": { "scope": "tenant", "id": "mia-platform-company" }, "name": "docker-image", "visibility": { "scope": "console" }, "displayName": "Docker Image", "description": "A single Docker image", "icon": { "mediaType": "image/svg+xml", "base64Data": "abc=" }, "documentation": { "type": "external", "url": "https://docs.mia-platform.eu/" }, "labels": { "environment": "prod" }, "annotations": { "mia-platform.eu/version": "14.0.0" }, "tags": [ "cloud" ], "links": [ { "displayName": "Homepage", "url": "https://www.docker.com/" } ], "maintainers": [ { "name": "Mia-Platform Core Team", "email": "support@mia-platform.eu" } ], "publisher": { "name": "Mia-Platform", "url": "https://mia-platform.eu/", "image": { "mediaType": "image/png", "base64Data": "abc=" } } }, "spec": { "type": "docker-image", "scope": "tenant", "isVersioningSupported": true, "validation": { "mechanism": "json-schema", "schema": { "type": "object", "properties": { "imageName": { "description": "The name of the Docker image (without registry or tag)", "type": "string", "pattern": "^[a-z0-9]+([._-][a-z0-9]+)*$" }, "registry": { "description": "The Docker registry hostname where the image is stored", "type": "string", "pattern": "^[a-z0-9]+([.-][a-z0-9]+)*\\.[a-z]{2,}([:\\d+])?(/[a-z0-9._-]+)*$|^[a-z0-9]+([.-][a-z0-9]+)*$" }, "tag": { "description": "The tag/version of the Docker image", "type": "string", "pattern": "^(latest|[0-9]+\\.[0-9]+\\.[0-9]+(-[a-z]+[0-9]*)?|[0-9]+\\.[0-9]+\\.[0-9]+)$" } }, "required": [ "imageName", "registry", "tag" ], "additionalProperties": false } } }, "__v": 0 } ] }