{
  "properties": {
    "apiVersion": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "metadata": {
      "type": "object"
    },
    "spec": {
      "properties": {
        "compatibilityLevel": {
          "enum": [
            "BACKWARD",
            "BACKWARD_TRANSITIVE",
            "FORWARD",
            "FORWARD_TRANSITIVE",
            "FULL",
            "FULL_TRANSITIVE",
            "NONE"
          ],
          "type": "string"
        },
        "data": {
          "properties": {
            "configRef": {
              "minLength": 1,
              "type": "string"
            },
            "format": {
              "enum": [
                "avro",
                "json",
                "protobuf"
              ],
              "minLength": 1,
              "type": "string"
            }
          },
          "required": [
            "configRef",
            "format"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "mode": {
          "enum": [
            "IMPORT",
            "READONLY",
            "READWRITE"
          ],
          "type": "string"
        },
        "name": {
          "maxLength": 255,
          "minLength": 1,
          "pattern": "^[^\\\\]*$",
          "type": "string"
        },
        "normalize": {
          "type": "boolean"
        },
        "schemaReferences": {
          "items": {
            "properties": {
              "avro": {
                "properties": {
                  "avro": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "avro"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "format": {
                "enum": [
                  "avro",
                  "json",
                  "protobuf"
                ],
                "minLength": 1,
                "type": "string"
              },
              "json": {
                "properties": {
                  "url": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "name": {
                "type": "string"
              },
              "protobuf": {
                "properties": {
                  "file": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "subject": {
                "minLength": 1,
                "type": "string"
              },
              "version": {
                "anyOf": [
                  {
                    "type": "integer"
                  },
                  {
                    "type": "string"
                  }
                ],
                "x-kubernetes-int-or-string": true,
                "x-kubernetes-validations": [
                  {
                    "message": "version must be 'latest' or a positive integer",
                    "rule": "self == 'latest' || self > 0"
                  }
                ]
              }
            },
            "required": [
              "format",
              "subject",
              "version"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "schemaRegistryClusterRef": {
          "properties": {
            "name": {
              "type": "string"
            },
            "namespace": {
              "type": "string"
            }
          },
          "required": [
            "name"
          ],
          "type": "object",
          "additionalProperties": false
        },
        "schemaRegistryRest": {
          "properties": {
            "authentication": {
              "properties": {
                "basic": {
                  "properties": {
                    "debug": {
                      "type": "boolean"
                    },
                    "directoryPathInContainer": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "ignoreRoles": {
                      "type": "boolean"
                    },
                    "restrictedRoles": {
                      "items": {
                        "type": "string"
                      },
                      "minItems": 1,
                      "type": "array"
                    },
                    "roles": {
                      "items": {
                        "type": "string"
                      },
                      "type": "array"
                    },
                    "secretRef": {
                      "maxLength": 30,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "bearer": {
                  "properties": {
                    "directoryPathInContainer": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "secretRef": {
                      "maxLength": 30,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "type": "object",
                  "additionalProperties": false
                },
                "oauth": {
                  "properties": {
                    "configuration": {
                      "properties": {
                        "audience": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "clientAssertion": {
                          "properties": {
                            "clientId": {
                              "minLength": 1,
                              "type": "string"
                            },
                            "jwtTokenFile": {
                              "properties": {
                                "directoryPathInContainer": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "secretRef": {
                                  "maxLength": 30,
                                  "minLength": 1,
                                  "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                  "type": "string"
                                }
                              },
                              "type": "object",
                              "additionalProperties": false
                            },
                            "localClientAssertion": {
                              "properties": {
                                "audience": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "includeJtiClaim": {
                                  "type": "boolean"
                                },
                                "includeNbfClaim": {
                                  "type": "boolean"
                                },
                                "issuer": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "privateKeyFile": {
                                  "properties": {
                                    "directoryPathInContainer": {
                                      "minLength": 1,
                                      "type": "string"
                                    },
                                    "encryptedPrivateKey": {
                                      "type": "boolean"
                                    },
                                    "includeAssertionTemplate": {
                                      "type": "boolean"
                                    },
                                    "secretRef": {
                                      "maxLength": 30,
                                      "minLength": 1,
                                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                                      "type": "string"
                                    }
                                  },
                                  "type": "object",
                                  "additionalProperties": false
                                },
                                "subject": {
                                  "minLength": 1,
                                  "type": "string"
                                },
                                "tokenLifetime": {
                                  "format": "int32",
                                  "type": "integer"
                                }
                              },
                              "type": "object",
                              "additionalProperties": false
                            }
                          },
                          "type": "object",
                          "additionalProperties": false
                        },
                        "expectedIssuer": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "groupsClaimName": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "jwksEndpointUri": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "loginConnectTimeoutMs": {
                          "format": "int32",
                          "type": "integer"
                        },
                        "loginReadTimeoutMs": {
                          "format": "int32",
                          "type": "integer"
                        },
                        "loginRetryBackoffMaxMs": {
                          "format": "int32",
                          "type": "integer"
                        },
                        "loginRetryBackoffMs": {
                          "format": "int32",
                          "type": "integer"
                        },
                        "scope": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "subClaimName": {
                          "minLength": 1,
                          "type": "string"
                        },
                        "tokenEndpointUri": {
                          "minLength": 1,
                          "type": "string"
                        }
                      },
                      "type": "object",
                      "additionalProperties": false
                    },
                    "directoryPathInContainer": {
                      "minLength": 1,
                      "type": "string"
                    },
                    "secretRef": {
                      "maxLength": 30,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "configuration"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "sslClientAuthentication": {
                  "type": "boolean"
                },
                "type": {
                  "enum": [
                    "basic",
                    "bearer",
                    "mtls",
                    "oauth"
                  ],
                  "type": "string"
                }
              },
              "required": [
                "type"
              ],
              "type": "object",
              "additionalProperties": false
            },
            "endpoint": {
              "minLength": 1,
              "pattern": "^https?://.*",
              "type": "string"
            },
            "kafkaClusterID": {
              "minLength": 1,
              "type": "string"
            },
            "tls": {
              "properties": {
                "directoryPathInContainer": {
                  "minLength": 1,
                  "type": "string"
                },
                "jksPassword": {
                  "properties": {
                    "secretRef": {
                      "maxLength": 30,
                      "minLength": 1,
                      "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                      "type": "string"
                    }
                  },
                  "required": [
                    "secretRef"
                  ],
                  "type": "object",
                  "additionalProperties": false
                },
                "secretRef": {
                  "maxLength": 63,
                  "minLength": 1,
                  "pattern": "^[a-z0-9]([-a-z0-9]*[a-z0-9])?$",
                  "type": "string"
                }
              },
              "type": "object",
              "additionalProperties": false
            }
          },
          "type": "object",
          "additionalProperties": false
        }
      },
      "required": [
        "data"
      ],
      "type": "object",
      "additionalProperties": false
    },
    "status": {
      "properties": {
        "appState": {
          "default": "Unknown",
          "enum": [
            "Unknown",
            "Created",
            "Failed",
            "Deleted"
          ],
          "type": "string"
        },
        "compatibilityLevel": {
          "type": "string"
        },
        "conditions": {
          "items": {
            "properties": {
              "lastProbeTime": {
                "format": "date-time",
                "type": "string"
              },
              "lastTransitionTime": {
                "format": "date-time",
                "type": "string"
              },
              "message": {
                "type": "string"
              },
              "reason": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "type": {
                "type": "string"
              }
            },
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "deletedVersions": {
          "items": {
            "format": "int32",
            "type": "integer"
          },
          "type": "array"
        },
        "format": {
          "type": "string"
        },
        "id": {
          "format": "int32",
          "type": "integer"
        },
        "mode": {
          "type": "string"
        },
        "normalize": {
          "type": "boolean"
        },
        "observedGeneration": {
          "format": "int64",
          "type": "integer"
        },
        "schemaReferences": {
          "items": {
            "properties": {
              "avro": {
                "properties": {
                  "avro": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "avro"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "format": {
                "enum": [
                  "avro",
                  "json",
                  "protobuf"
                ],
                "minLength": 1,
                "type": "string"
              },
              "json": {
                "properties": {
                  "url": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "url"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "name": {
                "type": "string"
              },
              "protobuf": {
                "properties": {
                  "file": {
                    "minLength": 1,
                    "type": "string"
                  }
                },
                "required": [
                  "file"
                ],
                "type": "object",
                "additionalProperties": false
              },
              "subject": {
                "minLength": 1,
                "type": "string"
              },
              "version": {
                "format": "int32",
                "type": "integer"
              }
            },
            "required": [
              "format",
              "subject",
              "version"
            ],
            "type": "object",
            "additionalProperties": false
          },
          "type": "array"
        },
        "schemaRegistryAuthenticationType": {
          "type": "string"
        },
        "schemaRegistryEndpoint": {
          "type": "string"
        },
        "schemaRegistryTLS": {
          "type": "boolean"
        },
        "softDeletedVersions": {
          "items": {
            "format": "int32",
            "type": "integer"
          },
          "type": "array"
        },
        "state": {
          "type": "string"
        },
        "subject": {
          "type": "string"
        },
        "version": {
          "format": "int32",
          "type": "integer"
        }
      },
      "type": "object",
      "additionalProperties": false
    }
  },
  "required": [
    "spec"
  ],
  "type": "object"
}
