package restapi

import (
	"encoding/json"
)

var (

	SwaggerJSON json.RawMessage

	FlatSwaggerJSON json.RawMessage
)

func init() {
	SwaggerJSON = json.RawMessage([]byte(`{
  "consumes": [
    "application/cloudevents+json",
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "swagger": "2.0",
  "info": {
    "title": "Configuration Service API",
    "version": "0.1.0"
  },
  "basePath": "/v1",
  "paths": {
    "/event": {
      "post": {
        "tags": [
          "event"
        ],
        "summary": "Handles an incoming event",
        "operationId": "handle event",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/KeptnContextExtendedCE"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/project": {
      "get": {
        "tags": [
          "Project"
        ],
        "summary": "Get list of projects",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          },
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedProjects"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Project"
        ],
        "summary": "INTERNAL Endpoint: Create a new project by project name",
        "deprecated": true,
        "parameters": [
          {
            "$ref": "#/parameters/project"
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Project has been created. Response does not have a body."
          },
          "400": {
            "description": "Failed. Project could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/project/{projectName}": {
      "get": {
        "tags": [
          "Project"
        ],
        "summary": "Get the specified project",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedProject"
            }
          },
          "404": {
            "description": "Failed. Project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Project"
        ],
        "summary": "INTERNAL Endpoint: Update the specified project",
        "deprecated": true,
        "parameters": [
          {
            "$ref": "#/parameters/project"
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Project has been updated. Response does not have a body."
          },
          "400": {
            "description": "Failed. Project could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Project"
        ],
        "summary": "INTERNAL Endpoint: Delete the specified project",
        "deprecated": true,
        "responses": {
          "204": {
            "description": "Success. Project has been deleted. Response does not have a body."
          },
          "400": {
            "description": "Failed. Project could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        }
      ]
    },
    "/project/{projectName}/resource": {
      "get": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Get list of project resources",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          },
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Update list of project resources",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Project resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Create list of new resources for the project",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Project resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        }
      ]
    },
    "/project/{projectName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Get the specified resource",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Project resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Update the specified resource",
        "parameters": [
          {
            "$ref": "#/parameters/resource"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Project resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Delete the specified resource",
        "responses": {
          "204": {
            "description": "Success. Project resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/resourceURI"
        },
        {
          "$ref": "#/parameters/disableUpstreamSync"
        }
      ]
    },
    "/project/{projectName}/service": {
      "get": {
        "tags": [
          "Services"
        ],
        "operationId": "get services",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ServicesWithStageInfo"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        }
      ]
    },
    "/project/{projectName}/service/{serviceName}": {
      "get": {
        "tags": [
          "Services"
        ],
        "operationId": "get service",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedServiceWithStageInfo"
            }
          },
          "404": {
            "description": "Failed. Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/serviceName"
        }
      ]
    },
    "/project/{projectName}/service/{serviceName}/resource": {
      "get": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Get list of default resources for the service used in all stages",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          },
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Containing service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Update list of service default resources",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service default resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Create list of default resources for the service used in all stages",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service default resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/serviceName"
        }
      ]
    },
    "/project/{projectName}/service/{serviceName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Get the specified default resource for the service",
        "parameters": [
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Default resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Update the specified default resource for the service",
        "responses": {
          "201": {
            "description": "Success. Service default resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Delete the specified default resource for the service",
        "responses": {
          "204": {
            "description": "Success. Service default resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/serviceName"
        },
        {
          "$ref": "#/parameters/resourceURI"
        }
      ]
    },
    "/project/{projectName}/stage": {
      "get": {
        "tags": [
          "Stage"
        ],
        "summary": "Get list of stages",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          },
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Stages"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Stage"
        ],
        "summary": "INTERNAL Endpoint: Create a new stage by stage name",
        "deprecated": true,
        "parameters": [
          {
            "$ref": "#/parameters/stage"
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Stage has been created. Response does not have a body."
          },
          "400": {
            "description": "Failed. Stage could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}": {
      "get": {
        "tags": [
          "Stage"
        ],
        "summary": "Get the specified stage",
        "parameters": [
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedStage"
            }
          },
          "404": {
            "description": "Failed. Project resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Stage"
        ],
        "summary": "INTERNAL Endpoint: Update the specified stage",
        "deprecated": true,
        "parameters": [
          {
            "$ref": "#/parameters/stage"
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Stage has been updated. Response does not have a body."
          },
          "400": {
            "description": "Failed. Stage could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Stage"
        ],
        "summary": "INTERNAL Endpoint: Delete the specified stage",
        "deprecated": true,
        "responses": {
          "204": {
            "description": "Success. Stage has been deleted. Response does not have a body."
          },
          "400": {
            "description": "Failed. Stage could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/resource": {
      "get": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Get list of stage resources",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          },
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Stage could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Update list of stage resources",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Stage resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Create list of new resources for the stage",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Stage resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Get the specified resource",
        "parameters": [
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Stage resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Update the specified resource",
        "parameters": [
          {
            "$ref": "#/parameters/resource"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Stage resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Delete the specified resource",
        "responses": {
          "204": {
            "description": "Success. Stage resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        },
        {
          "$ref": "#/parameters/resourceURI"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service": {
      "get": {
        "tags": [
          "Service"
        ],
        "summary": "Get list of services",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          },
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Services"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Service"
        ],
        "summary": "INTERNAL Endpoint: Create a new service by service name",
        "deprecated": true,
        "parameters": [
          {
            "$ref": "#/parameters/service"
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Stage has been created. Response does not have a body."
          },
          "400": {
            "description": "Failed. Service could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}": {
      "get": {
        "tags": [
          "Service"
        ],
        "summary": "Get the specified service",
        "parameters": [
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedService"
            }
          },
          "404": {
            "description": "Failed. Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service"
        ],
        "summary": "INTERNAL Endpoint: Update the specified service",
        "deprecated": true,
        "parameters": [
          {
            "$ref": "#/parameters/service"
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Service has been updated. Response does not have a body."
          },
          "400": {
            "description": "Failed. Service could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Service"
        ],
        "summary": "INTERNAL Endpoint: Delete the specified service",
        "deprecated": true,
        "responses": {
          "204": {
            "description": "Success. Service has been deleted. Response does not have a body."
          },
          "400": {
            "description": "Failed. Service could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        },
        {
          "$ref": "#/parameters/serviceName"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/remediation": {
      "get": {
        "tags": [
          "remediation"
        ],
        "summary": "Get all open remediations",
        "operationId": "getRemediations",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Remediations"
            }
          },
          "404": {
            "description": "Failed. Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "remediation"
        ],
        "summary": "Create remediation",
        "operationId": "createRemediation",
        "parameters": [
          {
            "name": "remediation",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Remediation"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Remediation"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        },
        {
          "$ref": "#/parameters/serviceName"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/remediation/{keptnContext}": {
      "get": {
        "tags": [
          "remediation"
        ],
        "summary": "Get open remediations by KeptnContext",
        "operationId": "getRemediationsForContext",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Remediations"
            }
          },
          "404": {
            "description": "Failed. Remediations could not be found",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "remediation"
        ],
        "summary": "Close open remediations for KeptnContext",
        "operationId": "closeRemediations",
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/pageSize"
        },
        {
          "$ref": "#/parameters/nextPageKey"
        },
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        },
        {
          "$ref": "#/parameters/serviceName"
        },
        {
          "$ref": "#/parameters/keptnContext"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/resource": {
      "get": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Get list of service resources",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          },
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Containing Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Update list of service resources",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Create list of new resources for the service",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        },
        {
          "$ref": "#/parameters/serviceName"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Get the specified resource",
        "parameters": [
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Service resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Update the specified resource",
        "parameters": [
          {
            "$ref": "#/parameters/resource"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Delete the specified resource",
        "responses": {
          "204": {
            "description": "Success. Service resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        },
        {
          "$ref": "#/parameters/serviceName"
        },
        {
          "$ref": "#/parameters/resourceURI"
        }
      ]
    }
  },
  "definitions": {
    "Error": {
      "type": "object",
      "required": [
        "message"
      ],
      "properties": {
        "code": {
          "description": "Error code",
          "type": "integer",
          "format": "int64"
        },
        "message": {
          "description": "Error message",
          "type": "string"
        }
      }
    },
    "EventContext": {
      "type": "object",
      "properties": {
        "eventId": {
          "description": "ID of the event",
          "type": "string"
        },
        "keptnContext": {
          "description": "Keptn Context ID of the event",
          "type": "string"
        },
        "time": {
          "description": "Time of the event",
          "type": "string"
        }
      }
    },
    "EventContexts": {
      "type": "object",
      "properties": {
        "eventContexts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/EventContext"
          }
        },
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "ExpandedProject": {
      "type": "object",
      "properties": {
        "creationDate": {
          "description": "Creation date of the project",
          "type": "string"
        },
        "gitRemoteURI": {
          "description": "Git remote URI",
          "type": "string"
        },
        "gitUser": {
          "description": "Git User",
          "type": "string"
        },
        "lastEventContext": {
          "$ref": "#/definitions/EventContext"
        },
        "projectName": {
          "description": "Project name",
          "type": "string"
        },
        "shipyard": {
          "description": "Shipyard file content",
          "type": "string"
        },
        "stages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedStage"
          }
        }
      }
    },
    "ExpandedProjects": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "projects": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedProject"
          }
        },
        "totalCount": {
          "description": "Total number of projects",
          "type": "number"
        }
      }
    },
    "ExpandedService": {
      "type": "object",
      "properties": {
        "creationDate": {
          "description": "Creation date of the service",
          "type": "string"
        },
        "deployedImage": {
          "description": "Currently deployed image",
          "type": "string"
        },
        "lastEventTypes": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/EventContext"
          }
        },
        "openRemediations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Remediation"
          }
        },
        "serviceName": {
          "description": "Service name",
          "type": "string"
        }
      }
    },
    "ExpandedServiceWithStageInfo": {
      "type": "object",
      "properties": {
        "creationDate": {
          "description": "Creation date of the service",
          "type": "string"
        },
        "serviceName": {
          "description": "Service name",
          "type": "string"
        },
        "stageInfo": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/InverseServiceStageInfo"
          }
        }
      }
    },
    "ExpandedStage": {
      "type": "object",
      "properties": {
        "lastEventContext": {
          "$ref": "#/definitions/EventContext"
        },
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedService"
          }
        },
        "stageName": {
          "description": "Stage name",
          "type": "string"
        }
      }
    },
    "InverseServiceStageInfo": {
      "type": "object",
      "properties": {
        "deployedImage": {
          "description": "Currently deployed image",
          "type": "string"
        },
        "lastEventTypes": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/EventContext"
          }
        },
        "stageName": {
          "type": "string"
        }
      }
    },
    "KeptnContextExtendedCE": {
      "type": "object",
      "required": [
        "data",
        "source",
        "type"
      ],
      "properties": {
        "contenttype": {
          "type": "string"
        },
        "data": {
          "type": [
            "object",
            "string"
          ]
        },
        "extensions": {
          "type": "object"
        },
        "id": {
          "type": "string"
        },
        "shkeptncontext": {
          "type": "string"
        },
        "source": {
          "type": "string",
          "format": "uri-reference"
        },
        "specversion": {
          "type": "string"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "Project": {
      "type": "object",
      "properties": {
        "gitRemoteURI": {
          "description": "Git remote URI",
          "type": "string"
        },
        "gitToken": {
          "description": "Git token",
          "type": "string"
        },
        "gitUser": {
          "description": "Git User",
          "type": "string"
        },
        "projectName": {
          "description": "Project name",
          "type": "string"
        },
        "stages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Stage"
          }
        }
      }
    },
    "Projects": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "projects": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Project"
          }
        },
        "totalCount": {
          "description": "Total number of projects",
          "type": "number"
        }
      }
    },
    "Remediation": {
      "type": "object",
      "properties": {
        "action": {
          "description": "Executed action",
          "type": "string"
        },
        "eventId": {
          "description": "ID of the event",
          "type": "string"
        },
        "keptnContext": {
          "description": "Keptn Context ID of the event",
          "type": "string"
        },
        "time": {
          "description": "Time of the event",
          "type": "string"
        },
        "type": {
          "description": "Type of the event",
          "type": "string"
        }
      }
    },
    "Remediations": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "remediations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Remediation"
          }
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "Resource": {
      "type": "object",
      "required": [
        "resourceURI"
      ],
      "properties": {
        "metadata": {
          "$ref": "#/definitions/Version"
        },
        "resourceContent": {
          "description": "Resource content",
          "type": "string"
        },
        "resourceURI": {
          "description": "Resource URI",
          "type": "string"
        }
      }
    },
    "Resources": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "resources": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Resource"
          }
        },
        "totalCount": {
          "description": "Total number of resources",
          "type": "number"
        }
      }
    },
    "Service": {
      "type": "object",
      "properties": {
        "serviceName": {
          "description": "Service name",
          "type": "string"
        }
      }
    },
    "Services": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedService"
          }
        },
        "totalCount": {
          "description": "Total number of services",
          "type": "number"
        }
      }
    },
    "ServicesWithStageInfo": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedServiceWithStageInfo"
          }
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "Stage": {
      "type": "object",
      "properties": {
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Service"
          }
        },
        "stageName": {
          "description": "Stage name",
          "type": "string"
        }
      }
    },
    "Stages": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "stages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedStage"
          }
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "Version": {
      "type": "object",
      "properties": {
        "branch": {
          "description": "branch in git repo containing the resource",
          "type": "string"
        },
        "upstreamURL": {
          "description": "Upstream repository containing the resource",
          "type": "string"
        },
        "version": {
          "description": "version/git commit id of the resource",
          "type": "string"
        }
      }
    }
  },
  "parameters": {
    "disableUpstreamSync": {
      "type": "boolean",
      "default": false,
      "description": "Disable sync of upstream repo before reading content",
      "name": "disableUpstreamSync",
      "in": "query"
    },
    "keptnContext": {
      "type": "string",
      "description": "Keptn Context",
      "name": "keptnContext",
      "in": "path",
      "required": true
    },
    "nextPageKey": {
      "type": "string",
      "description": "Pointer to the next set of items",
      "name": "nextPageKey",
      "in": "query"
    },
    "pageSize": {
      "maximum": 50,
      "minimum": 1,
      "type": "integer",
      "default": 20,
      "description": "The number of items to return",
      "name": "pageSize",
      "in": "query"
    },
    "project": {
      "description": "Project entity",
      "name": "project",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Project"
      }
    },
    "projectName": {
      "type": "string",
      "description": "Name of the project",
      "name": "projectName",
      "in": "path",
      "required": true
    },
    "resource": {
      "description": "Resource",
      "name": "resource",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Resource"
      }
    },
    "resourceURI": {
      "type": "string",
      "description": "Resource URI",
      "name": "resourceURI",
      "in": "path",
      "required": true
    },
    "resources": {
      "description": "List of resources",
      "name": "resources",
      "in": "body",
      "schema": {
        "properties": {
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/definitions/Resource"
            }
          }
        }
      }
    },
    "service": {
      "description": "Service entity",
      "name": "service",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Service"
      }
    },
    "serviceName": {
      "type": "string",
      "description": "Name of the service",
      "name": "serviceName",
      "in": "path",
      "required": true
    },
    "stage": {
      "description": "Stage entity",
      "name": "stage",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Stage"
      }
    },
    "stageName": {
      "type": "string",
      "description": "Name of the stage",
      "name": "stageName",
      "in": "path",
      "required": true
    }
  }
}`))
	FlatSwaggerJSON = json.RawMessage([]byte(`{
  "consumes": [
    "application/cloudevents+json",
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "swagger": "2.0",
  "info": {
    "title": "Configuration Service API",
    "version": "develop"
  },
  "basePath": "/v1",
  "paths": {
    "/event": {
      "post": {
        "tags": [
          "event"
        ],
        "summary": "Handles an incoming event",
        "operationId": "handle event",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/KeptnContextExtendedCE"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/project": {
      "get": {
        "tags": [
          "Project"
        ],
        "summary": "Get list of projects",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          },
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedProjects"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Project"
        ],
        "summary": "INTERNAL Endpoint: Create a new project by project name",
        "deprecated": true,
        "parameters": [
          {
            "description": "Project entity",
            "name": "project",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Project"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Project has been created. Response does not have a body."
          },
          "400": {
            "description": "Failed. Project could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/project/{projectName}": {
      "get": {
        "tags": [
          "Project"
        ],
        "summary": "Get the specified project",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedProject"
            }
          },
          "404": {
            "description": "Failed. Project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Project"
        ],
        "summary": "INTERNAL Endpoint: Update the specified project",
        "deprecated": true,
        "parameters": [
          {
            "description": "Project entity",
            "name": "project",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Project"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Project has been updated. Response does not have a body."
          },
          "400": {
            "description": "Failed. Project could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Project"
        ],
        "summary": "INTERNAL Endpoint: Delete the specified project",
        "deprecated": true,
        "responses": {
          "204": {
            "description": "Success. Project has been deleted. Response does not have a body."
          },
          "400": {
            "description": "Failed. Project could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/resource": {
      "get": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Get list of project resources",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          },
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Update list of project resources",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Project resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Create list of new resources for the project",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Project resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Get the specified resource",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Project resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Update the specified resource",
        "parameters": [
          {
            "description": "Resource",
            "name": "resource",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Project resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Delete the specified resource",
        "responses": {
          "204": {
            "description": "Success. Project resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Resource URI",
          "name": "resourceURI",
          "in": "path",
          "required": true
        },
        {
          "type": "boolean",
          "default": false,
          "description": "Disable sync of upstream repo before reading content",
          "name": "disableUpstreamSync",
          "in": "query"
        }
      ]
    },
    "/project/{projectName}/service": {
      "get": {
        "tags": [
          "Services"
        ],
        "operationId": "get services",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ServicesWithStageInfo"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/service/{serviceName}": {
      "get": {
        "tags": [
          "Services"
        ],
        "operationId": "get service",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedServiceWithStageInfo"
            }
          },
          "404": {
            "description": "Failed. Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/service/{serviceName}/resource": {
      "get": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Get list of default resources for the service used in all stages",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          },
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Containing service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Update list of service default resources",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service default resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Create list of default resources for the service used in all stages",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service default resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/service/{serviceName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Get the specified default resource for the service",
        "parameters": [
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Default resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Update the specified default resource for the service",
        "responses": {
          "201": {
            "description": "Success. Service default resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Delete the specified default resource for the service",
        "responses": {
          "204": {
            "description": "Success. Service default resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Resource URI",
          "name": "resourceURI",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage": {
      "get": {
        "tags": [
          "Stage"
        ],
        "summary": "Get list of stages",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          },
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Stages"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Stage"
        ],
        "summary": "INTERNAL Endpoint: Create a new stage by stage name",
        "deprecated": true,
        "parameters": [
          {
            "description": "Stage entity",
            "name": "stage",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Stage"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Stage has been created. Response does not have a body."
          },
          "400": {
            "description": "Failed. Stage could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}": {
      "get": {
        "tags": [
          "Stage"
        ],
        "summary": "Get the specified stage",
        "parameters": [
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedStage"
            }
          },
          "404": {
            "description": "Failed. Project resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Stage"
        ],
        "summary": "INTERNAL Endpoint: Update the specified stage",
        "deprecated": true,
        "parameters": [
          {
            "description": "Stage entity",
            "name": "stage",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Stage"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Stage has been updated. Response does not have a body."
          },
          "400": {
            "description": "Failed. Stage could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Stage"
        ],
        "summary": "INTERNAL Endpoint: Delete the specified stage",
        "deprecated": true,
        "responses": {
          "204": {
            "description": "Success. Stage has been deleted. Response does not have a body."
          },
          "400": {
            "description": "Failed. Stage could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/resource": {
      "get": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Get list of stage resources",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          },
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Stage could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Update list of stage resources",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Stage resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Create list of new resources for the stage",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Stage resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Get the specified resource",
        "parameters": [
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Stage resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Update the specified resource",
        "parameters": [
          {
            "description": "Resource",
            "name": "resource",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Stage resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Delete the specified resource",
        "responses": {
          "204": {
            "description": "Success. Stage resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Resource URI",
          "name": "resourceURI",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service": {
      "get": {
        "tags": [
          "Service"
        ],
        "summary": "Get list of services",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          },
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Services"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Service"
        ],
        "summary": "INTERNAL Endpoint: Create a new service by service name",
        "deprecated": true,
        "parameters": [
          {
            "description": "Service entity",
            "name": "service",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Service"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Stage has been created. Response does not have a body."
          },
          "400": {
            "description": "Failed. Service could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}": {
      "get": {
        "tags": [
          "Service"
        ],
        "summary": "Get the specified service",
        "parameters": [
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedService"
            }
          },
          "404": {
            "description": "Failed. Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service"
        ],
        "summary": "INTERNAL Endpoint: Update the specified service",
        "deprecated": true,
        "parameters": [
          {
            "description": "Service entity",
            "name": "service",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Service"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Service has been updated. Response does not have a body."
          },
          "400": {
            "description": "Failed. Service could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Service"
        ],
        "summary": "INTERNAL Endpoint: Delete the specified service",
        "deprecated": true,
        "responses": {
          "204": {
            "description": "Success. Service has been deleted. Response does not have a body."
          },
          "400": {
            "description": "Failed. Service could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/remediation": {
      "get": {
        "tags": [
          "remediation"
        ],
        "summary": "Get all open remediations",
        "operationId": "getRemediations",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Remediations"
            }
          },
          "404": {
            "description": "Failed. Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "remediation"
        ],
        "summary": "Create remediation",
        "operationId": "createRemediation",
        "parameters": [
          {
            "name": "remediation",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Remediation"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Remediation"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/remediation/{keptnContext}": {
      "get": {
        "tags": [
          "remediation"
        ],
        "summary": "Get open remediations by KeptnContext",
        "operationId": "getRemediationsForContext",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Remediations"
            }
          },
          "404": {
            "description": "Failed. Remediations could not be found",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "remediation"
        ],
        "summary": "Close open remediations for KeptnContext",
        "operationId": "closeRemediations",
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "maximum": 50,
          "minimum": 1,
          "type": "integer",
          "default": 20,
          "description": "The number of items to return",
          "name": "pageSize",
          "in": "query"
        },
        {
          "type": "string",
          "description": "Pointer to the next set of items",
          "name": "nextPageKey",
          "in": "query"
        },
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Keptn Context",
          "name": "keptnContext",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/resource": {
      "get": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Get list of service resources",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          },
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Containing Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Update list of service resources",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Create list of new resources for the service",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Get the specified resource",
        "parameters": [
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Service resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Update the specified resource",
        "parameters": [
          {
            "description": "Resource",
            "name": "resource",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Delete the specified resource",
        "responses": {
          "204": {
            "description": "Success. Service resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Resource URI",
          "name": "resourceURI",
          "in": "path",
          "required": true
        }
      ]
    }
  },
  "definitions": {
    "Error": {
      "type": "object",
      "required": [
        "message"
      ],
      "properties": {
        "code": {
          "description": "Error code",
          "type": "integer",
          "format": "int64"
        },
        "message": {
          "description": "Error message",
          "type": "string"
        }
      }
    },
    "EventContext": {
      "type": "object",
      "properties": {
        "eventId": {
          "description": "ID of the event",
          "type": "string"
        },
        "keptnContext": {
          "description": "Keptn Context ID of the event",
          "type": "string"
        },
        "time": {
          "description": "Time of the event",
          "type": "string"
        }
      }
    },
    "EventContexts": {
      "type": "object",
      "properties": {
        "eventContexts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/EventContext"
          }
        },
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "ExpandedProject": {
      "type": "object",
      "properties": {
        "creationDate": {
          "description": "Creation date of the project",
          "type": "string"
        },
        "gitRemoteURI": {
          "description": "Git remote URI",
          "type": "string"
        },
        "gitUser": {
          "description": "Git User",
          "type": "string"
        },
        "lastEventContext": {
          "$ref": "#/definitions/EventContext"
        },
        "projectName": {
          "description": "Project name",
          "type": "string"
        },
        "shipyard": {
          "description": "Shipyard file content",
          "type": "string"
        },
        "stages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedStage"
          }
        }
      }
    },
    "ExpandedProjects": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "projects": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedProject"
          }
        },
        "totalCount": {
          "description": "Total number of projects",
          "type": "number"
        }
      }
    },
    "ExpandedService": {
      "type": "object",
      "properties": {
        "creationDate": {
          "description": "Creation date of the service",
          "type": "string"
        },
        "deployedImage": {
          "description": "Currently deployed image",
          "type": "string"
        },
        "lastEventTypes": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/EventContext"
          }
        },
        "openRemediations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Remediation"
          }
        },
        "serviceName": {
          "description": "Service name",
          "type": "string"
        }
      }
    },
    "ExpandedServiceWithStageInfo": {
      "type": "object",
      "properties": {
        "creationDate": {
          "description": "Creation date of the service",
          "type": "string"
        },
        "serviceName": {
          "description": "Service name",
          "type": "string"
        },
        "stageInfo": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/InverseServiceStageInfo"
          }
        }
      }
    },
    "ExpandedStage": {
      "type": "object",
      "properties": {
        "lastEventContext": {
          "$ref": "#/definitions/EventContext"
        },
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedService"
          }
        },
        "stageName": {
          "description": "Stage name",
          "type": "string"
        }
      }
    },
    "InverseServiceStageInfo": {
      "type": "object",
      "properties": {
        "deployedImage": {
          "description": "Currently deployed image",
          "type": "string"
        },
        "lastEventTypes": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/EventContext"
          }
        },
        "stageName": {
          "type": "string"
        }
      }
    },
    "KeptnContextExtendedCE": {
      "type": "object",
      "required": [
        "data",
        "source",
        "type"
      ],
      "properties": {
        "contenttype": {
          "type": "string"
        },
        "data": {
          "type": [
            "object",
            "string"
          ]
        },
        "extensions": {
          "type": "object"
        },
        "id": {
          "type": "string"
        },
        "shkeptncontext": {
          "type": "string"
        },
        "source": {
          "type": "string",
          "format": "uri-reference"
        },
        "specversion": {
          "type": "string"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "Project": {
      "type": "object",
      "properties": {
        "gitRemoteURI": {
          "description": "Git remote URI",
          "type": "string"
        },
        "gitToken": {
          "description": "Git token",
          "type": "string"
        },
        "gitUser": {
          "description": "Git User",
          "type": "string"
        },
        "projectName": {
          "description": "Project name",
          "type": "string"
        },
        "stages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Stage"
          }
        }
      }
    },
    "Projects": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "projects": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Project"
          }
        },
        "totalCount": {
          "description": "Total number of projects",
          "type": "number"
        }
      }
    },
    "Remediation": {
      "type": "object",
      "properties": {
        "action": {
          "description": "Executed action",
          "type": "string"
        },
        "eventId": {
          "description": "ID of the event",
          "type": "string"
        },
        "keptnContext": {
          "description": "Keptn Context ID of the event",
          "type": "string"
        },
        "time": {
          "description": "Time of the event",
          "type": "string"
        },
        "type": {
          "description": "Type of the event",
          "type": "string"
        }
      }
    },
    "Remediations": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "remediations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Remediation"
          }
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "Resource": {
      "type": "object",
      "required": [
        "resourceURI"
      ],
      "properties": {
        "metadata": {
          "$ref": "#/definitions/Version"
        },
        "resourceContent": {
          "description": "Resource content",
          "type": "string"
        },
        "resourceURI": {
          "description": "Resource URI",
          "type": "string"
        }
      }
    },
    "Resources": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "resources": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Resource"
          }
        },
        "totalCount": {
          "description": "Total number of resources",
          "type": "number"
        }
      }
    },
    "Service": {
      "type": "object",
      "properties": {
        "serviceName": {
          "description": "Service name",
          "type": "string"
        }
      }
    },
    "Services": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedService"
          }
        },
        "totalCount": {
          "description": "Total number of services",
          "type": "number"
        }
      }
    },
    "ServicesWithStageInfo": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedServiceWithStageInfo"
          }
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "Stage": {
      "type": "object",
      "properties": {
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Service"
          }
        },
        "stageName": {
          "description": "Stage name",
          "type": "string"
        }
      }
    },
    "Stages": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "stages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedStage"
          }
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "Version": {
      "type": "object",
      "properties": {
        "branch": {
          "description": "branch in git repo containing the resource",
          "type": "string"
        },
        "upstreamURL": {
          "description": "Upstream repository containing the resource",
          "type": "string"
        },
        "version": {
          "description": "version/git commit id of the resource",
          "type": "string"
        }
      }
    }
  },
  "parameters": {
    "disableUpstreamSync": {
      "type": "boolean",
      "default": false,
      "description": "Disable sync of upstream repo before reading content",
      "name": "disableUpstreamSync",
      "in": "query"
    },
    "keptnContext": {
      "type": "string",
      "description": "Keptn Context",
      "name": "keptnContext",
      "in": "path",
      "required": true
    },
    "nextPageKey": {
      "type": "string",
      "description": "Pointer to the next set of items",
      "name": "nextPageKey",
      "in": "query"
    },
    "pageSize": {
      "maximum": 50,
      "minimum": 1,
      "type": "integer",
      "default": 20,
      "description": "The number of items to return",
      "name": "pageSize",
      "in": "query"
    },
    "project": {
      "description": "Project entity",
      "name": "project",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Project"
      }
    },
    "projectName": {
      "type": "string",
      "description": "Name of the project",
      "name": "projectName",
      "in": "path",
      "required": true
    },
    "resource": {
      "description": "Resource",
      "name": "resource",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Resource"
      }
    },
    "resourceURI": {
      "type": "string",
      "description": "Resource URI",
      "name": "resourceURI",
      "in": "path",
      "required": true
    },
    "resources": {
      "description": "List of resources",
      "name": "resources",
      "in": "body",
      "schema": {
        "properties": {
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/definitions/Resource"
            }
          }
        }
      }
    },
    "service": {
      "description": "Service entity",
      "name": "service",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Service"
      }
    },
    "serviceName": {
      "type": "string",
      "description": "Name of the service",
      "name": "serviceName",
      "in": "path",
      "required": true
    },
    "stage": {
      "description": "Stage entity",
      "name": "stage",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Stage"
      }
    },
    "stageName": {
      "type": "string",
      "description": "Name of the stage",
      "name": "stageName",
      "in": "path",
      "required": true
    }
  }
}`))
}
// Code generated by go-swagger; DO NOT EDIT.

