{
  "$comment": "This file is autogenerated, do not modify it by hand.",
  "$id": "https://cdn.mia-platform.eu/catalog/v1alpha1/mia-platform.eu.v1alpha1.ItemTypeDefinition.json",
  "description": "A resource that extends the Catalog API by defining a item type.",
  "examples": [
    {
      "apiVersion": "mia-platform.eu/v1alpha1",
      "kind": "ItemTypeDefinition",
      "metadata": {
        "annotations": {
          "mia-platform.eu/version": "14.0.0"
        },
        "creationTimestamp": "2025-09-17T10:30:45Z",
        "description": "A single Docker image.",
        "labels": {
          "environment": "demo"
        },
        "links": [
          {
            "title": "Documentation",
            "url": "https://docs.mia-platform.eu/"
          }
        ],
        "name": "dockerimages.servicecatalog.example.com",
        "uid": "550e8400-e29b-41d4-a716-446655440000",
        "updateTimestamp": "2025-09-17T10:30:45Z",
        "urn": "urn:mia-platform-catalog:mia-platform.eu:v1alpha1:ItemTypeDefinition:dockerimages.servicecatalog.example.com"
      },
      "resourceVersion": "1",
      "spec": {
        "group": "servicecatalog.example.com",
        "names": {
          "displayPlural": "Docker Images",
          "kind": "DockerImage",
          "plural": "dockerimages"
        },
        "scope": "Organization",
        "versions": [
          {
            "name": "v1alpha1",
            "schema": {
              "openAPIV31Schema": {
                "properties": {
                  "spec": {
                    "properties": {
                      "imageName": {
                        "type": "string"
                      },
                      "registry": {
                        "default": "docker.io",
                        "type": "string"
                      },
                      "tag": {
                        "pattern": "(latest|[0-9]+.[0-9]+.[0-9]+(-[a-z]+[0-9]*)?|[0-9]+.[0-9]+.[0-9]+)$",
                        "type": "string"
                      }
                    },
                    "required": [
                      "imageName",
                      "tag"
                    ],
                    "type": "object"
                  }
                },
                "type": "object"
              }
            },
            "selectableFields": [
              {
                "jsonPath": "spec.imageName"
              }
            ],
            "served": true
          }
        ]
      }
    }
  ],
  "properties": {
    "apiVersion": {
      "description": "The versioned schema of this representation of an object.",
      "enum": [
        "mia-platform.eu/v1alpha1"
      ],
      "type": "string"
    },
    "kind": {
      "description": "The type of this object.",
      "enum": [
        "ItemTypeDefinition"
      ],
      "type": "string"
    },
    "metadata": {
      "description": "The standard object metadata.",
      "properties": {
        "annotations": {
          "additionalProperties": {
            "type": "string"
          },
          "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.",
          "examples": [
            {
              "image-registry": "https://hub.docker.com/",
              "mia-platform.eu/version": "14.0.0"
            }
          ],
          "propertyNames": {
            "pattern": "^([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"
          },
          "type": "object"
        },
        "creationTimestamp": {
          "description": "The server time when this object was created. Clients may not set this value. It is represented in ISO 8601 form and is in UTC.",
          "examples": [
            "2025-09-17T10:30:45Z"
          ],
          "format": "date-time",
          "readOnly": true,
          "type": [
            "string",
            "null"
          ]
        },
        "description": {
          "description": "A brief description of this object.",
          "type": [
            "string",
            "null"
          ]
        },
        "labels": {
          "additionalProperties": {
            "maxLength": 63,
            "pattern": "^([a-zA-Z0-9]([a-zA-Z0-9._-]{0,61}[a-zA-Z0-9])?|)$",
            "type": "string"
          },
          "description": "A map of string keys and values that can be used to organize and categorize (scope and select) objects.",
          "examples": [
            {
              "environment": "dev",
              "mia-platform.eu/tenant": "my-company",
              "track": ""
            }
          ],
          "propertyNames": {
            "pattern": "^([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"
          },
          "type": "object"
        },
        "links": {
          "description": "A list of external hyperlinks.",
          "items": {
            "examples": [
              {
                "title": "Mia-Platform",
                "url": "https://mia-platform.eu/"
              },
              {
                "url": "https://example.com"
              }
            ],
            "properties": {
              "title": {
                "description": "A display name for the link.",
                "minLength": 1,
                "type": [
                  "string",
                  "null"
                ]
              },
              "url": {
                "description": "The URL in standard URI format.",
                "format": "uri",
                "type": "string"
              }
            },
            "required": [
              "url"
            ],
            "type": "object"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "name": {
          "description": "The name of this object. It must be unique within object of the same type. It is represented in RFC 1035 DNS subdomain format.",
          "examples": [
            "api-gateway",
            "dockerimages.stable.example.com"
          ],
          "maxLength": 253,
          "minLength": 1,
          "pattern": "^[a-z0-9]([a-z0-9.-]*[a-z0-9])?$",
          "readOnly": true,
          "type": "string"
        },
        "tags": {
          "description": "A list of single-valued strings.",
          "items": {
            "examples": [
              "ai",
              "env-production"
            ],
            "maxLength": 63,
            "minLength": 1,
            "pattern": "^[a-z0-9:+#]+(-[a-z0-9:+#]+)*$",
            "type": "string"
          },
          "type": [
            "array",
            "null"
          ]
        },
        "title": {
          "description": "A display name of this object. It is to be presented in user interfaces instead of the `metadata.name` of this object, when available.",
          "examples": [
            "Plugin",
            "Custom Workload",
            "AI Agent"
          ],
          "minLength": 1,
          "type": [
            "string",
            "null"
          ]
        },
        "uid": {
          "description": "The unique in time and space identifier for this object. Clients may not set this value. It is represented in RFC 4122 form.",
          "examples": [
            "550e8400-e29b-41d4-a716-446655440000"
          ],
          "format": "uuid",
          "readOnly": true,
          "type": [
            "string",
            "null"
          ]
        },
        "updateTimestamp": {
          "description": "The server time when this object was last updated. Clients may not set this value. It is represented in ISO 8601 form and is in UTC.",
          "examples": [
            "2025-09-17T10:30:45Z"
          ],
          "format": "date-time",
          "type": [
            "string",
            "null"
          ]
        },
        "urn": {
          "description": "The Uniform Resource Name (URN) of this object. It is represented in the format `urn:mia-platform-catalog:<group>:<version>:<kind>:<name>`. Clients may not set this value.",
          "examples": [
            "urn:mia-platform-catalog:stable.example.com:v1:DockerImage:my-resource"
          ],
          "pattern": "^urn:mia-platform-catalog:([a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)*):(v[0-9]+(?:alpha[0-9]+|beta[0-9]+)?):([a-zA-Z][a-zA-Z0-9]*):([a-z0-9](?:[a-z0-9.-]*[a-z0-9])?)$",
          "readOnly": true,
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "name"
      ],
      "type": "object"
    },
    "resourceVersion": {
      "description": "An opaque value that represents the internal version of this object. Clients may not set this value and must treat it as opaque.",
      "readOnly": true,
      "type": [
        "string",
        "null"
      ]
    },
    "spec": {
      "description": "The state of this object.",
      "oneOf": [
        {
          "properties": {
            "group": {
              "description": "The API group of the items of the defined type. The items of the defined type will be serve under `/{group}/*`. Must match the `metadata.name` of this object in the form `<spec.names.plural>.<spec.group>`.",
              "examples": [
                "stable.example.com"
              ],
              "maxLength": 253,
              "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$",
              "type": "string"
            },
            "llmDescription": {
              "description": "A description of the item type for LLM-based tools. It is used to provide additional information about the item type to LLMs. It should be written in English and may contain markdown formatting.",
              "type": [
                "string",
                "null"
              ]
            },
            "names": {
              "description": "The family and kind names for the items of the defined type.",
              "oneOf": [
                {
                  "properties": {
                    "displayPlural": {
                      "description": "The display name of the family of items. It is used only for display purposes. Defaults to the `spec.names.plural` of this object.",
                      "examples": [
                        "Docker Images"
                      ],
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "displaySingular": {
                      "description": "The display name of the item type. It is used only for display purposes. Defaults to the `spec.names.singular` of this object.",
                      "examples": [
                        "Docker image"
                      ],
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "kind": {
                      "description": "The type of the item. It is normally CamelCase and singular. Items of the defined type will use this value as the `kind` attribute in API calls.",
                      "examples": [
                        "DockerImage"
                      ],
                      "pattern": "^[a-zA-Z][a-zA-Z0-9]*$",
                      "readOnly": true,
                      "type": "string"
                    },
                    "plural": {
                      "description": "The name of the family of items to serve. The items of the defined type will be served under `/{group}/{version}/items/{plural}/*`. Must match the `metadata.name` of this object in the form `<spec.names.plural>.<spec.group>`. Must be all lowercase.",
                      "examples": [
                        "docker-images"
                      ],
                      "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$",
                      "readOnly": true,
                      "type": "string"
                    },
                    "singular": {
                      "description": "The singular name of the item type. It is used only for display purposes in technical environments (e.g., a CLI). Defaults to the `spec.names.kind` of this object.",
                      "examples": [
                        "docker-image"
                      ],
                      "pattern": "^[a-z0-9]([a-z0-9-]*[a-z0-9])?$",
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "kind",
                    "plural"
                  ],
                  "type": "object"
                }
              ]
            },
            "scope": {
              "description": "The scope of the items of the defined type. Always equal to `Organization` for now, but may be extended in the future to allow for more granular scoping.",
              "oneOf": [
                {
                  "enum": [
                    "Organization"
                  ],
                  "type": "string"
                }
              ]
            },
            "versions": {
              "description": "The list of all API versions of the items of the defined type.",
              "items": {
                "properties": {
                  "deprecated": {
                    "description": "A flag stating if this version of the API is deprecated. When set to `true`, API requests to this version receive a warning header in the server response.",
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "deprecationWarning": {
                    "description": "An override for the default warning returned to API clients. May only be set when `deprecated` is true. The default warning indicates this version is deprecated and recommends use of the newest served version of equal or greater stability, if one exists.",
                    "type": [
                      "string",
                      "null"
                    ]
                  },
                  "name": {
                    "description": "The version name. It must start with a `v` followed by a number (the major version), then optionally the string `alpha` or `beta` and another number (the minor version). The items of the defined type are served under this version at `/{group}/{version}/*` if `spec.versions.served` is `true`. The name must be unique across all versions.",
                    "examples": [
                      "v1alpha1"
                    ],
                    "pattern": "^v[0-9]+(alpha[0-9]+|beta[0-9]+)?$",
                    "type": "string"
                  },
                  "schema": {
                    "description": "The list of validation methods for the items of the defined type.",
                    "oneOf": [
                      {
                        "properties": {
                          "openAPIV31Schema": {
                            "allOf": [
                              {
                                "properties": {
                                  "properties": {
                                    "properties": {
                                      "metadata": {
                                        "description": "A validation on the `metadata.name` property to apply specific restrictions.",
                                        "properties": {
                                          "properties": {
                                            "additionalProperties": false,
                                            "properties": {
                                              "name": {
                                                "additionalProperties": true,
                                                "properties": {
                                                  "type": {
                                                    "enum": [
                                                      "string"
                                                    ],
                                                    "type": "string"
                                                  }
                                                },
                                                "required": [
                                                  "type"
                                                ],
                                                "type": "object"
                                              }
                                            },
                                            "required": [
                                              "name"
                                            ],
                                            "type": "object"
                                          },
                                          "type": {
                                            "enum": [
                                              "object"
                                            ],
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "properties"
                                        ],
                                        "type": "object"
                                      },
                                      "spec": {
                                        "description": "A validation on the `spec` property of the items.",
                                        "properties": {
                                          "properties": {
                                            "type": "object"
                                          },
                                          "type": {
                                            "enum": [
                                              "object"
                                            ],
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "type",
                                          "properties"
                                        ],
                                        "type": "object"
                                      }
                                    },
                                    "required": [
                                      "spec"
                                    ],
                                    "type": "object"
                                  },
                                  "type": {
                                    "enum": [
                                      "object"
                                    ],
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "type",
                                  "properties"
                                ],
                                "type": "object"
                              },
                              {
                                "$ref": "./mia-platform.eu.v1alpha1.SchemaObject.json"
                              }
                            ],
                            "description": "The validation schema for the items of the defined type. It must be used to validate the `spec` field of the items and may be used to validate the `metadata.name` field of the items. Based on the OpenAPI v3.1 schema object."
                          }
                        },
                        "required": [
                          "openAPIV31Schema"
                        ],
                        "type": "object"
                      }
                    ]
                  },
                  "selectableFields": {
                    "description": "A list of paths to fields that may be used as field selectors.",
                    "items": {
                      "examples": [
                        {
                          "jsonPath": "spec.imageName"
                        }
                      ],
                      "properties": {
                        "jsonPath": {
                          "description": "A simple JSON path which is evaluated against each item of the defined type to produce a field selector value. Only JSON paths without the array notation are allowed. It must point to a field yielding a primitive or homogeneous array of primitives value. Types with enum values and strings with formats are allowed.",
                          "type": "string"
                        }
                      },
                      "required": [
                        "jsonPath"
                      ],
                      "type": "object"
                    },
                    "type": [
                      "array",
                      "null"
                    ]
                  },
                  "served": {
                    "description": "A flag enabling/disabling this version from being served via REST APIs.",
                    "type": "boolean"
                  }
                },
                "required": [
                  "name",
                  "schema",
                  "served"
                ],
                "type": "object"
              },
              "type": "array"
            }
          },
          "required": [
            "group",
            "names",
            "scope",
            "versions"
          ],
          "type": "object"
        }
      ]
    }
  },
  "required": [
    "apiVersion",
    "kind",
    "metadata",
    "spec"
  ],
  "type": "object"
}
