{"openapi":"3.1.0","info":{"title":"School Booking Platform Backend","contact":{"name":"Koder95","url":"https://github.com/koder95","email":"kontakt@koder95.pl"},"license":{"name":"The MIT License","url":"https://opensource.org/licenses/MIT"},"version":"1.0.12-alpha"},"servers":[{"url":"https://sbp-backend-development.up.railway.app","description":"Generated server url"}],"tags":[{"name":"Teacher management","description":"The endpoint to manage teachers"},{"name":"Examples controller","description":"This controller is used to insert example entities"},{"name":"Student management","description":"Endpoints for managing students."},{"name":"Lesson management","description":"The endpoint to manage lessons"},{"name":"Booking controller","description":"This controller is used to manage bookings"},{"name":"Subject management","description":"The endpoint to manage subjects"},{"name":"Resources","description":"Operations related to resources"},{"name":"Availability slots management","description":"The endpoint to manage availability slots"},{"name":"Email retrieval","description":"The endpoint for retrieving emails"},{"name":"Setup controller","description":"This controller is used to init database after create its fresh instance"},{"name":"Authentication management","description":"Provide authentication abilities and user management"}],"paths":{"/api/teachers/{teacherUuid}":{"get":{"tags":["Teacher management"],"summary":"Get teacher by UUID","description":"Retrieve a specific teacher by their UUID. Available for public access.","operationId":"get","parameters":[{"name":"teacherUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TeacherDto"}}}}}},"put":{"tags":["Teacher management"],"summary":"Update teacher","description":"Update an existing teacher by their UUID. Only available for users with ADMIN role.","operationId":"update","parameters":[{"name":"teacherUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeacherRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TeacherDto"}}}}},"security":[{"bearer-key":[]}]},"delete":{"tags":["Teacher management"],"summary":"Delete teacher","description":"Delete a teacher by their UUID. Only available for users with ADMIN role.","operationId":"delete","parameters":[{"name":"teacherUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TeacherDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/teachers/{teacherUuid}/avatar":{"put":{"tags":["Teacher management"],"summary":"Update teacher avatar","description":"Update a teacher avatar by teacher UUID. Only available for users with ADMIN role.","operationId":"updateAvatar","parameters":[{"name":"teacherUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTeacherAvatarRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TeacherDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/teachers/{teacherUuid}/availability":{"get":{"tags":["Teacher management"],"summary":"Get teacher availability by UUID","description":"Retrieve a specific teacher availability by their UUID. Available for public access.","operationId":"getAvailability","parameters":[{"name":"teacherUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AvailabilityDto"}}}}}},"put":{"tags":["Teacher management"],"summary":"Set time availability of the teacher","description":"Update time availability of the teacher (by UUID). Empty values in request are set.","operationId":"updateAvailability","parameters":[{"name":"teacherUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAvailabilityRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AvailabilityDto"}}}}},"security":[{"bearer-key":[]}]},"patch":{"tags":["Teacher management"],"summary":"Add time availability to the teacher","description":"Update time availability of the teacher (by UUID). Empty values in request are ignored.","operationId":"addAvailability","parameters":[{"name":"teacherUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAvailabilityRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/AvailabilityDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/subjects/{id}":{"get":{"tags":["Subject management"],"summary":"Get subject by ID","description":"Retrieve a specific subject by its ID. Available for public access.","operationId":"getOne","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubjectDto"}}}}}},"put":{"tags":["Subject management"],"summary":"Update subject","description":"Update an existing subject by its ID. Only available for users with ADMIN role.","operationId":"update_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSubjectRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubjectDto"}}}}},"security":[{"bearer-key":[]}]},"delete":{"tags":["Subject management"],"summary":"Delete subject","description":"Delete a subject by its ID. Only available for users with ADMIN role.","operationId":"delete_1","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","format":"int64"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubjectDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/students/{studentUuid}/abilities":{"get":{"tags":["Student management"],"summary":"Get abilities for a student","operationId":"getAbilities","parameters":[{"name":"studentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StudentAbilitiesDto"}}}}},"security":[{"bearer-key":[]}]},"put":{"tags":["Student management"],"summary":"Set abilities for a student","operationId":"setAbilities","parameters":[{"name":"studentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStudentAbilitiesRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StudentAbilitiesDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/lessons/{lessonUuid}":{"get":{"tags":["Lesson management"],"summary":"Get lesson by UUID","description":"Get a specific lesson by its UUID","operationId":"getByUuid","parameters":[{"name":"lessonUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LessonDto"}}}}}},"put":{"tags":["Lesson management"],"summary":"Update lesson","description":"Update an existing lesson","operationId":"update_2","parameters":[{"name":"lessonUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateLessonRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LessonDto"}}}}},"security":[{"bearer-key":[]}]},"delete":{"tags":["Lesson management"],"summary":"Delete lesson","description":"Delete an existing lesson","operationId":"delete_2","parameters":[{"name":"lessonUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LessonDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/teachers":{"get":{"tags":["Teacher management"],"summary":"Get all teachers","description":"Retrieve a paginated list of teachers. Only available for users with ADMIN role.","operationId":"getAll","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelTeacherDto"}}}}},"security":[{"bearer-key":[]}]},"post":{"tags":["Teacher management"],"summary":"Create a new teacher","description":"Create a new teacher. Only available for users with ADMIN role.","operationId":"create","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTeacherRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/TeacherDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/teachers/{teacherUuid}/availability/slots":{"get":{"tags":["Teacher management"],"summary":"Get all availability slots for a teacher","description":"Retrieve a paginated list of availability slots for a specific teacher by their UUID. Only available for users with ADMIN role.","operationId":"getAllAvailabilitySlots","parameters":[{"name":"teacherUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelAvailabilitySlotDto"}}}}},"security":[{"bearer-key":[]}]},"post":{"tags":["Teacher management"],"summary":"Generate availability slots for a teacher","description":"Generate availability slots for a specific teacher by their UUID. Only available for users with ADMIN role.","operationId":"generateAvailabilitySlots","parameters":[{"name":"teacherUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelAvailabilitySlotDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/subjects":{"get":{"tags":["Subject management"],"summary":"Get all subjects","description":"Retrieve a paginated list of subjects. Available for public access.","operationId":"getAll_1","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelSubjectDto"}}}}}},"post":{"tags":["Subject management"],"summary":"Create a new subject","description":"Create a new subject. Only available for users with ADMIN role.","operationId":"create_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateSubjectRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubjectDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/students":{"get":{"tags":["Student management"],"summary":"Get all students","description":"Retrieve a paginated list of students. Only available for users with ADMIN role.","operationId":"getAll_2","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelStudentDto"}}}}},"security":[{"bearer-key":[]}]},"post":{"tags":["Student management"],"summary":"Create a new student","description":"Create a new student with the provided email address. Only available for users with ADMIN role.","operationId":"create_2","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateStudentRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StudentDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/setup/examples/install":{"post":{"tags":["Examples controller"],"summary":"Install example data","description":"This endpoint is used to install example data into the database. It is protected by admin role, so only admin can use it.","operationId":"installExamples","parameters":[{"name":"step","in":"query","required":false,"schema":{"type":"integer","format":"int32","default":1,"exclusiveMinimum":0,"maximum":7}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelBookingDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/setup/admin":{"post":{"tags":["Setup controller"],"summary":"Create an admin account","operationId":"createAdmin","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAdminRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/CreateAdminResponseDto"}}}}}}},"/api/lessons":{"get":{"tags":["Lesson management"],"summary":"Get all lessons","description":"Get all lessons with pagination","operationId":"getAll_3","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelLessonDto"}}}}}},"post":{"tags":["Lesson management"],"summary":"Create lesson","description":"Create a new lesson","operationId":"create_3","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateLessonRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/LessonDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/lessons/{lessonUuid}/booking":{"post":{"tags":["Lesson management"],"summary":"Book lesson","description":"Book a lesson as student","operationId":"book","parameters":[{"name":"lessonUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BookingDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/lessons/generate":{"post":{"tags":["Lesson management"],"summary":"Generate lessons","description":"Generate lessons from all availability slots and get all with pagination","operationId":"generate","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelLessonDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/bookings/decision":{"post":{"tags":["Booking controller"],"summary":"Apply booking decision","description":"Apply a decision to a booking","operationId":"applyDecision","parameters":[{"name":"decision","in":"query","required":true,"schema":{"$ref":"#/components/schemas/BookingDecisionDto"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelBookingDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/availability-slots":{"get":{"tags":["Availability slots management"],"summary":"Get all availability slots","description":"Retrieve a paginated list of availability slots.","operationId":"getAll_4","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelAvailabilitySlotDto"}}}}},"security":[{"bearer-key":[]}]},"post":{"tags":["Availability slots management"],"summary":"Generate availability slots","description":"Generate availability slots for a every teacher. This operation may spend much time.","operationId":"generate_1","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelAvailabilitySlotDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/auth/ott":{"post":{"tags":["Authentication management"],"summary":"Generate access token for students","operationId":"login","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StudentLoginRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserLoginResponseDto"}}}}}}},"/api/auth/ott/generate":{"post":{"tags":["Authentication management"],"summary":"Generate OTT token and send it","operationId":"sendOtt","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateOneTimeTokenRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EmailDeliveryInfoDto"}}}}}}},"/api/auth/login":{"post":{"tags":["Authentication management"],"summary":"Generate access token for administrators","operationId":"login_1","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserLoginRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/UserLoginResponseDto"}}}}}}},"/api/students/{studentUuid}":{"get":{"tags":["Student management"],"summary":"Get a student by UUID","description":"Retrieve a student by their unique identifier. Only available for users with ADMIN role.","operationId":"get_1","parameters":[{"name":"studentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StudentDto"}}}}},"security":[{"bearer-key":[]}]},"patch":{"tags":["Student management"],"summary":"Update student info","operationId":"update_3","parameters":[{"name":"studentUuid","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateStudentRequestDto"}}},"required":true},"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StudentDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/teachers/uuids":{"get":{"tags":["Teacher management"],"summary":"Get all teacher's UUIDs","description":"Retrieve a paginated list of teacher's UUIDs. Only available for public access.","operationId":"getAllWithoutEmails","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelTeacherDtoWithoutEmail"}}}}}}},"/api/subjects/{name}":{"get":{"tags":["Subject management"],"summary":"Get subject by name","description":"Retrieve a specific subject by its name. Available for public access.","operationId":"getByName","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/SubjectDto"}}}}}}},"/api/resources":{"get":{"tags":["Resources"],"summary":"Get all resources","description":"Get all resources with pagination","operationId":"getAllResources","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelResourceDto"}}}}}}},"/api/resources/{uuid}":{"get":{"tags":["Resources"],"summary":"Get resource by UUID","description":"Get a specific resource by its UUID","operationId":"getResourceByUuid","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ResourceDto"}}}}}}},"/api/lessons/search":{"get":{"tags":["Lesson management"],"summary":"Search lessons","description":"Search lessons by page and optional filters:\n\n- **from** / **to**: filter by lesson start time range.\n- **open**: if `true`, only still-open lessons; if `false`, only closed lessons.\n- **subject.id**: filter by lesson specific subject\n- **subject.name** / **subject.description**:\n filter by matched name and description pattern\n","operationId":"search","parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"open","in":"query","required":false,"schema":{"type":"boolean"}},{"name":"subject.id","in":"query","required":false,"schema":{"type":"integer","format":"int64"}},{"name":"subject.name","in":"query","required":false,"schema":{"type":"string"}},{"name":"subject.description","in":"query","required":false,"schema":{"type":"string"}},{"name":"assignedTeacherUuid","in":"query","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelLessonDto"}}}}}}},"/api/lessons/booked":{"get":{"tags":["Lesson management"],"summary":"Get all booked lessons","description":"Get all booked lessons by page and include the following roles:\n\n- If you do this as an administrator, you'll get booked lessons **for all students**.\n- If you do this as a student, you'll get booked lessons **for yourself**.\n","operationId":"getBooked","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelLessonDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/emails":{"get":{"tags":["Email retrieval"],"summary":"Get all emails","description":"Retrieve a paginated list of emails","operationId":"getAll_5","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelEmailDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/emails/delivery/logs":{"get":{"tags":["Email retrieval"],"summary":"Get all email delivery logs","description":"Retrieve a paginated list of email delivery logs","operationId":"getAllDeliveryLogs","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelEmailDeliveryInfoDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/bookings":{"get":{"tags":["Booking controller"],"summary":"Get all bookings","description":"Retrieve a list of all bookings","operationId":"getAllBookings","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelBookingDto"}}}}},"security":[{"bearer-key":[]}]}},"/api/bookings/not-accepted-yet":{"get":{"tags":["Booking controller"],"summary":"Get all not accepted yet bookings","description":"Retrieve a list of all not accepted yet bookings","operationId":"getAllNotAcceptedYetBookings","parameters":[{"name":"page","in":"query","description":"Zero-based page index (0..N)","required":false,"schema":{"type":"integer","default":0,"minimum":0}},{"name":"size","in":"query","description":"The size of the page to be returned","required":false,"schema":{"type":"integer","default":20,"minimum":1}},{"name":"sort","in":"query","description":"Sorting criteria in the format: property,(asc|desc). Default sort order is ascending. Multiple sort criteria are supported.","required":false,"schema":{"type":"array","items":{"type":"string"}}}],"responses":{"200":{"description":"OK","content":{"*/*":{"schema":{"$ref":"#/components/schemas/PagedModelBookingDto"}}}}},"security":[{"bearer-key":[]}]}}},"components":{"schemas":{"UpdateTeacherRequestDto":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1},"subjectId":{"type":"integer","format":"int64","exclusiveMinimum":0},"firstName":{"type":"string"},"lastName":{"type":"string"},"zoneId":{"type":"string"},"color":{"type":"string","pattern":"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"},"workType":{"type":"string","enum":["CONTRACT","FREELANCE"]},"workDueDate":{"type":"string","format":"date"},"avatarUrl":{"type":"string"}},"required":["email","subjectId"]},"SubjectDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"name":{"type":"string"},"description":{"type":"string"}}},"TeacherDto":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"email":{"type":"string"},"subject":{"$ref":"#/components/schemas/SubjectDto"},"firstName":{"type":"string"},"lastName":{"type":"string"},"zoneId":{"type":"string"},"color":{"type":"string"},"workType":{"type":"string","enum":["CONTRACT","FREELANCE"]},"workDueDate":{"type":"string","format":"date"},"avatarUrl":{"type":"string"}}},"UpdateTeacherAvatarRequestDto":{"type":"object","properties":{"avatarUrl":{"type":"string","minLength":1}},"required":["avatarUrl"]},"TimeRangeDto":{"type":"object","properties":{"startTime":{"type":"string","format":"time-local"},"endTime":{"type":"string","format":"time-local"}},"required":["endTime","startTime"]},"UpdateAvailabilityRequestDto":{"type":"object","properties":{"monday":{"$ref":"#/components/schemas/TimeRangeDto"},"tuesday":{"$ref":"#/components/schemas/TimeRangeDto"},"wednesday":{"$ref":"#/components/schemas/TimeRangeDto"},"thursday":{"$ref":"#/components/schemas/TimeRangeDto"},"friday":{"$ref":"#/components/schemas/TimeRangeDto"},"lunchBreak":{"$ref":"#/components/schemas/TimeRangeDto"}}},"AvailabilityDto":{"type":"object","properties":{"teacherUuid":{"type":"string","format":"uuid"},"monday":{"$ref":"#/components/schemas/TimeRangeDto"},"tuesday":{"$ref":"#/components/schemas/TimeRangeDto"},"wednesday":{"$ref":"#/components/schemas/TimeRangeDto"},"thursday":{"$ref":"#/components/schemas/TimeRangeDto"},"friday":{"$ref":"#/components/schemas/TimeRangeDto"},"lunchBreak":{"$ref":"#/components/schemas/TimeRangeDto"}}},"UpdateSubjectRequestDto":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"}},"required":["name"]},"UpdateStudentAbilitiesRequestDto":{"type":"object","description":"Supplies information about limits to set.\n","properties":{"remainingLessons":{"type":"integer","format":"int32","description":"Every student has got a number of lessons available for booking\nincreased through buy actions. This value can be change by an admin anyway.\nIf it is equal zero then a student cannot book any lesson.\nWhen this value is bigger than zero then a student can book some lesson and\nafter every action this value decreased by one.\n","title":"Number of remaining lessons available for booking"}},"title":"Update request for abilities of a student"},"StudentAbilitiesDto":{"type":"object","description":"Provides information about limits set for a specific student.\n","properties":{"student":{"$ref":"#/components/schemas/StudentDto","title":"A student"},"remainingLessons":{"type":"integer","format":"int32","description":"Every student has got a number of lessons available for booking\nincreased through buy actions. This value can be change by an admin anyway.\nIf it is equal zero then a student cannot book any lesson.\nWhen this value is bigger than zero then a student can book some lesson and\nafter every action this value decreased by one.\n","title":"Number of remaining lessons available for booking"}},"title":"Abilities of a student"},"StudentDto":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"email":{"type":"string"},"avatarUrl":{"type":"string"},"zoneId":{"type":"string"},"isTrial":{"type":"boolean"}}},"UpdateLessonRequestDto":{"type":"object","properties":{"closingTime":{"type":"string","format":"date-time"},"maxEnrolled":{"type":"integer","format":"int32"}},"required":["closingTime"]},"LessonDto":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"startTime":{"type":"string","format":"date-time"},"subjectId":{"type":"integer","format":"int64"},"teacherUuid":{"type":"string","format":"uuid"},"maxEnrolled":{"type":"integer","format":"int32"},"enrolled":{"type":"integer","format":"int32"},"closingTime":{"type":"string","format":"date-time"}}},"CreateTeacherRequestDto":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1},"subjectId":{"type":"integer","format":"int64","exclusiveMinimum":0},"firstName":{"type":"string"},"lastName":{"type":"string"},"zoneId":{"type":"string"},"color":{"type":"string","pattern":"^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"},"workType":{"type":"string","enum":["CONTRACT","FREELANCE"]},"workDueDate":{"type":"string","format":"date"}},"required":["email","subjectId"]},"AvailabilitySlotDto":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"timestamp":{"type":"string","format":"date-time"},"teachers":{"type":"array","items":{"$ref":"#/components/schemas/TeacherDtoWithoutEmail"},"uniqueItems":true}}},"PageMetadata":{"type":"object","properties":{"size":{"type":"integer","format":"int64"},"number":{"type":"integer","format":"int64"},"totalElements":{"type":"integer","format":"int64"},"totalPages":{"type":"integer","format":"int64"}}},"PagedModelAvailabilitySlotDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/AvailabilitySlotDto"}},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"TeacherDtoWithoutEmail":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"firstName":{"type":"string"},"lastName":{"type":"string"},"subject":{"$ref":"#/components/schemas/SubjectDto"},"color":{"type":"string"},"workType":{"type":"string","enum":["CONTRACT","FREELANCE"]},"workDueDate":{"type":"string","format":"date"},"avatarUrl":{"type":"string"}}},"CreateSubjectRequestDto":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"}},"required":["name"]},"CreateStudentRequestDto":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1},"zoneId":{"type":"string"},"isTrial":{"type":"boolean"}},"required":["email","zoneId"]},"BookingDto":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"},"studentUuid":{"type":"string","format":"uuid"},"lessonUuid":{"type":"string","format":"uuid"},"bookedAt":{"type":"string"},"type":{"type":"string","enum":["ACCEPTED","REQUESTED"]}}},"PagedModelBookingDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/BookingDto"}},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"CreateAdminRequestDto":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1},"password":{"type":"string","maxLength":2147483647,"minLength":10},"zoneId":{"type":"string"}},"required":["email","password"]},"CreateAdminResponseDto":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid"}}},"CreateLessonRequestDto":{"type":"object","properties":{"availabilitySlotUuid":{"type":"string","format":"uuid"},"teacherUuid":{"type":"string","format":"uuid"},"maxEnrolled":{"type":"integer","format":"int32"}},"required":["availabilitySlotUuid","teacherUuid"]},"PagedModelLessonDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/LessonDto"}},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"BookingDecisionDto":{"type":"object","properties":{"accepted":{"type":"array","items":{"type":"string","format":"uuid"},"uniqueItems":true},"rejected":{"type":"array","items":{"type":"string","format":"uuid"},"uniqueItems":true}}},"StudentLoginRequestDto":{"type":"object","properties":{"token":{"type":"string","minLength":1}},"required":["token"]},"UserLoginResponseDto":{"type":"object","properties":{"token":{"type":"string"}}},"GenerateOneTimeTokenRequestDto":{"type":"object","properties":{"email":{"type":"string","format":"email"},"zoneId":{"type":"string"}},"required":["email"]},"EmailDeliveryInfoDto":{"type":"object","properties":{"createdAt":{"type":"string","format":"date-time"},"status":{"type":"string","enum":["PENDING","SENT","FAILED"]},"error":{"type":"string"},"recipient":{"type":"string"}}},"UserLoginRequestDto":{"type":"object","properties":{"email":{"type":"string","format":"email","minLength":1},"password":{"type":"string","minLength":1}},"required":["email","password"]},"UpdateStudentRequestDto":{"type":"object","properties":{"zoneId":{"type":"string"},"avatarUrl":{"type":"string"},"isTrial":{"type":"boolean"}},"required":["zoneId"]},"PagedModelTeacherDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/TeacherDto"}},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"PagedModelTeacherDtoWithoutEmail":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/TeacherDtoWithoutEmail"}},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"PagedModelSubjectDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/SubjectDto"}},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"PagedModelStudentDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/StudentDto"}},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"PagedModelResourceDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/ResourceDto"}},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"ResourceDto":{"type":"object","description":"Data transfer object representing a resource.","properties":{"uuid":{"type":"string","format":"uuid","description":"The unique identifier of the resource.","example":"123e4567-e89b-12d3-a456-426614174000","title":"Resource UUID"},"url":{"type":"string","description":"The URL of the resource.","example":"https://frontend.example.com/resources/avatar.png","title":"Resource URL"},"type":{"type":"string","description":"The type of the resource.","enum":["AVATAR"],"examples":["AVATAR"],"title":"Resource type"}},"title":"Response with a resource"},"EmailDto":{"type":"object","properties":{"id":{"type":"integer","format":"int64"},"value":{"type":"string"}}},"PagedModelEmailDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/EmailDto"}},"page":{"$ref":"#/components/schemas/PageMetadata"}}},"PagedModelEmailDeliveryInfoDto":{"type":"object","properties":{"content":{"type":"array","items":{"$ref":"#/components/schemas/EmailDeliveryInfoDto"}},"page":{"$ref":"#/components/schemas/PageMetadata"}}}},"securitySchemes":{"bearer-key":{"type":"http","description":"authorization with JWT token","scheme":"bearer","bearerFormat":"JWT"}}}}