From 7831af6bf93dc7a207b3eeb04614e1cf24c27da2 Mon Sep 17 00:00:00 2001 From: Tim Hogarty Date: Mon, 6 May 2024 14:39:53 -0700 Subject: [PATCH 1/3] Remove patch for port response project --- services/fabricv4/README.md | 1 - services/fabricv4/docs/Port.md | 8 +- services/fabricv4/docs/PortResponse.md | 8 +- services/fabricv4/docs/PortResponseProject.md | 56 ------- services/fabricv4/model_port.go | 12 +- services/fabricv4/model_port_response.go | 12 +- .../fabricv4/model_port_response_project.go | 154 ------------------ .../fabricv4/oas3.patched/swagger.yaml | 9 +- ...0429_use_custom_portresponse_project.patch | 27 --- 9 files changed, 21 insertions(+), 266 deletions(-) delete mode 100644 services/fabricv4/docs/PortResponseProject.md delete mode 100644 services/fabricv4/model_port_response_project.go delete mode 100644 spec/services/fabricv4/patches/20240429_use_custom_portresponse_project.patch diff --git a/services/fabricv4/README.md b/services/fabricv4/README.md index 500c1635..1dd0bfb6 100644 --- a/services/fabricv4/README.md +++ b/services/fabricv4/README.md @@ -385,7 +385,6 @@ Class | Method | HTTP request | Description - [PortResponseBmmrType](docs/PortResponseBmmrType.md) - [PortResponseConnectivitySourceType](docs/PortResponseConnectivitySourceType.md) - [PortResponsePhysicalPortsType](docs/PortResponsePhysicalPortsType.md) - - [PortResponseProject](docs/PortResponseProject.md) - [PortResponseServiceType](docs/PortResponseServiceType.md) - [PortSearchFieldName](docs/PortSearchFieldName.md) - [PortSettings](docs/PortSettings.md) diff --git a/services/fabricv4/docs/Port.md b/services/fabricv4/docs/Port.md index 50a5364c..55b50c65 100644 --- a/services/fabricv4/docs/Port.md +++ b/services/fabricv4/docs/Port.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes **PhysicalPortsCount** | Pointer to **int32** | | [optional] **ConnectivitySourceType** | [**PortResponseConnectivitySourceType**](PortResponseConnectivitySourceType.md) | | **BmmrType** | Pointer to [**PortResponseBmmrType**](PortResponseBmmrType.md) | | [optional] -**Project** | Pointer to [**PortResponseProject**](PortResponseProject.md) | | [optional] +**Project** | Pointer to [**Project**](Project.md) | | [optional] **State** | Pointer to [**PortState**](PortState.md) | | [optional] **Order** | Pointer to [**PortOrder**](PortOrder.md) | | [optional] **CvpId** | Pointer to **string** | Equinix assigned response attribute for Unique ID for a virtual port. | [optional] @@ -366,20 +366,20 @@ HasBmmrType returns a boolean if a field has been set. ### GetProject -`func (o *Port) GetProject() PortResponseProject` +`func (o *Port) GetProject() Project` GetProject returns the Project field if non-nil, zero value otherwise. ### GetProjectOk -`func (o *Port) GetProjectOk() (*PortResponseProject, bool)` +`func (o *Port) GetProjectOk() (*Project, bool)` GetProjectOk returns a tuple with the Project field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProject -`func (o *Port) SetProject(v PortResponseProject)` +`func (o *Port) SetProject(v Project)` SetProject sets Project field to given value. diff --git a/services/fabricv4/docs/PortResponse.md b/services/fabricv4/docs/PortResponse.md index 885d9345..1506d869 100644 --- a/services/fabricv4/docs/PortResponse.md +++ b/services/fabricv4/docs/PortResponse.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **PhysicalPortsCount** | Pointer to **int32** | | [optional] **ConnectivitySourceType** | Pointer to [**PortResponseConnectivitySourceType**](PortResponseConnectivitySourceType.md) | | [optional] **BmmrType** | Pointer to [**PortResponseBmmrType**](PortResponseBmmrType.md) | | [optional] -**Project** | Pointer to [**PortResponseProject**](PortResponseProject.md) | | [optional] +**Project** | Pointer to [**Project**](Project.md) | | [optional] **State** | Pointer to [**PortState**](PortState.md) | | [optional] **Order** | Pointer to [**PortOrder**](PortOrder.md) | | [optional] **CvpId** | Pointer to **string** | Equinix assigned response attribute for Unique ID for a virtual port. | [optional] @@ -366,20 +366,20 @@ HasBmmrType returns a boolean if a field has been set. ### GetProject -`func (o *PortResponse) GetProject() PortResponseProject` +`func (o *PortResponse) GetProject() Project` GetProject returns the Project field if non-nil, zero value otherwise. ### GetProjectOk -`func (o *PortResponse) GetProjectOk() (*PortResponseProject, bool)` +`func (o *PortResponse) GetProjectOk() (*Project, bool)` GetProjectOk returns a tuple with the Project field if it's non-nil, zero value otherwise and a boolean to check if the value has been set. ### SetProject -`func (o *PortResponse) SetProject(v PortResponseProject)` +`func (o *PortResponse) SetProject(v Project)` SetProject sets Project field to given value. diff --git a/services/fabricv4/docs/PortResponseProject.md b/services/fabricv4/docs/PortResponseProject.md deleted file mode 100644 index ee81ea28..00000000 --- a/services/fabricv4/docs/PortResponseProject.md +++ /dev/null @@ -1,56 +0,0 @@ -# PortResponseProject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ProjectId** | Pointer to **string** | Subscriber-assigned project ID | [optional] - -## Methods - -### NewPortResponseProject - -`func NewPortResponseProject() *PortResponseProject` - -NewPortResponseProject instantiates a new PortResponseProject object -This constructor will assign default values to properties that have it defined, -and makes sure properties required by API are set, but the set of arguments -will change when the set of required properties is changed - -### NewPortResponseProjectWithDefaults - -`func NewPortResponseProjectWithDefaults() *PortResponseProject` - -NewPortResponseProjectWithDefaults instantiates a new PortResponseProject object -This constructor will only assign default values to properties that have it defined, -but it doesn't guarantee that properties required by API are set - -### GetProjectId - -`func (o *PortResponseProject) GetProjectId() string` - -GetProjectId returns the ProjectId field if non-nil, zero value otherwise. - -### GetProjectIdOk - -`func (o *PortResponseProject) GetProjectIdOk() (*string, bool)` - -GetProjectIdOk returns a tuple with the ProjectId field if it's non-nil, zero value otherwise -and a boolean to check if the value has been set. - -### SetProjectId - -`func (o *PortResponseProject) SetProjectId(v string)` - -SetProjectId sets ProjectId field to given value. - -### HasProjectId - -`func (o *PortResponseProject) HasProjectId() bool` - -HasProjectId returns a boolean if a field has been set. - - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/services/fabricv4/model_port.go b/services/fabricv4/model_port.go index 2b9b7c56..bbcdb91c 100644 --- a/services/fabricv4/model_port.go +++ b/services/fabricv4/model_port.go @@ -40,7 +40,7 @@ type Port struct { PhysicalPortsCount *int32 `json:"physicalPortsCount,omitempty"` ConnectivitySourceType PortResponseConnectivitySourceType `json:"connectivitySourceType"` BmmrType *PortResponseBmmrType `json:"bmmrType,omitempty"` - Project *PortResponseProject `json:"project,omitempty"` + Project *Project `json:"project,omitempty"` State *PortState `json:"state,omitempty"` Order *PortOrder `json:"order,omitempty"` // Equinix assigned response attribute for Unique ID for a virtual port. @@ -487,9 +487,9 @@ func (o *Port) SetBmmrType(v PortResponseBmmrType) { } // GetProject returns the Project field value if set, zero value otherwise. -func (o *Port) GetProject() PortResponseProject { +func (o *Port) GetProject() Project { if o == nil || IsNil(o.Project) { - var ret PortResponseProject + var ret Project return ret } return *o.Project @@ -497,7 +497,7 @@ func (o *Port) GetProject() PortResponseProject { // GetProjectOk returns a tuple with the Project field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *Port) GetProjectOk() (*PortResponseProject, bool) { +func (o *Port) GetProjectOk() (*Project, bool) { if o == nil || IsNil(o.Project) { return nil, false } @@ -513,8 +513,8 @@ func (o *Port) HasProject() bool { return false } -// SetProject gets a reference to the given PortResponseProject and assigns it to the Project field. -func (o *Port) SetProject(v PortResponseProject) { +// SetProject gets a reference to the given Project and assigns it to the Project field. +func (o *Port) SetProject(v Project) { o.Project = &v } diff --git a/services/fabricv4/model_port_response.go b/services/fabricv4/model_port_response.go index dc3f596d..b8e8083a 100644 --- a/services/fabricv4/model_port_response.go +++ b/services/fabricv4/model_port_response.go @@ -38,7 +38,7 @@ type PortResponse struct { PhysicalPortsCount *int32 `json:"physicalPortsCount,omitempty"` ConnectivitySourceType *PortResponseConnectivitySourceType `json:"connectivitySourceType,omitempty"` BmmrType *PortResponseBmmrType `json:"bmmrType,omitempty"` - Project *PortResponseProject `json:"project,omitempty"` + Project *Project `json:"project,omitempty"` State *PortState `json:"state,omitempty"` Order *PortOrder `json:"order,omitempty"` // Equinix assigned response attribute for Unique ID for a virtual port. @@ -486,9 +486,9 @@ func (o *PortResponse) SetBmmrType(v PortResponseBmmrType) { } // GetProject returns the Project field value if set, zero value otherwise. -func (o *PortResponse) GetProject() PortResponseProject { +func (o *PortResponse) GetProject() Project { if o == nil || IsNil(o.Project) { - var ret PortResponseProject + var ret Project return ret } return *o.Project @@ -496,7 +496,7 @@ func (o *PortResponse) GetProject() PortResponseProject { // GetProjectOk returns a tuple with the Project field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *PortResponse) GetProjectOk() (*PortResponseProject, bool) { +func (o *PortResponse) GetProjectOk() (*Project, bool) { if o == nil || IsNil(o.Project) { return nil, false } @@ -512,8 +512,8 @@ func (o *PortResponse) HasProject() bool { return false } -// SetProject gets a reference to the given PortResponseProject and assigns it to the Project field. -func (o *PortResponse) SetProject(v PortResponseProject) { +// SetProject gets a reference to the given Project and assigns it to the Project field. +func (o *PortResponse) SetProject(v Project) { o.Project = &v } diff --git a/services/fabricv4/model_port_response_project.go b/services/fabricv4/model_port_response_project.go deleted file mode 100644 index d2bd14c9..00000000 --- a/services/fabricv4/model_port_response_project.go +++ /dev/null @@ -1,154 +0,0 @@ -/* -Equinix Fabric API v4 - -Equinix Fabric is an advanced software-defined interconnection solution that enables you to directly, securely and dynamically connect to distributed infrastructure and digital ecosystems on platform Equinix via a single port, Customers can use Fabric to connect to:
1. Cloud Service Providers - Clouds, network and other service providers.
2. Enterprises - Other Equinix customers, vendors and partners.
3. Myself - Another customer instance deployed at Equinix.
- -Contact: api-support@equinix.com -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package fabricv4 - -import ( - "encoding/json" -) - -// checks if the PortResponseProject type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &PortResponseProject{} - -// PortResponseProject struct for PortResponseProject -type PortResponseProject struct { - // Subscriber-assigned project ID - ProjectId *string `json:"projectId,omitempty"` - AdditionalProperties map[string]interface{} -} - -type _PortResponseProject PortResponseProject - -// NewPortResponseProject instantiates a new PortResponseProject object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewPortResponseProject() *PortResponseProject { - this := PortResponseProject{} - return &this -} - -// NewPortResponseProjectWithDefaults instantiates a new PortResponseProject object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewPortResponseProjectWithDefaults() *PortResponseProject { - this := PortResponseProject{} - return &this -} - -// GetProjectId returns the ProjectId field value if set, zero value otherwise. -func (o *PortResponseProject) GetProjectId() string { - if o == nil || IsNil(o.ProjectId) { - var ret string - return ret - } - return *o.ProjectId -} - -// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *PortResponseProject) GetProjectIdOk() (*string, bool) { - if o == nil || IsNil(o.ProjectId) { - return nil, false - } - return o.ProjectId, true -} - -// HasProjectId returns a boolean if a field has been set. -func (o *PortResponseProject) HasProjectId() bool { - if o != nil && !IsNil(o.ProjectId) { - return true - } - - return false -} - -// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. -func (o *PortResponseProject) SetProjectId(v string) { - o.ProjectId = &v -} - -func (o PortResponseProject) MarshalJSON() ([]byte, error) { - toSerialize, err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o PortResponseProject) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - if !IsNil(o.ProjectId) { - toSerialize["projectId"] = o.ProjectId - } - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *PortResponseProject) UnmarshalJSON(data []byte) (err error) { - varPortResponseProject := _PortResponseProject{} - - err = json.Unmarshal(data, &varPortResponseProject) - - if err != nil { - return err - } - - *o = PortResponseProject(varPortResponseProject) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "projectId") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullablePortResponseProject struct { - value *PortResponseProject - isSet bool -} - -func (v NullablePortResponseProject) Get() *PortResponseProject { - return v.value -} - -func (v *NullablePortResponseProject) Set(val *PortResponseProject) { - v.value = val - v.isSet = true -} - -func (v NullablePortResponseProject) IsSet() bool { - return v.isSet -} - -func (v *NullablePortResponseProject) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullablePortResponseProject(val *PortResponseProject) *NullablePortResponseProject { - return &NullablePortResponseProject{value: val, isSet: true} -} - -func (v NullablePortResponseProject) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullablePortResponseProject) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} diff --git a/spec/services/fabricv4/oas3.patched/swagger.yaml b/spec/services/fabricv4/oas3.patched/swagger.yaml index 359bed77..403295f3 100644 --- a/spec/services/fabricv4/oas3.patched/swagger.yaml +++ b/spec/services/fabricv4/oas3.patched/swagger.yaml @@ -9046,7 +9046,7 @@ components: - SELF - EQUINIX project: - $ref: "#/components/schemas/PortResponseProject" + $ref: "#/components/schemas/Project" state: $ref: "#/components/schemas/PortState" order: @@ -10719,13 +10719,6 @@ components: type: string description: Subscriber-assigned project ID example: 44f4c4f8-2f39-494e-838c-d8e640591be5 - PortResponseProject: - type: object - properties: - projectId: - type: string - description: Subscriber-assigned project ID - example: 44f4c4f8-2f39-494e-838c-d8e640591be5 ConnectionSideAdditionalInfo: type: object properties: diff --git a/spec/services/fabricv4/patches/20240429_use_custom_portresponse_project.patch b/spec/services/fabricv4/patches/20240429_use_custom_portresponse_project.patch deleted file mode 100644 index 360071c2..00000000 --- a/spec/services/fabricv4/patches/20240429_use_custom_portresponse_project.patch +++ /dev/null @@ -1,27 +0,0 @@ -diff --git a/spec/services/fabricv4/oas3.patched/swagger.yaml b/spec/services/fabricv4/oas3.patched/swagger.yaml -index 403295f..359bed7 100644 ---- a/spec/services/fabricv4/oas3.patched/swagger.yaml -+++ b/spec/services/fabricv4/oas3.patched/swagger.yaml -@@ -9046,7 +9046,7 @@ components: - - SELF - - EQUINIX - project: -- $ref: "#/components/schemas/Project" -+ $ref: "#/components/schemas/PortResponseProject" - state: - $ref: "#/components/schemas/PortState" - order: -@@ -10719,6 +10719,13 @@ components: - type: string - description: Subscriber-assigned project ID - example: 44f4c4f8-2f39-494e-838c-d8e640591be5 -+ PortResponseProject: -+ type: object -+ properties: -+ projectId: -+ type: string -+ description: Subscriber-assigned project ID -+ example: 44f4c4f8-2f39-494e-838c-d8e640591be5 - ConnectionSideAdditionalInfo: - type: object - properties: From e081320db27d099615c0b41fbd0d24008c24805b Mon Sep 17 00:00:00 2001 From: Tim Hogarty Date: Mon, 6 May 2024 14:43:02 -0700 Subject: [PATCH 2/3] Manual Spec Patch: Remove required field from project model until API fixes response for PDS Users --- ..._remove_required_fields_from_project_model.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 spec/services/fabricv4/patches/20240506_remove_required_fields_from_project_model.patch diff --git a/spec/services/fabricv4/patches/20240506_remove_required_fields_from_project_model.patch b/spec/services/fabricv4/patches/20240506_remove_required_fields_from_project_model.patch new file mode 100644 index 00000000..369f03bf --- /dev/null +++ b/spec/services/fabricv4/patches/20240506_remove_required_fields_from_project_model.patch @@ -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: From caea8fda690e62f7560ce8175fffa5b5277e9951 Mon Sep 17 00:00:00 2001 From: Tim Hogarty Date: Mon, 6 May 2024 14:45:23 -0700 Subject: [PATCH 3/3] Code generation for removing required fields from project model --- services/fabricv4/docs/Project.md | 9 ++- services/fabricv4/docs/RouteFiltersApi.md | 2 +- services/fabricv4/model_project.go | 57 +++++++------------ .../fabricv4/oas3.patched/swagger.yaml | 2 - 4 files changed, 30 insertions(+), 40 deletions(-) diff --git a/services/fabricv4/docs/Project.md b/services/fabricv4/docs/Project.md index 3645e973..6115ca85 100644 --- a/services/fabricv4/docs/Project.md +++ b/services/fabricv4/docs/Project.md @@ -4,13 +4,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**ProjectId** | **string** | Subscriber-assigned project ID | +**ProjectId** | Pointer to **string** | Subscriber-assigned project ID | [optional] ## Methods ### NewProject -`func NewProject(projectId string, ) *Project` +`func NewProject() *Project` NewProject instantiates a new Project object This constructor will assign default values to properties that have it defined, @@ -44,6 +44,11 @@ and a boolean to check if the value has been set. SetProjectId sets ProjectId field to given value. +### HasProjectId + +`func (o *Project) HasProjectId() bool` + +HasProjectId returns a boolean if a field has been set. [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/services/fabricv4/docs/RouteFiltersApi.md b/services/fabricv4/docs/RouteFiltersApi.md index 204bf227..ba2138c2 100644 --- a/services/fabricv4/docs/RouteFiltersApi.md +++ b/services/fabricv4/docs/RouteFiltersApi.md @@ -115,7 +115,7 @@ import ( ) func main() { - routeFiltersBase := *openapiclient.NewRouteFiltersBase(openapiclient.ConnectionRouteFilterData_type("BGP_IPv4_PREFIX_FILTER"), "My-direct-route-1", *openapiclient.NewProject("44f4c4f8-2f39-494e-838c-d8e640591be5")) // RouteFiltersBase | + routeFiltersBase := *openapiclient.NewRouteFiltersBase(openapiclient.ConnectionRouteFilterData_type("BGP_IPv4_PREFIX_FILTER"), "My-direct-route-1", *openapiclient.NewProject()) // RouteFiltersBase | configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) diff --git a/services/fabricv4/model_project.go b/services/fabricv4/model_project.go index eb9f1586..20c24caf 100644 --- a/services/fabricv4/model_project.go +++ b/services/fabricv4/model_project.go @@ -12,7 +12,6 @@ package fabricv4 import ( "encoding/json" - "fmt" ) // checks if the Project type satisfies the MappedNullable interface at compile time @@ -21,7 +20,7 @@ var _ MappedNullable = &Project{} // Project struct for Project type Project struct { // Subscriber-assigned project ID - ProjectId string `json:"projectId"` + ProjectId *string `json:"projectId,omitempty"` AdditionalProperties map[string]interface{} } @@ -31,9 +30,8 @@ type _Project Project // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewProject(projectId string) *Project { +func NewProject() *Project { this := Project{} - this.ProjectId = projectId return &this } @@ -45,28 +43,36 @@ func NewProjectWithDefaults() *Project { return &this } -// GetProjectId returns the ProjectId field value +// GetProjectId returns the ProjectId field value if set, zero value otherwise. func (o *Project) GetProjectId() string { - if o == nil { + if o == nil || IsNil(o.ProjectId) { var ret string return ret } - - return o.ProjectId + return *o.ProjectId } -// GetProjectIdOk returns a tuple with the ProjectId field value +// GetProjectIdOk returns a tuple with the ProjectId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *Project) GetProjectIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.ProjectId) { return nil, false } - return &o.ProjectId, true + return o.ProjectId, true +} + +// HasProjectId returns a boolean if a field has been set. +func (o *Project) HasProjectId() bool { + if o != nil && !IsNil(o.ProjectId) { + return true + } + + return false } -// SetProjectId sets field value +// SetProjectId gets a reference to the given string and assigns it to the ProjectId field. func (o *Project) SetProjectId(v string) { - o.ProjectId = v + o.ProjectId = &v } func (o Project) MarshalJSON() ([]byte, error) { @@ -79,7 +85,9 @@ func (o Project) MarshalJSON() ([]byte, error) { func (o Project) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["projectId"] = o.ProjectId + if !IsNil(o.ProjectId) { + toSerialize["projectId"] = o.ProjectId + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -89,27 +97,6 @@ func (o Project) ToMap() (map[string]interface{}, error) { } func (o *Project) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "projectId", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err - } - - for _, requiredProperty := range requiredProperties { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - varProject := _Project{} err = json.Unmarshal(data, &varProject) diff --git a/spec/services/fabricv4/oas3.patched/swagger.yaml b/spec/services/fabricv4/oas3.patched/swagger.yaml index 403295f3..53e4acf2 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: