{"openapi":"3.0.0","paths":{"/squads":{"get":{"description":"Retrieves all the squads, but not their members","operationId":"SquadsController_getAllSquads","parameters":[{"name":"delayMs","required":false,"in":"query","description":"A delay in milliseconds before returning the result","schema":{"type":"number"}}],"responses":{"200":{"description":"The available squads","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllSquadsResultDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseDto"}}}}},"summary":"Get all squads","tags":["squads"]}},"/squads/{id}/devs":{"get":{"description":"Retrieves the squad developers","operationId":"SquadsController_getSquadsDevelopers","parameters":[{"name":"delayMs","required":false,"in":"query","description":"A delay in milliseconds before returning the result","schema":{"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page to fetch, starting at 1","schema":{"type":"number"}},{"name":"byPage","required":false,"in":"query","description":"Numbers of developers to fetch per page","schema":{"type":"number"}},{"name":"id","required":true,"in":"path","schema":{"type":"number"}}],"responses":{"200":{"description":"The squad developers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SquadsDevelopersResultDto"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestDto"}}}},"404":{"description":"The requested squad wasn't found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseDto"}}}}},"summary":"Get the developers belonging to a squad","tags":["squads"]}},"/devs":{"get":{"description":"Retrieves all developers, but not their squad","operationId":"DevsController_getAllDevelopers","parameters":[{"name":"delayMs","required":false,"in":"query","description":"A delay in milliseconds before returning the result","schema":{"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page to fetch, starting at 1","schema":{"type":"number"}},{"name":"byPage","required":false,"in":"query","description":"Numbers of developers to fetch per page","schema":{"type":"number"}}],"responses":{"200":{"description":"The available developers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AllDevsResultDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseDto"}}}}},"summary":"Get all developers","tags":["devs"]}},"/devs/change-squad":{"post":{"description":"Changes the squad of the developer","operationId":"DevsController_changeDeveloperSquad","parameters":[{"name":"delayMs","required":false,"in":"query","description":"A delay in milliseconds before returning the result","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeSquadBodyDto"}}}},"responses":{"200":{"description":"A message containing the name of the developer and his new squad","schema":{"example":"Yolo McCool moved to squad 4"},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChangeSquadResultDto"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestDto"}}}},"404":{"description":"We may receive a not found if either the developers or the squad could not be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseDto"}}}}},"summary":"Moves the developer to another squad","tags":["devs"]}},"/devs/by-squads":{"post":{"description":"Retrieves the developers belonging to a set of squads","operationId":"DevsController_getDevelopersBySquads","parameters":[{"name":"delayMs","required":false,"in":"query","description":"A delay in milliseconds before returning the result","schema":{"type":"number"}},{"name":"page","required":false,"in":"query","description":"Page to fetch, starting at 1","schema":{"type":"number"}},{"name":"byPage","required":false,"in":"query","description":"Numbers of developers to fetch per page","schema":{"type":"number"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevelopersBySquadsBodyDto"}}}},"responses":{"201":{"description":"The developers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DevelopersBySquadsResultDto"}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestDto"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiResponseDto"}}}}},"summary":"Get developers belonging to one or several squads","tags":["devs"]}}},"info":{"title":"Devfriends backend","description":"The backend of our wonderful dev friends app!","version":"1.0","contact":{}},"tags":[],"servers":[],"components":{"securitySchemes":{"bearer":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"SquadDto":{"type":"object","properties":{"id":{"type":"number"},"name":{"type":"string"},"devsCount":{"type":"number"}},"required":["id","name","devsCount"]},"AllSquadsResultDto":{"type":"object","properties":{"result":{"type":"array","items":{"$ref":"#/components/schemas/SquadDto"}}},"required":["result"]},"ApiResponseDto":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"type":"string"}},"required":["statusCode","message"]},"DevDto":{"type":"object","properties":{"id":{"type":"number"},"idSquad":{"type":"number"},"firstName":{"type":"string"},"avatar":{"type":"string"}},"required":["id","idSquad","firstName","avatar"]},"SquadsDevelopersResultDto":{"type":"object","properties":{"PreviousPage":{"type":"number"},"currentPage":{"type":"number"},"nextPage":{"type":"number"},"lastPage":{"type":"number"},"total":{"type":"number"},"result":{"type":"array","items":{"$ref":"#/components/schemas/DevDto"}}},"required":["currentPage","lastPage","total","result"]},"BadRequestDto":{"type":"object","properties":{"statusCode":{"type":"number"},"message":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"error":{"type":"string"}},"required":["statusCode","message","error"]},"AllDevsResultDto":{"type":"object","properties":{"PreviousPage":{"type":"number"},"currentPage":{"type":"number"},"nextPage":{"type":"number"},"lastPage":{"type":"number"},"total":{"type":"number"},"result":{"type":"array","items":{"$ref":"#/components/schemas/DevDto"}}},"required":["currentPage","lastPage","total","result"]},"ChangeSquadBodyDto":{"type":"object","properties":{"idDev":{"type":"number"},"idSquad":{"type":"number"}},"required":["idDev","idSquad"]},"ChangeSquadResultDto":{"type":"object","properties":{"result":{"type":"string"}},"required":["result"]},"DevelopersBySquadsBodyDto":{"type":"object","properties":{"idSquads":{"type":"array","items":{"type":"number"}}},"required":["idSquads"]},"DevelopersBySquadsResultDto":{"type":"object","properties":{"PreviousPage":{"type":"number"},"currentPage":{"type":"number"},"nextPage":{"type":"number"},"lastPage":{"type":"number"},"total":{"type":"number"},"result":{"type":"array","items":{"$ref":"#/components/schemas/DevDto"}}},"required":["currentPage","lastPage","total","result"]}}}}