Skip to content

Commit 9ee3534

Browse files
committed
fix: review fixes
1 parent 81d1c99 commit 9ee3534

5 files changed

Lines changed: 50 additions & 36 deletions

File tree

api/spec/packages/aip/src/billing/operations.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ interface BillingProfilesOperations {
5252
* Filter billing profiles returned in the response.
5353
*
5454
* To filter billing profiles by name add the following query param:
55-
* filter[name]=my-profile
55+
* filter[name][eq]=my-profile
5656
*/
5757
@query(#{ style: "deepObject", explode: true })
5858
filter?: ListBillingProfilesParamsFilter,

api/v3/api.gen.go

Lines changed: 34 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v3/openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2375,7 +2375,7 @@ paths:
23752375
Filter billing profiles returned in the response.
23762376
23772377
To filter billing profiles by name add the following query param:
2378-
filter[name]=my-profile
2378+
filter[name][eq]=my-profile
23792379
schema:
23802380
$ref: '#/components/schemas/ListBillingProfilesParamsFilter'
23812381
style: deepObject

openmeter/billing/profile.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,7 @@ type OrderBy string
371371

372372
func (o OrderBy) Values() []OrderBy {
373373
return []OrderBy{
374+
OrderByID,
374375
OrderByCreatedAt,
375376
OrderByUpdatedAt,
376377
OrderByName,

openmeter/billing/service/profile_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,19 @@ func TestListProfiles(t *testing.T) {
121121
require.Equal(t, sortx.OrderDesc, got.Order)
122122
},
123123
},
124+
{
125+
name: "SortByID",
126+
input: billing.ListProfilesInput{
127+
Namespace: ns,
128+
OrderBy: "id",
129+
Order: sortx.OrderDesc,
130+
},
131+
assertAdapter: func(t *testing.T, got billing.ListProfilesInput) {
132+
t.Helper()
133+
require.Equal(t, billing.OrderByID, got.OrderBy)
134+
require.Equal(t, sortx.OrderDesc, got.Order)
135+
},
136+
},
124137
{
125138
// both Eq and Contains set — validateSingleOperator returns ErrFilterMultipleOperators
126139
name: "ValidationError_NameMultipleOperators",

0 commit comments

Comments
 (0)