From 4c5d2e215592e149248d4976685f75d5c2748224 Mon Sep 17 00:00:00 2001 From: pl018383 Date: Tue, 26 May 2026 12:12:52 -0400 Subject: [PATCH 1/4] Add IndexLink schema to handle index link's metadata field --- .../latest/components/schemas/IndexLink.yaml | 25 ++++++++++ apis/cf/latest/paths/Root.yaml | 16 +++---- apis/cf/latest/paths/V3.yaml | 46 +++++++++---------- 3 files changed, 56 insertions(+), 31 deletions(-) create mode 100644 apis/cf/latest/components/schemas/IndexLink.yaml diff --git a/apis/cf/latest/components/schemas/IndexLink.yaml b/apis/cf/latest/components/schemas/IndexLink.yaml new file mode 100644 index 0000000..4d99c57 --- /dev/null +++ b/apis/cf/latest/components/schemas/IndexLink.yaml @@ -0,0 +1,25 @@ +type: object +properties: + href: + type: string + description: The URL of the link + method: + type: string + description: An optional field containing the HTTP method to be used when following the URL + meta: + type: object + description: Contains metadata about the link + properties: + version: + type: string + description: The version of the API + host_key_fingerprint: + type: string + description: The host key fingerprint of the link + oauth_client: + type: string + description: The oauth client for the link +required: + - href +description: | + Each link is keyed by its type and will include a href for the URL and an optional method for links that cannot be followed using GET. Can include a meta object with metadata about the link. diff --git a/apis/cf/latest/paths/Root.yaml b/apis/cf/latest/paths/Root.yaml index 0410b8f..43d47b2 100644 --- a/apis/cf/latest/paths/Root.yaml +++ b/apis/cf/latest/paths/Root.yaml @@ -19,35 +19,35 @@ get: properties: self: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the current endpoint cloud_controller_v2: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the Cloud Controller V2 API cloud_controller_v3: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the Cloud Controller V3 API network_policy_v1: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the Network Policy V1 API uaa: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the UAA API logging: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the Logging API log_cache: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the Log Cache API log_stream: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the Log Stream API '404': $ref: '../components/responses/NotFound.yaml' diff --git a/apis/cf/latest/paths/V3.yaml b/apis/cf/latest/paths/V3.yaml index 13181f7..ec30357 100644 --- a/apis/cf/latest/paths/V3.yaml +++ b/apis/cf/latest/paths/V3.yaml @@ -19,95 +19,95 @@ get: properties: self: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the current endpoint apps: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the apps endpoint builds: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the builds endpoint deployments: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the deployments endpoint domains: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the domains endpoint droplets: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the droplets endpoint feature_flags: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the feature flags endpoint info: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the info endpoint isolation_segments: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the isolation segments endpoint organizations: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the organizations endpoint packages: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the packages endpoint processes: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the processes endpoint roles: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the roles endpoint routes: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the routes endpoint security_groups: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the security groups endpoint service_brokers: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the service brokers endpoint service_instances: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the service instances endpoint service_offerings: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the service offerings endpoint service_plans: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the service plans endpoint spaces: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the spaces endpoint stacks: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the stacks endpoint tasks: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the tasks endpoint users: allOf: - - $ref: '../components/schemas/Link.yaml' + - $ref: '../components/schemas/IndexLink.yaml' - description: Link to the users endpoint '404': $ref: '../components/responses/NotFound.yaml' From 51259e4d354680d8d771967a91cf875bf8cb7a6e Mon Sep 17 00:00:00 2001 From: Peter Levine Date: Tue, 26 May 2026 13:07:03 -0400 Subject: [PATCH 2/4] Reduce Schema Drift and have IndexLink inherit from link Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .../latest/components/schemas/IndexLink.yaml | 38 ++++++++----------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/apis/cf/latest/components/schemas/IndexLink.yaml b/apis/cf/latest/components/schemas/IndexLink.yaml index 4d99c57..33988b1 100644 --- a/apis/cf/latest/components/schemas/IndexLink.yaml +++ b/apis/cf/latest/components/schemas/IndexLink.yaml @@ -1,25 +1,19 @@ -type: object -properties: - href: - type: string - description: The URL of the link - method: - type: string - description: An optional field containing the HTTP method to be used when following the URL - meta: - type: object - description: Contains metadata about the link +allOf: + - $ref: ../components/schemas/Link.yaml + - type: object properties: - version: - type: string - description: The version of the API - host_key_fingerprint: - type: string - description: The host key fingerprint of the link - oauth_client: - type: string - description: The oauth client for the link -required: - - href + meta: + type: object + description: Contains metadata about the link + properties: + version: + type: string + description: The version of the API + host_key_fingerprint: + type: string + description: The host key fingerprint of the link + oauth_client: + type: string + description: The oauth client for the link description: | Each link is keyed by its type and will include a href for the URL and an optional method for links that cannot be followed using GET. Can include a meta object with metadata about the link. From 5f189c4a24a5026c7f0f9a032bed8224a4a968b6 Mon Sep 17 00:00:00 2001 From: pl018383 Date: Tue, 26 May 2026 13:10:42 -0400 Subject: [PATCH 3/4] V3 api root does not have the meta field --- apis/cf/latest/paths/V3.yaml | 46 ++++++++++++++++++------------------ 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/apis/cf/latest/paths/V3.yaml b/apis/cf/latest/paths/V3.yaml index ec30357..13181f7 100644 --- a/apis/cf/latest/paths/V3.yaml +++ b/apis/cf/latest/paths/V3.yaml @@ -19,95 +19,95 @@ get: properties: self: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the current endpoint apps: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the apps endpoint builds: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the builds endpoint deployments: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the deployments endpoint domains: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the domains endpoint droplets: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the droplets endpoint feature_flags: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the feature flags endpoint info: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the info endpoint isolation_segments: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the isolation segments endpoint organizations: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the organizations endpoint packages: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the packages endpoint processes: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the processes endpoint roles: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the roles endpoint routes: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the routes endpoint security_groups: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the security groups endpoint service_brokers: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the service brokers endpoint service_instances: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the service instances endpoint service_offerings: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the service offerings endpoint service_plans: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the service plans endpoint spaces: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the spaces endpoint stacks: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the stacks endpoint tasks: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the tasks endpoint users: allOf: - - $ref: '../components/schemas/IndexLink.yaml' + - $ref: '../components/schemas/Link.yaml' - description: Link to the users endpoint '404': $ref: '../components/responses/NotFound.yaml' From 88059acc9b5b8c0ece368fea25aea366442ab56c Mon Sep 17 00:00:00 2001 From: pl018383 Date: Tue, 26 May 2026 13:14:55 -0400 Subject: [PATCH 4/4] Reference to Link object --- apis/cf/latest/components/schemas/IndexLink.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/cf/latest/components/schemas/IndexLink.yaml b/apis/cf/latest/components/schemas/IndexLink.yaml index 33988b1..bb19381 100644 --- a/apis/cf/latest/components/schemas/IndexLink.yaml +++ b/apis/cf/latest/components/schemas/IndexLink.yaml @@ -1,5 +1,5 @@ allOf: - - $ref: ../components/schemas/Link.yaml + - $ref: ./Link.yaml - type: object properties: meta: