Skip to content

Commit

Permalink
fix: add comment on other issues caused by codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
turip committed May 15, 2024
1 parent edc222d commit e857d30
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
10 changes: 10 additions & 0 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1444,6 +1444,11 @@ components:
format: date-time
example: "2023-01-01T00:00:00Z"
LedgerGrantBalance:
# TODO: until https://github.com/deepmap/oapi-codegen/pull/1610 is not merged, the
# generated go type will be invalid (it will be credit.Grant instead of GrantBalance).
#
# Given that we are not using this type as a return type of a call, this is just
# an inconsistency we can ignore.
x-go-type-import:
path: github.com/openmeterio/openmeter/internal/credit
x-go-type: credit.GrantBalance
Expand All @@ -1457,6 +1462,11 @@ components:
type: number
example: 100
FeatureBalance:
# TODO: until https://github.com/deepmap/oapi-codegen/pull/1610 is not merged, the
# generated go type will be invalid (it will be credit.Feature instead of FeatureBalance).
#
# Given that we are not using this type as a return type of a call, this is just
# an inconsistency we can ignore.
x-go-type-import:
path: github.com/openmeterio/openmeter/internal/credit
x-go-type: credit.FeatureBalance
Expand Down
2 changes: 1 addition & 1 deletion e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ func TestCredit(t *testing.T) {
require.NoError(t, err)
require.Equal(t, http.StatusCreated, resp.StatusCode(), "Invalid status code [response_body=%s]", resp.Body)

expected := &api.LedgerGrantBalance{
expected := &credit.Grant{
ID: resp.JSON201.ID,
LedgerID: ledgerID,
Type: credit.GrantTypeUsage,
Expand Down

0 comments on commit e857d30

Please sign in to comment.