From 35e34c25a0705c7fa9f59d5fd599ec7f756363a6 Mon Sep 17 00:00:00 2001 From: Sam Gunaratne Date: Tue, 12 Aug 2025 13:54:55 -0600 Subject: [PATCH 1/2] Update errors to be an array and to always re-use component --- apis/cf/latest/components/responses/500.yaml | 2 +- .../components/responses/500Unauthorized.yaml | 2 +- .../components/responses/BadRequest.yaml | 2 +- .../components/responses/Forbidden.yaml | 2 +- .../latest/components/responses/NotFound.yaml | 2 +- .../components/responses/Unauthorized.yaml | 2 +- .../responses/UnprocessableEntity.yaml | 2 +- apis/cf/latest/paths/Apps.yaml | 6 +--- apis/cf/latest/paths/Buildpacks.yaml | 24 +++------------ apis/cf/latest/paths/Domains.yaml | 12 ++------ apis/cf/latest/paths/Droplets.yaml | 30 ++++--------------- 11 files changed, 19 insertions(+), 67 deletions(-) diff --git a/apis/cf/latest/components/responses/500.yaml b/apis/cf/latest/components/responses/500.yaml index 8a135ea..4728249 100644 --- a/apis/cf/latest/components/responses/500.yaml +++ b/apis/cf/latest/components/responses/500.yaml @@ -2,4 +2,4 @@ description: Internal Server Error content: application/json: schema: - $ref: '../schemas/Error.yaml' + $ref: '../schemas/Errors.yaml' diff --git a/apis/cf/latest/components/responses/500Unauthorized.yaml b/apis/cf/latest/components/responses/500Unauthorized.yaml index 8a135ea..4728249 100644 --- a/apis/cf/latest/components/responses/500Unauthorized.yaml +++ b/apis/cf/latest/components/responses/500Unauthorized.yaml @@ -2,4 +2,4 @@ description: Internal Server Error content: application/json: schema: - $ref: '../schemas/Error.yaml' + $ref: '../schemas/Errors.yaml' diff --git a/apis/cf/latest/components/responses/BadRequest.yaml b/apis/cf/latest/components/responses/BadRequest.yaml index e856fee..2023489 100644 --- a/apis/cf/latest/components/responses/BadRequest.yaml +++ b/apis/cf/latest/components/responses/BadRequest.yaml @@ -2,4 +2,4 @@ description: Bad Request content: application/json: schema: - $ref: '../schemas/Error.yaml' + $ref: '../schemas/Errors.yaml' diff --git a/apis/cf/latest/components/responses/Forbidden.yaml b/apis/cf/latest/components/responses/Forbidden.yaml index 2f39d10..b90c039 100644 --- a/apis/cf/latest/components/responses/Forbidden.yaml +++ b/apis/cf/latest/components/responses/Forbidden.yaml @@ -2,4 +2,4 @@ description: Forbidden content: application/json: schema: - $ref: '../schemas/Error.yaml' + $ref: '../schemas/Errors.yaml' diff --git a/apis/cf/latest/components/responses/NotFound.yaml b/apis/cf/latest/components/responses/NotFound.yaml index 0304ab9..955b8d5 100644 --- a/apis/cf/latest/components/responses/NotFound.yaml +++ b/apis/cf/latest/components/responses/NotFound.yaml @@ -2,4 +2,4 @@ description: Not Found content: application/json: schema: - $ref: '../schemas/Error.yaml' + $ref: '../schemas/Errors.yaml' diff --git a/apis/cf/latest/components/responses/Unauthorized.yaml b/apis/cf/latest/components/responses/Unauthorized.yaml index 90172c1..1360303 100644 --- a/apis/cf/latest/components/responses/Unauthorized.yaml +++ b/apis/cf/latest/components/responses/Unauthorized.yaml @@ -2,4 +2,4 @@ description: Unauthorized content: application/json: schema: - $ref: '../schemas/Error.yaml' + $ref: '../schemas/Errors.yaml' diff --git a/apis/cf/latest/components/responses/UnprocessableEntity.yaml b/apis/cf/latest/components/responses/UnprocessableEntity.yaml index 7501008..a36abb8 100644 --- a/apis/cf/latest/components/responses/UnprocessableEntity.yaml +++ b/apis/cf/latest/components/responses/UnprocessableEntity.yaml @@ -2,4 +2,4 @@ description: Unprocessable Entity content: application/json: schema: - $ref: '../schemas/Error.yaml' + $ref: '../schemas/Errors.yaml' diff --git a/apis/cf/latest/paths/Apps.yaml b/apis/cf/latest/paths/Apps.yaml index 6732330..1d2919d 100644 --- a/apis/cf/latest/paths/Apps.yaml +++ b/apis/cf/latest/paths/Apps.yaml @@ -188,11 +188,7 @@ '404': $ref: '../components/responses/NotFound.yaml' '422': - description: Unprocessable Entity - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' + $ref: '../components/responses/UnprocessableEntity.yaml' delete: summary: Delete an app description: Delete a specific app by its GUID. diff --git a/apis/cf/latest/paths/Buildpacks.yaml b/apis/cf/latest/paths/Buildpacks.yaml index 3971e92..b41ec00 100644 --- a/apis/cf/latest/paths/Buildpacks.yaml +++ b/apis/cf/latest/paths/Buildpacks.yaml @@ -53,11 +53,7 @@ '201': $ref: '../components/responses/BuildpackCreateResponse.yaml' '400': - description: Bad request - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' + $ref: '../components/responses/BadRequest.yaml' '401': $ref: '../components/responses/Unauthorized.yaml' '403': @@ -75,11 +71,7 @@ '200': $ref: '../components/responses/BuildpackGetResponse.yaml' '400': - description: Bad request - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' + $ref: '../components/responses/BadRequest.yaml' '401': $ref: '../components/responses/Unauthorized.yaml' '403': @@ -141,11 +133,7 @@ schema: $ref: '../components/schemas/Buildpack.yaml' '400': - description: Bad request - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' + $ref: '../components/responses/BadRequest.yaml' '401': $ref: '../components/responses/Unauthorized.yaml' '403': @@ -205,8 +193,4 @@ '404': $ref: '../components/responses/NotFound.yaml' '422': - description: Unprocessable Entity - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' + $ref: '../components/responses/UnprocessableEntity.yaml' diff --git a/apis/cf/latest/paths/Domains.yaml b/apis/cf/latest/paths/Domains.yaml index 18a5fd9..77a5f46 100644 --- a/apis/cf/latest/paths/Domains.yaml +++ b/apis/cf/latest/paths/Domains.yaml @@ -193,11 +193,7 @@ '404': $ref: '../components/responses/NotFound.yaml' '422': - description: Unprocessable Entity - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' + $ref: '../components/responses/UnprocessableEntity.yaml' /v3/organizations/{organization_guid}/domains: get: summary: List domains for an organization @@ -284,8 +280,4 @@ '404': $ref: '../components/responses/NotFound.yaml' '422': - description: Unprocessable Entity - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' + $ref: '../components/responses/UnprocessableEntity.yaml' diff --git a/apis/cf/latest/paths/Droplets.yaml b/apis/cf/latest/paths/Droplets.yaml index 5962de5..ec58ca3 100644 --- a/apis/cf/latest/paths/Droplets.yaml +++ b/apis/cf/latest/paths/Droplets.yaml @@ -77,11 +77,7 @@ '201': $ref: '../components/responses/DropletCreateResponse.yaml' '400': - description: Bad request - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' + $ref: '../components/responses/BadRequest.yaml' /v3/droplets/{guid}: get: summary: Retrieve a droplet @@ -95,11 +91,7 @@ '200': $ref: '../components/responses/DropletGetResponse.yaml' '400': - description: Bad request - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' + $ref: '../components/responses/BadRequest.yaml' patch: summary: Update a droplet description: Update attributes of a specific droplet by its GUID. @@ -128,11 +120,7 @@ '200': $ref: '../components/responses/DropletGetResponse.yaml' '400': - description: Bad request - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' + $ref: '../components/responses/BadRequest.yaml' '401': $ref: '../components/responses/Unauthorized.yaml' '403': @@ -140,11 +128,7 @@ '404': $ref: '../components/responses/NotFound.yaml' '422': - description: Unprocessable Entity - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' + $ref: '../components/responses/UnprocessableEntity.yaml' delete: summary: Delete a droplet description: Delete a specific droplet by its GUID. @@ -209,8 +193,4 @@ '404': $ref: '../components/responses/NotFound.yaml' '422': - description: Unprocessable Entity - content: - application/json: - schema: - $ref: '../components/schemas/Error.yaml' + $ref: '../components/responses/UnprocessableEntity.yaml' From 87c563163d6fc987539d5ad2ca063fbba3f8da1d Mon Sep 17 00:00:00 2001 From: Sam Gunaratne Date: Tue, 12 Aug 2025 19:44:34 -0600 Subject: [PATCH 2/2] Various improvements * CF returns a list of errors rather than a single error * Add missing paths to openapi.yaml * Add missing resource schema * Add missing requestBodies * Change to use path references rather than hash references * Add missing response body schemas * Add lint ignore for endpoint that returns 302 --- .redocly.lint-ignore.yaml | 5 +- .../components/parameters/SpaceGuid.yaml | 7 + .../requestBodies/AppCreateRequestBody.yaml | 30 +++ .../requestBodies/AppUpdateRequestBody.yaml | 20 ++ .../requestBodies/BuildCreateRequestBody.yaml | 23 +++ .../BuildpackUpdateRequestBody.yaml | 25 +++ .../DomainCreateRequestBody.yaml | 32 ++++ .../DomainUpdateRequestBody.yaml | 10 + .../OrganizationCreateRequestBody.yaml | 18 ++ .../OrganizationQuotaCreateRequestBody.yaml | 69 +++++++ .../OrganizationQuotaUpdateRequestBody.yaml | 62 ++++++ .../OrganizationUpdateRequestBody.yaml | 16 ++ .../PackageCreateRequestBody.yaml | 46 +++++ .../PackageUpdateRequestBody.yaml | 10 + .../PackageUploadRequestBody.yaml | 15 ++ .../ProcessUpdateRequestBody.yaml | 17 ++ .../requestBodies/SpaceCreateRequestBody.yaml | 25 +++ .../requestBodies/SpaceUpdateRequestBody.yaml | 13 ++ .../requestBodies/TaskCreateRequestBody.yaml | 41 ++++ .../components/schemas/AppEnvironment.yaml | 24 +++ .../schemas/AppEnvironmentVariables.yaml | 10 + .../components/schemas/AppPermissions.yaml | 12 ++ .../components/schemas/AppSshEnabled.yaml | 11 ++ .../components/schemas/HealthCheck.yaml | 22 +++ .../components/schemas/Organization.yaml | 22 +++ .../components/schemas/OrganizationList.yaml | 9 + .../components/schemas/OrganizationQuota.yaml | 68 +++++++ .../schemas/OrganizationQuotaList.yaml | 9 + .../cf/latest/components/schemas/Package.yaml | 14 +- .../components/schemas/PackageList.yaml | 4 +- .../cf/latest/components/schemas/Process.yaml | 45 +++++ .../components/schemas/ProcessList.yaml | 9 + .../components/schemas/ProcessStats.yaml | 39 ++++ .../latest/components/schemas/RouteList.yaml | 9 + apis/cf/latest/openapi.yaml | 178 ++++++++++++++++-- apis/cf/latest/paths/Apps.yaml | 68 +++---- apis/cf/latest/paths/Buildpacks.yaml | 39 +--- apis/cf/latest/paths/Builds.yaml | 2 +- apis/cf/latest/paths/Domains.yaml | 32 +--- apis/cf/latest/paths/Manifests.yaml | 12 +- apis/cf/latest/paths/OrganizationQuotas.yaml | 60 +++--- apis/cf/latest/paths/Organizations.yaml | 146 ++++++++------ apis/cf/latest/paths/Packages.yaml | 165 +++++++--------- apis/cf/latest/paths/Processes.yaml | 95 +++++----- apis/cf/latest/paths/Routes.yaml | 2 + apis/cf/latest/paths/SecurityGroups.yaml | 24 +-- apis/cf/latest/paths/Sidecars.yaml | 18 +- apis/cf/latest/paths/Spaces.yaml | 10 +- apis/cf/latest/paths/Tasks.yaml | 9 +- 49 files changed, 1236 insertions(+), 415 deletions(-) create mode 100644 apis/cf/latest/components/parameters/SpaceGuid.yaml create mode 100644 apis/cf/latest/components/requestBodies/AppCreateRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/AppUpdateRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/BuildCreateRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/BuildpackUpdateRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/DomainCreateRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/DomainUpdateRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/OrganizationCreateRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/OrganizationQuotaCreateRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/OrganizationQuotaUpdateRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/OrganizationUpdateRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/PackageCreateRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/PackageUpdateRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/PackageUploadRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/ProcessUpdateRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/SpaceCreateRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/SpaceUpdateRequestBody.yaml create mode 100644 apis/cf/latest/components/requestBodies/TaskCreateRequestBody.yaml create mode 100644 apis/cf/latest/components/schemas/AppEnvironment.yaml create mode 100644 apis/cf/latest/components/schemas/AppEnvironmentVariables.yaml create mode 100644 apis/cf/latest/components/schemas/AppPermissions.yaml create mode 100644 apis/cf/latest/components/schemas/AppSshEnabled.yaml create mode 100644 apis/cf/latest/components/schemas/HealthCheck.yaml create mode 100644 apis/cf/latest/components/schemas/Organization.yaml create mode 100644 apis/cf/latest/components/schemas/OrganizationList.yaml create mode 100644 apis/cf/latest/components/schemas/OrganizationQuota.yaml create mode 100644 apis/cf/latest/components/schemas/OrganizationQuotaList.yaml create mode 100644 apis/cf/latest/components/schemas/Process.yaml create mode 100644 apis/cf/latest/components/schemas/ProcessList.yaml create mode 100644 apis/cf/latest/components/schemas/ProcessStats.yaml create mode 100644 apis/cf/latest/components/schemas/RouteList.yaml diff --git a/.redocly.lint-ignore.yaml b/.redocly.lint-ignore.yaml index 7488897..e600f7e 100644 --- a/.redocly.lint-ignore.yaml +++ b/.redocly.lint-ignore.yaml @@ -1,2 +1,5 @@ # This file instructs Redocly's linter to ignore the rules contained for specific parts of your API. -# See https://redoc.ly/docs/cli/ for more information. +# See https://redocly.com/docs/cli/ for more information. +apis/cf/latest/paths/Packages.yaml: + operation-2xx-response: + - '#/~1v3~1packages~1{guid}~1download/get/responses' diff --git a/apis/cf/latest/components/parameters/SpaceGuid.yaml b/apis/cf/latest/components/parameters/SpaceGuid.yaml new file mode 100644 index 0000000..dddd5b7 --- /dev/null +++ b/apis/cf/latest/components/parameters/SpaceGuid.yaml @@ -0,0 +1,7 @@ +name: space_guid +in: path +required: true +schema: + type: string + format: uuid +description: The unique identifier for the space diff --git a/apis/cf/latest/components/requestBodies/AppCreateRequestBody.yaml b/apis/cf/latest/components/requestBodies/AppCreateRequestBody.yaml new file mode 100644 index 0000000..e247c6c --- /dev/null +++ b/apis/cf/latest/components/requestBodies/AppCreateRequestBody.yaml @@ -0,0 +1,30 @@ +description: App object that needs to be created +required: true +content: + application/json: + schema: + type: object + properties: + name: + type: string + description: Name of the app + environment_variables: + type: object + description: Environment variables to be used for the App when running + additionalProperties: + type: string + lifecycle: + $ref: '../schemas/Lifecycle.yaml' + relationships: + type: object + properties: + space: + $ref: '../schemas/RelationshipToOne.yaml' + required: + - space + metadata: + $ref: '../schemas/Metadata.yaml' + required: + - name + - relationships + description: Request schema for creating an app diff --git a/apis/cf/latest/components/requestBodies/AppUpdateRequestBody.yaml b/apis/cf/latest/components/requestBodies/AppUpdateRequestBody.yaml new file mode 100644 index 0000000..12f4f72 --- /dev/null +++ b/apis/cf/latest/components/requestBodies/AppUpdateRequestBody.yaml @@ -0,0 +1,20 @@ +description: App object that needs to be updated +required: true +content: + application/json: + schema: + type: object + properties: + name: + type: string + description: Name of the app + environment_variables: + type: object + description: Environment variables to be used for the App when running + additionalProperties: + type: string + lifecycle: + $ref: '../schemas/Lifecycle.yaml' + metadata: + $ref: '../schemas/Metadata.yaml' + description: Request schema for updating an app diff --git a/apis/cf/latest/components/requestBodies/BuildCreateRequestBody.yaml b/apis/cf/latest/components/requestBodies/BuildCreateRequestBody.yaml new file mode 100644 index 0000000..d770335 --- /dev/null +++ b/apis/cf/latest/components/requestBodies/BuildCreateRequestBody.yaml @@ -0,0 +1,23 @@ +description: Build object that needs to be created +required: true +content: + application/json: + schema: + type: object + properties: + package: + type: object + properties: + guid: + type: string + format: uuid + required: + - guid + description: App package to stage + lifecycle: + $ref: '../schemas/Lifecycle.yaml' + metadata: + $ref: '../schemas/Metadata.yaml' + required: + - package + description: Request schema for creating a build diff --git a/apis/cf/latest/components/requestBodies/BuildpackUpdateRequestBody.yaml b/apis/cf/latest/components/requestBodies/BuildpackUpdateRequestBody.yaml new file mode 100644 index 0000000..41ef507 --- /dev/null +++ b/apis/cf/latest/components/requestBodies/BuildpackUpdateRequestBody.yaml @@ -0,0 +1,25 @@ +description: Buildpack object that needs to be updated +required: true +content: + application/json: + schema: + type: object + properties: + name: + type: string + description: The name of the buildpack + position: + type: integer + description: The position of the buildpack in the order of execution + enabled: + type: boolean + description: Whether the buildpack is enabled + locked: + type: boolean + description: Whether the buildpack is locked + stack: + type: string + description: The stack the buildpack is compatible with + metadata: + $ref: '../schemas/Metadata.yaml' + description: Request schema for updating a buildpack diff --git a/apis/cf/latest/components/requestBodies/DomainCreateRequestBody.yaml b/apis/cf/latest/components/requestBodies/DomainCreateRequestBody.yaml new file mode 100644 index 0000000..5216f87 --- /dev/null +++ b/apis/cf/latest/components/requestBodies/DomainCreateRequestBody.yaml @@ -0,0 +1,32 @@ +description: Domain object that needs to be created +required: true +content: + application/json: + schema: + type: object + properties: + name: + type: string + description: Name of the domain + internal: + type: boolean + description: Whether the domain is used for internal (container-to-container) traffic + router_group: + type: object + properties: + guid: + type: string + format: uuid + description: The router group the domain will be associated with + relationships: + type: object + properties: + organization: + $ref: '../schemas/RelationshipToOne.yaml' + shared_organizations: + $ref: '../schemas/RelationshipToMany.yaml' + metadata: + $ref: '../schemas/Metadata.yaml' + required: + - name + description: Request schema for creating a domain diff --git a/apis/cf/latest/components/requestBodies/DomainUpdateRequestBody.yaml b/apis/cf/latest/components/requestBodies/DomainUpdateRequestBody.yaml new file mode 100644 index 0000000..006b258 --- /dev/null +++ b/apis/cf/latest/components/requestBodies/DomainUpdateRequestBody.yaml @@ -0,0 +1,10 @@ +description: Domain object that needs to be updated +required: true +content: + application/json: + schema: + type: object + properties: + metadata: + $ref: '../schemas/Metadata.yaml' + description: Request schema for updating a domain diff --git a/apis/cf/latest/components/requestBodies/OrganizationCreateRequestBody.yaml b/apis/cf/latest/components/requestBodies/OrganizationCreateRequestBody.yaml new file mode 100644 index 0000000..9f35669 --- /dev/null +++ b/apis/cf/latest/components/requestBodies/OrganizationCreateRequestBody.yaml @@ -0,0 +1,18 @@ +description: Organization object that needs to be created +required: true +content: + application/json: + schema: + type: object + properties: + name: + type: string + description: Organization name + suspended: + type: boolean + description: Whether an organization is suspended or not + metadata: + $ref: '../schemas/Metadata.yaml' + required: + - name + description: Request schema for creating an organization diff --git a/apis/cf/latest/components/requestBodies/OrganizationQuotaCreateRequestBody.yaml b/apis/cf/latest/components/requestBodies/OrganizationQuotaCreateRequestBody.yaml new file mode 100644 index 0000000..6e6f870 --- /dev/null +++ b/apis/cf/latest/components/requestBodies/OrganizationQuotaCreateRequestBody.yaml @@ -0,0 +1,69 @@ +description: Organization quota object that needs to be created +required: true +content: + application/json: + schema: + type: object + properties: + name: + type: string + description: Name of the quota + apps: + type: object + description: Quotas that affect applications and application sub-resources + properties: + per_process_memory_in_mb: + type: [integer, "null"] + description: Maximum memory for a single process or task + total_memory_in_mb: + type: [integer, "null"] + description: Total memory allowed for all the started processes and running tasks in an organization + total_instances: + type: [integer, "null"] + description: Total instances of all the started processes allowed in an organization + log_rate_limit_in_bytes_per_second: + type: [integer, "null"] + description: Total log rate limit allowed for all the started processes and running tasks in an organization + per_app_tasks: + type: [integer, "null"] + description: Maximum number of running tasks in an organization + services: + type: object + description: Quotas that affect services + properties: + paid_services_allowed: + type: boolean + description: Specifies whether instances of paid service plans can be created + total_service_instances: + type: [integer, "null"] + description: Total number of service instances allowed in an organization + total_service_keys: + type: [integer, "null"] + description: Total number of service keys allowed in an organization + routes: + type: object + description: Quotas that affect routes + properties: + total_routes: + type: [integer, "null"] + description: Total number of routes allowed in an organization + total_reserved_ports: + type: [integer, "null"] + description: Total number of ports that are reservable by routes in an organization + domains: + type: object + description: Quotas that affect domains + properties: + total_domains: + type: [integer, "null"] + description: Total number of domains that can be scoped to an organization + relationships: + type: object + properties: + organizations: + $ref: '../schemas/RelationshipToMany.yaml' + metadata: + $ref: '../schemas/Metadata.yaml' + required: + - name + description: Request schema for creating an organization quota diff --git a/apis/cf/latest/components/requestBodies/OrganizationQuotaUpdateRequestBody.yaml b/apis/cf/latest/components/requestBodies/OrganizationQuotaUpdateRequestBody.yaml new file mode 100644 index 0000000..00d1402 --- /dev/null +++ b/apis/cf/latest/components/requestBodies/OrganizationQuotaUpdateRequestBody.yaml @@ -0,0 +1,62 @@ +description: Organization quota object that needs to be updated +required: true +content: + application/json: + schema: + type: object + properties: + name: + type: string + description: Name of the quota + apps: + type: object + description: Quotas that affect applications and application sub-resources + properties: + per_process_memory_in_mb: + type: [integer, "null"] + description: Maximum memory for a single process or task + total_memory_in_mb: + type: [integer, "null"] + description: Total memory allowed for all the started processes and running tasks in an organization + total_instances: + type: [integer, "null"] + description: Total instances of all the started processes allowed in an organization + log_rate_limit_in_bytes_per_second: + type: [integer, "null"] + description: Total log rate limit allowed for all the started processes and running tasks in an organization + per_app_tasks: + type: [integer, "null"] + description: Maximum number of running tasks in an organization + services: + type: object + description: Quotas that affect services + properties: + paid_services_allowed: + type: boolean + description: Specifies whether instances of paid service plans can be created + total_service_instances: + type: [integer, "null"] + description: Total number of service instances allowed in an organization + total_service_keys: + type: [integer, "null"] + description: Total number of service keys allowed in an organization + routes: + type: object + description: Quotas that affect routes + properties: + total_routes: + type: [integer, "null"] + description: Total number of routes allowed in an organization + total_reserved_ports: + type: [integer, "null"] + description: Total number of ports that are reservable by routes in an organization + domains: + type: object + description: Quotas that affect domains + properties: + total_domains: + type: [integer, "null"] + description: Total number of domains that can be scoped to an organization + metadata: + $ref: '../schemas/Metadata.yaml' + description: Request schema for updating an organization quota diff --git a/apis/cf/latest/components/requestBodies/OrganizationUpdateRequestBody.yaml b/apis/cf/latest/components/requestBodies/OrganizationUpdateRequestBody.yaml new file mode 100644 index 0000000..c2d65aa --- /dev/null +++ b/apis/cf/latest/components/requestBodies/OrganizationUpdateRequestBody.yaml @@ -0,0 +1,16 @@ +description: Organization object that needs to be updated +required: true +content: + application/json: + schema: + type: object + properties: + name: + type: string + description: Organization name + suspended: + type: boolean + description: Whether an organization is suspended or not + metadata: + $ref: '../schemas/Metadata.yaml' + description: Request schema for updating an organization diff --git a/apis/cf/latest/components/requestBodies/PackageCreateRequestBody.yaml b/apis/cf/latest/components/requestBodies/PackageCreateRequestBody.yaml new file mode 100644 index 0000000..edaba43 --- /dev/null +++ b/apis/cf/latest/components/requestBodies/PackageCreateRequestBody.yaml @@ -0,0 +1,46 @@ +description: Package object that needs to be created +required: true +content: + application/json: + schema: + type: object + properties: + type: + type: string + description: Type of the package; valid values are bits or docker + enum: + - bits + - docker + data: + type: object + description: Data for package type + properties: + image: + type: string + description: The registry address of the image (for docker packages) + username: + type: string + description: The username for the image's registry (for docker packages) + password: + type: string + description: The password for the image's registry (for docker packages) + relationships: + type: object + properties: + app: + type: object + properties: + data: + type: object + properties: + guid: + type: string + format: uuid + required: + - app + metadata: + $ref: '../schemas/Metadata.yaml' + required: + - type + - relationships + description: Request schema for creating a package diff --git a/apis/cf/latest/components/requestBodies/PackageUpdateRequestBody.yaml b/apis/cf/latest/components/requestBodies/PackageUpdateRequestBody.yaml new file mode 100644 index 0000000..2570c5a --- /dev/null +++ b/apis/cf/latest/components/requestBodies/PackageUpdateRequestBody.yaml @@ -0,0 +1,10 @@ +description: Package object that needs to be updated +required: true +content: + application/json: + schema: + type: object + properties: + metadata: + $ref: '../schemas/Metadata.yaml' + description: Request schema for updating a package diff --git a/apis/cf/latest/components/requestBodies/PackageUploadRequestBody.yaml b/apis/cf/latest/components/requestBodies/PackageUploadRequestBody.yaml new file mode 100644 index 0000000..8989ea3 --- /dev/null +++ b/apis/cf/latest/components/requestBodies/PackageUploadRequestBody.yaml @@ -0,0 +1,15 @@ +description: Package bits to be uploaded +required: true +content: + multipart/form-data: + schema: + type: object + properties: + bits: + type: string + format: binary + description: A gzipped tar file that contains the package bits + resources: + type: string + description: Fingerprints of the application bits that have previously been pushed to Cloud Foundry + description: Request schema for uploading package bits diff --git a/apis/cf/latest/components/requestBodies/ProcessUpdateRequestBody.yaml b/apis/cf/latest/components/requestBodies/ProcessUpdateRequestBody.yaml new file mode 100644 index 0000000..320aebe --- /dev/null +++ b/apis/cf/latest/components/requestBodies/ProcessUpdateRequestBody.yaml @@ -0,0 +1,17 @@ +description: Process object that needs to be updated +required: true +content: + application/json: + schema: + type: object + properties: + command: + type: [string, "null"] + description: The command used to start the process; use null to revert to the buildpack-detected or procfile-provided start command + health_check: + $ref: '../schemas/HealthCheck.yaml' + readiness_health_check: + $ref: '../schemas/HealthCheck.yaml' + metadata: + $ref: '../schemas/Metadata.yaml' + description: Request schema for updating a process diff --git a/apis/cf/latest/components/requestBodies/SpaceCreateRequestBody.yaml b/apis/cf/latest/components/requestBodies/SpaceCreateRequestBody.yaml new file mode 100644 index 0000000..9109e24 --- /dev/null +++ b/apis/cf/latest/components/requestBodies/SpaceCreateRequestBody.yaml @@ -0,0 +1,25 @@ +description: Space object that needs to be created +required: true +content: + application/json: + schema: + type: object + properties: + name: + type: string + description: Name of the space + relationships: + type: object + properties: + organization: + $ref: '../schemas/RelationshipToOne.yaml' + isolation_segment: + $ref: '../schemas/RelationshipToOne.yaml' + required: + - organization + metadata: + $ref: '../schemas/Metadata.yaml' + required: + - name + - relationships + description: Request schema for creating a space diff --git a/apis/cf/latest/components/requestBodies/SpaceUpdateRequestBody.yaml b/apis/cf/latest/components/requestBodies/SpaceUpdateRequestBody.yaml new file mode 100644 index 0000000..bc3f861 --- /dev/null +++ b/apis/cf/latest/components/requestBodies/SpaceUpdateRequestBody.yaml @@ -0,0 +1,13 @@ +description: Space object that needs to be updated +required: true +content: + application/json: + schema: + type: object + properties: + name: + type: string + description: Name of the space + metadata: + $ref: '../schemas/Metadata.yaml' + description: Request schema for updating a space diff --git a/apis/cf/latest/components/requestBodies/TaskCreateRequestBody.yaml b/apis/cf/latest/components/requestBodies/TaskCreateRequestBody.yaml new file mode 100644 index 0000000..ec40d43 --- /dev/null +++ b/apis/cf/latest/components/requestBodies/TaskCreateRequestBody.yaml @@ -0,0 +1,41 @@ +description: Task object that needs to be created +required: true +content: + application/json: + schema: + type: object + properties: + command: + type: string + description: The command to run for the task + name: + type: string + description: Human-readable name for the task + memory_in_mb: + type: integer + description: Amount of memory to allocate for the task in MB + disk_in_mb: + type: integer + description: Amount of disk to allocate for the task in MB + log_rate_limit_in_bytes_per_second: + type: integer + description: Amount of log rate limit to allocate for the task in bytes per second + droplet_guid: + type: string + format: uuid + description: The GUID of a droplet to use to run the task + template: + type: object + description: An object with a process field to template the task from + properties: + process: + type: object + properties: + guid: + type: string + format: uuid + required: + - guid + metadata: + $ref: '../schemas/Metadata.yaml' + description: Request schema for creating a task diff --git a/apis/cf/latest/components/schemas/AppEnvironment.yaml b/apis/cf/latest/components/schemas/AppEnvironment.yaml new file mode 100644 index 0000000..06cc326 --- /dev/null +++ b/apis/cf/latest/components/schemas/AppEnvironment.yaml @@ -0,0 +1,24 @@ +type: object +properties: + staging_env_json: + type: object + description: Environment variables used during staging + additionalProperties: true + running_env_json: + type: object + description: Environment variables used during runtime + additionalProperties: true + environment_variables: + type: object + description: User-defined environment variables + additionalProperties: + type: string + system_env_json: + type: object + description: System environment variables including VCAP_SERVICES + additionalProperties: true + application_env_json: + type: object + description: Application environment variables including VCAP_APPLICATION + additionalProperties: true +description: 'Environment variables that will be provided to an app at runtime' diff --git a/apis/cf/latest/components/schemas/AppEnvironmentVariables.yaml b/apis/cf/latest/components/schemas/AppEnvironmentVariables.yaml new file mode 100644 index 0000000..defd5dc --- /dev/null +++ b/apis/cf/latest/components/schemas/AppEnvironmentVariables.yaml @@ -0,0 +1,10 @@ +type: object +properties: + var: + type: object + description: Environment variables + additionalProperties: + type: string + links: + $ref: './Links.yaml' +description: 'App environment variables with links' diff --git a/apis/cf/latest/components/schemas/AppPermissions.yaml b/apis/cf/latest/components/schemas/AppPermissions.yaml new file mode 100644 index 0000000..b89ddd0 --- /dev/null +++ b/apis/cf/latest/components/schemas/AppPermissions.yaml @@ -0,0 +1,12 @@ +type: object +properties: + read_basic_data: + type: boolean + description: Whether the user can read basic app data + read_sensitive_data: + type: boolean + description: Whether the user can read sensitive app data +required: + - read_basic_data + - read_sensitive_data +description: 'User permissions for an app' diff --git a/apis/cf/latest/components/schemas/AppSshEnabled.yaml b/apis/cf/latest/components/schemas/AppSshEnabled.yaml new file mode 100644 index 0000000..2738065 --- /dev/null +++ b/apis/cf/latest/components/schemas/AppSshEnabled.yaml @@ -0,0 +1,11 @@ +type: object +properties: + enabled: + type: boolean + description: Whether SSH is enabled for the app + reason: + type: string + description: If SSH is disabled, describes whether it is disabled globally, at the space level, or at the app level +required: + - enabled +description: 'SSH enabled status for an app' diff --git a/apis/cf/latest/components/schemas/HealthCheck.yaml b/apis/cf/latest/components/schemas/HealthCheck.yaml new file mode 100644 index 0000000..fe1c238 --- /dev/null +++ b/apis/cf/latest/components/schemas/HealthCheck.yaml @@ -0,0 +1,22 @@ +type: object +properties: + type: + type: string + enum: ["port", "process", "http"] + description: The type of health check to perform; valid values are http, port, and process; default is port + data: + type: object + properties: + timeout: + type: integer + description: The duration in seconds that health checks can fail before the process is restarted + invocation_timeout: + type: integer + description: The timeout in seconds for individual health check requests for http and port health checks + interval: + type: integer + description: The interval in seconds between health check requests + endpoint: + type: string + description: The endpoint called to determine if the app is healthy; this key is only present for http health checks +description: 'Health check configuration for a process' diff --git a/apis/cf/latest/components/schemas/Organization.yaml b/apis/cf/latest/components/schemas/Organization.yaml new file mode 100644 index 0000000..206235e --- /dev/null +++ b/apis/cf/latest/components/schemas/Organization.yaml @@ -0,0 +1,22 @@ +type: object +allOf: + - $ref: './BaseSchema.yaml' + - properties: + name: + type: string + description: Name of the organization + suspended: + type: boolean + description: Whether an organization is suspended or not; non-admins will be blocked from creating, updating, or deleting resources in a suspended organization + relationships: + type: object + properties: + quota: + $ref: './RelationshipToOne.yaml' + description: The quota applied to the organization + metadata: + $ref: './Metadata.yaml' + links: + $ref: './Links.yaml' +description: > + An org is a development account that an individual or multiple collaborators can own and use. All collaborators access an org with user accounts. Collaborators in an org share a resource quota plan, applications, services availability, and custom domains. diff --git a/apis/cf/latest/components/schemas/OrganizationList.yaml b/apis/cf/latest/components/schemas/OrganizationList.yaml new file mode 100644 index 0000000..e8f28da --- /dev/null +++ b/apis/cf/latest/components/schemas/OrganizationList.yaml @@ -0,0 +1,9 @@ +type: object +allOf: + - $ref: './Pagination.yaml' + - properties: + resources: + type: array + items: + $ref: './Organization.yaml' +description: A paginated list of organizations diff --git a/apis/cf/latest/components/schemas/OrganizationQuota.yaml b/apis/cf/latest/components/schemas/OrganizationQuota.yaml new file mode 100644 index 0000000..fad778e --- /dev/null +++ b/apis/cf/latest/components/schemas/OrganizationQuota.yaml @@ -0,0 +1,68 @@ +type: object +allOf: + - $ref: './BaseSchema.yaml' + - properties: + name: + type: string + description: Name of the quota + apps: + type: object + description: Quotas that affect applications and application sub-resources + properties: + per_process_memory_in_mb: + type: [integer, "null"] + description: Maximum memory for a single process or task + total_memory_in_mb: + type: [integer, "null"] + description: Total memory allowed for all the started processes and running tasks in an organization + total_instances: + type: [integer, "null"] + description: Total instances of all the started processes allowed in an organization + log_rate_limit_in_bytes_per_second: + type: [integer, "null"] + description: Total log rate limit allowed for all the started processes and running tasks in an organization + per_app_tasks: + type: [integer, "null"] + description: Maximum number of running tasks in an organization + services: + type: object + description: Quotas that affect services + properties: + paid_services_allowed: + type: boolean + description: Specifies whether instances of paid service plans can be created + total_service_instances: + type: [integer, "null"] + description: Total number of service instances allowed in an organization + total_service_keys: + type: [integer, "null"] + description: Total number of service keys allowed in an organization + routes: + type: object + description: Quotas that affect routes + properties: + total_routes: + type: [integer, "null"] + description: Total number of routes allowed in an organization + total_reserved_ports: + type: [integer, "null"] + description: Total number of ports that are reservable by routes in an organization + domains: + type: object + description: Quotas that affect domains + properties: + total_domains: + type: [integer, "null"] + description: Total number of domains that can be scoped to an organization + relationships: + type: object + properties: + organizations: + $ref: './RelationshipToMany.yaml' + description: A relationship to the organizations where the quota is applied + metadata: + $ref: './Metadata.yaml' + links: + $ref: './Links.yaml' +description: > + Organization quotas are named sets of memory, log rate, service, and instance usage quotas. For example, one organization quota might allow up to 10 services, 10 routes, and 2 GB of RAM, while another might offer 100 services, 100 routes, and 10 GB of RAM. diff --git a/apis/cf/latest/components/schemas/OrganizationQuotaList.yaml b/apis/cf/latest/components/schemas/OrganizationQuotaList.yaml new file mode 100644 index 0000000..cf47a8f --- /dev/null +++ b/apis/cf/latest/components/schemas/OrganizationQuotaList.yaml @@ -0,0 +1,9 @@ +type: object +allOf: + - $ref: './Pagination.yaml' + - properties: + resources: + type: array + items: + $ref: './OrganizationQuota.yaml' +description: A paginated list of organization quotas diff --git a/apis/cf/latest/components/schemas/Package.yaml b/apis/cf/latest/components/schemas/Package.yaml index cbc226a..fca538c 100644 --- a/apis/cf/latest/components/schemas/Package.yaml +++ b/apis/cf/latest/components/schemas/Package.yaml @@ -1,6 +1,6 @@ type: object allOf: - - $ref: '#/components/schemas/BaseSchema' + - $ref: './BaseSchema.yaml' - properties: type: type: string @@ -44,23 +44,23 @@ allOf: - COPYING - EXPIRED relationships: - $ref: '#/components/schemas/Relationships' + $ref: './Relationships.yaml' metadata: - $ref: '#/components/schemas/Metadata' + $ref: './Metadata.yaml' links: allOf: - - $ref: '#/components/schemas/Links' + - $ref: './Links.yaml' - properties: upload: allOf: - - $ref: '#/components/schemas/Link' + - $ref: './Link.yaml' - description: The URL to upload the package bits download: allOf: - - $ref: '#/components/schemas/Link' + - $ref: './Link.yaml' - description: The URL to download the package bits stage: allOf: - - $ref: '#/components/schemas/Link' + - $ref: './Link.yaml' - description: The URL to stage the package description: 'A package represents an application"s "source code" - either raw bits or a pointer to these bits. Packages are used to create builds, which result in a droplet that can be deployed.' diff --git a/apis/cf/latest/components/schemas/PackageList.yaml b/apis/cf/latest/components/schemas/PackageList.yaml index 2d90fd0..2b8672f 100644 --- a/apis/cf/latest/components/schemas/PackageList.yaml +++ b/apis/cf/latest/components/schemas/PackageList.yaml @@ -1,8 +1,8 @@ type: object properties: pagination: - $ref: '#/components/schemas/Pagination' + $ref: './Pagination.yaml' resources: type: array items: - $ref: '#/components/schemas/Package' + $ref: './Package.yaml' diff --git a/apis/cf/latest/components/schemas/Process.yaml b/apis/cf/latest/components/schemas/Process.yaml new file mode 100644 index 0000000..fc637dc --- /dev/null +++ b/apis/cf/latest/components/schemas/Process.yaml @@ -0,0 +1,45 @@ +type: object +allOf: + - $ref: './BaseSchema.yaml' + - properties: + version: + type: string + format: uuid + description: Random identifier that changes every time the process will be recreated in the runtime + type: + type: string + description: Process type; a unique identifier for processes belonging to an app + command: + type: [string, "null"] + description: The command used to start the process; use null to revert to the buildpack-detected or procfile-provided start command + user: + type: [string, "null"] + description: The user used to run the process; use null to revert to the docker-detected or default 'vcap' user + instances: + type: integer + description: The number of instances to run + memory_in_mb: + type: integer + description: The memory in MB allocated per instance + disk_in_mb: + type: integer + description: The disk in MB allocated per instance + log_rate_limit_in_bytes_per_second: + type: integer + description: The log rate in bytes per second allocated per instance + health_check: + $ref: './HealthCheck.yaml' + readiness_health_check: + $ref: './HealthCheck.yaml' + relationships: + type: object + properties: + app: + $ref: './RelationshipToOne.yaml' + revision: + $ref: './RelationshipToOne.yaml' + metadata: + $ref: './Metadata.yaml' + links: + $ref: './Links.yaml' +description: 'A process defines the runnable units of an app' diff --git a/apis/cf/latest/components/schemas/ProcessList.yaml b/apis/cf/latest/components/schemas/ProcessList.yaml new file mode 100644 index 0000000..b54d869 --- /dev/null +++ b/apis/cf/latest/components/schemas/ProcessList.yaml @@ -0,0 +1,9 @@ +allOf: + - $ref: './Pagination.yaml' + - type: object + properties: + resources: + type: array + items: + $ref: './Process.yaml' +description: 'A list of processes' diff --git a/apis/cf/latest/components/schemas/ProcessStats.yaml b/apis/cf/latest/components/schemas/ProcessStats.yaml new file mode 100644 index 0000000..254daee --- /dev/null +++ b/apis/cf/latest/components/schemas/ProcessStats.yaml @@ -0,0 +1,39 @@ +type: object +properties: + resources: + type: array + items: + type: object + properties: + type: + type: string + index: + type: integer + state: + type: string + enum: ["RUNNING", "CRASHED", "STARTING", "DOWN"] + host: + type: string + uptime: + type: integer + mem_quota: + type: integer + disk_quota: + type: integer + log_rate_limit: + type: integer + usage: + type: object + properties: + time: + type: string + format: date-time + cpu: + type: number + mem: + type: integer + disk: + type: integer + log_rate: + type: integer +description: 'Statistics for a process' diff --git a/apis/cf/latest/components/schemas/RouteList.yaml b/apis/cf/latest/components/schemas/RouteList.yaml new file mode 100644 index 0000000..3150ae5 --- /dev/null +++ b/apis/cf/latest/components/schemas/RouteList.yaml @@ -0,0 +1,9 @@ +type: object +properties: + pagination: + $ref: './Pagination.yaml' + resources: + type: array + items: + $ref: './Route.yaml' +description: A list of routes diff --git a/apis/cf/latest/openapi.yaml b/apis/cf/latest/openapi.yaml index a7733a4..188366a 100644 --- a/apis/cf/latest/openapi.yaml +++ b/apis/cf/latest/openapi.yaml @@ -1,7 +1,7 @@ openapi: 3.1.0 info: title: Cloud Foundry V3 API - description: "# Welcome to the Cloud Foundry V3 API docs! This is the latest available specification. \n\n# Getting help\nThe CAPI team can most easily be reached on our Slack channel for questions and issues regarding the API. To report an issue with the docs or API, please feel free to file a GitHub issue on our API repo, cloud_controller_ng.\nWe recommend reaching out to Slack first as we will be most responsive there.\n \n# More resources\n- The Cloud Foundry V2 API is still depricated but still available for interacting with Cloud Foundry.\n- Running Tasks\n- V3 API Documentation OpenAPI Spec Source Code. " + description: "# Welcome to the Cloud Foundry V3 API docs! This is the latest available specification. \n\n# Getting help\nThe CAPI team can most easily be reached on our Slack channel for questions and issues regarding the API. To report an issue with the docs or API, please feel free to file a GitHub issue on our API repo, cloud_controller_ng.\nWe recommend reaching out to Slack first as we will be most responsive there.\n \n# More resources\n- The Cloud Foundry V2 API is still deprecated but still available for interacting with Cloud Foundry.\n- Running Tasks\n- V3 API Documentation OpenAPI Spec Source Code. " version: latest license: name: Apache 2.0 @@ -151,6 +151,14 @@ components: $ref: './components/schemas/App.yaml' AppList: $ref: './components/schemas/AppList.yaml' + AppEnvironment: + $ref: './components/schemas/AppEnvironment.yaml' + AppEnvironmentVariables: + $ref: './components/schemas/AppEnvironmentVariables.yaml' + AppPermissions: + $ref: './components/schemas/AppPermissions.yaml' + AppSshEnabled: + $ref: './components/schemas/AppSshEnabled.yaml' Route: $ref: './components/schemas/Route.yaml' RouteDestination: @@ -171,6 +179,24 @@ components: $ref: './components/schemas/IsolationSegment.yaml' IsolationSegmentList: $ref: './components/schemas/IsolationSegmentList.yaml' + Organization: + $ref: './components/schemas/Organization.yaml' + OrganizationList: + $ref: './components/schemas/OrganizationList.yaml' + OrganizationQuota: + $ref: './components/schemas/OrganizationQuota.yaml' + OrganizationQuotaList: + $ref: './components/schemas/OrganizationQuotaList.yaml' + Package: + $ref: './components/schemas/Package.yaml' + PackageList: + $ref: './components/schemas/PackageList.yaml' + Process: + $ref: './components/schemas/Process.yaml' + ProcessList: + $ref: './components/schemas/ProcessList.yaml' + ProcessStats: + $ref: './components/schemas/ProcessStats.yaml' SecurityGroup: $ref: './components/schemas/SecurityGroup.yaml' ServiceBroker: @@ -271,22 +297,56 @@ components: RoleListResponse: $ref: './components/responses/RoleListResponse.yaml' requestBodies: + AppCreateRequestBody: + $ref: './components/requestBodies/AppCreateRequestBody.yaml' + AppUpdateRequestBody: + $ref: './components/requestBodies/AppUpdateRequestBody.yaml' + BuildCreateRequestBody: + $ref: './components/requestBodies/BuildCreateRequestBody.yaml' BuildpackCreateRequestBody: $ref: './components/requestBodies/BuildpackCreateRequestBody.yaml' - UserCreate: - $ref: './components/requestBodies/UserCreate.yaml' - UserUpdate: - $ref: './components/requestBodies/UserUpdate.yaml' + BuildpackUpdateRequestBody: + $ref: './components/requestBodies/BuildpackUpdateRequestBody.yaml' + DomainCreateRequestBody: + $ref: './components/requestBodies/DomainCreateRequestBody.yaml' + DomainUpdateRequestBody: + $ref: './components/requestBodies/DomainUpdateRequestBody.yaml' DropletCreateRequestBody: $ref: './components/requestBodies/DropletCreateRequestBody.yaml' + IsolationSegmentCreate: + $ref: './components/requestBodies/IsolationSegmentCreate.yaml' + OrganizationCreateRequestBody: + $ref: './components/requestBodies/OrganizationCreateRequestBody.yaml' + OrganizationUpdateRequestBody: + $ref: './components/requestBodies/OrganizationUpdateRequestBody.yaml' + OrganizationQuotaCreateRequestBody: + $ref: './components/requestBodies/OrganizationQuotaCreateRequestBody.yaml' + OrganizationQuotaUpdateRequestBody: + $ref: './components/requestBodies/OrganizationQuotaUpdateRequestBody.yaml' + PackageCreateRequestBody: + $ref: './components/requestBodies/PackageCreateRequestBody.yaml' + PackageUpdateRequestBody: + $ref: './components/requestBodies/PackageUpdateRequestBody.yaml' + PackageUploadRequestBody: + $ref: './components/requestBodies/PackageUploadRequestBody.yaml' + ProcessUpdateRequestBody: + $ref: './components/requestBodies/ProcessUpdateRequestBody.yaml' + RoleCreate: + $ref: './components/requestBodies/RoleCreate.yaml' RouteCreateRequestBody: $ref: './components/requestBodies/RouteCreateRequestBody.yaml' RouteDestinations: $ref: './components/requestBodies/RouteDestinations.yaml' - RoleCreate: - $ref: './components/requestBodies/RoleCreate.yaml' - IsolationSegmentCreate: - $ref: './components/requestBodies/IsolationSegmentCreate.yaml' + SpaceCreateRequestBody: + $ref: './components/requestBodies/SpaceCreateRequestBody.yaml' + SpaceUpdateRequestBody: + $ref: './components/requestBodies/SpaceUpdateRequestBody.yaml' + TaskCreateRequestBody: + $ref: './components/requestBodies/TaskCreateRequestBody.yaml' + UserCreate: + $ref: './components/requestBodies/UserCreate.yaml' + UserUpdate: + $ref: './components/requestBodies/UserUpdate.yaml' paths: /: $ref: './paths/Root.yaml#/' @@ -440,8 +500,8 @@ paths: $ref: './paths/ServiceUsageEvents.yaml#/~1v3~1service_usage_events~1actions~1destructively_purge_all_and_reseed' /v3/sidecars/{guid}: $ref: './paths/Sidecars.yaml#/~1v3~1sidecars~1{guid}' - /v3/apps/{app_guid}/sidecars: - $ref: './paths/Sidecars.yaml#/~1v3~1apps~1{app_guid}~1sidecars' + /v3/apps/{guid}/sidecars: + $ref: './paths/Sidecars.yaml#/~1v3~1apps~1{guid}~1sidecars' /v3/spaces: $ref: './paths/Spaces.yaml#/~1v3~1spaces' /v3/spaces/{guid}: @@ -488,3 +548,99 @@ paths: $ref: './paths/Users.yaml#/~1v3~1users' /v3/users/{guid}: $ref: './paths/Users.yaml#/~1v3~1users~1{guid}' + /v3/organizations: + $ref: './paths/Organizations.yaml#/~1v3~1organizations' + /v3/organizations/{guid}: + $ref: './paths/Organizations.yaml#/~1v3~1organizations~1{guid}' + /v3/organizations/{guid}/domains/default: + $ref: './paths/Organizations.yaml#/~1v3~1organizations~1{guid}~1domains~1default' + /v3/organizations/{guid}/usage_summary: + $ref: './paths/Organizations.yaml#/~1v3~1organizations~1{guid}~1usage_summary' + /v3/organizations/{guid}/users: + $ref: './paths/Organizations.yaml#/~1v3~1organizations~1{guid}~1users' + /v3/organizations/{guid}/relationships/default_isolation_segment: + $ref: './paths/Organizations.yaml#/~1v3~1organizations~1{guid}~1relationships~1default_isolation_segment' + /v3/organization_quotas: + $ref: './paths/OrganizationQuotas.yaml#/~1v3~1organization_quotas' + /v3/organization_quotas/{guid}: + $ref: './paths/OrganizationQuotas.yaml#/~1v3~1organization_quotas~1{guid}' + /v3/organization_quotas/{quota_guid}/relationships/organizations: + $ref: './paths/OrganizationQuotas.yaml#/~1v3~1organization_quotas~1{quota_guid}~1relationships~1organizations' + /v3/packages: + $ref: './paths/Packages.yaml#/~1v3~1packages' + /v3/packages/{guid}: + $ref: './paths/Packages.yaml#/~1v3~1packages~1{guid}' + /v3/apps/{guid}/packages: + $ref: './paths/Packages.yaml#/~1v3~1apps~1{guid}~1packages' + /v3/packages/{guid}/upload: + $ref: './paths/Packages.yaml#/~1v3~1packages~1{guid}~1upload' + /v3/packages/{guid}/download: + $ref: './paths/Packages.yaml#/~1v3~1packages~1{guid}~1download' + /v3/processes: + $ref: './paths/Processes.yaml#/~1v3~1processes' + /v3/processes/{guid}: + $ref: './paths/Processes.yaml#/~1v3~1processes~1{guid}' + /v3/processes/{guid}/stats: + $ref: './paths/Processes.yaml#/~1v3~1processes~1{guid}~1stats' + /v3/processes/{guid}/actions/scale: + $ref: './paths/Processes.yaml#/~1v3~1processes~1{guid}~1actions~1scale' + /v3/processes/{guid}/instances/{index}: + $ref: './paths/Processes.yaml#/~1v3~1processes~1{guid}~1instances~1{index}' + /v3/apps/{guid}/processes: + $ref: './paths/Processes.yaml#/~1v3~1apps~1{guid}~1processes' + /v3/apps/{guid}/processes/{type}: + $ref: './paths/Processes.yaml#/~1v3~1apps~1{guid}~1processes~1{type}' + /v3/apps/{guid}/processes/{type}/stats: + $ref: './paths/Processes.yaml#/~1v3~1apps~1{guid}~1processes~1{type}~1stats' + /v3/apps/{guid}/processes/{type}/actions/scale: + $ref: './paths/Processes.yaml#/~1v3~1apps~1{guid}~1processes~1{type}~1actions~1scale' + /v3/apps/{guid}/processes/{type}/instances/{index}: + $ref: './paths/Processes.yaml#/~1v3~1apps~1{guid}~1processes~1{type}~1instances~1{index}' + /v3/apps/{guid}/manifest: + $ref: './paths/Manifests.yaml#/~1v3~1apps~1{guid}~1manifest' + /v3/apps/{guid}/builds: + $ref: './paths/Builds.yaml#/~1v3~1apps~1{guid}~1builds' + /v3/apps/{guid}/tasks: + $ref: './paths/Tasks.yaml#/~1v3~1apps~1{guid}~1tasks' + /v3/apps/{guid}/actions/clear_buildpack_cache: + $ref: './paths/Apps.yaml#/~1v3~1apps~1{guid}~1actions~1clear_buildpack_cache' + /v3/apps/{guid}/env: + $ref: './paths/Apps.yaml#/~1v3~1apps~1{guid}~1env' + /v3/apps/{guid}/environment_variables: + $ref: './paths/Apps.yaml#/~1v3~1apps~1{guid}~1environment_variables' + /v3/apps/{guid}/features: + $ref: './paths/Apps.yaml#/~1v3~1apps~1{guid}~1features' + /v3/apps/{guid}/features/{name}: + $ref: './paths/Apps.yaml#/~1v3~1apps~1{guid}~1features~1{name}' + /v3/apps/{guid}/permissions: + $ref: './paths/Apps.yaml#/~1v3~1apps~1{guid}~1permissions' + /v3/apps/{guid}/routes: + $ref: './paths/Routes.yaml#/~1v3~1apps~1{guid}~1routes' + /v3/apps/{guid}/ssh_enabled: + $ref: './paths/Apps.yaml#/~1v3~1apps~1{guid}~1ssh_enabled' + /v3/domains/{guid}/route_reservations: + $ref: './paths/Domains.yaml#/~1v3~1domains~1{guid}~1route_reservations' + /v3/organizations/{guid}/domains: + $ref: './paths/Domains.yaml#/~1v3~1organizations~1{guid}~1domains' + /v3/processes/{guid}/sidecars: + $ref: './paths/Sidecars.yaml#/~1v3~1processes~1{guid}~1sidecars' + /v3/routes/{guid}: + $ref: './paths/Routes.yaml#/~1v3~1routes~1{guid}' + /v3/routes/{guid}/relationships/shared_spaces: + $ref: './paths/Routes.yaml#/~1v3~1routes~1{guid}~1relationships~1shared_spaces' + /v3/routes/{guid}/relationships/shared_spaces/{space_guid}: + $ref: './paths/Routes.yaml#/~1v3~1routes~1{guid}~1relationships~1shared_spaces~1{space_guid}' + /v3/routes/{guid}/relationships/space: + $ref: './paths/Routes.yaml#/~1v3~1routes~1{guid}~1relationships~1space' + /v3/service_instances/{guid}/credentials: + $ref: './paths/ServiceInstances.yaml#/~1v3~1service_instances~1{guid}~1credentials' + /v3/service_instances/{guid}/parameters: + $ref: './paths/ServiceInstances.yaml#/~1v3~1service_instances~1{guid}~1parameters' + /v3/service_instances/{guid}/permissions: + $ref: './paths/ServiceInstances.yaml#/~1v3~1service_instances~1{guid}~1permissions' + /v3/service_instances/{guid}/relationships/shared_spaces: + $ref: './paths/ServiceInstances.yaml#/~1v3~1service_instances~1{guid}~1relationships~1shared_spaces' + /v3/service_instances/{guid}/relationships/shared_spaces/usage_summary: + $ref: './paths/ServiceInstances.yaml#/~1v3~1service_instances~1{guid}~1relationships~1shared_spaces~1usage_summary' + /v3/service_instances/{guid}/relationships/shared_spaces/{space_guid}: + $ref: './paths/ServiceInstances.yaml#/~1v3~1service_instances~1{guid}~1relationships~1shared_spaces~1{space_guid}' diff --git a/apis/cf/latest/paths/Apps.yaml b/apis/cf/latest/paths/Apps.yaml index 1d2919d..f4a5e77 100644 --- a/apis/cf/latest/paths/Apps.yaml +++ b/apis/cf/latest/paths/Apps.yaml @@ -79,29 +79,7 @@ tags: - Apps requestBody: - description: App object that needs to be created - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: The name of the app - relationships: - $ref: '../components/schemas/Relationships.yaml' - lifecycle: - $ref: '../components/schemas/Lifecycle.yaml' - metadata: - $ref: '../components/schemas/Metadata.yaml' - environment_variables: - type: object - description: Environment variables to be used for the App when running - required: - - name - - relationships - description: Request schema for creating an app + $ref: '../components/requestBodies/AppCreateRequestBody.yaml' responses: '201': description: Successfully created app @@ -161,23 +139,7 @@ parameters: - $ref: '../components/parameters/Guid.yaml' requestBody: - description: App object that needs to be updated - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: The name of the app - lifecycle: - $ref: '../components/schemas/Lifecycle.yaml' - metadata: - $ref: '../components/schemas/Metadata.yaml' - required: - - name - description: Request schema for updating an app + $ref: '../components/requestBodies/AppUpdateRequestBody.yaml' responses: '200': description: Successfully updated app @@ -340,6 +302,10 @@ responses: '200': description: OK + content: + application/json: + schema: + $ref: '../components/schemas/AppEnvironment.yaml' '404': $ref: '../components/responses/NotFound.yaml' /v3/apps/{guid}/environment_variables: @@ -354,6 +320,10 @@ responses: '200': description: OK + content: + application/json: + schema: + $ref: '../components/schemas/AppEnvironmentVariables.yaml' '404': $ref: '../components/responses/NotFound.yaml' patch: @@ -378,12 +348,16 @@ responses: '200': description: OK + content: + application/json: + schema: + $ref: '../components/schemas/AppEnvironmentVariables.yaml' '404': $ref: '../components/responses/NotFound.yaml' /v3/apps/{guid}/permissions: get: summary: Get permissions for an app - description: Get the current user’s permissions for the given app. If a user can see an app, then they can see its basic data. Only admin, read-only admins, and space developers can read sensitive data. + description: Get the current user's permissions for the given app. If a user can see an app, then they can see its basic data. Only admin, read-only admins, and space developers can read sensitive data. operationId: getPermissionsForApp tags: - Apps @@ -392,12 +366,16 @@ responses: '200': description: OK + content: + application/json: + schema: + $ref: '../components/schemas/AppPermissions.yaml' '404': $ref: '../components/responses/NotFound.yaml' /v3/apps/{guid}/ssh_enabled: get: summary: Get SSH enabled for an app - description: Returns if an application’s runtime environment will accept ssh connections. If ssh is disabled, the reason field will describe whether it is disabled globally, at the space level, or at the app level. + description: Returns if an application's runtime environment will accept ssh connections. If ssh is disabled, the reason field will describe whether it is disabled globally, at the space level, or at the app level. operationId: getSshEnabledForApp tags: - Apps @@ -406,6 +384,10 @@ responses: '200': description: OK + content: + application/json: + schema: + $ref: '../components/schemas/AppSshEnabled.yaml' '404': $ref: '../components/responses/NotFound.yaml' /v3/apps/{guid}/actions/clear_buildpack_cache: @@ -479,4 +461,4 @@ '200': description: OK '404': - $ref: '../components/responses/NotFound.yaml' + $ref: '../components/responses/NotFound.yaml' \ No newline at end of file diff --git a/apis/cf/latest/paths/Buildpacks.yaml b/apis/cf/latest/paths/Buildpacks.yaml index b41ec00..8adbe8c 100644 --- a/apis/cf/latest/paths/Buildpacks.yaml +++ b/apis/cf/latest/paths/Buildpacks.yaml @@ -87,44 +87,7 @@ parameters: - $ref: '../components/parameters/Guid.yaml' requestBody: - description: Buildpack object that needs to be updated - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: The name of the buildpack - stack: - type: string - description: The stack the buildpack is compatible with - position: - type: integer - description: The position of the buildpack in the order of execution - enabled: - type: boolean - description: Whether the buildpack is enabled - locked: - type: boolean - description: Whether the buildpack is locked - filename: - type: string - description: The filename of the buildpack - required: - - name - description: Request schema for updating a buildpack - examples: - buildpack: - summary: A sample buildpack - value: - name: ruby_buildpack - stack: cflinuxfs3 - position: 1 - enabled: true - locked: false - filename: ruby_buildpack-cflinuxfs3-v1.0.0.zip + $ref: '../components/requestBodies/BuildpackUpdateRequestBody.yaml' responses: '200': description: Successfully updated buildpack diff --git a/apis/cf/latest/paths/Builds.yaml b/apis/cf/latest/paths/Builds.yaml index 417f08e..4f1e3d9 100644 --- a/apis/cf/latest/paths/Builds.yaml +++ b/apis/cf/latest/paths/Builds.yaml @@ -105,7 +105,7 @@ $ref: '../components/schemas/Build.yaml' '404': $ref: '../components/responses/NotFound.yaml' -/v3/apps/{app_guid}/builds: +/v3/apps/{guid}/builds: get: summary: List builds for an app description: Retrieve all builds for the app. diff --git a/apis/cf/latest/paths/Domains.yaml b/apis/cf/latest/paths/Domains.yaml index 77a5f46..f2d50ca 100644 --- a/apis/cf/latest/paths/Domains.yaml +++ b/apis/cf/latest/paths/Domains.yaml @@ -51,35 +51,7 @@ tags: - Domains requestBody: - description: Domain object that needs to be created - required: true - content: - application/json: - schema: - type: object - properties: - name: - type: string - description: The name of the domain - internal: - type: boolean - description: Whether the domain is used for internal (container-to-container) traffic - router_group: - type: object - properties: - guid: - type: string - format: uuid - description: The desired router group GUID - organization: - $ref: '../components/schemas/RelationshipToOne.yaml' - shared_organizations: - $ref: '../components/schemas/RelationshipToMany.yaml' - metadata: - $ref: '../components/schemas/Metadata.yaml' - required: - - name - - internal + $ref: '../components/requestBodies/DomainCreateRequestBody.yaml' responses: '201': description: Successfully created domain @@ -194,7 +166,7 @@ $ref: '../components/responses/NotFound.yaml' '422': $ref: '../components/responses/UnprocessableEntity.yaml' -/v3/organizations/{organization_guid}/domains: +/v3/organizations/{guid}/domains: get: summary: List domains for an organization description: Retrieve all domains available in an organization for the current user. diff --git a/apis/cf/latest/paths/Manifests.yaml b/apis/cf/latest/paths/Manifests.yaml index cd0cf55..6c00899 100644 --- a/apis/cf/latest/paths/Manifests.yaml +++ b/apis/cf/latest/paths/Manifests.yaml @@ -6,7 +6,7 @@ tags: - Manifests parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' requestBody: content: application/x-yaml: @@ -22,7 +22,7 @@ type: string format: uri '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' /v3/apps/{guid}/manifest: get: summary: Generate a manifest for an app @@ -31,7 +31,7 @@ tags: - Manifests parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' responses: '200': description: OK @@ -40,7 +40,7 @@ schema: type: string '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' /v3/spaces/{guid}/manifest_diff: post: summary: Create a manifest diff for a space (experimental) @@ -49,7 +49,7 @@ tags: - Manifests parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' requestBody: content: application/x-yaml: @@ -77,4 +77,4 @@ value: type: string '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' diff --git a/apis/cf/latest/paths/OrganizationQuotas.yaml b/apis/cf/latest/paths/OrganizationQuotas.yaml index a4adfe8..2ea439a 100644 --- a/apis/cf/latest/paths/OrganizationQuotas.yaml +++ b/apis/cf/latest/paths/OrganizationQuotas.yaml @@ -6,9 +6,9 @@ tags: - Organization Quotas parameters: - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/OrderBy' + - $ref: '../components/parameters/Page.yaml' + - $ref: '../components/parameters/PerPage.yaml' + - $ref: '../components/parameters/OrderBy.yaml' - name: guids in: query schema: @@ -35,8 +35,12 @@ responses: '200': description: OK + content: + application/json: + schema: + $ref: '../components/schemas/OrganizationQuotaList.yaml' '401': - $ref: '#/components/responses/Unauthorized' + $ref: '../components/responses/Unauthorized.yaml' post: summary: Create an organization quota description: This endpoint creates a new organization quota, but does not assign it to a specific organization unless an organization GUID is provided in the relationships.organizations parameter. @@ -44,17 +48,18 @@ tags: - Organization Quotas requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OrganizationQuota' + $ref: '../components/requestBodies/OrganizationQuotaCreateRequestBody.yaml' responses: '201': description: Created + content: + application/json: + schema: + $ref: '../components/schemas/OrganizationQuota.yaml' '401': - $ref: '#/components/responses/Unauthorized' + $ref: '../components/responses/Unauthorized.yaml' '422': - $ref: '#/components/responses/UnprocessableEntity' + $ref: '../components/responses/UnprocessableEntity.yaml' /v3/organization_quotas/{guid}: get: summary: Get an organization quota @@ -63,12 +68,16 @@ tags: - Organization Quotas parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' responses: '200': description: OK + content: + application/json: + schema: + $ref: '../components/schemas/OrganizationQuota.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' patch: summary: Update an organization quota description: This endpoint will only update the parameters specified in the request body. Any unspecified parameters will retain their existing values. @@ -76,19 +85,20 @@ tags: - Organization Quotas parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/OrganizationQuota' + $ref: '../components/requestBodies/OrganizationQuotaUpdateRequestBody.yaml' responses: '200': description: OK + content: + application/json: + schema: + $ref: '../components/schemas/OrganizationQuota.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' '422': - $ref: '#/components/responses/UnprocessableEntity' + $ref: '../components/responses/UnprocessableEntity.yaml' delete: summary: Delete an organization quota description: Organization quotas cannot be deleted when applied to any organizations. @@ -96,12 +106,12 @@ tags: - Organization Quotas parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' responses: '202': description: Accepted '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' /v3/organization_quotas/{quota_guid}/relationships/organizations: post: summary: Apply an organization quota to an organization @@ -120,9 +130,13 @@ content: application/json: schema: - $ref: '#/components/schemas/RelationshipToMany' + $ref: '../components/schemas/RelationshipToMany.yaml' responses: '200': description: OK + content: + application/json: + schema: + $ref: '../components/schemas/RelationshipToMany.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' diff --git a/apis/cf/latest/paths/Organizations.yaml b/apis/cf/latest/paths/Organizations.yaml index c8fcb1a..d8dd1c4 100644 --- a/apis/cf/latest/paths/Organizations.yaml +++ b/apis/cf/latest/paths/Organizations.yaml @@ -6,12 +6,12 @@ tags: - Organizations parameters: - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/OrderBy' - - $ref: '#/components/parameters/CreatedAts' - - $ref: '#/components/parameters/UpdatedAts' - - $ref: '#/components/parameters/LabelSelector' + - $ref: '../components/parameters/Page.yaml' + - $ref: '../components/parameters/PerPage.yaml' + - $ref: '../components/parameters/OrderBy.yaml' + - $ref: '../components/parameters/CreatedAts.yaml' + - $ref: '../components/parameters/UpdatedAts.yaml' + - $ref: '../components/parameters/LabelSelector.yaml' - name: names in: query schema: @@ -29,8 +29,12 @@ responses: '200': description: OK + content: + application/json: + schema: + $ref: '../components/schemas/OrganizationList.yaml' '401': - $ref: '#/components/responses/Unauthorized' + $ref: '../components/responses/Unauthorized.yaml' post: summary: Create an organization description: Create a new organization. @@ -38,25 +42,18 @@ tags: - Organizations requestBody: - content: - application/json: - schema: - properties: - name: - type: string - suspended: - type: boolean - metadata: - $ref: '#/components/schemas/metadata' - required: - - name + $ref: '../components/requestBodies/OrganizationCreateRequestBody.yaml' responses: '201': description: Created + content: + application/json: + schema: + $ref: '../components/schemas/Organization.yaml' '401': - $ref: '#/components/responses/Unauthorized' + $ref: '../components/responses/Unauthorized.yaml' '422': - $ref: '#/components/responses/UnprocessableEntity' + $ref: '../components/responses/UnprocessableEntity.yaml' /v3/organizations/{guid}: get: summary: Get an organization @@ -65,12 +62,16 @@ tags: - Organizations parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' responses: '200': description: OK + content: + application/json: + schema: + $ref: '../components/schemas/Organization.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' patch: summary: Update an organization description: Update an organization. @@ -78,25 +79,20 @@ tags: - Organizations parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' requestBody: - content: - application/json: - schema: - properties: - name: - type: string - suspended: - type: boolean - metadata: - $ref: '#/components/schemas/metadata' + $ref: '../components/requestBodies/OrganizationUpdateRequestBody.yaml' responses: '200': description: OK + content: + application/json: + schema: + $ref: '../components/schemas/Organization.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' '422': - $ref: '#/components/responses/UnprocessableEntity' + $ref: '../components/responses/UnprocessableEntity.yaml' delete: summary: Delete an organization description: When an organization is deleted, user roles associated with the organization will also be deleted. @@ -104,12 +100,12 @@ tags: - Organizations parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' responses: '202': description: Accepted '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' /v3/organizations/{guid}/domains/default: get: summary: Get default domain @@ -118,26 +114,56 @@ tags: - Organizations parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' responses: '200': description: OK + content: + application/json: + schema: + $ref: '../components/schemas/Domain.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' /v3/organizations/{guid}/usage_summary: get: summary: Get usage summary - description: This endpoint retrieves the specified organization object’s memory and app instance usage summary. + description: This endpoint retrieves the specified organization object's memory and app instance usage summary. operationId: getUsageSummaryForOrganization tags: - Organizations parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' responses: '200': description: OK + content: + application/json: + schema: + type: object + properties: + usage_summary: + type: object + properties: + started_instances: + type: integer + memory_in_mb: + type: integer + routes: + type: integer + service_instances: + type: integer + reserved_ports: + type: integer + domains: + type: integer + per_app_tasks: + type: integer + service_keys: + type: integer + links: + $ref: '../components/schemas/Links.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' /v3/organizations/{guid}/users: get: summary: List users for an organization @@ -146,10 +172,10 @@ tags: - Organizations parameters: - - $ref: '#/components/parameters/GUID' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/OrderBy' + - $ref: '../components/parameters/Guid.yaml' + - $ref: '../components/parameters/Page.yaml' + - $ref: '../components/parameters/PerPage.yaml' + - $ref: '../components/parameters/OrderBy.yaml' - name: guids in: query schema: @@ -178,14 +204,18 @@ items: type: string description: Comma-delimited list of partial usernames to filter by - - $ref: '#/components/parameters/LabelSelector' - - $ref: '#/components/parameters/CreatedAts' - - $ref: '#/components/parameters/UpdatedAts' + - $ref: '../components/parameters/LabelSelector.yaml' + - $ref: '../components/parameters/CreatedAts.yaml' + - $ref: '../components/parameters/UpdatedAts.yaml' responses: '200': description: OK + content: + application/json: + schema: + $ref: '../components/schemas/UserList.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' /v3/organizations/{guid}/relationships/default_isolation_segment: get: summary: Get default isolation segment @@ -194,16 +224,16 @@ tags: - Organizations parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/RelationshipToOne' + $ref: '../components/schemas/RelationshipToOne.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' patch: summary: Assign default isolation segment description: Set the default isolation segment for a given organization. @@ -211,18 +241,18 @@ tags: - Organizations parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' requestBody: content: application/json: schema: - $ref: '#/components/schemas/RelationshipToOne' + $ref: '../components/schemas/RelationshipToOne.yaml' responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/RelationshipToOne' + $ref: '../components/schemas/RelationshipToOne.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' diff --git a/apis/cf/latest/paths/Packages.yaml b/apis/cf/latest/paths/Packages.yaml index e025d60..605b5ee 100644 --- a/apis/cf/latest/paths/Packages.yaml +++ b/apis/cf/latest/paths/Packages.yaml @@ -6,12 +6,12 @@ tags: - Packages parameters: - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/OrderBy' - - $ref: '#/components/parameters/CreatedAts' - - $ref: '#/components/parameters/UpdatedAts' - - $ref: '#/components/parameters/LabelSelector' + - $ref: '../components/parameters/Page.yaml' + - $ref: '../components/parameters/PerPage.yaml' + - $ref: '../components/parameters/OrderBy.yaml' + - $ref: '../components/parameters/CreatedAts.yaml' + - $ref: '../components/parameters/UpdatedAts.yaml' + - $ref: '../components/parameters/LabelSelector.yaml' - name: guids in: query schema: @@ -60,9 +60,9 @@ content: application/json: schema: - $ref: '#/components/schemas/PackageList' + $ref: '../components/schemas/PackageList.yaml' '401': - $ref: '#/components/responses/Unauthorized' + $ref: '../components/responses/Unauthorized.yaml' post: summary: Create a package description: Create a new package. @@ -70,22 +70,22 @@ tags: - Packages requestBody: - $ref: '#/components/requestBodies/packageCreateRequestBody' + $ref: '../components/requestBodies/PackageCreateRequestBody.yaml' responses: '201': description: Successfully created package content: application/json: schema: - $ref: '#/components/schemas/Package' + $ref: '../components/schemas/Package.yaml' '400': - $ref: '#/components/responses/BadRequest' + $ref: '../components/responses/BadRequest.yaml' '401': - $ref: '#/components/responses/Unauthorized' + $ref: '../components/responses/Unauthorized.yaml' '403': - $ref: '#/components/responses/Forbidden' + $ref: '../components/responses/Forbidden.yaml' '422': - $ref: '#/components/responses/UnprocessableEntity' + $ref: '../components/responses/UnprocessableEntity.yaml' /v3/packages/{guid}: get: summary: Get a package @@ -94,87 +94,16 @@ tags: - Packages parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' responses: '200': description: Successfully retrieved package content: application/json: schema: - $ref: '#/components/schemas/Package' + $ref: '../components/schemas/Package.yaml' '404': - $ref: '#/components/responses/NotFound' -/v3/apps/{app_guid}/packages: - get: - summary: List packages for an app - description: Retrieve packages for an app that the user has access to. - operationId: listAppPackages - tags: - - Packages - parameters: - - $ref: '#/components/parameters/GUID' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/OrderBy' - - name: states - in: query - schema: - type: array - items: - type: string - description: Comma-delimited list of package states to filter by - - name: types - in: query - schema: - type: array - items: - type: string - description: Comma-delimited list of package types to filter by - responses: - '200': - description: OK - content: - application/json: - schema: - $ref: '#/components/schemas/PackageList' - '404': - $ref: '#/components/responses/NotFound' - patch: - summary: Update a package - description: Update attributes of a specific package by its GUID. - operationId: updatePackage - tags: - - Packages - parameters: - - $ref: '#/components/parameters/GUID' - requestBody: - $ref: '#/components/requestBodies/packageUpdateRequestBody' - responses: - '200': - description: Successfully updated package - content: - application/json: - schema: - $ref: '#/components/schemas/Package' - '404': - $ref: '#/components/responses/NotFound' - delete: - summary: Delete a package - description: Delete a specific package by its GUID. - operationId: deletePackage - tags: - - Packages - parameters: - - $ref: '#/components/parameters/GUID' - responses: - '202': - description: Successfully deleted package - content: - application/json: - schema: - $ref: '#/components/schemas/job' - '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' /v3/packages/{guid}/upload: post: summary: Upload package bits @@ -183,18 +112,18 @@ tags: - Packages parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' requestBody: - $ref: '#/components/requestBodies/packageUploadRequestBody' + $ref: '../components/requestBodies/PackageUploadRequestBody.yaml' responses: '200': description: Successfully uploaded package bits content: application/json: schema: - $ref: '#/components/schemas/Package' + $ref: '../components/schemas/Package.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' /v3/packages/{guid}/download: get: summary: Download package bits @@ -203,12 +132,12 @@ tags: - Packages parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' responses: '302': description: Redirect to download location '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' /v3/packages?source_guid={source_guid}: post: summary: Copy a package @@ -233,7 +162,7 @@ type: object properties: relationships: - $ref: '#/components/schemas/relationships' + $ref: '../components/schemas/Relationships.yaml' required: - relationships description: Request schema for copying a package @@ -243,6 +172,48 @@ content: application/json: schema: - $ref: '#/components/schemas/Package' + $ref: '../components/schemas/Package.yaml' + '404': + $ref: '../components/responses/NotFound.yaml' +/v3/apps/{guid}/packages: + get: + summary: List packages for an app + description: Retrieve packages for an app that the user has access to. + operationId: listAppPackages + tags: + - Packages + parameters: + - $ref: '../components/parameters/Guid.yaml' + - name: guids + in: query + schema: + type: array + items: + type: string + description: Comma-delimited list of app GUIDs to filter by + - $ref: '../components/parameters/Page.yaml' + - $ref: '../components/parameters/PerPage.yaml' + - $ref: '../components/parameters/OrderBy.yaml' + - name: states + in: query + schema: + type: array + items: + type: string + description: Comma-delimited list of package states to filter by + - name: types + in: query + schema: + type: array + items: + type: string + description: Comma-delimited list of package types to filter by + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '../components/schemas/PackageList.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' \ No newline at end of file diff --git a/apis/cf/latest/paths/Processes.yaml b/apis/cf/latest/paths/Processes.yaml index 7e9fee2..82f5697 100644 --- a/apis/cf/latest/paths/Processes.yaml +++ b/apis/cf/latest/paths/Processes.yaml @@ -6,12 +6,12 @@ tags: - Processes parameters: - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/OrderBy' - - $ref: '#/components/parameters/CreatedAts' - - $ref: '#/components/parameters/UpdatedAts' - - $ref: '#/components/parameters/LabelSelector' + - $ref: '../components/parameters/Page.yaml' + - $ref: '../components/parameters/PerPage.yaml' + - $ref: '../components/parameters/OrderBy.yaml' + - $ref: '../components/parameters/CreatedAts.yaml' + - $ref: '../components/parameters/UpdatedAts.yaml' + - $ref: '../components/parameters/LabelSelector.yaml' - name: guids in: query schema: @@ -53,9 +53,9 @@ content: application/json: schema: - $ref: '#/components/schemas/ProcessList' + $ref: '../components/schemas/ProcessList.yaml' '401': - $ref: '#/components/responses/Unauthorized' + $ref: '../components/responses/Unauthorized.yaml' /v3/processes/{guid}: get: summary: Get a process @@ -64,16 +64,16 @@ tags: - Processes parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Process' + $ref: '../components/schemas/Process.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' patch: summary: Update a process description: Update a process. @@ -81,29 +81,20 @@ tags: - Processes parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' requestBody: - content: - application/json: - schema: - properties: - command: - type: string - health_check: - $ref: '#/components/schemas/HealthCheck' - metadata: - $ref: '#/components/schemas/Metadata' + $ref: '../components/requestBodies/ProcessUpdateRequestBody.yaml' responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/Process' + $ref: '../components/schemas/Process.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' '422': - $ref: '#/components/responses/UnprocessableEntity' + $ref: '../components/responses/UnprocessableEntity.yaml' /v3/processes/{guid}/stats: get: summary: Get stats for a process @@ -112,16 +103,16 @@ tags: - Processes parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/ProcessStats' + $ref: '../components/schemas/ProcessStats.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' /v3/processes/{guid}/actions/scale: post: summary: Scale a process @@ -130,7 +121,7 @@ tags: - Processes parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' requestBody: content: application/json: @@ -150,11 +141,11 @@ content: application/json: schema: - $ref: '#/components/schemas/Process' + $ref: '../components/schemas/Process.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' '422': - $ref: '#/components/responses/UnprocessableEntity' + $ref: '../components/responses/UnprocessableEntity.yaml' /v3/processes/{guid}/instances/{index}: delete: summary: Terminate a process instance @@ -163,7 +154,7 @@ tags: - Processes parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' - name: index in: path required: true @@ -173,7 +164,7 @@ '204': description: No Content '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' /v3/apps/{guid}/processes: get: summary: List processes for an app @@ -182,19 +173,19 @@ tags: - Processes parameters: - - $ref: '#/components/parameters/GUID' - - $ref: '#/components/parameters/Page' - - $ref: '#/components/parameters/PerPage' - - $ref: '#/components/parameters/OrderBy' + - $ref: '../components/parameters/Guid.yaml' + - $ref: '../components/parameters/Page.yaml' + - $ref: '../components/parameters/PerPage.yaml' + - $ref: '../components/parameters/OrderBy.yaml' responses: '200': description: OK content: application/json: schema: - $ref: '#/components/schemas/ProcessList' + $ref: '../components/schemas/ProcessList.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' /v3/apps/{guid}/processes/{type}: get: summary: Get a process for an app @@ -203,7 +194,7 @@ tags: - Processes parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' - name: type in: path required: true @@ -215,9 +206,9 @@ content: application/json: schema: - $ref: '#/components/schemas/Process' + $ref: '../components/schemas/Process.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' /v3/apps/{guid}/processes/{type}/stats: get: summary: Get stats for a process for an app @@ -226,7 +217,7 @@ tags: - Processes parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' - name: type in: path required: true @@ -238,9 +229,9 @@ content: application/json: schema: - $ref: '#/components/schemas/ProcessStats' + $ref: '../components/schemas/ProcessStats.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' /v3/apps/{guid}/processes/{type}/actions/scale: post: summary: Scale a process for an app @@ -249,7 +240,7 @@ tags: - Processes parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' - name: type in: path required: true @@ -274,11 +265,11 @@ content: application/json: schema: - $ref: '#/components/schemas/Process' + $ref: '../components/schemas/Process.yaml' '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' '422': - $ref: '#/components/responses/UnprocessableEntity' + $ref: '../components/responses/UnprocessableEntity.yaml' /v3/apps/{guid}/processes/{type}/instances/{index}: delete: summary: Terminate a process instance for an app @@ -287,7 +278,7 @@ tags: - Processes parameters: - - $ref: '#/components/parameters/GUID' + - $ref: '../components/parameters/Guid.yaml' - name: type in: path required: true @@ -302,4 +293,4 @@ '204': description: No Content '404': - $ref: '#/components/responses/NotFound' + $ref: '../components/responses/NotFound.yaml' diff --git a/apis/cf/latest/paths/Routes.yaml b/apis/cf/latest/paths/Routes.yaml index ce6991e..4929b64 100644 --- a/apis/cf/latest/paths/Routes.yaml +++ b/apis/cf/latest/paths/Routes.yaml @@ -297,6 +297,8 @@ operationId: createRoute tags: - Routes + parameters: + - $ref: '../components/parameters/Guid.yaml' requestBody: $ref: '../components/requestBodies/RouteCreateRequestBody.yaml' responses: diff --git a/apis/cf/latest/paths/SecurityGroups.yaml b/apis/cf/latest/paths/SecurityGroups.yaml index 9be27b2..9321ea6 100644 --- a/apis/cf/latest/paths/SecurityGroups.yaml +++ b/apis/cf/latest/paths/SecurityGroups.yaml @@ -104,11 +104,11 @@ $ref: ../components/schemas/SecurityGroup.yaml '404': $ref: ../components/responses/NotFound.yaml -/v3/spaces/{space_guid}/running_security_groups: +/v3/spaces/{guid}/running_security_groups: get: summary: List running security groups for a space description: This endpoint returns security groups that are enabled for running globally or at the space level for the given space. - operationId: listRunningSecurityGroupsForSpace + operationId: listRunningSecurityGroupsForSpaceBySpaceGuid tags: - Security Groups parameters: @@ -122,11 +122,11 @@ $ref: ../components/schemas/SecurityGroupList.yaml '404': $ref: ../components/responses/NotFound.yaml -/v3/spaces/{space_guid}/staging_security_groups: +/v3/spaces/{guid}/staging_security_groups: get: summary: List staging security groups for a space description: This endpoint returns security groups that are enabled for staging globally or at the space level for the given space. - operationId: listStagingSecurityGroupsForSpace + operationId: listStagingSecurityGroupsForSpaceBySpaceGuid tags: - Security Groups parameters: @@ -139,7 +139,7 @@ schema: $ref: ../components/schemas/SecurityGroupList.yaml '404': - $ref: ../components/responses/NotFound.yaml' + $ref: ../components/responses/NotFound.yaml patch: summary: Update a security group description: This endpoint will only update the parameters specified in the request body. Any unspecified parameters will retain their existing values. Updates to the `rules` parameter will fully replace the current set of `rules` for the security group. Updates to the `globally_enabled` parameter will be merged with the existing configuration. For example, an update to the `running` parameter will not affect the `staging` configuration. @@ -207,12 +207,7 @@ - Security Groups parameters: - $ref: ../components/parameters/Guid.yaml - - name: space_guid - in: path - required: true - schema: - type: string - format: uuid + - $ref: ../components/parameters/SpaceGuid.yaml responses: '204': description: No Content @@ -250,12 +245,7 @@ - Security Groups parameters: - $ref: ../components/parameters/Guid.yaml - - name: space_guid - in: path - required: true - schema: - type: string - format: uuid + - $ref: ../components/parameters/SpaceGuid.yaml responses: '204': description: No Content diff --git a/apis/cf/latest/paths/Sidecars.yaml b/apis/cf/latest/paths/Sidecars.yaml index f433c16..0f1eed8 100644 --- a/apis/cf/latest/paths/Sidecars.yaml +++ b/apis/cf/latest/paths/Sidecars.yaml @@ -40,7 +40,7 @@ $ref: '../components/responses/NotFound.yaml' '422': $ref: '../components/responses/UnprocessableEntity.yaml' -/v3/apps/{app_guid}/sidecars: +/v3/apps/{guid}/sidecars: get: summary: List sidecars for app description: Retrieves all sidecars associated with a app. @@ -48,12 +48,7 @@ tags: - Sidecars parameters: - - name: app_guid - in: path - required: true - schema: - type: string - format: uuid + - $ref: '../components/parameters/Guid.yaml' responses: '200': description: OK @@ -70,12 +65,7 @@ tags: - Sidecars parameters: - - name: app_guid - in: path - required: true - schema: - type: string - format: uuid + - $ref: '../components/parameters/Guid.yaml' requestBody: content: application/json: @@ -92,7 +82,7 @@ $ref: '../components/responses/NotFound.yaml' '422': $ref: '../components/responses/UnprocessableEntity.yaml' -/v3/processes/{process_guid}/sidecars: +/v3/processes/{guid}/sidecars: get: summary: List sidecars for process description: Retrieves all sidecars associated with a process. diff --git a/apis/cf/latest/paths/Spaces.yaml b/apis/cf/latest/paths/Spaces.yaml index 75bcaf3..9d3b682 100644 --- a/apis/cf/latest/paths/Spaces.yaml +++ b/apis/cf/latest/paths/Spaces.yaml @@ -56,10 +56,7 @@ tags: - Spaces requestBody: - content: - application/json: - schema: - $ref: '../components/schemas/Space.yaml' + $ref: '../components/requestBodies/SpaceCreateRequestBody.yaml' responses: '201': description: Created @@ -132,10 +129,7 @@ parameters: - $ref: '../components/parameters/Guid.yaml' requestBody: - content: - application/json: - schema: - $ref: '../components/schemas/Space.yaml' + $ref: '../components/requestBodies/SpaceUpdateRequestBody.yaml' responses: '200': description: OK diff --git a/apis/cf/latest/paths/Tasks.yaml b/apis/cf/latest/paths/Tasks.yaml index 1d76953..194d5f7 100644 --- a/apis/cf/latest/paths/Tasks.yaml +++ b/apis/cf/latest/paths/Tasks.yaml @@ -70,7 +70,7 @@ $ref: '../components/schemas/TaskList.yaml' '401': $ref: '../components/responses/Unauthorized.yaml' -/v3/apps/{app_guid}/tasks: +/v3/apps/{guid}/tasks: post: summary: Create a task description: Create a new task. @@ -78,12 +78,7 @@ tags: - Tasks parameters: - - name: app_guid - in: path - required: true - schema: - type: string - format: uuid + - $ref: '../components/parameters/Guid.yaml' requestBody: content: application/json: