1 line
3.4 KiB
JSON
1 line
3.4 KiB
JSON
{"openapi":"3.1.0","info":{"title":"api","description":"","license":{"name":""},"version":"0.1.0"},"paths":{"/":{"get":{"operationId":"index","responses":{"200":{"description":"Success","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/.well-known/health-check":{"get":{"summary":"Get health of the API.","operationId":"health_check","responses":{"200":{"description":"Success","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["auth"],"summary":"Login","operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginBody"}}},"required":true},"responses":{"200":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/v1/auth/signup":{"post":{"tags":["auth"],"summary":"Sign up","operationId":"signup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupBody"}}},"required":true},"responses":{"200":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/v1/exercises/create":{"post":{"tags":["exercises"],"operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateExerciseBody"}}},"required":true},"responses":{"200":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}},"/api/v1/muscles/all":{"get":{"tags":["muscles"],"operationId":"get_all","responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Muscle"}}}}}}},"/api/v1/muscles/create":{"post":{"tags":["muscles"],"operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateMuscleBody"}}},"required":true},"responses":{"200":{"description":"","content":{"text/plain":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"CreateExerciseBody":{"type":"object","required":["name","exercise_type","description","body_parts","primary_muscles","secondary_muscles"],"properties":{"body_parts":{"type":"array","items":{"type":"string"}},"description":{"type":"string"},"exercise_type":{"$ref":"#/components/schemas/ExerciseType"},"name":{"type":"string"},"primary_muscles":{"type":"array","items":{"type":"string"}},"secondary_muscles":{"type":"array","items":{"type":"string"}}}},"CreateMuscleBody":{"type":"object","required":["name","scientific_name","major_group","minor_group"],"properties":{"major_group":{"type":"string"},"minor_group":{"type":"string"},"name":{"type":"string"},"scientific_name":{"type":"string"}}},"ExerciseType":{"type":"string","enum":["Dumbbell","Barbell","Bodyweight","Machine","Kettlebell","ResistanceBand","Cable","MedicineBall","Plyometric","PlateLoadedMachine"]},"LoginBody":{"type":"object","required":["username","password"],"properties":{"password":{"type":"string"},"username":{"type":"string"}}},"Muscle":{"type":"object","required":["id","name","minor_group"],"properties":{"id":{"type":"string"},"major_group":{"type":["string","null"]},"minor_group":{"type":"string"},"name":{"type":"string"},"scientific_name":{"type":["string","null"]}}},"SignupBody":{"type":"object","required":["real_name","username","email","password"],"properties":{"email":{"type":"string"},"password":{"type":"string"},"real_name":{"type":"string"},"username":{"type":"string"}}}}},"tags":[{"name":"auth","description":"Authentication API endpoints"},{"name":"exercises","description":"Exercise API endpoints"},{"name":"muscles","description":"Muscle API endpoints"}]} |