From 9298fdc129f7bc3257c0382d661fd0bcab59dd33 Mon Sep 17 00:00:00 2001 From: Ryan Kes Date: Fri, 27 Dec 2024 18:50:50 +0100 Subject: [PATCH] fix: make sort a string again --- ipmgmt/.openapi-generator/FILES | 2 -- ipmgmt/README.md | 1 - ipmgmt/api/openapi.yaml | 12 +++--------- ipmgmt/api_ipmgmt.go | 8 ++++---- ipmgmt/docs/IpmgmtAPI.md | 8 ++++---- 5 files changed, 11 insertions(+), 20 deletions(-) diff --git a/ipmgmt/.openapi-generator/FILES b/ipmgmt/.openapi-generator/FILES index 7bff2f2..6aefa8f 100644 --- a/ipmgmt/.openapi-generator/FILES +++ b/ipmgmt/.openapi-generator/FILES @@ -18,7 +18,6 @@ docs/NullRouteIPOpts.md docs/NullRoutedIP.md docs/ProtocolVersion.md docs/ReverseLookup.md -docs/Sort.md docs/Subnet.md docs/UpdateIPOpts.md docs/UpdateNullRouteOpts.md @@ -39,7 +38,6 @@ model_null_route_ip_opts.go model_null_routed_ip.go model_protocol_version.go model_reverse_lookup.go -model_sort.go model_subnet.go model_update_ip_opts.go model_update_null_route_opts.go diff --git a/ipmgmt/README.md b/ipmgmt/README.md index 3706ea2..1200662 100644 --- a/ipmgmt/README.md +++ b/ipmgmt/README.md @@ -104,7 +104,6 @@ Class | Method | HTTP request | Description - [NullRoutedIP](docs/NullRoutedIP.md) - [ProtocolVersion](docs/ProtocolVersion.md) - [ReverseLookup](docs/ReverseLookup.md) - - [Sort](docs/Sort.md) - [Subnet](docs/Subnet.md) - [UpdateIPOpts](docs/UpdateIPOpts.md) - [UpdateNullRouteOpts](docs/UpdateNullRouteOpts.md) diff --git a/ipmgmt/api/openapi.yaml b/ipmgmt/api/openapi.yaml index 6fab665..b6c3ff0 100644 --- a/ipmgmt/api/openapi.yaml +++ b/ipmgmt/api/openapi.yaml @@ -151,7 +151,7 @@ paths: name: sort required: false schema: - $ref: '#/components/schemas/sort' + type: string style: form - description: Filter by reverse lookup. example: mydomain1.example.com @@ -887,7 +887,7 @@ paths: name: sort required: false schema: - $ref: '#/components/schemas/sort' + type: string style: form responses: "200": @@ -1182,7 +1182,7 @@ components: name: sort required: false schema: - $ref: '#/components/schemas/sort' + type: string style: form reverseLookup: description: Filter by reverse lookup. @@ -1287,12 +1287,6 @@ components: - ROUTER2 - IPMI type: string - sort: - enum: - - ip - - nullRouted - - reverseLookup - type: string assignedContract: description: An explanation about the purpose of this instance. example: diff --git a/ipmgmt/api_ipmgmt.go b/ipmgmt/api_ipmgmt.go index ef6b46a..7197b90 100644 --- a/ipmgmt/api_ipmgmt.go +++ b/ipmgmt/api_ipmgmt.go @@ -177,7 +177,7 @@ type ApiGetIPListRequest struct { ips *string equipmentIds *string assignedContractIds *string - sort *Sort + sort *string reverseLookup *string } @@ -254,7 +254,7 @@ func (r ApiGetIPListRequest) AssignedContractIds(assignedContractIds string) Api } // Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. -func (r ApiGetIPListRequest) Sort(sort Sort) ApiGetIPListRequest { +func (r ApiGetIPListRequest) Sort(sort string) ApiGetIPListRequest { r.sort = &sort return r } @@ -470,7 +470,7 @@ type ApiGetNullRouteHistoryListRequest struct { ticketId *string contractId *string equipmentId *string - sort *Sort + sort *string } // Limit the number of results returned. @@ -540,7 +540,7 @@ func (r ApiGetNullRouteHistoryListRequest) EquipmentId(equipmentId string) ApiGe } // Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. -func (r ApiGetNullRouteHistoryListRequest) Sort(sort Sort) ApiGetNullRouteHistoryListRequest { +func (r ApiGetNullRouteHistoryListRequest) Sort(sort string) ApiGetNullRouteHistoryListRequest { r.sort = &sort return r } diff --git a/ipmgmt/docs/IpmgmtAPI.md b/ipmgmt/docs/IpmgmtAPI.md index 7a8f2f6..f42256d 100644 --- a/ipmgmt/docs/IpmgmtAPI.md +++ b/ipmgmt/docs/IpmgmtAPI.md @@ -48,7 +48,7 @@ func main() { ips := "ips_example" // string | Return only IPs specified as a comma-separated list (optional) equipmentIds := "equipmentIds_example" // string | Return only IPs assigned to equipment items specified as a comma-separated list of IDs (optional) assignedContractIds := "assignedContractIds_example" // string | Return only IPs assigned to contracts specified as a comma-separated list of IDs (optional) - sort := openapiclient.sort("ip") // Sort | Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. (optional) + sort := "sort_example" // string | Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. (optional) reverseLookup := "mydomain1.example.com" // string | Filter by reverse lookup. (optional) configuration := openapiclient.NewConfiguration() @@ -86,7 +86,7 @@ Name | Type | Description | Notes **ips** | **string** | Return only IPs specified as a comma-separated list | **equipmentIds** | **string** | Return only IPs assigned to equipment items specified as a comma-separated list of IDs | **assignedContractIds** | **string** | Return only IPs assigned to contracts specified as a comma-separated list of IDs | - **sort** | [**Sort**](Sort.md) | Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. | + **sort** | **string** | Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. | **reverseLookup** | **string** | Filter by reverse lookup. | ### Return type @@ -138,7 +138,7 @@ func main() { ticketId := "ticketId_example" // string | Filter by the reference stored with the null route (optional) contractId := "contractId_example" // string | Filter by ID of the contract assigned to the IP at the time of null route creation (optional) equipmentId := "equipmentId_example" // string | Filter by ID of the server assigned to the IP at the time of null route creation (optional) - sort := openapiclient.sort("ip") // Sort | Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. (optional) + sort := "sort_example" // string | Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. (optional) configuration := openapiclient.NewConfiguration() apiClient := openapiclient.NewAPIClient(configuration) @@ -174,7 +174,7 @@ Name | Type | Description | Notes **ticketId** | **string** | Filter by the reference stored with the null route | **contractId** | **string** | Filter by ID of the contract assigned to the IP at the time of null route creation | **equipmentId** | **string** | Filter by ID of the server assigned to the IP at the time of null route creation | - **sort** | [**Sort**](Sort.md) | Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. | + **sort** | **string** | Comma-separated list of sort field names. Prepend the field name with '-' for descending order. E.g. `sort=ip,-nullrouted`. Sortable field names are ip, nullRouted, reverseLookup. | ### Return type