Skip to content

Commit

Permalink
Manual Spec Patch: * Correct Fabricv4 API Spec via patching to use va…
Browse files Browse the repository at this point in the history
…lid any type. * Add custom portResponseProject for customer bug fix until all PDS accounts are migrated. * Remove required field from project model until API fixes response for PDS Users. * Remove required field from port response.
  • Loading branch information
jkallem-equinix committed Jul 17, 2024
1 parent 58ddcc7 commit cdd9540
Show file tree
Hide file tree
Showing 4 changed files with 178 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
diff --git a/spec/services/fabricv4/oas3.patched/swagger.yaml b/spec/services/fabricv4/oas3.patched/swagger.yaml
index 4608d7b..920b724 100644
--- a/spec/services/fabricv4/oas3.patched/swagger.yaml
+++ b/spec/services/fabricv4/oas3.patched/swagger.yaml
@@ -8868,7 +8868,7 @@ components:
operation:
$ref: "#/components/schemas/PortOperation"
account:
- $ref: "#/components/schemas/SimplifiedAccount"
+ $ref: "#/components/schemas/SimplifiedAccountPortResponse"
changelog:
$ref: "#/components/schemas/Changelog"
serviceType:
@@ -8955,6 +8955,9 @@ components:
description: Port is the Request Object for Creating Fabric Ports
allOf:
- $ref: "#/components/schemas/PortResponse"
+ properties:
+ account:
+ $ref: "#/components/schemas/SimplifiedAccount"
PhysicalPort:
type: object
properties:
@@ -10635,6 +10638,24 @@ components:
type: integer
description: Reseller customer organization identifier
format: int64
+ SimplifiedAccountPortResponse:
+ type: object
+ description: Temporary SimplifiedAccount for PortResponse data mismatch of all strings in account
+ allOf:
+ - $ref: "#/components/schemas/SimplifiedAccount"
+ properties:
+ accountNumber:
+ type: string
+ description: Account number
+ orgId:
+ type: string
+ description: Customer organization identifier
+ resellerAccountNumber:
+ type: string
+ description: Reseller account number
+ resellerOrgId:
+ type: string
+ description: Reseller customer organization identifier
Changelog:
type: object
properties:
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
diff --git a/spec/services/fabricv4/oas3.patched/swagger.yaml b/spec/services/fabricv4/oas3.patched/swagger.yaml
index e8b0692..4608d7b 100644
--- a/spec/services/fabricv4/oas3.patched/swagger.yaml
+++ b/spec/services/fabricv4/oas3.patched/swagger.yaml
@@ -3228,7 +3228,7 @@ paths:
content:
application/json:
schema:
- $ref: "#/components/schemas/Port"
+ $ref: "#/components/schemas/PortResponse"
examples:
portExample:
$ref: "#/components/examples/COLOSinglePortNonLagResponse"
@@ -3355,7 +3355,7 @@ paths:
content:
application/json:
schema:
- $ref: "#/components/schemas/Port"
+ $ref: "#/components/schemas/PortResponse"
examples:
portExample:
$ref: "#/components/examples/portByUUID"
@@ -8800,18 +8800,9 @@ components:
type: array
description: GET All User Port Across Fabric Metros
items:
- $ref: "#/components/schemas/Port"
+ $ref: "#/components/schemas/PortResponse"
description: GET All User Port Across Fabric Metros
- Port:
- required:
- - account
- - connectivitySourceType
- - encapsulation
- - location
- - physicalPortsSpeed
- - physicalPortsType
- - settings
- - type
+ PortResponse:
type: object
properties:
type:
@@ -8949,7 +8940,21 @@ components:
description: Port Loas
items:
$ref: "#/components/schemas/PortLoa"
- description: Port specification
+ description: Port response specification
+ Port:
+ required:
+ - account
+ - connectivitySourceType
+ - encapsulation
+ - location
+ - physicalPortsSpeed
+ - physicalPortsType
+ - settings
+ - type
+ type: object
+ description: Port is the Request Object for Creating Fabric Ports
+ allOf:
+ - $ref: "#/components/schemas/PortResponse"
PhysicalPort:
type: object
properties:
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/spec/services/fabricv4/oas3.patched/swagger.yaml b/spec/services/fabricv4/oas3.patched/swagger.yaml
index 403295f..53e4acf 100644
--- a/spec/services/fabricv4/oas3.patched/swagger.yaml
+++ b/spec/services/fabricv4/oas3.patched/swagger.yaml
@@ -10711,8 +10711,6 @@ components:
$ref: "#/components/schemas/ConnectionSideAdditionalInfo"
description: Connection configuration object for each side of multi-segment connection
Project:
- required:
- - projectId
type: object
properties:
projectId:
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
diff --git a/spec/services/fabricv4/oas3.patched/swagger.yaml b/spec/services/fabricv4/oas3.patched/swagger.yaml
index d552403..761c5fa 100644
--- a/spec/services/fabricv4/oas3.patched/swagger.yaml
+++ b/spec/services/fabricv4/oas3.patched/swagger.yaml
@@ -10304,7 +10304,6 @@ components:
- /advanceConfiguration/ptp
- /package
value:
- type: object
description: new value for updated parameter
description: Fabric Precision Timing change operation data
precisionTimeServiceRequest:
@@ -10723,7 +10722,6 @@ components:
description: path inside document leading to updated parameter
example: /ipv6
value:
- type: object
description: new value for updated parameter
description: Connection change operation data
Actions:
@@ -11174,7 +11172,6 @@ components:
description: path inside document leading to updated parameter
example: /expirationDateTime
value:
- type: object
description: new value for updated parameter
description: Service Token change operation data
ServiceTokenActions:
@@ -11794,7 +11791,6 @@ components:
type: string
description: path inside document leading to updated parameter
value:
- type: object
description: new value for updated parameter
description: Fabric Cloud Router change operation data
CloudRouterActionType:
@@ -11958,7 +11954,6 @@ components:
description: path inside document leading to updated parameter
example: /name
value:
- type: object
description: new value for updated parameter
description: Network change operation data
NetworkSortCriteriaResponse:
@@ -23856,4 +23851,4 @@ components:
BearerAuth:
type: http
scheme: bearer
- bearerFormat: JWT
\ No newline at end of file
+ bearerFormat: JWT

0 comments on commit cdd9540

Please sign in to comment.