{
  "openapi": "3.0.3",
  "paths": {
    "/services-dependencies": {
      "get": {
        "tags": [
          "Services Dependencies"
        ],
        "summary": "List services dependencies",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Service"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/[\\$]page/services-dependencies": {
      "post": {
        "tags": [
          "Services Dependencies"
        ],
        "summary": "Page services dependencies",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Service"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/services-dependencies/{id}": {
      "get": {
        "tags": [
          "Services Dependencies"
        ],
        "summary": "Get service dependencies",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Service dependencies not found",
            "content": {}
          }
        }
      },
      "patch": {
        "tags": [
          "Services Dependencies"
        ],
        "summary": "Patch service dependencies",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "version": {
                    "default": 1,
                    "type": "number"
                  },
                  "endpoint": {
                    "type": "string"
                  },
                  "releaseTrack": {
                    "type": "string",
                    "enum": [
                      "development",
                      "release-candidate",
                      "general-availability",
                      "removed-from-distribution"
                    ]
                  },
                  "sourceTenantId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Service dependencies not found",
            "content": {}
          },
          "500": {
            "description": "Not able to patch service dependencies",
            "content": {}
          }
        }
      }
    },
    "/services-dependencies/{id}/are-owned-by-other-service": {
      "post": {
        "tags": [
          "Services Dependencies"
        ],
        "summary": "Validate if the dependencies are owned by other service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "version": {
                    "default": 1,
                    "type": "number"
                  },
                  "endpoint": {
                    "type": "string"
                  },
                  "releaseTrack": {
                    "type": "string",
                    "enum": [
                      "development",
                      "release-candidate",
                      "general-availability",
                      "removed-from-distribution"
                    ]
                  },
                  "sourceTenantId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "500": {
            "description": "Not able to validate if the dependencies are owned by other service",
            "content": {}
          }
        }
      }
    },
    "/services-dependencies/{id}/{component}": {
      "put": {
        "tags": [
          "Services Dependencies"
        ],
        "summary": "Put latest service dependencies by component",
        "parameters": [
          {
            "name": "component",
            "in": "path",
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "version": {
                    "default": 1,
                    "type": "number"
                  },
                  "endpoint": {
                    "type": "string"
                  },
                  "releaseTrack": {
                    "type": "string",
                    "enum": [
                      "development",
                      "release-candidate",
                      "general-availability",
                      "removed-from-distribution"
                    ]
                  },
                  "sourceTenantId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "400": {
            "description": "Invalid component provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Service dependencies not found",
            "content": {}
          },
          "500": {
            "description": "Not able to put service dependencies",
            "content": {}
          }
        }
      }
    },
    "/services/from-external-template": {
      "post": {
        "tags": [
          "Services"
        ],
        "summary": "Create service from external template",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "version": {
                    "default": 1,
                    "type": "number"
                  },
                  "endpoint": {
                    "type": "string"
                  },
                  "releaseTrack": {
                    "type": "string",
                    "enum": [
                      "development",
                      "release-candidate",
                      "general-availability",
                      "removed-from-distribution"
                    ]
                  },
                  "sourceTenantId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Service already exists",
            "content": {}
          },
          "500": {
            "description": "Not able to create service from external template",
            "content": {}
          }
        }
      }
    },
    "/services/external-template-compatibility-check": {
      "post": {
        "tags": [
          "Services"
        ],
        "summary": "Compatibility check of extenal template",
        "parameters": [],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "templateId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "configuration": {
                    "type": "object",
                    "properties": {
                      "agents": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "allOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "size": {
                                      "type": "string"
                                    },
                                    "_metaData": {
                                      "type": "object",
                                      "properties": {
                                        "doNotStart": {
                                          "type": "boolean"
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    "envVars": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "label": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "label",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "nos-topic",
                                        "flow-topic",
                                        "chat-topic",
                                        "flow-http",
                                        "site-http",
                                        "worker"
                                      ]
                                    },
                                    "scaleType": {
                                      "type": "string",
                                      "enum": [
                                        "cpu",
                                        "lag"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "size",
                                    "type",
                                    "scaleType"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "scaleType": {
                                          "type": "string",
                                          "const": "cpu"
                                        },
                                        "targetCpu": {
                                          "type": "number",
                                          "minimum": 1,
                                          "maximum": 100
                                        },
                                        "maxReplicas": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 100
                                        },
                                        "minReplicas": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 100
                                        }
                                      },
                                      "required": [
                                        "scaleType",
                                        "targetCpu",
                                        "maxReplicas",
                                        "minReplicas"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "scaleType": {
                                          "type": "string",
                                          "const": "lag"
                                        },
                                        "lagThreshold": {
                                          "default": 100,
                                          "type": "number",
                                          "minimum": 2
                                        },
                                        "maxReplicas": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 100
                                        },
                                        "minReplicas": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 100
                                        }
                                      },
                                      "required": [
                                        "scaleType",
                                        "lagThreshold",
                                        "maxReplicas",
                                        "minReplicas"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "size": {
                                  "type": "string"
                                },
                                "_metaData": {
                                  "type": "object",
                                  "properties": {
                                    "doNotStart": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "envVars": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "label": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "label",
                                      "value"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "const": "flow-cron"
                                },
                                "schedule": {
                                  "type": "string",
                                  "pattern": "^((\\*(\\/\\d+)?|([0-5]?\\d)(-([0-5]?\\d)(\\/\\d+)?)?(,([0-5]?\\d)(-([0-5]?\\d)(\\/\\d+)?)?)*)\\s+(\\*(\\/\\d+)?|([01]?\\d|2[0-3])(-([01]?\\d|2[0-3])(\\/\\d+)?)?(,([01]?\\d|2[0-3])(-([01]?\\d|2[0-3])(\\/\\d+)?)?)*)\\s+(\\*(\\/\\d+)?|(0?[1-9]|[12]\\d|3[01])(-(0?[1-9]|[12]\\d|3[01])(\\/\\d+)?)?(,(0?[1-9]|[12]\\d|3[01])(-(0?[1-9]|[12]\\d|3[01])(\\/\\d+)?)?)*)\\s+(\\*(\\/\\d+)?|([1-9]|1[012])(-([1-9]|1[012])(\\/\\d+)?)?(,([1-9]|1[012])(-([1-9]|1[012])(\\/\\d+)?)?)*|jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\\s+(\\*(\\/\\d+)?|([0-6])(-([0-6])(\\/\\d+)?)?(,([0-6])(-([0-6])(\\/\\d+)?)?)*|mon|tue|wed|thu|fri|sat|sun)|(@yearly|@annually|@monthly|@weekly|@daily|@midnight|@hourly))$"
                                }
                              },
                              "required": [
                                "size",
                                "type",
                                "schedule"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "topics": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "partitions_count": {
                              "type": "number",
                              "minimum": 1
                            }
                          },
                          "required": [
                            "partitions_count"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "externalApis": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "allOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "bearer",
                                    "kafka",
                                    "client-grant",
                                    "password-grant",
                                    "authorization-code-grant",
                                    "google-service-account",
                                    "basic",
                                    "public",
                                    "pulsar",
                                    "connection-string",
                                    "sftp",
                                    "azure-blob",
                                    "aws-s3"
                                  ]
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "bearer"
                                    },
                                    "endpoint": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "bearerToken": {
                                      "type": "string"
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "endpoint",
                                    "bearerToken"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "connection-string"
                                    },
                                    "connectionString": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "connectionString"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "sftp"
                                    },
                                    "host": {
                                      "type": "string"
                                    },
                                    "port": {
                                      "type": "number"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "host",
                                    "port",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "azure-blob"
                                    },
                                    "accountName": {
                                      "type": "string"
                                    },
                                    "accountKey": {
                                      "type": "string"
                                    },
                                    "containerName": {
                                      "type": "string"
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "accountName",
                                    "accountKey"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "aws-s3"
                                    },
                                    "region": {
                                      "type": "string"
                                    },
                                    "accessKeyId": {
                                      "type": "string"
                                    },
                                    "secretAccessKey": {
                                      "type": "string"
                                    },
                                    "bucketName": {
                                      "type": "string"
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "region",
                                    "accessKeyId",
                                    "secretAccessKey"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "kafka"
                                    },
                                    "topicTemplate": {
                                      "type": "string"
                                    },
                                    "partitioner": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "legacy"
                                      ]
                                    },
                                    "brokers": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "mechanism": {
                                      "type": "string",
                                      "const": "plain"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "partitioner",
                                    "brokers",
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "kafka"
                                    },
                                    "topicTemplate": {
                                      "type": "string"
                                    },
                                    "partitioner": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "legacy"
                                      ]
                                    },
                                    "brokers": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-256"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "partitioner",
                                    "brokers",
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "kafka"
                                    },
                                    "topicTemplate": {
                                      "type": "string"
                                    },
                                    "partitioner": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "legacy"
                                      ]
                                    },
                                    "brokers": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-512"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "partitioner",
                                    "brokers",
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "kafka"
                                    },
                                    "topicTemplate": {
                                      "type": "string"
                                    },
                                    "partitioner": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "legacy"
                                      ]
                                    },
                                    "brokers": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "mechanism": {
                                      "type": "string",
                                      "const": "oauthbearer"
                                    },
                                    "authEndpoint": {
                                      "type": "string"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "partitioner",
                                    "brokers",
                                    "mechanism",
                                    "authEndpoint",
                                    "clientId",
                                    "clientSecret",
                                    "audience"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "client-grant"
                                    },
                                    "endpoint": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "authEndpoint": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    },
                                    "scope": {
                                      "type": "string"
                                    },
                                    "contentType": {
                                      "type": "string",
                                      "enum": [
                                        "application/json",
                                        "x-www-form-urlencoded"
                                      ]
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "endpoint",
                                    "authEndpoint",
                                    "clientId",
                                    "clientSecret"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "password-grant"
                                    },
                                    "endpoint": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "authEndpoint": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    },
                                    "client": {
                                      "type": "object",
                                      "properties": {
                                        "clientId": {
                                          "type": "string"
                                        },
                                        "clientSecret": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "clientId",
                                        "clientSecret"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "audience": {
                                      "type": "string"
                                    },
                                    "scope": {
                                      "type": "string"
                                    },
                                    "contentType": {
                                      "type": "string",
                                      "enum": [
                                        "application/json",
                                        "x-www-form-urlencoded"
                                      ]
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "endpoint",
                                    "authEndpoint",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "authorization-code-grant"
                                    },
                                    "appId": {
                                      "type": "string"
                                    },
                                    "scope": {
                                      "type": "string"
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "appId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "google-service-account"
                                    },
                                    "key": {
                                      "type": "string"
                                    },
                                    "scope": {
                                      "type": "string"
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "key",
                                    "scope"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "basic"
                                    },
                                    "endpoint": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "endpoint",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "public"
                                    },
                                    "endpoint": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "endpoint"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "pulsar"
                                        },
                                        "topicTemplate": {
                                          "type": "string"
                                        },
                                        "serviceUrl": {
                                          "type": "string"
                                        },
                                        "headers": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "key": {
                                                "type": "string"
                                              },
                                              "value": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "key",
                                              "value"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "serviceUrl"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "authMode": {
                                              "type": "string",
                                              "const": "bearer"
                                            },
                                            "bearerToken": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "authMode",
                                            "bearerToken"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "authMode": {
                                              "type": "string",
                                              "const": "oauth"
                                            },
                                            "authEndpoint": {
                                              "type": "string",
                                              "format": "uri"
                                            },
                                            "clientId": {
                                              "type": "string"
                                            },
                                            "clientSecret": {
                                              "type": "string"
                                            },
                                            "audience": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "authMode",
                                            "authEndpoint",
                                            "clientId",
                                            "clientSecret"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      },
                      "jwksConfigurations": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "jwksUri": {
                              "type": "string",
                              "minLength": 1
                            },
                            "cache": {
                              "default": true,
                              "type": "boolean"
                            },
                            "rateLimit": {
                              "default": true,
                              "type": "boolean"
                            },
                            "jwksRequestsPerMinute": {
                              "default": 5,
                              "type": "number"
                            },
                            "audience": {
                              "type": "string",
                              "minLength": 1
                            },
                            "issuer": {
                              "type": "string",
                              "minLength": 1
                            },
                            "algorithms": {
                              "default": "RS256",
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "jwksUri",
                            "cache",
                            "rateLimit",
                            "jwksRequestsPerMinute",
                            "audience",
                            "issuer",
                            "algorithms"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "authorizationCodeApps": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "client": {
                              "type": "object",
                              "properties": {
                                "clientId": {
                                  "type": "string"
                                },
                                "clientSecret": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "clientId",
                                "clientSecret"
                              ],
                              "additionalProperties": false
                            },
                            "endpoints": {
                              "type": "object",
                              "properties": {
                                "authenticationMethod": {
                                  "type": "string",
                                  "enum": [
                                    "basic",
                                    "post"
                                  ]
                                },
                                "authorization": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "token": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "revoke": {
                                  "type": "string",
                                  "format": "uri"
                                }
                              },
                              "required": [
                                "authenticationMethod",
                                "authorization",
                                "token"
                              ],
                              "additionalProperties": false
                            },
                            "connectionConfig": {
                              "type": "object",
                              "properties": {
                                "endpoint": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "endpoint"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "client",
                            "endpoints",
                            "connectionConfig"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "aiRoutes": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": false
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "name",
                  "templateId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "required": [
                        "success"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "const": false
                        },
                        "messages": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "success"
                      ],
                      "additionalProperties": false
                    }
                  ],
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/services": {
      "get": {
        "tags": [
          "Services"
        ],
        "summary": "List services",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Service"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Services"
        ],
        "summary": "Create a service",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "version": {
                    "default": 1,
                    "type": "number"
                  },
                  "endpoint": {
                    "type": "string"
                  },
                  "releaseTrack": {
                    "type": "string",
                    "enum": [
                      "development",
                      "release-candidate",
                      "general-availability",
                      "removed-from-distribution"
                    ]
                  },
                  "sourceTenantId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Service already exists",
            "content": {}
          },
          "500": {
            "description": "Not able to create service",
            "content": {}
          }
        }
      }
    },
    "/[\\$]page/services": {
      "post": {
        "tags": [
          "Services"
        ],
        "summary": "Page services",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Service"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/services/{id}": {
      "get": {
        "tags": [
          "Services"
        ],
        "summary": "Get service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Service not found",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Services"
        ],
        "summary": "Update service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "version": {
                    "default": 1,
                    "type": "number"
                  },
                  "endpoint": {
                    "type": "string"
                  },
                  "releaseTrack": {
                    "type": "string",
                    "enum": [
                      "development",
                      "release-candidate",
                      "general-availability",
                      "removed-from-distribution"
                    ]
                  },
                  "sourceTenantId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Service not found",
            "content": {}
          },
          "500": {
            "description": "Not able to update service",
            "content": {}
          }
        }
      },
      "delete": {
        "tags": [
          "Services"
        ],
        "summary": "Delete service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "204": {
            "description": "Service deleted successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid service id provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Service not found",
            "content": {}
          }
        }
      }
    },
    "/services/{id}/latest-dependencies": {
      "get": {
        "tags": [
          "Services"
        ],
        "summary": "Get service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "direct": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "typeId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "instanceId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "version": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "typeId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "peer": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "typeId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "instanceId": {
                            "type": "string",
                            "minLength": 1
                          },
                          "version": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "typeId"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "direct",
                    "peer"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Service not found",
            "content": {}
          }
        }
      }
    },
    "/services/{id}/releases": {
      "get": {
        "tags": [
          "Services"
        ],
        "summary": "List services",
        "parameters": [
          {
            "name": "includeTotal",
            "in": "query"
          },
          {
            "name": "pageSize",
            "in": "query"
          },
          {
            "name": "pageToken",
            "in": "query"
          },
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Service"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      },
      "post": {
        "tags": [
          "Services"
        ],
        "summary": "Create service release",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "releaseTrack": {
                    "type": "string",
                    "enum": [
                      "development",
                      "release-candidate",
                      "general-availability",
                      "removed-from-distribution"
                    ]
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "releaseTrack"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Service not found",
            "content": {}
          },
          "500": {
            "description": "Not able to update service",
            "content": {}
          }
        }
      }
    },
    "/[\\$]page/services/{id}/releases": {
      "post": {
        "tags": [
          "Services"
        ],
        "summary": "Page services",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/$ListQuery"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "items": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Service"
                      }
                    },
                    "nextPageToken": {
                      "type": "string"
                    },
                    "totalCount": {
                      "type": "integer"
                    }
                  },
                  "required": [
                    "items"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Invalid search provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/services/{id}/releases/{version}": {
      "get": {
        "tags": [
          "Services"
        ],
        "summary": "Get service",
        "parameters": [
          {
            "name": "version",
            "in": "path",
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Service not found",
            "content": {}
          }
        }
      }
    },
    "/services/{serviceId}/releases/{releaseId}": {
      "put": {
        "tags": [
          "Services"
        ],
        "summary": "Update service release",
        "parameters": [
          {
            "name": "releaseId",
            "in": "path",
            "required": true
          },
          {
            "name": "serviceId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "releaseTrack": {
                    "type": "string",
                    "enum": [
                      "development",
                      "release-candidate",
                      "general-availability",
                      "removed-from-distribution"
                    ]
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Release not found",
            "content": {}
          },
          "500": {
            "description": "Not able to update release",
            "content": {}
          }
        }
      }
    },
    "/services/{id}/releases-validate": {
      "post": {
        "tags": [
          "Services"
        ],
        "summary": "Validate a service release",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Service release not found",
            "content": {}
          },
          "500": {
            "description": "Not able to validate service",
            "content": {}
          }
        }
      }
    },
    "/services/{id}/release-changeset/{version}": {
      "get": {
        "tags": [
          "Services"
        ],
        "summary": "Get release changeset",
        "parameters": [
          {
            "name": "version",
            "in": "path",
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Service release not found",
            "content": {}
          }
        }
      }
    },
    "/services/{id}/all-dependents-in-tenant": {
      "get": {
        "tags": [
          "Services"
        ],
        "summary": "Gathers all the services in the current that have peer dependencies on the direct dependencies of this service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "version": {
                    "default": 1,
                    "type": "number"
                  },
                  "endpoint": {
                    "type": "string"
                  },
                  "releaseTrack": {
                    "type": "string",
                    "enum": [
                      "development",
                      "release-candidate",
                      "general-availability",
                      "removed-from-distribution"
                    ]
                  },
                  "sourceTenantId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Service validated successfully",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Service not found",
            "content": {}
          },
          "500": {
            "description": "Not able to get direct dependencies",
            "content": {}
          }
        }
      }
    },
    "/services/{id}/releases-dependents": {
      "post": {
        "tags": [
          "Services"
        ],
        "summary": "List service dependents",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "404": {
            "description": "Service release not found",
            "content": {}
          },
          "500": {
            "description": "Not able to validate service",
            "content": {}
          }
        }
      }
    },
    "/services/{id}/dependents": {
      "post": {
        "tags": [
          "Services"
        ],
        "summary": "Gathers all the services that have peer dependencies on the direct dependencies of this service",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "version": {
                    "default": 1,
                    "type": "number"
                  },
                  "endpoint": {
                    "type": "string"
                  },
                  "releaseTrack": {
                    "type": "string",
                    "enum": [
                      "development",
                      "release-candidate",
                      "general-availability",
                      "removed-from-distribution"
                    ]
                  },
                  "sourceTenantId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Service validated successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Service already exists",
            "content": {}
          },
          "500": {
            "description": "Not able to validate service",
            "content": {}
          }
        }
      }
    },
    "/services/release-compatibility-check": {
      "post": {
        "tags": [
          "Services"
        ],
        "summary": "Compatibility check of a release",
        "parameters": [],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tenantId": {
                    "type": "string"
                  },
                  "uri": {
                    "type": "string"
                  },
                  "version": {
                    "type": "number"
                  },
                  "endpoint": {
                    "type": "string"
                  },
                  "token": {
                    "type": "string"
                  }
                },
                "required": [
                  "tenantId",
                  "uri",
                  "endpoint",
                  "token"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "required": [
                        "success"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "const": false
                        },
                        "messages": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "success"
                      ],
                      "additionalProperties": false
                    }
                  ],
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    },
    "/services/installation": {
      "post": {
        "tags": [
          "Services"
        ],
        "summary": "Install service",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "version": {
                    "default": 1,
                    "type": "number"
                  },
                  "endpoint": {
                    "type": "string"
                  },
                  "releaseTrack": {
                    "type": "string",
                    "enum": [
                      "development",
                      "release-candidate",
                      "general-availability",
                      "removed-from-distribution"
                    ]
                  },
                  "sourceTenantId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "multipart/form-data": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Service already exists",
            "content": {}
          },
          "500": {
            "description": "Not able to upload service",
            "content": {}
          }
        }
      },
      "put": {
        "tags": [
          "Services"
        ],
        "summary": "Update a service installation",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "version": {
                    "default": 1,
                    "type": "number"
                  },
                  "endpoint": {
                    "type": "string"
                  },
                  "releaseTrack": {
                    "type": "string",
                    "enum": [
                      "development",
                      "release-candidate",
                      "general-availability",
                      "removed-from-distribution"
                    ]
                  },
                  "sourceTenantId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "",
            "content": {
              "multipart/form-data": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Service already exists",
            "content": {}
          },
          "500": {
            "description": "Not able to upload service",
            "content": {}
          }
        }
      }
    },
    "/services/installation:validate": {
      "put": {
        "tags": [
          "Services"
        ],
        "summary": "Validation of a service installation update",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "version": {
                    "default": 1,
                    "type": "number"
                  },
                  "endpoint": {
                    "type": "string"
                  },
                  "releaseTrack": {
                    "type": "string",
                    "enum": [
                      "development",
                      "release-candidate",
                      "general-availability",
                      "removed-from-distribution"
                    ]
                  },
                  "sourceTenantId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Service validated successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Service already exists",
            "content": {}
          },
          "500": {
            "description": "Not able to validate service",
            "content": {}
          }
        }
      },
      "post": {
        "tags": [
          "Services"
        ],
        "summary": "Validation of a service installation",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "version": {
                    "default": 1,
                    "type": "number"
                  },
                  "endpoint": {
                    "type": "string"
                  },
                  "releaseTrack": {
                    "type": "string",
                    "enum": [
                      "development",
                      "release-candidate",
                      "general-availability",
                      "removed-from-distribution"
                    ]
                  },
                  "sourceTenantId": {
                    "type": "string"
                  },
                  "description": {
                    "type": "string"
                  }
                },
                "required": [
                  "name"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Service validated successfully",
            "content": {}
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Service already exists",
            "content": {}
          },
          "500": {
            "description": "Not able to validate service",
            "content": {}
          }
        }
      }
    },
    "/services/from-template": {
      "post": {
        "tags": [
          "Services"
        ],
        "summary": "Create a service from template",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "name": {
                    "type": "string",
                    "minLength": 1
                  },
                  "templateId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "configuration": {
                    "type": "object",
                    "properties": {
                      "agents": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "anyOf": [
                            {
                              "allOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "size": {
                                      "type": "string"
                                    },
                                    "_metaData": {
                                      "type": "object",
                                      "properties": {
                                        "doNotStart": {
                                          "type": "boolean"
                                        }
                                      },
                                      "additionalProperties": false
                                    },
                                    "envVars": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "label": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "label",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "type": {
                                      "type": "string",
                                      "enum": [
                                        "nos-topic",
                                        "flow-topic",
                                        "chat-topic",
                                        "flow-http",
                                        "site-http",
                                        "worker"
                                      ]
                                    },
                                    "scaleType": {
                                      "type": "string",
                                      "enum": [
                                        "cpu",
                                        "lag"
                                      ]
                                    }
                                  },
                                  "required": [
                                    "size",
                                    "type",
                                    "scaleType"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "oneOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "scaleType": {
                                          "type": "string",
                                          "const": "cpu"
                                        },
                                        "targetCpu": {
                                          "type": "number",
                                          "minimum": 1,
                                          "maximum": 100
                                        },
                                        "maxReplicas": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 100
                                        },
                                        "minReplicas": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 100
                                        }
                                      },
                                      "required": [
                                        "scaleType",
                                        "targetCpu",
                                        "maxReplicas",
                                        "minReplicas"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "type": "object",
                                      "properties": {
                                        "scaleType": {
                                          "type": "string",
                                          "const": "lag"
                                        },
                                        "lagThreshold": {
                                          "default": 100,
                                          "type": "number",
                                          "minimum": 2
                                        },
                                        "maxReplicas": {
                                          "type": "integer",
                                          "minimum": 1,
                                          "maximum": 100
                                        },
                                        "minReplicas": {
                                          "type": "integer",
                                          "minimum": 0,
                                          "maximum": 100
                                        }
                                      },
                                      "required": [
                                        "scaleType",
                                        "lagThreshold",
                                        "maxReplicas",
                                        "minReplicas"
                                      ],
                                      "additionalProperties": false
                                    }
                                  ],
                                  "type": "object"
                                }
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "size": {
                                  "type": "string"
                                },
                                "_metaData": {
                                  "type": "object",
                                  "properties": {
                                    "doNotStart": {
                                      "type": "boolean"
                                    }
                                  },
                                  "additionalProperties": false
                                },
                                "envVars": {
                                  "type": "array",
                                  "items": {
                                    "type": "object",
                                    "properties": {
                                      "label": {
                                        "type": "string"
                                      },
                                      "value": {
                                        "type": "string"
                                      }
                                    },
                                    "required": [
                                      "label",
                                      "value"
                                    ],
                                    "additionalProperties": false
                                  }
                                },
                                "type": {
                                  "type": "string",
                                  "const": "flow-cron"
                                },
                                "schedule": {
                                  "type": "string",
                                  "pattern": "^((\\*(\\/\\d+)?|([0-5]?\\d)(-([0-5]?\\d)(\\/\\d+)?)?(,([0-5]?\\d)(-([0-5]?\\d)(\\/\\d+)?)?)*)\\s+(\\*(\\/\\d+)?|([01]?\\d|2[0-3])(-([01]?\\d|2[0-3])(\\/\\d+)?)?(,([01]?\\d|2[0-3])(-([01]?\\d|2[0-3])(\\/\\d+)?)?)*)\\s+(\\*(\\/\\d+)?|(0?[1-9]|[12]\\d|3[01])(-(0?[1-9]|[12]\\d|3[01])(\\/\\d+)?)?(,(0?[1-9]|[12]\\d|3[01])(-(0?[1-9]|[12]\\d|3[01])(\\/\\d+)?)?)*)\\s+(\\*(\\/\\d+)?|([1-9]|1[012])(-([1-9]|1[012])(\\/\\d+)?)?(,([1-9]|1[012])(-([1-9]|1[012])(\\/\\d+)?)?)*|jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)\\s+(\\*(\\/\\d+)?|([0-6])(-([0-6])(\\/\\d+)?)?(,([0-6])(-([0-6])(\\/\\d+)?)?)*|mon|tue|wed|thu|fri|sat|sun)|(@yearly|@annually|@monthly|@weekly|@daily|@midnight|@hourly))$"
                                }
                              },
                              "required": [
                                "size",
                                "type",
                                "schedule"
                              ],
                              "additionalProperties": false
                            }
                          ]
                        }
                      },
                      "topics": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "partitions_count": {
                              "type": "number",
                              "minimum": 1
                            }
                          },
                          "required": [
                            "partitions_count"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "externalApis": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "allOf": [
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "enum": [
                                    "bearer",
                                    "kafka",
                                    "client-grant",
                                    "password-grant",
                                    "authorization-code-grant",
                                    "google-service-account",
                                    "basic",
                                    "public",
                                    "pulsar",
                                    "connection-string",
                                    "sftp",
                                    "azure-blob",
                                    "aws-s3"
                                  ]
                                }
                              },
                              "required": [
                                "type"
                              ],
                              "additionalProperties": false
                            },
                            {
                              "anyOf": [
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "bearer"
                                    },
                                    "endpoint": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "bearerToken": {
                                      "type": "string"
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "endpoint",
                                    "bearerToken"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "connection-string"
                                    },
                                    "connectionString": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "connectionString"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "sftp"
                                    },
                                    "host": {
                                      "type": "string"
                                    },
                                    "port": {
                                      "type": "number"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "host",
                                    "port",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "azure-blob"
                                    },
                                    "accountName": {
                                      "type": "string"
                                    },
                                    "accountKey": {
                                      "type": "string"
                                    },
                                    "containerName": {
                                      "type": "string"
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "accountName",
                                    "accountKey"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "aws-s3"
                                    },
                                    "region": {
                                      "type": "string"
                                    },
                                    "accessKeyId": {
                                      "type": "string"
                                    },
                                    "secretAccessKey": {
                                      "type": "string"
                                    },
                                    "bucketName": {
                                      "type": "string"
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "region",
                                    "accessKeyId",
                                    "secretAccessKey"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "kafka"
                                    },
                                    "topicTemplate": {
                                      "type": "string"
                                    },
                                    "partitioner": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "legacy"
                                      ]
                                    },
                                    "brokers": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "mechanism": {
                                      "type": "string",
                                      "const": "plain"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "partitioner",
                                    "brokers",
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "kafka"
                                    },
                                    "topicTemplate": {
                                      "type": "string"
                                    },
                                    "partitioner": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "legacy"
                                      ]
                                    },
                                    "brokers": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-256"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "partitioner",
                                    "brokers",
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "kafka"
                                    },
                                    "topicTemplate": {
                                      "type": "string"
                                    },
                                    "partitioner": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "legacy"
                                      ]
                                    },
                                    "brokers": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "mechanism": {
                                      "type": "string",
                                      "const": "scram-sha-512"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "partitioner",
                                    "brokers",
                                    "mechanism",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "kafka"
                                    },
                                    "topicTemplate": {
                                      "type": "string"
                                    },
                                    "partitioner": {
                                      "type": "string",
                                      "enum": [
                                        "default",
                                        "legacy"
                                      ]
                                    },
                                    "brokers": {
                                      "type": "array",
                                      "items": {
                                        "type": "string"
                                      }
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    },
                                    "mechanism": {
                                      "type": "string",
                                      "const": "oauthbearer"
                                    },
                                    "authEndpoint": {
                                      "type": "string"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "partitioner",
                                    "brokers",
                                    "mechanism",
                                    "authEndpoint",
                                    "clientId",
                                    "clientSecret",
                                    "audience"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "client-grant"
                                    },
                                    "endpoint": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "authEndpoint": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "clientId": {
                                      "type": "string"
                                    },
                                    "clientSecret": {
                                      "type": "string"
                                    },
                                    "audience": {
                                      "type": "string"
                                    },
                                    "scope": {
                                      "type": "string"
                                    },
                                    "contentType": {
                                      "type": "string",
                                      "enum": [
                                        "application/json",
                                        "x-www-form-urlencoded"
                                      ]
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "endpoint",
                                    "authEndpoint",
                                    "clientId",
                                    "clientSecret"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "password-grant"
                                    },
                                    "endpoint": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "authEndpoint": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    },
                                    "client": {
                                      "type": "object",
                                      "properties": {
                                        "clientId": {
                                          "type": "string"
                                        },
                                        "clientSecret": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "clientId",
                                        "clientSecret"
                                      ],
                                      "additionalProperties": false
                                    },
                                    "audience": {
                                      "type": "string"
                                    },
                                    "scope": {
                                      "type": "string"
                                    },
                                    "contentType": {
                                      "type": "string",
                                      "enum": [
                                        "application/json",
                                        "x-www-form-urlencoded"
                                      ]
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "endpoint",
                                    "authEndpoint",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "authorization-code-grant"
                                    },
                                    "appId": {
                                      "type": "string"
                                    },
                                    "scope": {
                                      "type": "string"
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "appId"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "google-service-account"
                                    },
                                    "key": {
                                      "type": "string"
                                    },
                                    "scope": {
                                      "type": "string"
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "key",
                                    "scope"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "basic"
                                    },
                                    "endpoint": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "username": {
                                      "type": "string"
                                    },
                                    "password": {
                                      "type": "string"
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "endpoint",
                                    "username",
                                    "password"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "type": "object",
                                  "properties": {
                                    "type": {
                                      "type": "string",
                                      "const": "public"
                                    },
                                    "endpoint": {
                                      "type": "string",
                                      "format": "uri"
                                    },
                                    "headers": {
                                      "type": "array",
                                      "items": {
                                        "type": "object",
                                        "properties": {
                                          "key": {
                                            "type": "string"
                                          },
                                          "value": {
                                            "type": "string"
                                          }
                                        },
                                        "required": [
                                          "key",
                                          "value"
                                        ],
                                        "additionalProperties": false
                                      }
                                    }
                                  },
                                  "required": [
                                    "type",
                                    "endpoint"
                                  ],
                                  "additionalProperties": false
                                },
                                {
                                  "allOf": [
                                    {
                                      "type": "object",
                                      "properties": {
                                        "type": {
                                          "type": "string",
                                          "const": "pulsar"
                                        },
                                        "topicTemplate": {
                                          "type": "string"
                                        },
                                        "serviceUrl": {
                                          "type": "string"
                                        },
                                        "headers": {
                                          "type": "array",
                                          "items": {
                                            "type": "object",
                                            "properties": {
                                              "key": {
                                                "type": "string"
                                              },
                                              "value": {
                                                "type": "string"
                                              }
                                            },
                                            "required": [
                                              "key",
                                              "value"
                                            ],
                                            "additionalProperties": false
                                          }
                                        }
                                      },
                                      "required": [
                                        "type",
                                        "serviceUrl"
                                      ],
                                      "additionalProperties": false
                                    },
                                    {
                                      "oneOf": [
                                        {
                                          "type": "object",
                                          "properties": {
                                            "authMode": {
                                              "type": "string",
                                              "const": "bearer"
                                            },
                                            "bearerToken": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "authMode",
                                            "bearerToken"
                                          ],
                                          "additionalProperties": false
                                        },
                                        {
                                          "type": "object",
                                          "properties": {
                                            "authMode": {
                                              "type": "string",
                                              "const": "oauth"
                                            },
                                            "authEndpoint": {
                                              "type": "string",
                                              "format": "uri"
                                            },
                                            "clientId": {
                                              "type": "string"
                                            },
                                            "clientSecret": {
                                              "type": "string"
                                            },
                                            "audience": {
                                              "type": "string"
                                            }
                                          },
                                          "required": [
                                            "authMode",
                                            "authEndpoint",
                                            "clientId",
                                            "clientSecret"
                                          ],
                                          "additionalProperties": false
                                        }
                                      ],
                                      "type": "object"
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      },
                      "jwksConfigurations": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "jwksUri": {
                              "type": "string",
                              "minLength": 1
                            },
                            "cache": {
                              "default": true,
                              "type": "boolean"
                            },
                            "rateLimit": {
                              "default": true,
                              "type": "boolean"
                            },
                            "jwksRequestsPerMinute": {
                              "default": 5,
                              "type": "number"
                            },
                            "audience": {
                              "type": "string",
                              "minLength": 1
                            },
                            "issuer": {
                              "type": "string",
                              "minLength": 1
                            },
                            "algorithms": {
                              "default": "RS256",
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "jwksUri",
                            "cache",
                            "rateLimit",
                            "jwksRequestsPerMinute",
                            "audience",
                            "issuer",
                            "algorithms"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "authorizationCodeApps": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {
                            "client": {
                              "type": "object",
                              "properties": {
                                "clientId": {
                                  "type": "string"
                                },
                                "clientSecret": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "clientId",
                                "clientSecret"
                              ],
                              "additionalProperties": false
                            },
                            "endpoints": {
                              "type": "object",
                              "properties": {
                                "authenticationMethod": {
                                  "type": "string",
                                  "enum": [
                                    "basic",
                                    "post"
                                  ]
                                },
                                "authorization": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "token": {
                                  "type": "string",
                                  "format": "uri"
                                },
                                "revoke": {
                                  "type": "string",
                                  "format": "uri"
                                }
                              },
                              "required": [
                                "authenticationMethod",
                                "authorization",
                                "token"
                              ],
                              "additionalProperties": false
                            },
                            "connectionConfig": {
                              "type": "object",
                              "properties": {
                                "endpoint": {
                                  "type": "string"
                                }
                              },
                              "required": [
                                "endpoint"
                              ],
                              "additionalProperties": false
                            }
                          },
                          "required": [
                            "client",
                            "endpoints",
                            "connectionConfig"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "aiRoutes": {
                        "type": "object",
                        "propertyNames": {
                          "type": "string"
                        },
                        "additionalProperties": {
                          "type": "object",
                          "properties": {},
                          "additionalProperties": false
                        }
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": [
                  "id",
                  "name",
                  "templateId"
                ],
                "additionalProperties": false
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Service"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "409": {
            "description": "Service already exists",
            "content": {}
          },
          "500": {
            "description": "Not able to create service from template",
            "content": {}
          }
        }
      }
    },
    "/services/template-compatibility-check/{serviceId}": {
      "get": {
        "tags": [
          "Services"
        ],
        "summary": "Compatibility check of a template",
        "parameters": [
          {
            "name": "serviceId",
            "in": "path",
            "required": true
          },
          {
            "name": "x-org-id",
            "in": "header",
            "required": false
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "const": true
                        }
                      },
                      "required": [
                        "success"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "object",
                      "properties": {
                        "success": {
                          "type": "boolean",
                          "const": false
                        },
                        "messages": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "success"
                      ],
                      "additionalProperties": false
                    }
                  ],
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Invalid payload provided",
            "content": {}
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "jwt": []
    }
  ],
  "components": {
    "schemas": {
      "$ListQuery": {
        "type": "object",
        "properties": {
          "pageToken": {
            "type": "string",
            "minLength": 1
          },
          "orderBy": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "fields": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            ]
          },
          "pageSize": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "includeTotal": {
            "type": "boolean"
          },
          "filterMode": {
            "anyOf": [
              {
                "type": "string",
                "const": "AND"
              },
              {
                "type": "string",
                "const": "OR"
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "$ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "string",
              "number"
            ]
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      },
      "Service": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "default": 1,
            "type": "number"
          },
          "endpoint": {
            "type": "string"
          },
          "releaseTrack": {
            "type": "string",
            "enum": [
              "development",
              "release-candidate",
              "general-availability",
              "removed-from-distribution"
            ]
          },
          "sourceTenantId": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "_metaData": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              },
              "updatedAt": {
                "type": "string",
                "pattern": "^(?:\\d+(?:\\.\\d+?)?|(?:\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z))$",
                "description": "An ISO 8601 date time string",
                "format": "date-time"
              }
            },
            "required": [
              "id",
              "createdAt"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "id",
          "name",
          "_metaData"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "info": {
    "title": "Contextual Services Api",
    "description": " "
  },
  "servers": [
    {
      "url": "/api/v1"
    }
  ]
}
