Skip to content

Commit

Permalink
Merge pull request #101 from Leaseweb/chore/sort-enum
Browse files Browse the repository at this point in the history
chore: add sort enum for ipmgmt
  • Loading branch information
alrayyes authored Dec 27, 2024
2 parents e351aa7 + e3d5e50 commit 592b62b
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 13 deletions.
4 changes: 2 additions & 2 deletions ipmgmt/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.gitignore
.openapi-generator-ignore
.travis.yml
README.md
api/openapi.yaml
Expand All @@ -19,6 +18,7 @@ docs/NullRouteIPOpts.md
docs/NullRoutedIP.md
docs/ProtocolVersion.md
docs/ReverseLookup.md
docs/Sort.md
docs/Subnet.md
docs/UpdateIPOpts.md
docs/UpdateNullRouteOpts.md
Expand All @@ -39,11 +39,11 @@ 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
model_update_reverse_lookup_records_opts.go
model_update_reverse_lookup_records_result.go
response.go
test/api_ipmgmt_test.go
utils.go
1 change: 1 addition & 0 deletions ipmgmt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ 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)
Expand Down
12 changes: 9 additions & 3 deletions ipmgmt/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ paths:
name: sort
required: false
schema:
type: string
$ref: '#/components/schemas/sort'
style: form
- description: Filter by reverse lookup.
example: mydomain1.example.com
Expand Down Expand Up @@ -887,7 +887,7 @@ paths:
name: sort
required: false
schema:
type: string
$ref: '#/components/schemas/sort'
style: form
responses:
"200":
Expand Down Expand Up @@ -1182,7 +1182,7 @@ components:
name: sort
required: false
schema:
type: string
$ref: '#/components/schemas/sort'
style: form
reverseLookup:
description: Filter by reverse lookup.
Expand Down Expand Up @@ -1287,6 +1287,12 @@ components:
- ROUTER2
- IPMI
type: string
sort:
enum:
- ip
- nullRouted
- reverseLookup
type: string
assignedContract:
description: An explanation about the purpose of this instance.
example:
Expand Down
8 changes: 4 additions & 4 deletions ipmgmt/api_ipmgmt.go

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

8 changes: 4 additions & 4 deletions ipmgmt/docs/IpmgmtAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 := "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)
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)
reverseLookup := "mydomain1.example.com" // string | Filter by reverse lookup. (optional)

configuration := openapiclient.NewConfiguration()
Expand Down Expand Up @@ -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** | **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. |
**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. |
**reverseLookup** | **string** | Filter by reverse lookup. |

### Return type
Expand Down Expand Up @@ -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 := "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)
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)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
Expand Down Expand Up @@ -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** | **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. |
**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. |

### Return type

Expand Down
15 changes: 15 additions & 0 deletions ipmgmt/docs/Sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Sort

## Enum


* `IP` (value: `"ip"`)

* `NULL_ROUTED` (value: `"nullRouted"`)

* `REVERSE_LOOKUP` (value: `"reverseLookup"`)


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


113 changes: 113 additions & 0 deletions ipmgmt/model_sort.go

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

0 comments on commit 592b62b

Please sign in to comment.