{"openapi":"3.0.1","info":{"title":"3-Sixty-App","version":"1.0","description":""},"servers":[{"url":"http://localhost:3000"}],"paths":{"/goals":{"get":{"summary":"Your GET endpoint","tags":[],"operationId":"get-goals","description":"List all goals for a user","responses":{"200":{"description":"OK","headers":{},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}}}}},"post":{"summary":"","operationId":"post-goals","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}}}},"description":"Creates a new post for a given user"}},"/goals/{goal_id}":{"parameters":[{"schema":{"type":"integer"},"name":"goal_id","in":"path","required":true,"description":"An integer value representing the goals id"}],"get":{"summary":"Your GET endpoint","tags":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"},"examples":{}}}}},"operationId":"get-goals-goal_id","description":"Read a single goal for a user","parameters":[]},"patch":{"summary":"","operationId":"patch-goals-goal_id","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Goal"}}}}},"description":"Update a single goal for a user"},"delete":{"summary":"","operationId":"delete-goals-goal_id","description":"Delete a certain goal","responses":{"204":{"description":"No Content"}}}},"/goals/{goal_id}/subtasks":{"parameters":[{"schema":{"type":"integer"},"name":"goal_id","in":"path","required":true,"description":"An integer value representing the goals id"}],"get":{"summary":"Your GET endpoint","tags":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subtask"},"examples":{}}}}},"operationId":"get-goals-goal_id-subtasks","description":"List all subtasks for a goal"},"post":{"summary":"","operationId":"post-goals-goal_id-subtasks","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subtask"}}}}},"description":"Creates a new subtask for a given goal"}},"/goals/{goal_id}/subtasks/{subtask_id}":{"parameters":[{"schema":{"type":"integer"},"name":"goal_id","in":"path","required":true,"description":"An integer value representing the goals id"},{"schema":{"type":"integer"},"name":"subtask_id","in":"path","required":true,"description":"An integer value representing the subtasks id"}],"get":{"summary":"Your GET endpoint","tags":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subtask"}}}}},"operationId":"get-goals-goal_id-subtasks-subtask_id","description":"Read a single subtask for a goal"},"patch":{"summary":"","operationId":"patch-goals-goal_id-subtasks-subtask_id","responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Subtask"}}}}},"description":"Update a single subtask for a goal"},"delete":{"summary":"","operationId":"delete-goals-goal_id-subtasks-subtask_id","responses":{"204":{"description":"No Content"}},"description":"Delete a certain subtask"}}},"components":{"schemas":{"User":{"title":"User","type":"object","description":"","properties":{"id":{"type":"integer","description":"Unique identifier for the given user."},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string","format":"email"},"date_of_birth":{"type":"string","format":"date","example":"1997-10-31"},"email_verified":{"type":"boolean","description":"Set to true if the user's email has been verified."},"started_at":{"type":"string","format":"date","example":"1997-10-31","description":"Started working at RobustaStudio at the given date"},"position":{"type":"integer","enum":["position 1","position 2","position 3"]},"profile_photo":{"type":"string"},"created_at":{"type":"string","format":"date-time","description":"The date that the user was created.","example":"1997-10-31 12:00:17"},"updated_at":{"type":"string","example":"1997-10-31 12:00:17","format":"date-time"},"goals":{"$ref":"#/components/schemas/Goal"},"certificates":{"$ref":"#/components/schemas/Certificate"},"team":{"$ref":"#/components/schemas/Team"}},"required":["id","first_name","last_name","email","email_verified","started_at","position","profile_photo","team"]},"Team":{"title":"Team","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time","example":"1997-10-31 12:00:17"},"updated_at":{"type":"string","format":"date-time","example":"1997-10-31 12:00:17"}},"required":["id","name"]},"Goal":{"title":"Goal","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"difficulty_points":{"type":"integer"},"created_at":{"type":"string","format":"date-time","example":"1997-10-31 12:00:17"},"updated_at":{"type":"string","format":"date-time","example":"1997-10-31 12:00:17"},"category":{"$ref":"#/components/schemas/Category"},"certificate":{"$ref":"#/components/schemas/Certificate"},"subtasks":{"$ref":"#/components/schemas/Subtask"}},"required":["id","name","difficulty_points","category","subtasks"]},"Subtask":{"title":"Subtask","type":"object","properties":{"id":{"type":"integer"},"details":{"type":"string"},"todo_status":{"type":"integer","enum":["To Do","In Progress","Done"]},"deadline":{"type":"string","format":"date","example":"1997-10-31"},"created_at":{"type":"string","format":"date-time","example":"1997-10-31 12:00:17"},"updated_at":{"type":"string","format":"date-time","example":"1997-10-31 12:00:17"},"goal":{"$ref":"#/components/schemas/Goal"}},"required":["id","details","deadline","goal"]},"Category":{"title":"Category","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"created_at":{"type":"string","format":"date-time","example":"1997-10-31 12:00:17"},"updated_at":{"type":"string","format":"date-time","example":"1997-10-31 12:00:17"}},"required":["id","name"]},"Certificate":{"title":"Certificate","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"photo":{"type":"string"},"created_at":{"type":"string","format":"date-time","example":"1997-10-31 12:00:17"},"updated_at":{"type":"string","format":"date-time","example":"1997-10-31 12:00:17"}},"required":["id","name","description","photo"]}},"requestBodies":{}}}