Skip to content

Commit

Permalink
fix: Patch change operation models (#78)
Browse files Browse the repository at this point in the history
Patching necessary to move from `type: object` to OAS `any` type to
allow for objects, or primitive types in the value portion of the change
items.

* Patch Route Filters Change model
* Patch Route Filter Rules Change model
  • Loading branch information
thogarty authored Sep 10, 2024
2 parents 2aefca7 + 28deefc commit 5641132
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 34 deletions.
2 changes: 1 addition & 1 deletion services/fabricv4/docs/RouteFilterRulesApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ import (
func main() {
routeFilterId := "routeFilterId_example" // string | Route Filters Id
routeFilterRuleId := "routeFilterRuleId_example" // string | Route Filter Rules Id
routeFilterRulesPatchRequestItem := []openapiclient.RouteFilterRulesPatchRequestItem{*openapiclient.NewRouteFilterRulesPatchRequestItem("replace", "/prefixMatch", map[string]interface{}(123))} // []RouteFilterRulesPatchRequestItem |
routeFilterRulesPatchRequestItem := []openapiclient.RouteFilterRulesPatchRequestItem{*openapiclient.NewRouteFilterRulesPatchRequestItem("replace", "/prefixMatch", interface{}(123))} // []RouteFilterRulesPatchRequestItem |

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
Expand Down
20 changes: 15 additions & 5 deletions services/fabricv4/docs/RouteFilterRulesPatchRequestItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Op** | **string** | Handy shortcut for operation name |
**Path** | **string** | path to change |
**Value** | **map[string]interface{}** | new value for updated parameter |
**Value** | **interface{}** | new value for updated parameter |

## Methods

### NewRouteFilterRulesPatchRequestItem

`func NewRouteFilterRulesPatchRequestItem(op string, path string, value map[string]interface{}, ) *RouteFilterRulesPatchRequestItem`
`func NewRouteFilterRulesPatchRequestItem(op string, path string, value interface{}, ) *RouteFilterRulesPatchRequestItem`

NewRouteFilterRulesPatchRequestItem instantiates a new RouteFilterRulesPatchRequestItem object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -69,24 +69,34 @@ SetPath sets Path field to given value.

### GetValue

`func (o *RouteFilterRulesPatchRequestItem) GetValue() map[string]interface{}`
`func (o *RouteFilterRulesPatchRequestItem) GetValue() interface{}`

GetValue returns the Value field if non-nil, zero value otherwise.

### GetValueOk

`func (o *RouteFilterRulesPatchRequestItem) GetValueOk() (*map[string]interface{}, bool)`
`func (o *RouteFilterRulesPatchRequestItem) GetValueOk() (*interface{}, bool)`

GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetValue

`func (o *RouteFilterRulesPatchRequestItem) SetValue(v map[string]interface{})`
`func (o *RouteFilterRulesPatchRequestItem) SetValue(v interface{})`

SetValue sets Value field to given value.


### SetValueNil

`func (o *RouteFilterRulesPatchRequestItem) SetValueNil(b bool)`

SetValueNil sets the value for Value to be an explicit nil

### UnsetValue
`func (o *RouteFilterRulesPatchRequestItem) UnsetValue()`

UnsetValue ensures that no value is present for Value, not even an explicit nil

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
2 changes: 1 addition & 1 deletion services/fabricv4/docs/RouteFiltersApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,7 @@ import (

func main() {
routeFilterId := "routeFilterId_example" // string | Route Filters Id
routeFiltersPatchRequestItem := []openapiclient.RouteFiltersPatchRequestItem{*openapiclient.NewRouteFiltersPatchRequestItem("replace", "/name", map[string]interface{}(123))} // []RouteFiltersPatchRequestItem |
routeFiltersPatchRequestItem := []openapiclient.RouteFiltersPatchRequestItem{*openapiclient.NewRouteFiltersPatchRequestItem("replace", "/name", interface{}(123))} // []RouteFiltersPatchRequestItem |

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
Expand Down
20 changes: 15 additions & 5 deletions services/fabricv4/docs/RouteFiltersPatchRequestItem.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Op** | **string** | Handy shortcut for operation name |
**Path** | **string** | path to change |
**Value** | **map[string]interface{}** | new value for updated parameter |
**Value** | **interface{}** | new value for updated parameter |

## Methods

### NewRouteFiltersPatchRequestItem

`func NewRouteFiltersPatchRequestItem(op string, path string, value map[string]interface{}, ) *RouteFiltersPatchRequestItem`
`func NewRouteFiltersPatchRequestItem(op string, path string, value interface{}, ) *RouteFiltersPatchRequestItem`

NewRouteFiltersPatchRequestItem instantiates a new RouteFiltersPatchRequestItem object
This constructor will assign default values to properties that have it defined,
Expand Down Expand Up @@ -69,24 +69,34 @@ SetPath sets Path field to given value.

### GetValue

`func (o *RouteFiltersPatchRequestItem) GetValue() map[string]interface{}`
`func (o *RouteFiltersPatchRequestItem) GetValue() interface{}`

GetValue returns the Value field if non-nil, zero value otherwise.

### GetValueOk

`func (o *RouteFiltersPatchRequestItem) GetValueOk() (*map[string]interface{}, bool)`
`func (o *RouteFiltersPatchRequestItem) GetValueOk() (*interface{}, bool)`

GetValueOk returns a tuple with the Value field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetValue

`func (o *RouteFiltersPatchRequestItem) SetValue(v map[string]interface{})`
`func (o *RouteFiltersPatchRequestItem) SetValue(v interface{})`

SetValue sets Value field to given value.


### SetValueNil

`func (o *RouteFiltersPatchRequestItem) SetValueNil(b bool)`

SetValueNil sets the value for Value to be an explicit nil

### UnsetValue
`func (o *RouteFiltersPatchRequestItem) UnsetValue()`

UnsetValue ensures that no value is present for Value, not even an explicit nil

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
24 changes: 14 additions & 10 deletions services/fabricv4/model_route_filter_rules_patch_request_item.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 14 additions & 10 deletions services/fabricv4/model_route_filters_patch_request_item.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions spec/services/fabricv4/oas3.patched/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12346,7 +12346,6 @@ components:
description: path to change
example: /name
value:
type: object
description: new value for updated parameter
description: Route Filter change operation data
RouteFiltersChangeOperation:
Expand Down Expand Up @@ -12439,7 +12438,6 @@ components:
description: path to change
example: /prefixMatch
value:
type: object
description: new value for updated parameter
description: Route Filter Rule change operation data
RouteFilterRulesChangeOperation:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/spec/services/fabricv4/oas3.patched/swagger.yaml b/spec/services/fabricv4/oas3.patched/swagger.yaml
index ac39f1e..3276e4a 100644
--- a/spec/services/fabricv4/oas3.patched/swagger.yaml
+++ b/spec/services/fabricv4/oas3.patched/swagger.yaml
@@ -12346,7 +12346,6 @@ components:
description: path to change
example: /name
value:
- type: object
description: new value for updated parameter
description: Route Filter change operation data
RouteFiltersChangeOperation:
@@ -12439,7 +12438,6 @@ components:
description: path to change
example: /prefixMatch
value:
- type: object
description: new value for updated parameter
description: Route Filter Rule change operation data
RouteFilterRulesChangeOperation:

0 comments on commit 5641132

Please sign in to comment.