Skip to content

Commit

Permalink
Update v1/user/id & v1/user/me Endpoints (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jer1605 authored Feb 4, 2025
1 parent b0c0206 commit 270a0e1
Show file tree
Hide file tree
Showing 3 changed files with 600 additions and 92 deletions.
53 changes: 44 additions & 9 deletions api-reference/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1915,7 +1915,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
"$ref": "#/components/schemas/UserWithRoles"
}
}
}
Expand Down Expand Up @@ -1954,7 +1954,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/User"
"$ref": "#/components/schemas/UserWithRoles"
}
}
}
Expand Down Expand Up @@ -2908,7 +2908,7 @@
"role"
]
},
"User": {
"UserBase": {
"type": "object",
"description": "A User is a unique identifier that you can use to manage and organize your work.",
"properties": {
Expand Down Expand Up @@ -2938,11 +2938,6 @@
"description": "Slug of the user",
"readOnly": true
},
"role": {
"type": "string",
"description": "Role of the user",
"readOnly": true
},
"avatar_url": {
"type": "string",
"description": "Avatar of the user",
Expand Down Expand Up @@ -2974,6 +2969,46 @@
"updated_at"
]
},
"User": {
"type": "object",
"description": "A User is a unique identifier that you can use to manage and organize your work.",
"allOf": [
{ "$ref": "#/components/schemas/UserBase" }
],
"properties": {
"role": {
"type": "string",
"description": "Role of the user",
"readOnly": true
}
},
"required": [
"object",
"id",
"email",
"name",
"slug",
"role",
"created_at",
"updated_at"
]
},
"UserWithRoles": {
"allOf": [
{ "$ref": "#/components/schemas/UserBase" }
],
"properties": {
"roles": {
"type": "object",
"additionalProperties": {
"type": "string",
"enum": ["admin", "member"],
"description": "The role of the user in each organization."
},
"description": "Roles of the user in multiple organizations. The keys are organization IDs, and values are roles ('admin', 'member')."
}
}
},
"OrganizationUser": {
"type": "object",
"allOf": [
Expand Down Expand Up @@ -3213,7 +3248,7 @@
"request_count": 32423432,
"event_count": 12390,
"month": "2023-12",
"project_id": "6d614bd5-4d81-4a9b-8ba4-6fe3ffd33748"
"project_id": "6d614bd5-4d81-4a9b-8ba4-6fe3ffd33748"
},
"properties": {
"object": {
Expand Down
Loading

0 comments on commit 270a0e1

Please sign in to comment.