Skip to content

Commit d8f29f7

Browse files
authored
feat: add annotations and metadata to meter (#3626)
1 parent 7c4879f commit d8f29f7

File tree

29 files changed

+1742
-1387
lines changed

29 files changed

+1742
-1387
lines changed

api/api.gen.go

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

api/client/go/client.gen.go

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

api/client/javascript/src/client/schemas.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7531,6 +7531,11 @@ export interface components {
75317531
groupBy?: {
75327532
[key: string]: string
75337533
}
7534+
/**
7535+
* Annotations
7536+
* @description Set of key-value pairs managed by the system. Cannot be modified by user.
7537+
*/
7538+
readonly annotations?: components['schemas']['Annotations'] | null
75347539
}
75357540
/**
75367541
* @description The aggregation type to use for the meter.

api/client/python/openmeter/_generated/models/_models.py

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

api/openapi.cloud.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19776,6 +19776,14 @@ components:
1977619776
Keys must be unique and consist only alphanumeric and underscore characters.
1977719777
example:
1977819778
type: $.type
19779+
annotations:
19780+
type: object
19781+
allOf:
19782+
- $ref: '#/components/schemas/Annotations'
19783+
nullable: true
19784+
description: Set of key-value pairs managed by the system. Cannot be modified by user.
19785+
title: Annotations
19786+
readOnly: true
1977919787
description: A meter is a configuration that defines how to match and aggregate events.
1978019788
example:
1978119789
id: 01G65Z755AFWAKHE12NY0CQ9FH

api/openapi.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20482,6 +20482,14 @@ components:
2048220482
Keys must be unique and consist only alphanumeric and underscore characters.
2048320483
example:
2048420484
type: $.type
20485+
annotations:
20486+
type: object
20487+
allOf:
20488+
- $ref: '#/components/schemas/Annotations'
20489+
nullable: true
20490+
description: Set of key-value pairs managed by the system. Cannot be modified by user.
20491+
title: Annotations
20492+
readOnly: true
2048520493
description: A meter is a configuration that defines how to match and aggregate events.
2048620494
example:
2048720495
id: 01G65Z755AFWAKHE12NY0CQ9FH

api/spec/src/meters.tsp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ model MeterUpdate is TypeSpec.Rest.Resource.ResourceReplaceModel<Meter>;
267267
updatedAt: DateTime.fromISO("2024-01-01T01:01:01.001Z"),
268268
})
269269
model Meter {
270-
// We omit name from the global.Resource as name is optional in the Meter model to avoiud breaking changes for now.
270+
// We omit name from the global.Resource as name is optional in the Meter model to avoid breaking changes for now.
271271
...OmitProperties<global.Resource, "name">;
272272

273273
/**
@@ -333,6 +333,13 @@ model Meter {
333333
@visibility(Lifecycle.Read, Lifecycle.Create, Lifecycle.Update)
334334
@example(#{ type: "$.type" })
335335
groupBy?: Record<string>;
336+
337+
/**
338+
* Set of key-value pairs managed by the system. Cannot be modified by user.
339+
*/
340+
@visibility(Lifecycle.Read)
341+
@summary("Annotations")
342+
annotations?: Annotations | null;
336343
}
337344

338345
/**

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2005,6 +2005,8 @@ github.com/oklog/ulid v1.3.1 h1:EGfNDEx6MqHz8B3uNV6QAib1UR2Lm97sHi3ocA6ESJ4=
20052005
github.com/oklog/ulid v1.3.1/go.mod h1:CirwcVhetQ6Lv90oh/F+FBtV6XMibvdAFo93nm5qn4U=
20062006
github.com/oklog/ulid/v2 v2.1.1 h1:suPZ4ARWLOJLegGFiZZ1dFAkqzhMjL3J1TzI+5wHz8s=
20072007
github.com/oklog/ulid/v2 v2.1.1/go.mod h1:rcEKHmBBKfef9DhnvX7y1HZBYxjXb0cP5ExxNsTT1QQ=
2008+
github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec=
2009+
github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY=
20082010
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852 h1:Yl0tPBa8QPjGmesFh1D0rDy+q1Twx6FyU7VWHi8wZbI=
20092011
github.com/oliveagle/jsonpath v0.0.0-20180606110733-2e52cf6e6852/go.mod h1:eqOVx5Vwu4gd2mmMZvVZsgIqNSaW3xxRThUJ0k/TPk4=
20102012
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=

openmeter/ent/db/meter.go

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

openmeter/ent/db/meter/meter.go

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

0 commit comments

Comments
 (0)