{"openapi":"3.0.0","servers":[{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/clairekeer1997/6156Project/1.0.0"},{"description":"SwaggerHub API Auto Mocking","url":"https://virtserver.swaggerhub.com/clairekeer1997/Sprint0/1.0.0"}],"info":{"version":"1.0.0","title":"API Spec - 6156 Project","description":"The API spec for 6156 cloud computing project"},"paths":{"/posts":{"get":{"tags":["Post"],"description":"returns all posts","operationId":"getStudents","parameters":[{"in":"query","name":"offset","schema":{"type":"integer","format":"int32"}},{"in":"query","name":"limit","description":"max number of records to return","schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"All posts","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Post"}}}}}}}},"/posts/{user_id}/new":{"post":{"tags":["Post"],"description":"Add new post","operationId":"setPosts","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully added post"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Post"}}}}}},"/posts/{user_id}/{post_id}":{"delete":{"tags":["Post"],"description":"Add new post","operationId":"deletePosts","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"post_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully deleted post"}}}},"/api/users/{user_id}/new":{"post":{"tags":["User"],"description":"create a new user","operationId":"setUser","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"responses":{"200":{"description":"Successfully added user"}}}},"/api/users/{user_id}":{"get":{"tags":["User"],"description":"returns user information","operationId":"getUser","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"All users","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/User"}}}}}}},"put":{"tags":["User"],"description":"Update user information","operationId":"updateUser","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}},"responses":{"200":{"description":"Successfully updated user"}}}},"/schedule":{"post":{"tags":["Schedule"],"description":"create a new schedule","operationId":"setSchedule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"responses":{"200":{"description":"Successfully added user"}}}},"/api/schedule/{schedule_id}":{"get":{"tags":["Schedule"],"description":"returns schedule information","operationId":"getSchedule","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"All schedules","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Schedule"}}}}}}},"put":{"tags":["Schedule"],"description":"Update schedule information","operationId":"updateSchedule","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"responses":{"200":{"description":"Successfully updated schedule"}}},"delete":{"tags":["Schedule"],"description":"Delete schedule information","operationId":"deleteSchedule","parameters":[{"name":"schedule_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully deleted schedule"}}}},"/schedule/find":{"post":{"tags":["Schedule"],"description":"find the matched schedules by date/time","operationId":"matchSchedule","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"responses":{"200":{"description":"All macthed schedules","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Schedule"}}}}}}}},"/matches/{user_id}":{"post":{"tags":["Match"],"description":"returns all matched schedules","operationId":"getMatches","parameters":[{"name":"user_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Schedule"}}}},"responses":{"200":{"description":"All schedules","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Match"}}}}}}}}},"components":{"schemas":{"ApiResponse":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string","example":"everything is ok"}}},"Schedule":{"type":"object","properties":{"user_id":{"type":"string","example":"abc"},"date":{"type":"string","example":"2022-12-12"},"start_time":{"type":"string","example":"12:00 PM"},"end_time":{"type":"string","example":"15:00 PM"}}},"Match":{"type":"object","properties":{"date":{"type":"string","example":"2022-12-12"},"start_time":{"type":"string","example":"12:00 PM"},"end_time":{"type":"string","example":"15:00 PM"},"name":{"type":"string","example":"Tony"},"email":{"type":"string","example":"abc@gmail.com"},"phone_number":{"type":"string","example":"123-456-7890"}}},"Post":{"type":"object","properties":{"user_id":{"type":"string","example":"abc123"},"post_id":{"type":"string"},"post_time":{"type":"string"},"description":{"type":"string"},"image_link":{"type":"string"},"title":{"type":"string"}}},"Post_new":{"type":"object","properties":{"description":{"type":"string"},"image":{"type":"string"},"title":{"type":"string"}}},"User":{"type":"object","properties":{"first_name":{"type":"string","example":"Tony"},"last_name":{"type":"string","example":"Lee"},"email":{"type":"string","example":"abc@gmail.com"},"phone_number":{"type":"string","example":"123-456-7890"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip_code":{"type":"string"}}},"Address":{"type":"object","properties":{"address_id":{"type":"integer","format":"int64"},"address1":{"type":"string"},"address2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"zip_code":{"type":"integer","format":"int64"}}},"Phone":{"type":"object","properties":{"phone_id":{"type":"integer","format":"int64"},"phone_number":{"type":"string","example":"123-456-7890"}}},"Email":{"type":"object","properties":{"email_id":{"type":"integer","format":"int64"},"email_address":{"type":"string","format":"email"}}}}}}