{"openapi":"3.0.0","info":{"title":"48x4000 ","description":"API for 48x4000 site","version":"1.0"},"servers":[{"url":"/api"}],"paths":{"/user/{username}":{"get":{"summary":"Return a user by username.","operationId":"core.user.find_one","parameters":[{"name":"username","in":"path","schema":{"type":"string"},"description":"Username to get","required":true}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/User"}}}}}}},"/user":{"post":{"description":"create new user","operationId":"core.user.create","parameters":[{"name":"username","in":"query","required":true,"schema":{"$ref":"#/components/schemas/User"}},{"name":"password","in":"query","required":true,"schema":{"$ref":"#/components/schemas/User"}}],"responses":{"200":{"description":"Successfully created new user."},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}},"/mountains":{"get":{"description":"Return lists of mountains","operationId":"core.mountain.read_all","responses":{"200":{"description":"Sucessfully returns list of all mountains","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Mountain"}}}}}}}},"/mountain":{"post":{"description":"Create a new mountain","operationId":"core.mountain.create","parameters":[{"name":"mountain","in":"query","schema":{"$ref":"#/components/schemas/Mountain"}}],"responses":{"200":{"description":"Successfully created a mountain"},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}},"/mountain/{name}":{"get":{"summary":"Return a mountain by name.","operationId":"core.mountain.read_one","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Mountain"}}}}}}},"/statuses/{userid}":{"get":{"summary":"Get all statuses for a given user","operationId":"core.statuses.read_all","parameters":[{"name":"userid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Ok","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Statuses"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}},"/status":{"put":{"operationId":"core.statuses.update","parameters":[{"name":"userId","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Statuses"}},{"name":"mountainId","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Statuses"}},{"name":"status","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Statuses"}}],"responses":{"200":{"description":"Successfully created updated status."},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}},"post":{"summary":"create new status for user","operationId":"core.statuses.create","parameters":[{"name":"userId","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Statuses"}},{"name":"mountainId","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Statuses"}},{"name":"status","in":"query","required":true,"schema":{"$ref":"#/components/schemas/Statuses"}}],"responses":{"200":{"description":"Successfully created new status."},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}},"components":{"schemas":{"User":{"required":["password","username"],"type":"object","properties":{"id":{"type":"integer"},"username":{"type":"string"},"password":{"type":"string"}}},"Mountain":{"required":["name"],"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"elevation":{"type":"string"}}},"Statuses":{"required":["mountainId","status","userId"],"type":"object","properties":{"userId":{"type":"integer"},"mountainId":{"type":"integer"},"status":{"type":"boolean"}}},"inline_response_400":{"type":"object","properties":{"message":{"type":"string"}}}},"responses":{"400Error":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/inline_response_400"}}}}}}}