package restapi

// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command

import (
	"encoding/json"
)

var (
	// SwaggerJSON embedded version of the swagger document used at generation time
	SwaggerJSON json.RawMessage
	// FlatSwaggerJSON embedded flattened version of the swagger document used at generation time
	FlatSwaggerJSON json.RawMessage
)

func init() {
	SwaggerJSON = json.RawMessage([]byte(`{
  "consumes": [
    "application/cloudevents+json",
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "swagger": "2.0",
  "info": {
    "title": "Configuration Service API",
    "version": "0.1.0"
  },
  "basePath": "/v1",
  "paths": {
    "/event": {
      "post": {
        "tags": [
          "event"
        ],
        "summary": "Handles an incoming event",
        "operationId": "handle event",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/KeptnContextExtendedCE"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/project": {
      "get": {
        "tags": [
          "Project"
        ],
        "summary": "Get list of projects",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          },
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedProjects"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Project"
        ],
        "summary": "INTERNAL Endpoint: Create a new project by project name",
        "deprecated": true,
        "parameters": [
          {
            "$ref": "#/parameters/project"
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Project has been created. Response does not have a body."
          },
          "400": {
            "description": "Failed. Project could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/project/{projectName}": {
      "get": {
        "tags": [
          "Project"
        ],
        "summary": "Get the specified project",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedProject"
            }
          },
          "404": {
            "description": "Failed. Project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Project"
        ],
        "summary": "INTERNAL Endpoint: Update the specified project",
        "deprecated": true,
        "parameters": [
          {
            "$ref": "#/parameters/project"
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Project has been updated. Response does not have a body."
          },
          "400": {
            "description": "Failed. Project could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Project"
        ],
        "summary": "INTERNAL Endpoint: Delete the specified project",
        "deprecated": true,
        "responses": {
          "204": {
            "description": "Success. Project has been deleted. Response does not have a body."
          },
          "400": {
            "description": "Failed. Project could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        }
      ]
    },
    "/project/{projectName}/resource": {
      "get": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Get list of project resources",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          },
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Update list of project resources",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Project resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Create list of new resources for the project",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Project resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        }
      ]
    },
    "/project/{projectName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Get the specified resource",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Project resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Update the specified resource",
        "parameters": [
          {
            "$ref": "#/parameters/resource"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Project resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Delete the specified resource",
        "responses": {
          "204": {
            "description": "Success. Project resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/resourceURI"
        },
        {
          "$ref": "#/parameters/disableUpstreamSync"
        }
      ]
    },
    "/project/{projectName}/service": {
      "get": {
        "tags": [
          "Services"
        ],
        "operationId": "get services",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ServicesWithStageInfo"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        }
      ]
    },
    "/project/{projectName}/service/{serviceName}": {
      "get": {
        "tags": [
          "Services"
        ],
        "operationId": "get service",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedServiceWithStageInfo"
            }
          },
          "404": {
            "description": "Failed. Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/serviceName"
        }
      ]
    },
    "/project/{projectName}/service/{serviceName}/resource": {
      "get": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Get list of default resources for the service used in all stages",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          },
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Containing service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Update list of service default resources",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service default resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Create list of default resources for the service used in all stages",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service default resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/serviceName"
        }
      ]
    },
    "/project/{projectName}/service/{serviceName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Get the specified default resource for the service",
        "parameters": [
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Default resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Update the specified default resource for the service",
        "responses": {
          "201": {
            "description": "Success. Service default resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Delete the specified default resource for the service",
        "responses": {
          "204": {
            "description": "Success. Service default resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/serviceName"
        },
        {
          "$ref": "#/parameters/resourceURI"
        }
      ]
    },
    "/project/{projectName}/stage": {
      "get": {
        "tags": [
          "Stage"
        ],
        "summary": "Get list of stages",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          },
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Stages"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Stage"
        ],
        "summary": "INTERNAL Endpoint: Create a new stage by stage name",
        "deprecated": true,
        "parameters": [
          {
            "$ref": "#/parameters/stage"
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Stage has been created. Response does not have a body."
          },
          "400": {
            "description": "Failed. Stage could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}": {
      "get": {
        "tags": [
          "Stage"
        ],
        "summary": "Get the specified stage",
        "parameters": [
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedStage"
            }
          },
          "404": {
            "description": "Failed. Project resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Stage"
        ],
        "summary": "INTERNAL Endpoint: Update the specified stage",
        "deprecated": true,
        "parameters": [
          {
            "$ref": "#/parameters/stage"
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Stage has been updated. Response does not have a body."
          },
          "400": {
            "description": "Failed. Stage could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Stage"
        ],
        "summary": "INTERNAL Endpoint: Delete the specified stage",
        "deprecated": true,
        "responses": {
          "204": {
            "description": "Success. Stage has been deleted. Response does not have a body."
          },
          "400": {
            "description": "Failed. Stage could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/resource": {
      "get": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Get list of stage resources",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          },
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Stage could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Update list of stage resources",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Stage resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Create list of new resources for the stage",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Stage resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Get the specified resource",
        "parameters": [
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Stage resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Update the specified resource",
        "parameters": [
          {
            "$ref": "#/parameters/resource"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Stage resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Delete the specified resource",
        "responses": {
          "204": {
            "description": "Success. Stage resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        },
        {
          "$ref": "#/parameters/resourceURI"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service": {
      "get": {
        "tags": [
          "Service"
        ],
        "summary": "Get list of services",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          },
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Services"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Service"
        ],
        "summary": "INTERNAL Endpoint: Create a new service by service name",
        "deprecated": true,
        "parameters": [
          {
            "$ref": "#/parameters/service"
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Stage has been created. Response does not have a body."
          },
          "400": {
            "description": "Failed. Service could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}": {
      "get": {
        "tags": [
          "Service"
        ],
        "summary": "Get the specified service",
        "parameters": [
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedService"
            }
          },
          "404": {
            "description": "Failed. Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service"
        ],
        "summary": "INTERNAL Endpoint: Update the specified service",
        "deprecated": true,
        "parameters": [
          {
            "$ref": "#/parameters/service"
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Service has been updated. Response does not have a body."
          },
          "400": {
            "description": "Failed. Service could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Service"
        ],
        "summary": "INTERNAL Endpoint: Delete the specified service",
        "deprecated": true,
        "responses": {
          "204": {
            "description": "Success. Service has been deleted. Response does not have a body."
          },
          "400": {
            "description": "Failed. Service could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        },
        {
          "$ref": "#/parameters/serviceName"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/remediation": {
      "get": {
        "tags": [
          "remediation"
        ],
        "summary": "Get all open remediations",
        "operationId": "getRemediations",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Remediations"
            }
          },
          "404": {
            "description": "Failed. Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "remediation"
        ],
        "summary": "Create remediation",
        "operationId": "createRemediation",
        "parameters": [
          {
            "name": "remediation",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Remediation"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Remediation"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        },
        {
          "$ref": "#/parameters/serviceName"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/remediation/{keptnContext}": {
      "get": {
        "tags": [
          "remediation"
        ],
        "summary": "Get open remediations by KeptnContext",
        "operationId": "getRemediationsForContext",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Remediations"
            }
          },
          "404": {
            "description": "Failed. Remediations could not be found",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "remediation"
        ],
        "summary": "Close open remediations for KeptnContext",
        "operationId": "closeRemediations",
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/pageSize"
        },
        {
          "$ref": "#/parameters/nextPageKey"
        },
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        },
        {
          "$ref": "#/parameters/serviceName"
        },
        {
          "$ref": "#/parameters/keptnContext"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/resource": {
      "get": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Get list of service resources",
        "parameters": [
          {
            "$ref": "#/parameters/pageSize"
          },
          {
            "$ref": "#/parameters/nextPageKey"
          },
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Containing Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Update list of service resources",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Create list of new resources for the service",
        "parameters": [
          {
            "$ref": "#/parameters/resources"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        },
        {
          "$ref": "#/parameters/serviceName"
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Get the specified resource",
        "parameters": [
          {
            "$ref": "#/parameters/disableUpstreamSync"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Service resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Update the specified resource",
        "parameters": [
          {
            "$ref": "#/parameters/resource"
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Delete the specified resource",
        "responses": {
          "204": {
            "description": "Success. Service resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "$ref": "#/parameters/projectName"
        },
        {
          "$ref": "#/parameters/stageName"
        },
        {
          "$ref": "#/parameters/serviceName"
        },
        {
          "$ref": "#/parameters/resourceURI"
        }
      ]
    }
  },
  "definitions": {
    "Error": {
      "type": "object",
      "required": [
        "message"
      ],
      "properties": {
        "code": {
          "description": "Error code",
          "type": "integer",
          "format": "int64"
        },
        "message": {
          "description": "Error message",
          "type": "string"
        }
      }
    },
    "EventContext": {
      "type": "object",
      "properties": {
        "eventId": {
          "description": "ID of the event",
          "type": "string"
        },
        "keptnContext": {
          "description": "Keptn Context ID of the event",
          "type": "string"
        },
        "time": {
          "description": "Time of the event",
          "type": "string"
        }
      }
    },
    "EventContexts": {
      "type": "object",
      "properties": {
        "eventContexts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/EventContext"
          }
        },
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "ExpandedProject": {
      "type": "object",
      "properties": {
        "creationDate": {
          "description": "Creation date of the project",
          "type": "string"
        },
        "gitRemoteURI": {
          "description": "Git remote URI",
          "type": "string"
        },
        "gitUser": {
          "description": "Git User",
          "type": "string"
        },
        "lastEventContext": {
          "$ref": "#/definitions/EventContext"
        },
        "projectName": {
          "description": "Project name",
          "type": "string"
        },
        "shipyard": {
          "description": "Shipyard file content",
          "type": "string"
        },
        "stages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedStage"
          }
        }
      }
    },
    "ExpandedProjects": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "projects": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedProject"
          }
        },
        "totalCount": {
          "description": "Total number of projects",
          "type": "number"
        }
      }
    },
    "ExpandedService": {
      "type": "object",
      "properties": {
        "creationDate": {
          "description": "Creation date of the service",
          "type": "string"
        },
        "deployedImage": {
          "description": "Currently deployed image",
          "type": "string"
        },
        "lastEventTypes": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/EventContext"
          }
        },
        "openRemediations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Remediation"
          }
        },
        "serviceName": {
          "description": "Service name",
          "type": "string"
        }
      }
    },
    "ExpandedServiceWithStageInfo": {
      "type": "object",
      "properties": {
        "creationDate": {
          "description": "Creation date of the service",
          "type": "string"
        },
        "serviceName": {
          "description": "Service name",
          "type": "string"
        },
        "stageInfo": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/InverseServiceStageInfo"
          }
        }
      }
    },
    "ExpandedStage": {
      "type": "object",
      "properties": {
        "lastEventContext": {
          "$ref": "#/definitions/EventContext"
        },
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedService"
          }
        },
        "stageName": {
          "description": "Stage name",
          "type": "string"
        }
      }
    },
    "InverseServiceStageInfo": {
      "type": "object",
      "properties": {
        "deployedImage": {
          "description": "Currently deployed image",
          "type": "string"
        },
        "lastEventTypes": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/EventContext"
          }
        },
        "stageName": {
          "type": "string"
        }
      }
    },
    "KeptnContextExtendedCE": {
      "type": "object",
      "required": [
        "data",
        "source",
        "type"
      ],
      "properties": {
        "contenttype": {
          "type": "string"
        },
        "data": {
          "type": [
            "object",
            "string"
          ]
        },
        "extensions": {
          "type": "object"
        },
        "id": {
          "type": "string"
        },
        "shkeptncontext": {
          "type": "string"
        },
        "source": {
          "type": "string",
          "format": "uri-reference"
        },
        "specversion": {
          "type": "string"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "Project": {
      "type": "object",
      "properties": {
        "gitRemoteURI": {
          "description": "Git remote URI",
          "type": "string"
        },
        "gitToken": {
          "description": "Git token",
          "type": "string"
        },
        "gitUser": {
          "description": "Git User",
          "type": "string"
        },
        "projectName": {
          "description": "Project name",
          "type": "string"
        },
        "stages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Stage"
          }
        }
      }
    },
    "Projects": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "projects": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Project"
          }
        },
        "totalCount": {
          "description": "Total number of projects",
          "type": "number"
        }
      }
    },
    "Remediation": {
      "type": "object",
      "properties": {
        "action": {
          "description": "Executed action",
          "type": "string"
        },
        "eventId": {
          "description": "ID of the event",
          "type": "string"
        },
        "keptnContext": {
          "description": "Keptn Context ID of the event",
          "type": "string"
        },
        "time": {
          "description": "Time of the event",
          "type": "string"
        },
        "type": {
          "description": "Type of the event",
          "type": "string"
        }
      }
    },
    "Remediations": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "remediations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Remediation"
          }
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "Resource": {
      "type": "object",
      "required": [
        "resourceURI"
      ],
      "properties": {
        "metadata": {
          "$ref": "#/definitions/Version"
        },
        "resourceContent": {
          "description": "Resource content",
          "type": "string"
        },
        "resourceURI": {
          "description": "Resource URI",
          "type": "string"
        }
      }
    },
    "Resources": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "resources": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Resource"
          }
        },
        "totalCount": {
          "description": "Total number of resources",
          "type": "number"
        }
      }
    },
    "Service": {
      "type": "object",
      "properties": {
        "serviceName": {
          "description": "Service name",
          "type": "string"
        }
      }
    },
    "Services": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedService"
          }
        },
        "totalCount": {
          "description": "Total number of services",
          "type": "number"
        }
      }
    },
    "ServicesWithStageInfo": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedServiceWithStageInfo"
          }
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "Stage": {
      "type": "object",
      "properties": {
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Service"
          }
        },
        "stageName": {
          "description": "Stage name",
          "type": "string"
        }
      }
    },
    "Stages": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "stages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedStage"
          }
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "Version": {
      "type": "object",
      "properties": {
        "branch": {
          "description": "branch in git repo containing the resource",
          "type": "string"
        },
        "upstreamURL": {
          "description": "Upstream repository containing the resource",
          "type": "string"
        },
        "version": {
          "description": "version/git commit id of the resource",
          "type": "string"
        }
      }
    }
  },
  "parameters": {
    "disableUpstreamSync": {
      "type": "boolean",
      "default": false,
      "description": "Disable sync of upstream repo before reading content",
      "name": "disableUpstreamSync",
      "in": "query"
    },
    "keptnContext": {
      "type": "string",
      "description": "Keptn Context",
      "name": "keptnContext",
      "in": "path",
      "required": true
    },
    "nextPageKey": {
      "type": "string",
      "description": "Pointer to the next set of items",
      "name": "nextPageKey",
      "in": "query"
    },
    "pageSize": {
      "maximum": 50,
      "minimum": 1,
      "type": "integer",
      "default": 20,
      "description": "The number of items to return",
      "name": "pageSize",
      "in": "query"
    },
    "project": {
      "description": "Project entity",
      "name": "project",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Project"
      }
    },
    "projectName": {
      "type": "string",
      "description": "Name of the project",
      "name": "projectName",
      "in": "path",
      "required": true
    },
    "resource": {
      "description": "Resource",
      "name": "resource",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Resource"
      }
    },
    "resourceURI": {
      "type": "string",
      "description": "Resource URI",
      "name": "resourceURI",
      "in": "path",
      "required": true
    },
    "resources": {
      "description": "List of resources",
      "name": "resources",
      "in": "body",
      "schema": {
        "properties": {
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/definitions/Resource"
            }
          }
        }
      }
    },
    "service": {
      "description": "Service entity",
      "name": "service",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Service"
      }
    },
    "serviceName": {
      "type": "string",
      "description": "Name of the service",
      "name": "serviceName",
      "in": "path",
      "required": true
    },
    "stage": {
      "description": "Stage entity",
      "name": "stage",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Stage"
      }
    },
    "stageName": {
      "type": "string",
      "description": "Name of the stage",
      "name": "stageName",
      "in": "path",
      "required": true
    }
  }
}`))
	FlatSwaggerJSON = json.RawMessage([]byte(`{
  "consumes": [
    "application/cloudevents+json",
    "application/json"
  ],
  "produces": [
    "application/json"
  ],
  "swagger": "2.0",
  "info": {
    "title": "Configuration Service API",
    "version": "develop"
  },
  "basePath": "/v1",
  "paths": {
    "/event": {
      "post": {
        "tags": [
          "event"
        ],
        "summary": "Handles an incoming event",
        "operationId": "handle event",
        "parameters": [
          {
            "name": "body",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/KeptnContextExtendedCE"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/project": {
      "get": {
        "tags": [
          "Project"
        ],
        "summary": "Get list of projects",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          },
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedProjects"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Project"
        ],
        "summary": "INTERNAL Endpoint: Create a new project by project name",
        "deprecated": true,
        "parameters": [
          {
            "description": "Project entity",
            "name": "project",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Project"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Project has been created. Response does not have a body."
          },
          "400": {
            "description": "Failed. Project could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      }
    },
    "/project/{projectName}": {
      "get": {
        "tags": [
          "Project"
        ],
        "summary": "Get the specified project",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedProject"
            }
          },
          "404": {
            "description": "Failed. Project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Project"
        ],
        "summary": "INTERNAL Endpoint: Update the specified project",
        "deprecated": true,
        "parameters": [
          {
            "description": "Project entity",
            "name": "project",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Project"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Project has been updated. Response does not have a body."
          },
          "400": {
            "description": "Failed. Project could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Project"
        ],
        "summary": "INTERNAL Endpoint: Delete the specified project",
        "deprecated": true,
        "responses": {
          "204": {
            "description": "Success. Project has been deleted. Response does not have a body."
          },
          "400": {
            "description": "Failed. Project could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/resource": {
      "get": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Get list of project resources",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          },
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Update list of project resources",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Project resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Create list of new resources for the project",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Project resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Get the specified resource",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Project resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Update the specified resource",
        "parameters": [
          {
            "description": "Resource",
            "name": "resource",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Project resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Project Resource"
        ],
        "summary": "Delete the specified resource",
        "responses": {
          "204": {
            "description": "Success. Project resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Project resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Resource URI",
          "name": "resourceURI",
          "in": "path",
          "required": true
        },
        {
          "type": "boolean",
          "default": false,
          "description": "Disable sync of upstream repo before reading content",
          "name": "disableUpstreamSync",
          "in": "query"
        }
      ]
    },
    "/project/{projectName}/service": {
      "get": {
        "tags": [
          "Services"
        ],
        "operationId": "get services",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ServicesWithStageInfo"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/service/{serviceName}": {
      "get": {
        "tags": [
          "Services"
        ],
        "operationId": "get service",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedServiceWithStageInfo"
            }
          },
          "404": {
            "description": "Failed. Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/service/{serviceName}/resource": {
      "get": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Get list of default resources for the service used in all stages",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          },
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Containing service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Update list of service default resources",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service default resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Create list of default resources for the service used in all stages",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service default resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/service/{serviceName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Get the specified default resource for the service",
        "parameters": [
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Default resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Update the specified default resource for the service",
        "responses": {
          "201": {
            "description": "Success. Service default resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Service Default Resource"
        ],
        "summary": "Delete the specified default resource for the service",
        "responses": {
          "204": {
            "description": "Success. Service default resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service default resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Resource URI",
          "name": "resourceURI",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage": {
      "get": {
        "tags": [
          "Stage"
        ],
        "summary": "Get list of stages",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          },
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Stages"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Stage"
        ],
        "summary": "INTERNAL Endpoint: Create a new stage by stage name",
        "deprecated": true,
        "parameters": [
          {
            "description": "Stage entity",
            "name": "stage",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Stage"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Stage has been created. Response does not have a body."
          },
          "400": {
            "description": "Failed. Stage could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}": {
      "get": {
        "tags": [
          "Stage"
        ],
        "summary": "Get the specified stage",
        "parameters": [
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedStage"
            }
          },
          "404": {
            "description": "Failed. Project resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Stage"
        ],
        "summary": "INTERNAL Endpoint: Update the specified stage",
        "deprecated": true,
        "parameters": [
          {
            "description": "Stage entity",
            "name": "stage",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Stage"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Stage has been updated. Response does not have a body."
          },
          "400": {
            "description": "Failed. Stage could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Stage"
        ],
        "summary": "INTERNAL Endpoint: Delete the specified stage",
        "deprecated": true,
        "responses": {
          "204": {
            "description": "Success. Stage has been deleted. Response does not have a body."
          },
          "400": {
            "description": "Failed. Stage could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/resource": {
      "get": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Get list of stage resources",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          },
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Stage could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Update list of stage resources",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Stage resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Create list of new resources for the stage",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Stage resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Get the specified resource",
        "parameters": [
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Stage resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Update the specified resource",
        "parameters": [
          {
            "description": "Resource",
            "name": "resource",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Stage resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Stage Resource"
        ],
        "summary": "Delete the specified resource",
        "responses": {
          "204": {
            "description": "Success. Stage resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Stage resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Resource URI",
          "name": "resourceURI",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service": {
      "get": {
        "tags": [
          "Service"
        ],
        "summary": "Get list of services",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          },
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Services"
            }
          },
          "404": {
            "description": "Failed. Containing project could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Service"
        ],
        "summary": "INTERNAL Endpoint: Create a new service by service name",
        "deprecated": true,
        "parameters": [
          {
            "description": "Service entity",
            "name": "service",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Service"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Stage has been created. Response does not have a body."
          },
          "400": {
            "description": "Failed. Service could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}": {
      "get": {
        "tags": [
          "Service"
        ],
        "summary": "Get the specified service",
        "parameters": [
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/ExpandedService"
            }
          },
          "404": {
            "description": "Failed. Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service"
        ],
        "summary": "INTERNAL Endpoint: Update the specified service",
        "deprecated": true,
        "parameters": [
          {
            "description": "Service entity",
            "name": "service",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Service"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Success. Service has been updated. Response does not have a body."
          },
          "400": {
            "description": "Failed. Service could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Service"
        ],
        "summary": "INTERNAL Endpoint: Delete the specified service",
        "deprecated": true,
        "responses": {
          "204": {
            "description": "Success. Service has been deleted. Response does not have a body."
          },
          "400": {
            "description": "Failed. Service could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/remediation": {
      "get": {
        "tags": [
          "remediation"
        ],
        "summary": "Get all open remediations",
        "operationId": "getRemediations",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Remediations"
            }
          },
          "404": {
            "description": "Failed. Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "remediation"
        ],
        "summary": "Create remediation",
        "operationId": "createRemediation",
        "parameters": [
          {
            "name": "remediation",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Remediation"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Remediation"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/remediation/{keptnContext}": {
      "get": {
        "tags": [
          "remediation"
        ],
        "summary": "Get open remediations by KeptnContext",
        "operationId": "getRemediationsForContext",
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Remediations"
            }
          },
          "404": {
            "description": "Failed. Remediations could not be found",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "remediation"
        ],
        "summary": "Close open remediations for KeptnContext",
        "operationId": "closeRemediations",
        "responses": {
          "200": {
            "description": "OK"
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "maximum": 50,
          "minimum": 1,
          "type": "integer",
          "default": 20,
          "description": "The number of items to return",
          "name": "pageSize",
          "in": "query"
        },
        {
          "type": "string",
          "description": "Pointer to the next set of items",
          "name": "nextPageKey",
          "in": "query"
        },
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Keptn Context",
          "name": "keptnContext",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/resource": {
      "get": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Get list of service resources",
        "parameters": [
          {
            "maximum": 50,
            "minimum": 1,
            "type": "integer",
            "default": 20,
            "description": "The number of items to return",
            "name": "pageSize",
            "in": "query"
          },
          {
            "type": "string",
            "description": "Pointer to the next set of items",
            "name": "nextPageKey",
            "in": "query"
          },
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resources"
            }
          },
          "404": {
            "description": "Failed. Containing Service could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Update list of service resources",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service resources have been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resources could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "post": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Create list of new resources for the service",
        "parameters": [
          {
            "description": "List of resources",
            "name": "resources",
            "in": "body",
            "schema": {
              "properties": {
                "resources": {
                  "type": "array",
                  "items": {
                    "$ref": "#/definitions/Resource"
                  }
                }
              }
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service resource has been created. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resource could not be created.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        }
      ]
    },
    "/project/{projectName}/stage/{stageName}/service/{serviceName}/resource/{resourceURI}": {
      "get": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Get the specified resource",
        "parameters": [
          {
            "type": "boolean",
            "default": false,
            "description": "Disable sync of upstream repo before reading content",
            "name": "disableUpstreamSync",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Success",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          },
          "404": {
            "description": "Failed. Service resource could not be found.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "put": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Update the specified resource",
        "parameters": [
          {
            "description": "Resource",
            "name": "resource",
            "in": "body",
            "schema": {
              "$ref": "#/definitions/Resource"
            }
          }
        ],
        "responses": {
          "201": {
            "description": "Success. Service resource has been updated. The version of the new configuration is returned.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resource could not be updated.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Service Resource"
        ],
        "summary": "Delete the specified resource",
        "responses": {
          "204": {
            "description": "Success. Service resource has been deleted.",
            "schema": {
              "$ref": "#/definitions/Version"
            }
          },
          "400": {
            "description": "Failed. Service resource could not be deleted.",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          },
          "default": {
            "description": "Error",
            "schema": {
              "$ref": "#/definitions/Error"
            }
          }
        }
      },
      "parameters": [
        {
          "type": "string",
          "description": "Name of the project",
          "name": "projectName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the stage",
          "name": "stageName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Name of the service",
          "name": "serviceName",
          "in": "path",
          "required": true
        },
        {
          "type": "string",
          "description": "Resource URI",
          "name": "resourceURI",
          "in": "path",
          "required": true
        }
      ]
    }
  },
  "definitions": {
    "Error": {
      "type": "object",
      "required": [
        "message"
      ],
      "properties": {
        "code": {
          "description": "Error code",
          "type": "integer",
          "format": "int64"
        },
        "message": {
          "description": "Error message",
          "type": "string"
        }
      }
    },
    "EventContext": {
      "type": "object",
      "properties": {
        "eventId": {
          "description": "ID of the event",
          "type": "string"
        },
        "keptnContext": {
          "description": "Keptn Context ID of the event",
          "type": "string"
        },
        "time": {
          "description": "Time of the event",
          "type": "string"
        }
      }
    },
    "EventContexts": {
      "type": "object",
      "properties": {
        "eventContexts": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/EventContext"
          }
        },
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "ExpandedProject": {
      "type": "object",
      "properties": {
        "creationDate": {
          "description": "Creation date of the project",
          "type": "string"
        },
        "gitRemoteURI": {
          "description": "Git remote URI",
          "type": "string"
        },
        "gitUser": {
          "description": "Git User",
          "type": "string"
        },
        "lastEventContext": {
          "$ref": "#/definitions/EventContext"
        },
        "projectName": {
          "description": "Project name",
          "type": "string"
        },
        "shipyard": {
          "description": "Shipyard file content",
          "type": "string"
        },
        "stages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedStage"
          }
        }
      }
    },
    "ExpandedProjects": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "projects": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedProject"
          }
        },
        "totalCount": {
          "description": "Total number of projects",
          "type": "number"
        }
      }
    },
    "ExpandedService": {
      "type": "object",
      "properties": {
        "creationDate": {
          "description": "Creation date of the service",
          "type": "string"
        },
        "deployedImage": {
          "description": "Currently deployed image",
          "type": "string"
        },
        "lastEventTypes": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/EventContext"
          }
        },
        "openRemediations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Remediation"
          }
        },
        "serviceName": {
          "description": "Service name",
          "type": "string"
        }
      }
    },
    "ExpandedServiceWithStageInfo": {
      "type": "object",
      "properties": {
        "creationDate": {
          "description": "Creation date of the service",
          "type": "string"
        },
        "serviceName": {
          "description": "Service name",
          "type": "string"
        },
        "stageInfo": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/InverseServiceStageInfo"
          }
        }
      }
    },
    "ExpandedStage": {
      "type": "object",
      "properties": {
        "lastEventContext": {
          "$ref": "#/definitions/EventContext"
        },
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedService"
          }
        },
        "stageName": {
          "description": "Stage name",
          "type": "string"
        }
      }
    },
    "InverseServiceStageInfo": {
      "type": "object",
      "properties": {
        "deployedImage": {
          "description": "Currently deployed image",
          "type": "string"
        },
        "lastEventTypes": {
          "type": "object",
          "additionalProperties": {
            "$ref": "#/definitions/EventContext"
          }
        },
        "stageName": {
          "type": "string"
        }
      }
    },
    "KeptnContextExtendedCE": {
      "type": "object",
      "required": [
        "data",
        "source",
        "type"
      ],
      "properties": {
        "contenttype": {
          "type": "string"
        },
        "data": {
          "type": [
            "object",
            "string"
          ]
        },
        "extensions": {
          "type": "object"
        },
        "id": {
          "type": "string"
        },
        "shkeptncontext": {
          "type": "string"
        },
        "source": {
          "type": "string",
          "format": "uri-reference"
        },
        "specversion": {
          "type": "string"
        },
        "time": {
          "type": "string",
          "format": "date-time"
        },
        "type": {
          "type": "string"
        }
      }
    },
    "Project": {
      "type": "object",
      "properties": {
        "gitRemoteURI": {
          "description": "Git remote URI",
          "type": "string"
        },
        "gitToken": {
          "description": "Git token",
          "type": "string"
        },
        "gitUser": {
          "description": "Git User",
          "type": "string"
        },
        "projectName": {
          "description": "Project name",
          "type": "string"
        },
        "stages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Stage"
          }
        }
      }
    },
    "Projects": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "projects": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Project"
          }
        },
        "totalCount": {
          "description": "Total number of projects",
          "type": "number"
        }
      }
    },
    "Remediation": {
      "type": "object",
      "properties": {
        "action": {
          "description": "Executed action",
          "type": "string"
        },
        "eventId": {
          "description": "ID of the event",
          "type": "string"
        },
        "keptnContext": {
          "description": "Keptn Context ID of the event",
          "type": "string"
        },
        "time": {
          "description": "Time of the event",
          "type": "string"
        },
        "type": {
          "description": "Type of the event",
          "type": "string"
        }
      }
    },
    "Remediations": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "remediations": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Remediation"
          }
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "Resource": {
      "type": "object",
      "required": [
        "resourceURI"
      ],
      "properties": {
        "metadata": {
          "$ref": "#/definitions/Version"
        },
        "resourceContent": {
          "description": "Resource content",
          "type": "string"
        },
        "resourceURI": {
          "description": "Resource URI",
          "type": "string"
        }
      }
    },
    "Resources": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "resources": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Resource"
          }
        },
        "totalCount": {
          "description": "Total number of resources",
          "type": "number"
        }
      }
    },
    "Service": {
      "type": "object",
      "properties": {
        "serviceName": {
          "description": "Service name",
          "type": "string"
        }
      }
    },
    "Services": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedService"
          }
        },
        "totalCount": {
          "description": "Total number of services",
          "type": "number"
        }
      }
    },
    "ServicesWithStageInfo": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedServiceWithStageInfo"
          }
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "Stage": {
      "type": "object",
      "properties": {
        "services": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/Service"
          }
        },
        "stageName": {
          "description": "Stage name",
          "type": "string"
        }
      }
    },
    "Stages": {
      "type": "object",
      "properties": {
        "nextPageKey": {
          "description": "Pointer to next page, base64 encoded",
          "type": "string"
        },
        "pageSize": {
          "description": "Size of returned page",
          "type": "number"
        },
        "stages": {
          "type": "array",
          "items": {
            "$ref": "#/definitions/ExpandedStage"
          }
        },
        "totalCount": {
          "description": "Total number of stages",
          "type": "number"
        }
      }
    },
    "Version": {
      "type": "object",
      "properties": {
        "branch": {
          "description": "branch in git repo containing the resource",
          "type": "string"
        },
        "upstreamURL": {
          "description": "Upstream repository containing the resource",
          "type": "string"
        },
        "version": {
          "description": "version/git commit id of the resource",
          "type": "string"
        }
      }
    }
  },
  "parameters": {
    "disableUpstreamSync": {
      "type": "boolean",
      "default": false,
      "description": "Disable sync of upstream repo before reading content",
      "name": "disableUpstreamSync",
      "in": "query"
    },
    "keptnContext": {
      "type": "string",
      "description": "Keptn Context",
      "name": "keptnContext",
      "in": "path",
      "required": true
    },
    "nextPageKey": {
      "type": "string",
      "description": "Pointer to the next set of items",
      "name": "nextPageKey",
      "in": "query"
    },
    "pageSize": {
      "maximum": 50,
      "minimum": 1,
      "type": "integer",
      "default": 20,
      "description": "The number of items to return",
      "name": "pageSize",
      "in": "query"
    },
    "project": {
      "description": "Project entity",
      "name": "project",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Project"
      }
    },
    "projectName": {
      "type": "string",
      "description": "Name of the project",
      "name": "projectName",
      "in": "path",
      "required": true
    },
    "resource": {
      "description": "Resource",
      "name": "resource",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Resource"
      }
    },
    "resourceURI": {
      "type": "string",
      "description": "Resource URI",
      "name": "resourceURI",
      "in": "path",
      "required": true
    },
    "resources": {
      "description": "List of resources",
      "name": "resources",
      "in": "body",
      "schema": {
        "properties": {
          "resources": {
            "type": "array",
            "items": {
              "$ref": "#/definitions/Resource"
            }
          }
        }
      }
    },
    "service": {
      "description": "Service entity",
      "name": "service",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Service"
      }
    },
    "serviceName": {
      "type": "string",
      "description": "Name of the service",
      "name": "serviceName",
      "in": "path",
      "required": true
    },
    "stage": {
      "description": "Stage entity",
      "name": "stage",
      "in": "body",
      "schema": {
        "$ref": "#/definitions/Stage"
      }
    },
    "stageName": {
      "type": "string",
      "description": "Name of the stage",
      "name": "stageName",
      "in": "path",
      "required": true
    }
  }
}`))
}
