{
  "$id": "https://niklasrosenstein.github.io/gitopsctr/schemas/apis/gitopsctr.io/v1/Receipt.schema.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null
    },
    "apiVersion": {
      "const": "gitopsctr.io/v1"
    },
    "kind": {
      "const": "Receipt"
    },
    "metadata": {
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string"
        }
      },
      "required": [
        "name"
      ],
      "title": "ReceiptMetadata",
      "type": "object"
    },
    "spec": {
      "additionalProperties": false,
      "properties": {
        "desired": {
          "additionalProperties": false,
          "properties": {
            "revision": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "default": null
            },
            "unitBlob": {
              "type": "string"
            }
          },
          "required": [
            "unitBlob"
          ],
          "title": "ReceiptDesired",
          "type": "object"
        },
        "resolvedInputs": {
          "anyOf": [
            {
              "additionalProperties": false,
              "properties": {
                "artifacts": {
                  "anyOf": [
                    {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "propertyNames": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "importedArtifactEvidence": {
                  "anyOf": [
                    {
                      "additionalProperties": {
                        "type": "object"
                      },
                      "propertyNames": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "importedArtifacts": {
                  "anyOf": [
                    {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "propertyNames": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "promotions": {
                  "anyOf": [
                    {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "propertyNames": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                },
                "receipts": {
                  "anyOf": [
                    {
                      "additionalProperties": {
                        "type": "string"
                      },
                      "propertyNames": {
                        "type": "string"
                      },
                      "type": "object"
                    },
                    {
                      "type": "null"
                    }
                  ],
                  "default": null
                }
              },
              "title": "ResolvedInputs",
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "subject": {
          "additionalProperties": false,
          "properties": {
            "apiVersion": {
              "type": "string"
            },
            "kind": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "qualifiedName": {
              "pattern": "^[a-z0-9][a-z0-9-]*(?:/[a-z0-9][a-z0-9-]*)*$",
              "type": "string"
            }
          },
          "required": [
            "apiVersion",
            "kind",
            "name",
            "qualifiedName"
          ],
          "title": "ReceiptSubjectDocument",
          "type": "object"
        }
      },
      "required": [
        "subject",
        "desired"
      ],
      "title": "ReceiptSpecDocument",
      "type": "object"
    },
    "status": {
      "additionalProperties": false,
      "properties": {
        "artifacts": {
          "anyOf": [
            {
              "type": "object"
            },
            {
              "type": "null"
            }
          ],
          "default": null
        },
        "controller": {
          "type": "object"
        },
        "result": {
          "type": "object"
        }
      },
      "required": [
        "controller",
        "result"
      ],
      "title": "ReceiptStatusDocument",
      "type": "object"
    }
  },
  "required": [
    "apiVersion",
    "kind",
    "metadata",
    "spec",
    "status"
  ],
  "title": "ReceiptDocument",
  "type": "object"
}
