{ "$comment": "This file was automatically generated, do not modify it by hand. Instead, modify the source Typescript file, and run `pnpm types build:catalog-schemas`.", "$id": "catalog-custom-resource.manifest.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "Catalog custom-resource item manifest", "description": "Data model of a Catalog custom-resource item to apply", "type": "object", "properties": { "categoryId": { "description": "Identifier of the item's category", "type": "string" }, "description": { "description": "Brief description of the item", "type": "string" }, "documentation": { "description": "Documentation of the item", "properties": { "type": { "enum": [ "externalLink", "markdown" ], "type": "string" }, "url": { "type": "string" } }, "required": [ "type", "url" ], "type": "object" }, "imageUrl": { "description": "Url of the image associated with the item", "type": "string" }, "itemId": { "description": "RFC-1035 compliant identifier of the item. It forms a composite PK with tenantId and, if present, version.name", "minLength": 1, "pattern": "^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?$", "type": "string" }, "lifecycleStatus": { "description": "Lifecycle status of the item", "enum": [ "coming-soon", "draft", "published", "maintenance", "deprecated", "archived" ], "type": "string" }, "name": { "description": "Human-readable name of the item", "minLength": 1, "type": "string" }, "providerId": { "description": "Identifier of the provider used to retrieve markdown documentation content and external resources, if supported by the item type", "type": "string" }, "publishOnMiaDocumentation": { "description": "Flag stating if the resource documentation should be published on Mia-Platform public documentation", "type": "boolean" }, "releaseDate": { "description": "Creation date of this item's release", "format": "date-time", "type": "string" }, "repositoryUrl": { "description": "URL of the repository containing the source code of the resource created by the item", "type": "string" }, "resources": { "additionalProperties": false, "properties": { "annotations": { "items": { "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "type": "object" }, "type": "array" }, "attributes": { "additionalProperties": { "properties": { "type": { "enum": [ "input" ], "type": "string" } }, "type": "object" }, "description": "Attributes to be used to generate the form to manage the custom resource", "type": "object" }, "generator": { "properties": { "configurationBaseFolder": { "type": "string" }, "templates": { "items": { "properties": { "engine": { "description": "The template engine used for generating the file (default is `mustache`)", "enum": [ "mustache" ], "type": "string" }, "fileExtension": { "description": "The extension of the file to generate. If not set, default is .yml", "type": "string" }, "folderName": { "description": "The name of the folder where the file will be created, below the configurationBaseFolder", "type": "string" }, "name": { "type": "string" }, "template": { "type": "string" } }, "required": [ "template", "name" ], "type": "object" }, "type": "array" }, "type": { "enum": [ "template" ], "type": "string" } }, "required": [ "type", "templates" ], "type": "object" }, "labels": { "items": { "properties": { "name": { "type": "string" }, "value": { "type": "string" } }, "type": "object" }, "type": "array" }, "meta": { "properties": { "apiVersion": { "type": "string" }, "kind": { "type": "string" } }, "type": "object" }, "name": { "minLength": 1, "type": "string" }, "runtime": { "description": "The object used to view the status of your current Kubernetes resources directly in the Console Runtime section", "additionalProperties": false, "properties": { "resourceId": { "description": "The plural name for the infrastructure resource definition", "type": "string" }, "type": { "description": "The type of the infrastructure resource. At the moment the only supported type by the Catalog is \"kubernetes\"", "type": "string" } }, "required": [ "type" ], "type": "object" }, "service": { "properties": { "archive": { "description": "URL for an tar.gz archive to be used to generate a new repository", "type": "string" } }, "type": "object" }, "jsonSchema": { "type": "object" }, "spec": { "type": "object" } }, "type": "object", "examples": [ { "name": "ExternalOrchestratorLambda", "meta": { "kind": "ExternalOrchestratorLambda", "apiVersion": "custom-generator.console.mia-platform.eu/v1" }, "spec": { "code": "the code" }, "generator": { "type": "template", "configurationBaseFolder": "base-folder-name", "templates": [ { "template": "this template can take some values from the spec, such as %spec.code%", "name": "template-name", "fileExtension": "json", "folderName": "template-folder-name" } ] } }, { "name": "sleepInfo", "meta": { "apiVersion": "kube-green.com/v1alpha1", "kind": "SleepInfo" }, "spec": { "sleepAt": "20:00", "timeZone": "Europe/Rome", "weekdays": "1-5" }, "runtime": { "type": "kubernetes", "resourceId": "sleepinfos" } } ] }, "supportedBy": { "description": "Identifier of the company that has produced the item", "type": "string" }, "supportedByImageUrl": { "description": "Url of the image associated with the company that has produced the item", "type": "string" }, "tenantId": { "description": "Identifier of the tenant to which the item belongs. It forms a composite PK with itemId and, if present, version.name", "type": "string" }, "type": { "const": "custom-resource" }, "version": { "description": "Version of the item following semver", "properties": { "name": { "description": "Semantic version", "pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$", "type": "string" }, "releaseNote": { "description": "Markdown release note", "type": "string" }, "security": { "description": "Flag stating if the version addresses any vulnerability", "type": "boolean" } }, "required": [ "name", "releaseNote" ], "type": "object" }, "visibility": { "description": "Visibility of the item", "properties": { "allTenants": { "default": false, "description": "If true, the item will be accessible to all companies", "type": "boolean" }, "public": { "default": false, "description": "If true, the item will be accessible from any user that access the Console, even if not authenticated", "type": "boolean" } }, "type": "object" }, "$schema": { "type": "string" } }, "additionalProperties": false, "required": [ "name", "itemId", "tenantId", "type", "resources", "lifecycleStatus" ] }