forked from SRS3-project/game-backend-nest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame-backend-openapi.json
1 lines (1 loc) · 4.72 KB
/
game-backend-openapi.json
1
{"openapi":"3.0.0","paths":{"/":{"get":{"operationId":"AppController_getHello","parameters":[],"responses":{"200":{"description":""}}}},"/player":{"post":{"operationId":"PlayerController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePlayerDto"}}}},"responses":{"201":{"description":""}},"tags":["player"]},"get":{"operationId":"PlayerController_findAll","parameters":[],"responses":{"200":{"description":""}},"tags":["player"]}},"/player/{username}":{"get":{"operationId":"PlayerController_findOne","parameters":[{"name":"username","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["player"]},"delete":{"operationId":"PlayerController_remove","parameters":[{"name":"username","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["player"]}},"/player/resources/{username}":{"get":{"operationId":"PlayerController_getResources","parameters":[{"name":"username","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["player"]}},"/player/troops/{username}":{"get":{"operationId":"PlayerController_getTroops","parameters":[{"name":"username","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["player"]}},"/player/techs/{username}":{"get":{"operationId":"PlayerController_getTechs","parameters":[{"name":"username","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["player"]}},"/player/update":{"patch":{"operationId":"PlayerController_update","parameters":[{"name":"username","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePlayerDto"}}}},"responses":{"200":{"description":""}},"tags":["player"]}},"/player/techs":{"patch":{"operationId":"PlayerController_updateTechs","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTechDto"}}}},"responses":{"200":{"description":""}},"tags":["player"]}},"/game/attack":{"post":{"operationId":"GameController_doAttack","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAttackDto"}}}},"responses":{"201":{"description":""}},"tags":["game"]}},"/game/build":{"post":{"operationId":"GameController_buildTroop","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateArmyDto"}}}},"responses":{"201":{"description":""}},"tags":["game"]}}},"info":{"title":"SRS-Game","description":"The SRS Project - Group 3","version":"1.0","contact":{}},"tags":[{"name":"game","description":""}],"servers":[],"components":{"schemas":{"CreatePlayerDto":{"properties":{"username":{"minLength":1,"type":"string"},"xp":{"minLength":1,"type":"string"},"level":{"minLength":1,"type":"string"},"resources":{"items":{},"minItems":4,"type":"array"},"troops":{"items":{},"minItems":14,"type":"array"},"techs":{"items":{},"minItems":16,"type":"array"},"x":{},"y":{},"attack":{"items":{},"type":"array"},"createdAt":{},"updatedAt":{},"deleted":{}},"type":"object","required":["username","xp","level"]},"PartialTypeClass":{"properties":{"username":{"minLength":1,"type":"string"},"xp":{"minLength":1,"type":"string"},"level":{"minLength":1,"type":"string"},"resources":{"items":{},"minItems":4,"type":"array"},"troops":{"items":{},"minItems":14,"type":"array"},"techs":{"items":{},"minItems":16,"type":"array"},"x":{},"y":{},"attack":{"items":{},"type":"array"},"createdAt":{},"updatedAt":{},"deleted":{}},"type":"object","required":["username","xp","level"]},"CreateAttackDto":{"properties":{"fromUsername":{"minLength":1,"type":"string"},"enemyUsername":{"minLength":1,"type":"string"},"army":{"$ref":"#/definitions/Array","minLength":1,"type":"string"}},"type":"object","required":["fromUsername","enemyUsername","army"]},"CreateArmyDto":{"properties":{"type":{"minLength":1,"type":"string","enum":["WANDERERS","CARAVAN","SETTLERS","SPY","JACKAL","ARCHER","INFANTRYMAN","CROSSBOWMAN","KNIGHT","WAREAGLE","NEUROMANCER","GROUNDTROLL","DRAGON","TITAN"]},"amount":{"minLength":1,"type":"number","minimum":0}},"type":"object","required":["type","amount"]},"CreateTechDto":{"properties":{"username":{"minLength":1,"type":"string"},"type":{"minLength":1,"type":"string","enum":["PICKS","AXES","CRUCIBLE","STORAGE","WAGONS","MOUNTS","EAGLES","SPACEANDTIME","WEAPONS","ARMORS","ARCANOMANCY","ESPIONAGE","LOGISTIC","STRATEGY","EXPLORATION","TARTARUS"]},"level":{"minLength":1,"type":"number","minimum":0}},"type":"object","required":["username","type","level"]}}}}