Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove formating constraint on user id #37

Merged
merged 1 commit into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/schema/autohost.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Request to add a new player to the battle.
"commandId": "autohost/addPlayer",
"data": {
"battleId": "00000000-0000-0000-0000-000000000000",
"userId": "f47a7e1e-4b2f-4d3d-3f3c-1f0f0e4b7e1e",
"userId": "351",
"name": "ipsum",
"password": "ipsum"
}
Expand Down Expand Up @@ -269,7 +269,7 @@ Kick a player from a battle.
"commandId": "autohost/kickPlayer",
"data": {
"battleId": "00000000-0000-0000-0000-000000000000",
"userId": "f47a7e1e-4b2f-4d3d-3f3c-1f0f0e4b7e1e"
"userId": "351"
}
}
```
Expand Down Expand Up @@ -568,7 +568,7 @@ Mute a player in a battle.
"commandId": "autohost/mutePlayer",
"data": {
"battleId": "11111111-1111-1111-1111-111111111111",
"userId": "f47a7e1e-4b2f-4d3d-3f3c-1f0f0e4b7e1e",
"userId": "351",
"chat": false,
"draw": false
}
Expand Down Expand Up @@ -1027,7 +1027,7 @@ Force players to become spectators in a battle.
"data": {
"battleId": "22222222-2222-2222-2222-222222222222",
"userIds": [
"f47a7e1e-4b2f-4d3d-3f3c-1f0f0e4b7e1e"
"351"
]
}
}
Expand Down
11 changes: 4 additions & 7 deletions docs/schema/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,7 @@ Sent by the server to inform the client when subscribed users get updated in som
"properties": {
"userId": {
"type": "string",
"format": "uuid",
"examples": [
"f47a7e1e-4b2f-4d3d-3f3c-1f0f0e4b7e1e"
]
"examples": ["351"]
},
"username": { "type": "string" },
"displayName": { "type": "string" },
Expand Down Expand Up @@ -126,7 +123,7 @@ Sent by the server to inform the client when subscribed users get updated in som
"users": [
{
"occaecatff": -19999999.999999955,
"userId": "f47a7e1e-4b2f-4d3d-3f3c-1f0f0e4b7e1e",
"userId": "351",
"username": "occaecat Lorem in",
"scopes": [
"occaecat Lorem in",
Expand All @@ -143,7 +140,7 @@ Sent by the server to inform the client when subscribed users get updated in som
},
{
"occaecatff": -19999999.999999955,
"userId": "f47a7e1e-4b2f-4d3d-3f3c-1f0f0e4b7e1e",
"userId": "351",
"username": "occaecat Lorem in",
"scopes": [
"occaecat Lorem in",
Expand All @@ -160,7 +157,7 @@ Sent by the server to inform the client when subscribed users get updated in som
},
{
"occaecatff": -19999999.999999955,
"userId": "f47a7e1e-4b2f-4d3d-3f3c-1f0f0e4b7e1e",
"userId": "351",
"username": "occaecat Lorem in",
"scopes": [
"occaecat Lorem in",
Expand Down
11 changes: 2 additions & 9 deletions schema/compiled.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,7 @@
"status"
]
},
"userId": {
"type": "string",
"format": "uuid",
"examples": ["f47a7e1e-4b2f-4d3d-3f3c-1f0f0e4b7e1e"]
}
"userId": { "type": "string", "examples": ["351"] }
},
"anyOf": [
{
Expand Down Expand Up @@ -1860,10 +1856,7 @@
"properties": {
"userId": {
"type": "string",
"format": "uuid",
"examples": [
"f47a7e1e-4b2f-4d3d-3f3c-1f0f0e4b7e1e"
]
"examples": ["351"]
},
"username": { "type": "string" },
"displayName": { "type": "string" },
Expand Down
3 changes: 1 addition & 2 deletions schema/definitions/userId.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@
"$id": "https://schema.beyondallreason.dev/tachyon/definitions/userId.json",
"title": "UserId",
"type": "string",
"format": "uuid",
"examples": ["f47a7e1e-4b2f-4d3d-3f3c-1f0f0e4b7e1e"]
"examples": ["351"]
}
5 changes: 1 addition & 4 deletions schema/user/updated/event.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,7 @@
"properties": {
"userId": {
"type": "string",
"format": "uuid",
"examples": [
"f47a7e1e-4b2f-4d3d-3f3c-1f0f0e4b7e1e"
]
"examples": ["351"]
},
"username": { "type": "string" },
"displayName": { "type": "string" },
Expand Down
3 changes: 1 addition & 2 deletions src/schema/definitions/userId.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ import { Type } from "@sinclair/typebox";

export const userId = Type.String({
$id: "userId",
format: "uuid",
examples: ["f47a7e1e-4b2f-4d3d-3f3c-1f0f0e4b7e1e"],
examples: ["351"],
});