This repository has been archived by the owner on Mar 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
openapi.json
1 lines (1 loc) · 6.98 KB
/
openapi.json
1
{"components":{"schemas":{"Direction":{"enum":["NORTH","EAST","SOUTH","WEST"],"title":"Direction","type":"string"},"ImagePredictionRequest":{"properties":{"file":{"format":"binary","title":"File","type":"string"}},"required":["file"],"title":"ImagePredictionRequest","type":"object"},"ImagePredictionResponse":{"properties":{"images":{"items":{"$ref":"#/components/schemas/ImagePredictionResponseImage"},"title":"Images","type":"array"}},"required":["images"],"title":"ImagePredictionResponse","type":"object"},"ImagePredictionResponseImage":{"properties":{"confidence":{"title":"Confidence","type":"number"},"image_id":{"title":"Image Id","type":"integer"}},"required":["image_id","confidence"],"title":"ImagePredictionResponseImage","type":"object"},"MiscInstruction":{"enum":["CAPTURE_IMAGE","RESET_GYROSCOPE"],"title":"MiscInstruction","type":"string"},"Move":{"enum":["FORWARD","BACKWARD"],"title":"Move","type":"string"},"PathfindingPoint":{"properties":{"x":{"minimum":0.0,"title":"X","type":"integer"},"y":{"minimum":0.0,"title":"Y","type":"integer"}},"required":["x","y"],"title":"PathfindingPoint","type":"object"},"PathfindingRequest":{"properties":{"obstacles":{"items":{"$ref":"#/components/schemas/PathfindingRequestObstacle"},"minItems":1,"title":"Obstacles","type":"array"},"robot":{"allOf":[{"$ref":"#/components/schemas/PathfindingRequestRobot"}],"description":"The initial position of the robot."},"verbose":{"default":true,"description":"Whether to attach the path and cost alongside the movement instructions in the response.","title":"Verbose","type":"boolean"}},"required":["robot","obstacles"],"title":"PathfindingRequest","type":"object"},"PathfindingRequestObstacle":{"properties":{"direction":{"allOf":[{"$ref":"#/components/schemas/Direction"}],"description":"The direction of the image."},"image_id":{"description":"The image ID.","minimum":1.0,"title":"Image Id","type":"integer"},"north_east":{"allOf":[{"$ref":"#/components/schemas/PathfindingPoint"}],"description":"The north-east corner of the obstacle."},"south_west":{"allOf":[{"$ref":"#/components/schemas/PathfindingPoint"}],"description":"The south-west corner of the obstacle."}},"required":["image_id","direction","south_west","north_east"],"title":"PathfindingRequestObstacle","type":"object"},"PathfindingRequestRobot":{"properties":{"direction":{"allOf":[{"$ref":"#/components/schemas/Direction"}],"description":"The direction of the robot."},"north_east":{"allOf":[{"$ref":"#/components/schemas/PathfindingPoint"}],"description":"The north-east corner of the robot."},"south_west":{"allOf":[{"$ref":"#/components/schemas/PathfindingPoint"}],"description":"The south-west corner of the robot."}},"required":["direction","south_west","north_east"],"title":"PathfindingRequestRobot","type":"object"},"PathfindingResponse":{"properties":{"segments":{"description":"The data for moving the robot from the start/objective to another objective.","items":{"$ref":"#/components/schemas/PathfindingResponseSegment"},"title":"Segments","type":"array"}},"required":["segments"],"title":"PathfindingResponse","type":"object"},"PathfindingResponseMoveInstruction":{"properties":{"amount":{"description":"The amount to move the robot in centimetres.","minimum":1.0,"title":"Amount","type":"integer"},"move":{"$ref":"#/components/schemas/Move"}},"required":["move","amount"],"title":"PathfindingResponseMoveInstruction","type":"object"},"PathfindingResponseSegment":{"properties":{"cost":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"The cost, included only if verbose is true.","title":"Cost"},"image_id":{"title":"Image Id","type":"integer"},"instructions":{"items":{"anyOf":[{"$ref":"#/components/schemas/MiscInstruction"},{"$ref":"#/components/schemas/TurnInstruction"},{"$ref":"#/components/schemas/PathfindingResponseMoveInstruction"}]},"title":"Instructions","type":"array"},"path":{"anyOf":[{"items":{"$ref":"#/components/schemas/PathfindingVector"},"type":"array"},{"type":"null"}],"description":"The path (unordered), included only if verbose is true.","title":"Path"}},"required":["image_id","cost","instructions","path"],"title":"PathfindingResponseSegment","type":"object"},"PathfindingVector":{"properties":{"direction":{"allOf":[{"$ref":"#/components/schemas/Direction"}],"description":"The direction"},"x":{"minimum":0.0,"title":"X","type":"integer"},"y":{"minimum":0.0,"title":"Y","type":"integer"}},"required":["direction","x","y"],"title":"PathfindingVector","type":"object"},"TurnInstruction":{"enum":["FORWARD_LEFT","FORWARD_RIGHT","BACKWARD_LEFT","BACKWARD_RIGHT"],"title":"TurnInstruction","type":"string"},"ValidationErrorModel":{"properties":{"ctx":{"anyOf":[{"type":"object"},{"type":"null"}],"description":"an optional object which contains values required to render the error message.","title":"Error context"},"loc":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"description":"the error's location as a list. ","title":"Location"},"msg":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"a computer-readable identifier of the error type.","title":"Message"},"type_":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"a human readable explanation of the error.","title":"Error Type"}},"title":"ValidationErrorModel","type":"object"}}},"info":{"title":"MDP API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/image/prediction/task-1":{"post":{"operationId":"_image_prediction_task_1_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ImagePredictionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagePredictionResponse"}}},"description":"OK"},"422":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ValidationErrorModel"},"type":"array"}}},"description":"Unprocessable Entity"}},"tags":["Image Recognition"]}},"/image/prediction/task-2":{"post":{"operationId":"_image_prediction_task_2_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ImagePredictionRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImagePredictionResponse"}}},"description":"OK"},"422":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ValidationErrorModel"},"type":"array"}}},"description":"Unprocessable Entity"}},"tags":["Image Recognition"]}},"/image/stitch":{"post":{"operationId":"_image_stitch_post","responses":{},"tags":["Image Recognition"]}},"/pathfinding/":{"post":{"operationId":"_pathfinding__post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PathfindingRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PathfindingResponse"}}},"description":"OK"},"422":{"content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ValidationErrorModel"},"type":"array"}}},"description":"Unprocessable Entity"}},"tags":["Pathfinding"]}}},"tags":[{"name":"Pathfinding"},{"name":"Image Recognition"}]}