37 lines
664 B
Markdown
37 lines
664 B
Markdown
# CharacterApi document shapes
|
|
|
|
This service expects JSON request bodies for character creation and stores
|
|
character documents in MongoDB.
|
|
|
|
Inbound JSON documents
|
|
- CreateCharacterRequest (`POST /api/characters`)
|
|
```json
|
|
{
|
|
"name": "string"
|
|
}
|
|
```
|
|
- MoveCharacterRequest (`PUT /api/characters/{id}/move`)
|
|
```json
|
|
{
|
|
"coord": {
|
|
"x": 0,
|
|
"y": 0
|
|
}
|
|
}
|
|
```
|
|
|
|
Stored documents (MongoDB)
|
|
- Character
|
|
```json
|
|
{
|
|
"id": "string (ObjectId)",
|
|
"ownerUserId": "string",
|
|
"name": "string",
|
|
"coord": {
|
|
"x": "number",
|
|
"y": "number"
|
|
},
|
|
"createdUtc": "string (ISO-8601 datetime)"
|
|
}
|
|
```
|