Skip to content

Commit 35713ad

Browse files
committed
fix: expose seperate identity struct
1 parent 7397a54 commit 35713ad

File tree

4 files changed

+60
-4
lines changed

4 files changed

+60
-4
lines changed

go/apps/api/openapi/gen.go

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

go/apps/api/openapi/openapi-generated.yaml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2856,7 +2856,7 @@ components:
28562856
of permissions that grant access to specific functionality. Only returned
28572857
when permissions were checked during verification.
28582858
identity:
2859-
"$ref": "#/components/schemas/Identity"
2859+
"$ref": "#/components/schemas/VerifyKeyIdentity"
28602860
description: |
28612861
Information about the identity associated with this key. Identities
28622862
allow multiple keys to share resources (like rate limits) and represent
@@ -2869,6 +2869,27 @@ components:
28692869
required:
28702870
- valid
28712871
- code
2872+
VerifyKeyIdentity:
2873+
type: object
2874+
properties:
2875+
id:
2876+
type: string
2877+
description: Identity ID
2878+
externalId:
2879+
type: string
2880+
description: External identity ID
2881+
meta:
2882+
type: object
2883+
additionalProperties: true
2884+
description: Identity metadata
2885+
ratelimits:
2886+
type: array
2887+
description: Identity ratelimits
2888+
items:
2889+
"$ref": "#/components/schemas/RatelimitResponse"
2890+
required:
2891+
- externalId
2892+
- id
28722893
VerifyKeyRatelimitData:
28732894
type: object
28742895
properties:

go/apps/api/openapi/spec/paths/v2/keys/verifyKey/V2KeysVerifyKeyResponseData.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ properties:
8686
of permissions that grant access to specific functionality. Only returned
8787
when permissions were checked during verification.
8888
identity:
89-
"$ref": "../../../../common/Identity.yaml"
89+
"$ref": "./VerifyKeyIdentity.yaml"
9090
description: |
9191
Information about the identity associated with this key. Identities
9292
allow multiple keys to share resources (like rate limits) and represent
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
type: object
2+
properties:
3+
id:
4+
type: string
5+
description: Identity ID
6+
externalId:
7+
type: string
8+
description: External identity ID
9+
meta:
10+
type: object
11+
additionalProperties: true
12+
description: Identity metadata
13+
ratelimits:
14+
type: array
15+
description: Identity ratelimits
16+
items:
17+
"$ref": "../../../../common/RatelimitResponse.yaml"
18+
required:
19+
- externalId
20+
- id

0 commit comments

Comments
 (0)