Skip to content

Commit

Permalink
Add name filter to /owners
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-opal committed Aug 31, 2023
1 parent 19d6ac5 commit 5ea18cf
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
12 changes: 11 additions & 1 deletion api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,15 @@ paths:
maximum: 1000
type: integer
style: form
- description: Owner name to filter by.
example: 200
explode: true
in: query
name: name
required: false
schema:
type: string
style: form
responses:
"200":
content:
Expand Down Expand Up @@ -1042,7 +1051,8 @@ paths:
- owners
/owners/name/{owner_name}:
get:
description: Returns an `Owner` object.
description: "Returns an `Owner` object. Does not support owners with `/` in\
\ their name, use /owners?name=... instead."
operationId: getOwnerFromName
parameters:
- description: The name of the owner.
Expand Down
12 changes: 11 additions & 1 deletion api_owners.go

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

6 changes: 4 additions & 2 deletions docs/OwnersApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ Name | Type | Description | Notes

## GetOwners

> PaginatedOwnersList GetOwners(ctx).Cursor(cursor).PageSize(pageSize).Execute()
> PaginatedOwnersList GetOwners(ctx).Cursor(cursor).PageSize(pageSize).Name(name).Execute()


Expand All @@ -382,10 +382,11 @@ import (
func main() {
cursor := "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw" // string | The pagination cursor value. (optional)
pageSize := int32(200) // int32 | Number of results to return per page. Default is 200. (optional)
name := "200" // string | Owner name to filter by. (optional)

configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.OwnersApi.GetOwners(context.Background()).Cursor(cursor).PageSize(pageSize).Execute()
resp, r, err := apiClient.OwnersApi.GetOwners(context.Background()).Cursor(cursor).PageSize(pageSize).Name(name).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OwnersApi.GetOwners``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
Expand All @@ -408,6 +409,7 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**cursor** | **string** | The pagination cursor value. |
**pageSize** | **int32** | Number of results to return per page. Default is 200. |
**name** | **string** | Owner name to filter by. |

### Return type

Expand Down

0 comments on commit 5ea18cf

Please sign in to comment.