{"openapi":"3.0.1","info":{"title":"OpenAPI definition","version":"v0"},"servers":[{"url":"http://127.0.0.1:42651","description":"Generated server url"}],"paths":{"/api/workout":{"get":{"tags":["workout-controller"],"operationId":"getAllWorkouts","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkoutResponseDto"}}}}}}},"post":{"tags":["workout-controller"],"operationId":"addWorkout","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWorkoutDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkoutResponseDto"}}}}}}},"/api/workout/{workoutId}/exercise":{"get":{"tags":["workout-exercise-controller"],"operationId":"getWorkoutExercises","parameters":[{"name":"workoutId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkoutExerciseResponseDto"}}}}}}},"post":{"tags":["workout-exercise-controller"],"operationId":"addWorkoutExercise","parameters":[{"name":"workoutId","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddWorkoutExerciseDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkoutExerciseResponseDto"}}}}}}},"/api/exercise":{"get":{"tags":["exercise-controller"],"operationId":"getAllExercises","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ExerciseResponseDto"}}}}}}},"post":{"tags":["exercise-controller"],"operationId":"addExercise","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddExerciseDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExerciseResponseDto"}}}}}}},"/api/auth/signup":{"post":{"tags":["authentication-controller"],"operationId":"signup","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/User"}}}}}}},"/api/auth/login":{"post":{"tags":["authentication-controller"],"operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LoginResponseDto"}}}}}}},"/api/workout/{id}":{"get":{"tags":["workout-controller"],"operationId":"getWorkoutById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkoutResponseDto"}}}}}},"delete":{"tags":["workout-controller"],"operationId":"deleteWorkoutById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkoutResponseDto"}}}}}},"patch":{"tags":["workout-controller"],"operationId":"updateUserById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkoutDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkoutResponseDto"}}}}}}},"/api/workout-exercise/{id}":{"delete":{"tags":["workout-exercise-controller"],"operationId":"deleteWorkoutExercise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkoutExerciseResponseDto"}}}}}},"patch":{"tags":["workout-exercise-controller"],"operationId":"updateWorkoutExercise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkoutExchangeDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/WorkoutExerciseResponseDto"}}}}}}},"/api/exercise/{id}":{"get":{"tags":["exercise-controller"],"operationId":"getExerciseById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExerciseResponseDto"}}}}}},"delete":{"tags":["exercise-controller"],"operationId":"deleteExercise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExerciseResponseDto"}}}}}},"patch":{"tags":["exercise-controller"],"operationId":"updateExercise","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddExerciseDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ExerciseResponseDto"}}}}}}},"/api/workout/user/{id}":{"get":{"tags":["workout-controller"],"operationId":"getWorkoutByUserId","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkoutResponseDto"}}}}}}}},"/api/user":{"get":{"tags":["user-controller"],"operationId":"index","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserResponseDto"}}}}}}}},"/api/user/{id}":{"get":{"tags":["user-controller"],"operationId":"getById","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int32"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserResponseDto"}}}}}}},"/api/test":{"get":{"tags":["index-controller"],"operationId":"test","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}},"/api/health":{"get":{"tags":["index-controller"],"operationId":"health","responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"type":"string"}}}}}}}},"components":{"schemas":{"AddWorkoutDto":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"userId":{"type":"integer","format":"int64"}}},"WorkoutResponseDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"title":{"type":"string"},"description":{"type":"string"},"date":{"type":"string","format":"date-time"},"userId":{"type":"integer","format":"int64"}}},"AddWorkoutExerciseDto":{"type":"object","properties":{"exerciseId":{"type":"integer","format":"int64"},"sets":{"type":"integer","format":"int32"},"reps":{"type":"integer","format":"int32"},"weight":{"type":"number","format":"float"}}},"ExerciseResponseDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"}}},"WorkoutExerciseResponseDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"exercise":{"$ref":"#/components/schemas/ExerciseResponseDto"},"workoutId":{"type":"integer","format":"int64"},"sets":{"type":"integer","format":"int32"},"reps":{"type":"integer","format":"int32"},"weight":{"type":"number","format":"float"}}},"AddExerciseDto":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"}}},"SignupDto":{"type":"object","properties":{"username":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"}}},"GrantedAuthority":{"type":"object","properties":{"authority":{"type":"string"}}},"User":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"email":{"type":"string"},"password":{"type":"string"},"authorities":{"type":"array","items":{"$ref":"#/components/schemas/GrantedAuthority"}},"enabled":{"type":"boolean"},"accountNonExpired":{"type":"boolean"},"accountNonLocked":{"type":"boolean"},"credentialsNonExpired":{"type":"boolean"}}},"LoginDto":{"type":"object","properties":{"email":{"type":"string"},"password":{"type":"string"}}},"LoginResponseDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"email":{"type":"string"},"token":{"type":"string"},"expiration":{"type":"integer","format":"int64"},"message":{"type":"string"}}},"UpdateWorkoutDto":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}}},"UpdateWorkoutExchangeDto":{"type":"object","properties":{"sets":{"type":"integer","format":"int32"},"reps":{"type":"integer","format":"int32"},"weight":{"type":"number","format":"float"}}},"UserResponseDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"username":{"type":"string"},"email":{"type":"string"},"enabled":{"type":"boolean"}}}}}}