From ccd56078d8816a82a07949de886fe632a1c7a645 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 12 Oct 2023 11:27:46 -0500 Subject: [PATCH] feat: API Sync by GitHub Action (2023-10-12) (#161) This API Sync PR was automated through [GitHub Actions workflow_displatch](https://github.com/equinix-labs/metal-go/actions?query=event%3Aworkflow_dispatch) on 2023-10-12. * latest Swagger is fetched * patches have been applied * generated client has been updated --------- Co-authored-by: github-actions[bot] --- equinix-openapi-metal/api/openapi.yaml | 12 +--- equinix-openapi-metal/docs/VirtualCircuit.md | 22 +++---- .../docs/VlanVirtualCircuit.md | 20 +++---- .../docs/VrfVirtualCircuit.md | 2 +- .../metal/v1/model/VlanVirtualCircuit.java | 58 ++++++++----------- .../metal/v1/model/VrfVirtualCircuit.java | 16 +++-- .../schemas/VlanVirtualCircuit.yaml | 10 ---- .../components/schemas/VrfVirtualCircuit.yaml | 2 + .../schemas/VlanVirtualCircuit.yaml | 10 ---- .../components/schemas/VrfVirtualCircuit.yaml | 2 + 10 files changed, 64 insertions(+), 90 deletions(-) diff --git a/equinix-openapi-metal/api/openapi.yaml b/equinix-openapi-metal/api/openapi.yaml index 730d8136d..f2ed02952 100644 --- a/equinix-openapi-metal/api/openapi.yaml +++ b/equinix-openapi-metal/api/openapi.yaml @@ -23710,17 +23710,7 @@ components: format: date-time type: string required: - - bill - - description - - id - - name - - nni_vlan - - port - - project - - status - - tags - virtual_network - - vnid type: object VlanVirtualCircuitCreateInput: properties: @@ -27812,6 +27802,8 @@ components: updated_at: format: date-time type: string + required: + - vrf type: object VrfVirtualCircuitCreateInput: properties: diff --git a/equinix-openapi-metal/docs/VirtualCircuit.md b/equinix-openapi-metal/docs/VirtualCircuit.md index a7e5c5b14..b2ce09eb6 100644 --- a/equinix-openapi-metal/docs/VirtualCircuit.md +++ b/equinix-openapi-metal/docs/VirtualCircuit.md @@ -7,18 +7,18 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**bill** | **Boolean** | True if the Virtual Circuit is being billed. Currently, only Virtual Circuits of Fabric VCs (Metal Billed) will be billed. Usage will start the first time the Virtual Circuit becomes active, and will not stop until it is deleted from Metal. | | -|**description** | **String** | | | -|**id** | **UUID** | | | -|**name** | **String** | | | -|**nniVlan** | **Integer** | | | -|**port** | [**Href**](Href.md) | | | -|**project** | [**Href**](Href.md) | | | +|**bill** | **Boolean** | True if the Virtual Circuit is being billed. Currently, only Virtual Circuits of Fabric VCs (Metal Billed) will be billed. Usage will start the first time the Virtual Circuit becomes active, and will not stop until it is deleted from Metal. | [optional] | +|**description** | **String** | | [optional] | +|**id** | **UUID** | | [optional] | +|**name** | **String** | | [optional] | +|**nniVlan** | **Integer** | | [optional] | +|**port** | [**Href**](Href.md) | | [optional] | +|**project** | [**Href**](Href.md) | | [optional] | |**speed** | **Integer** | integer representing bps speed | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The status changes of a VRF virtual circuit are generally the same as Virtual Circuits that aren't in a VRF. However, for VRF Virtual Circuits on Fabric VCs, the status will change to 'waiting_on_peering_details' once the Fabric service token associated with the virtual circuit has been redeemed on Fabric, and Metal has found the associated Fabric connection. At this point, users can update the subnet, MD5 password, customer IP and/or metal IP accordingly. For VRF Virtual Circuits on Dedicated Ports, we require all peering details to be set on creation of a VRF Virtual Circuit. The status will change to `changing_peering_details` whenever an active VRF Virtual Circuit has any of its peering details updated. | | -|**tags** | **List<String>** | | | +|**status** | [**StatusEnum**](#StatusEnum) | The status changes of a VRF virtual circuit are generally the same as Virtual Circuits that aren't in a VRF. However, for VRF Virtual Circuits on Fabric VCs, the status will change to 'waiting_on_peering_details' once the Fabric service token associated with the virtual circuit has been redeemed on Fabric, and Metal has found the associated Fabric connection. At this point, users can update the subnet, MD5 password, customer IP and/or metal IP accordingly. For VRF Virtual Circuits on Dedicated Ports, we require all peering details to be set on creation of a VRF Virtual Circuit. The status will change to `changing_peering_details` whenever an active VRF Virtual Circuit has any of its peering details updated. | [optional] | +|**tags** | **List<String>** | | [optional] | |**virtualNetwork** | [**Href**](Href.md) | | | -|**vnid** | **Integer** | | | +|**vnid** | **Integer** | | [optional] | |**createdAt** | **OffsetDateTime** | | [optional] | |**updatedAt** | **OffsetDateTime** | | [optional] | |**customerIp** | **String** | An IP address from the subnet that will be used on the Customer side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Metal IP. By default, the last usable IP address in the subnet will be used. | [optional] | @@ -26,7 +26,7 @@ |**metalIp** | **String** | An IP address from the subnet that will be used on the Metal side. This parameter is optional, but if supplied, we will use the other usable IP address in the subnet as the Customer IP. By default, the first usable IP address in the subnet will be used. | [optional] | |**peerAsn** | **Integer** | The peer ASN that will be used with the VRF on the Virtual Circuit. | [optional] | |**subnet** | **String** | The /30 or /31 subnet of one of the VRF IP Blocks that will be used with the VRF for the Virtual Circuit. This subnet does not have to be an existing VRF IP reservation, as we will create the VRF IP reservation on creation if it does not exist. The Metal IP and Customer IP must be IPs from this subnet. For /30 subnets, the network and broadcast IPs cannot be used as the Metal or Customer IP. | [optional] | -|**vrf** | [**Vrf**](Vrf.md) | | [optional] | +|**vrf** | [**Vrf**](Vrf.md) | | | diff --git a/equinix-openapi-metal/docs/VlanVirtualCircuit.md b/equinix-openapi-metal/docs/VlanVirtualCircuit.md index be2370450..0311665c4 100644 --- a/equinix-openapi-metal/docs/VlanVirtualCircuit.md +++ b/equinix-openapi-metal/docs/VlanVirtualCircuit.md @@ -7,18 +7,18 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**bill** | **Boolean** | True if the Virtual Circuit is being billed. Currently, only Virtual Circuits of Fabric VCs (Metal Billed) will be billed. Usage will start the first time the Virtual Circuit becomes active, and will not stop until it is deleted from Metal. | | -|**description** | **String** | | | -|**id** | **UUID** | | | -|**name** | **String** | | | -|**nniVlan** | **Integer** | | | -|**port** | [**Href**](Href.md) | | | -|**project** | [**Href**](Href.md) | | | +|**bill** | **Boolean** | True if the Virtual Circuit is being billed. Currently, only Virtual Circuits of Fabric VCs (Metal Billed) will be billed. Usage will start the first time the Virtual Circuit becomes active, and will not stop until it is deleted from Metal. | [optional] | +|**description** | **String** | | [optional] | +|**id** | **UUID** | | [optional] | +|**name** | **String** | | [optional] | +|**nniVlan** | **Integer** | | [optional] | +|**port** | [**Href**](Href.md) | | [optional] | +|**project** | [**Href**](Href.md) | | [optional] | |**speed** | **Integer** | For Virtual Circuits on shared and dedicated connections, this speed should match the one set on their Interconnection Ports. For Virtual Circuits on Fabric VCs (both Metal and Fabric Billed) that have found their corresponding Fabric connection, this is the actual speed of the interconnection that was configured when setting up the interconnection on the Fabric Portal. Details on Fabric VCs are included in the specification as a developer preview and is generally unavailable. Please contact our Support team for more details. | [optional] | -|**status** | [**StatusEnum**](#StatusEnum) | The status of a Virtual Circuit is always 'pending' on creation. The status can turn to 'Waiting on Customer VLAN' if a Metro VLAN was not set yet on the Virtual Circuit and is the last step needed for full activation. For Dedicated interconnections, as long as the Dedicated Port has been associated to the Virtual Circuit and a NNI VNID has been set, it will turn to 'waiting_on_customer_vlan'. For Fabric VCs, it will only change to 'waiting_on_customer_vlan' once the corresponding Fabric connection has been found on the Fabric side. If the Fabric service token associated with the Virtual Circuit hasn't been redeemed on Fabric within the expiry time, it will change to an `expired` status. Once a Metro VLAN is set on the Virtual Circuit (which for Fabric VCs, can be set on creation of a Fabric VC) and the necessary set up is done, it will turn into 'Activating' status as it tries to activate the Virtual Circuit. Once the Virtual Circuit fully activates and is configured on the switch, it will turn to staus 'active'. For Fabric VCs (Metal Billed), we will start billing the moment the status of the Virtual Circuit turns to 'active'. If there are any changes to the VLAN after the Virtual Circuit is in an 'active' status, the status will show 'changing_vlan' if a new VLAN has been provided, or 'deactivating' if we are removing the VLAN. When a deletion request is issued for the Virtual Circuit, it will move to a 'deleting' status, and we will immediately unconfigure the switch for the Virtual Circuit and issue a deletion on any associated Fabric connections. Any associated Metro VLANs on the virtual circuit will also be unassociated after the switch has been successfully unconfigured. If there are any associated Fabric connections, we will only fully delete the Virtual Circuit once we have checked that the Fabric connection was fully deprovisioned on Fabric. | | -|**tags** | **List<String>** | | | +|**status** | [**StatusEnum**](#StatusEnum) | The status of a Virtual Circuit is always 'pending' on creation. The status can turn to 'Waiting on Customer VLAN' if a Metro VLAN was not set yet on the Virtual Circuit and is the last step needed for full activation. For Dedicated interconnections, as long as the Dedicated Port has been associated to the Virtual Circuit and a NNI VNID has been set, it will turn to 'waiting_on_customer_vlan'. For Fabric VCs, it will only change to 'waiting_on_customer_vlan' once the corresponding Fabric connection has been found on the Fabric side. If the Fabric service token associated with the Virtual Circuit hasn't been redeemed on Fabric within the expiry time, it will change to an `expired` status. Once a Metro VLAN is set on the Virtual Circuit (which for Fabric VCs, can be set on creation of a Fabric VC) and the necessary set up is done, it will turn into 'Activating' status as it tries to activate the Virtual Circuit. Once the Virtual Circuit fully activates and is configured on the switch, it will turn to staus 'active'. For Fabric VCs (Metal Billed), we will start billing the moment the status of the Virtual Circuit turns to 'active'. If there are any changes to the VLAN after the Virtual Circuit is in an 'active' status, the status will show 'changing_vlan' if a new VLAN has been provided, or 'deactivating' if we are removing the VLAN. When a deletion request is issued for the Virtual Circuit, it will move to a 'deleting' status, and we will immediately unconfigure the switch for the Virtual Circuit and issue a deletion on any associated Fabric connections. Any associated Metro VLANs on the virtual circuit will also be unassociated after the switch has been successfully unconfigured. If there are any associated Fabric connections, we will only fully delete the Virtual Circuit once we have checked that the Fabric connection was fully deprovisioned on Fabric. | [optional] | +|**tags** | **List<String>** | | [optional] | |**virtualNetwork** | [**Href**](Href.md) | | | -|**vnid** | **Integer** | | | +|**vnid** | **Integer** | | [optional] | |**createdAt** | **OffsetDateTime** | | [optional] | |**updatedAt** | **OffsetDateTime** | | [optional] | diff --git a/equinix-openapi-metal/docs/VrfVirtualCircuit.md b/equinix-openapi-metal/docs/VrfVirtualCircuit.md index 7dd11be61..5a3ccf85b 100644 --- a/equinix-openapi-metal/docs/VrfVirtualCircuit.md +++ b/equinix-openapi-metal/docs/VrfVirtualCircuit.md @@ -21,7 +21,7 @@ |**status** | [**StatusEnum**](#StatusEnum) | The status changes of a VRF virtual circuit are generally the same as Virtual Circuits that aren't in a VRF. However, for VRF Virtual Circuits on Fabric VCs, the status will change to 'waiting_on_peering_details' once the Fabric service token associated with the virtual circuit has been redeemed on Fabric, and Metal has found the associated Fabric connection. At this point, users can update the subnet, MD5 password, customer IP and/or metal IP accordingly. For VRF Virtual Circuits on Dedicated Ports, we require all peering details to be set on creation of a VRF Virtual Circuit. The status will change to `changing_peering_details` whenever an active VRF Virtual Circuit has any of its peering details updated. | [optional] | |**subnet** | **String** | The /30 or /31 subnet of one of the VRF IP Blocks that will be used with the VRF for the Virtual Circuit. This subnet does not have to be an existing VRF IP reservation, as we will create the VRF IP reservation on creation if it does not exist. The Metal IP and Customer IP must be IPs from this subnet. For /30 subnets, the network and broadcast IPs cannot be used as the Metal or Customer IP. | [optional] | |**tags** | **List<String>** | | [optional] | -|**vrf** | [**Vrf**](Vrf.md) | | [optional] | +|**vrf** | [**Vrf**](Vrf.md) | | | |**createdAt** | **OffsetDateTime** | | [optional] | |**updatedAt** | **OffsetDateTime** | | [optional] | diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuit.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuit.java index f3c31303d..5bff12bf3 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuit.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VlanVirtualCircuit.java @@ -162,7 +162,7 @@ public StatusEnum read(final JsonReader jsonReader) throws IOException { public static final String SERIALIZED_NAME_TAGS = "tags"; @SerializedName(SERIALIZED_NAME_TAGS) - private List tags = new ArrayList<>(); + private List tags; public static final String SERIALIZED_NAME_VIRTUAL_NETWORK = "virtual_network"; @SerializedName(SERIALIZED_NAME_VIRTUAL_NETWORK) @@ -193,7 +193,7 @@ public VlanVirtualCircuit bill(Boolean bill) { * True if the Virtual Circuit is being billed. Currently, only Virtual Circuits of Fabric VCs (Metal Billed) will be billed. Usage will start the first time the Virtual Circuit becomes active, and will not stop until it is deleted from Metal. * @return bill **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Boolean getBill() { return bill; } @@ -214,7 +214,7 @@ public VlanVirtualCircuit description(String description) { * Get description * @return description **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getDescription() { return description; } @@ -235,7 +235,7 @@ public VlanVirtualCircuit id(UUID id) { * Get id * @return id **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public UUID getId() { return id; } @@ -256,7 +256,7 @@ public VlanVirtualCircuit name(String name) { * Get name * @return name **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public String getName() { return name; } @@ -277,7 +277,7 @@ public VlanVirtualCircuit nniVlan(Integer nniVlan) { * Get nniVlan * @return nniVlan **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getNniVlan() { return nniVlan; } @@ -298,7 +298,7 @@ public VlanVirtualCircuit port(Href port) { * Get port * @return port **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Href getPort() { return port; } @@ -319,7 +319,7 @@ public VlanVirtualCircuit project(Href project) { * Get project * @return project **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Href getProject() { return project; } @@ -361,7 +361,7 @@ public VlanVirtualCircuit status(StatusEnum status) { * The status of a Virtual Circuit is always 'pending' on creation. The status can turn to 'Waiting on Customer VLAN' if a Metro VLAN was not set yet on the Virtual Circuit and is the last step needed for full activation. For Dedicated interconnections, as long as the Dedicated Port has been associated to the Virtual Circuit and a NNI VNID has been set, it will turn to 'waiting_on_customer_vlan'. For Fabric VCs, it will only change to 'waiting_on_customer_vlan' once the corresponding Fabric connection has been found on the Fabric side. If the Fabric service token associated with the Virtual Circuit hasn't been redeemed on Fabric within the expiry time, it will change to an `expired` status. Once a Metro VLAN is set on the Virtual Circuit (which for Fabric VCs, can be set on creation of a Fabric VC) and the necessary set up is done, it will turn into 'Activating' status as it tries to activate the Virtual Circuit. Once the Virtual Circuit fully activates and is configured on the switch, it will turn to staus 'active'. For Fabric VCs (Metal Billed), we will start billing the moment the status of the Virtual Circuit turns to 'active'. If there are any changes to the VLAN after the Virtual Circuit is in an 'active' status, the status will show 'changing_vlan' if a new VLAN has been provided, or 'deactivating' if we are removing the VLAN. When a deletion request is issued for the Virtual Circuit, it will move to a 'deleting' status, and we will immediately unconfigure the switch for the Virtual Circuit and issue a deletion on any associated Fabric connections. Any associated Metro VLANs on the virtual circuit will also be unassociated after the switch has been successfully unconfigured. If there are any associated Fabric connections, we will only fully delete the Virtual Circuit once we have checked that the Fabric connection was fully deprovisioned on Fabric. * @return status **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public StatusEnum getStatus() { return status; } @@ -390,7 +390,7 @@ public VlanVirtualCircuit addTagsItem(String tagsItem) { * Get tags * @return tags **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public List getTags() { return tags; } @@ -432,7 +432,7 @@ public VlanVirtualCircuit vnid(Integer vnid) { * Get vnid * @return vnid **/ - @javax.annotation.Nonnull + @javax.annotation.Nullable public Integer getVnid() { return vnid; } @@ -619,17 +619,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); - openapiRequiredFields.add("bill"); - openapiRequiredFields.add("description"); - openapiRequiredFields.add("id"); - openapiRequiredFields.add("name"); - openapiRequiredFields.add("nni_vlan"); - openapiRequiredFields.add("port"); - openapiRequiredFields.add("project"); - openapiRequiredFields.add("status"); - openapiRequiredFields.add("tags"); openapiRequiredFields.add("virtual_network"); - openapiRequiredFields.add("vnid"); } /** @@ -652,26 +642,28 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("description").isJsonPrimitive()) { + if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString())); } - if (!jsonObj.get("id").isJsonPrimitive()) { + if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString())); } - if (!jsonObj.get("name").isJsonPrimitive()) { + if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString())); } - // validate the required field `port` - Href.validateJsonElement(jsonObj.get("port")); - // validate the required field `project` - Href.validateJsonElement(jsonObj.get("project")); - if (!jsonObj.get("status").isJsonPrimitive()) { + // validate the optional field `port` + if (jsonObj.get("port") != null && !jsonObj.get("port").isJsonNull()) { + Href.validateJsonElement(jsonObj.get("port")); + } + // validate the optional field `project` + if (jsonObj.get("project") != null && !jsonObj.get("project").isJsonNull()) { + Href.validateJsonElement(jsonObj.get("project")); + } + if ((jsonObj.get("status") != null && !jsonObj.get("status").isJsonNull()) && !jsonObj.get("status").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); } - // ensure the required json array is present - if (jsonObj.get("tags") == null) { - throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); - } else if (!jsonObj.get("tags").isJsonArray()) { + // ensure the optional json data is an array if present + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } // validate the required field `virtual_network` diff --git a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java index 3be08a2cc..e060ae1fa 100644 --- a/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java +++ b/equinix-openapi-metal/src/main/java/com/equinix/openapi/metal/v1/model/VrfVirtualCircuit.java @@ -508,7 +508,7 @@ public VrfVirtualCircuit vrf(Vrf vrf) { * Get vrf * @return vrf **/ - @javax.annotation.Nullable + @javax.annotation.Nonnull public Vrf getVrf() { return vrf; } @@ -704,6 +704,7 @@ private String toIndentedString(Object o) { // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(); + openapiRequiredFields.add("vrf"); } /** @@ -718,6 +719,13 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti throw new IllegalArgumentException(String.format("The required field(s) %s in VrfVirtualCircuit is not found in the empty JSON string", VrfVirtualCircuit.openapiRequiredFields.toString())); } } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : VrfVirtualCircuit.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format("The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } JsonObject jsonObj = jsonElement.getAsJsonObject(); if ((jsonObj.get("customer_ip") != null && !jsonObj.get("customer_ip").isJsonNull()) && !jsonObj.get("customer_ip").isJsonPrimitive()) { throw new IllegalArgumentException(String.format("Expected the field `customer_ip` to be a primitive type in the JSON string but got `%s`", jsonObj.get("customer_ip").toString())); @@ -755,10 +763,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull() && !jsonObj.get("tags").isJsonArray()) { throw new IllegalArgumentException(String.format("Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); } - // validate the optional field `vrf` - if (jsonObj.get("vrf") != null && !jsonObj.get("vrf").isJsonNull()) { - Vrf.validateJsonElement(jsonObj.get("vrf")); - } + // validate the required field `vrf` + Vrf.validateJsonElement(jsonObj.get("vrf")); } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/spec/oas3.fetched/openapi/public/components/schemas/VlanVirtualCircuit.yaml b/spec/oas3.fetched/openapi/public/components/schemas/VlanVirtualCircuit.yaml index 27f9c9ecf..75155eead 100644 --- a/spec/oas3.fetched/openapi/public/components/schemas/VlanVirtualCircuit.yaml +++ b/spec/oas3.fetched/openapi/public/components/schemas/VlanVirtualCircuit.yaml @@ -1,15 +1,5 @@ required: -- bill -- description -- id -- name -- nni_vlan -- port -- project -- status -- tags - virtual_network -- vnid properties: bill: type: boolean diff --git a/spec/oas3.fetched/openapi/public/components/schemas/VrfVirtualCircuit.yaml b/spec/oas3.fetched/openapi/public/components/schemas/VrfVirtualCircuit.yaml index 84c9c32a4..350c260e3 100644 --- a/spec/oas3.fetched/openapi/public/components/schemas/VrfVirtualCircuit.yaml +++ b/spec/oas3.fetched/openapi/public/components/schemas/VrfVirtualCircuit.yaml @@ -1,3 +1,5 @@ +required: +- vrf properties: customer_ip: description: >- diff --git a/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml b/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml index 27f9c9ecf..75155eead 100644 --- a/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml +++ b/spec/oas3.patched/openapi/public/components/schemas/VlanVirtualCircuit.yaml @@ -1,15 +1,5 @@ required: -- bill -- description -- id -- name -- nni_vlan -- port -- project -- status -- tags - virtual_network -- vnid properties: bill: type: boolean diff --git a/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml b/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml index 84c9c32a4..350c260e3 100644 --- a/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml +++ b/spec/oas3.patched/openapi/public/components/schemas/VrfVirtualCircuit.yaml @@ -1,3 +1,5 @@ +required: +- vrf properties: customer_ip: description: >-