Loading backend/src/rest/club/router.ts +39 −39 Original line number Diff line number Diff line Loading @@ -112,6 +112,41 @@ export const clubsRouter = Router(); */ clubsRouter.get('/', clubsController.getClubs); /** * @swagger * /api/v1/clubs/search: * get: * summary: Search for a club by ID or name * tags: [Clubs] * parameters: * - in: query * name: id * schema: * type: string * description: The ID of the club to search * required: false * - in: query * name: name * schema: * type: string * description: The name of the club to search * required: false * responses: * 200: * description: The club was successfully found * content: * application/json: * schema: * $ref: '#/components/schemas/Club' * 400: * description: Bad request, the provided data did not match the required schema * 404: * description: Bad request, the provided ID or name did not match any existing club * 500: * description: Some server error */ clubsRouter.get('/search', clubsController.getClub); /** * @swagger * /api/v1/clubs: Loading Loading @@ -202,42 +237,7 @@ clubsRouter.put('/:id', clubsController.updateClub); /** * @swagger * /api/v1/clubs/search: * get: * summary: Search for a club by ID or name * tags: [Clubs] * parameters: * - in: query * name: id * schema: * type: string * description: The ID of the club to search * required: false * - in: query * name: name * schema: * type: string * description: The name of the club to search * required: false * responses: * 200: * description: The club was successfully found * content: * application/json: * schema: * $ref: '#/components/schemas/Club' * 400: * description: Bad request, the provided data did not match the required schema * 404: * description: Bad request, the provided ID or name did not match any existing club * 500: * description: Some server error */ clubsRouter.get('/search', clubsController.getClub); /** * @swagger * /api/v1/clubs/add_playlists/{id}: * /api/v1/clubs/{id}/add_playlists: * put: * summary: Add playlists to a club * tags: [Clubs] Loading Loading @@ -268,11 +268,11 @@ clubsRouter.get('/search', clubsController.getClub); * 500: * description: Some server error */ clubsRouter.put('/add_playlists/:id', clubsController.addPlaylists); clubsRouter.put('/:id/add_playlists', clubsController.addPlaylists); /** * @swagger * /api/v1/clubs/remove_playlists/{id}: * /api/v1/clubs/{id}/remove_playlists: * put: * summary: Remove playlists from a club * tags: [Clubs] Loading Loading @@ -303,4 +303,4 @@ clubsRouter.put('/add_playlists/:id', clubsController.addPlaylists); * 500: * description: Some server error */ clubsRouter.put('/remove_playlists/:id', clubsController.removePlaylists); clubsRouter.put('/:id/remove_playlists', clubsController.removePlaylists); backend/src/rest/movie/router.ts +27 −27 Original line number Diff line number Diff line Loading @@ -84,6 +84,33 @@ export const moviesRouter = Router(); */ moviesRouter.get('/', moviesController.getMovies); /** * @swagger * /api/v1/movies/{id}: * get: * summary: Retrieve a movie from OUR database * tags: [Movies] * parameters: * - in: path * name: id * schema: * type: string * description: The ID of the movie to retrieve * required: true * responses: * 200: * description: The movie was successfully retrieved * content: * application/json: * schema: * $ref: '#/components/schemas/Movie' * 404: * description: The provided ID did not match any existing movie * 500: * description: Some server error */ moviesRouter.get('/:id', moviesController.getMovie); /** * @swagger * /api/v1/movies/trending: Loading Loading @@ -138,30 +165,3 @@ moviesRouter.get('/trending', moviesController.getTrendingMovies); * description: Some server error */ moviesRouter.get('/search', moviesController.searchMovies); /** * @swagger * /api/v1/movies/{id}: * get: * summary: Retrieve a movie from OUR database * tags: [Movies] * parameters: * - in: path * name: id * schema: * type: string * description: The ID of the movie to retrieve * required: true * responses: * 200: * description: The movie was successfully retrieved * content: * application/json: * schema: * $ref: '#/components/schemas/Movie' * 404: * description: The provided ID did not match any existing movie * 500: * description: Some server error */ moviesRouter.get('/:id', moviesController.getMovie); backend/src/rest/playlist/router.ts +51 −51 Original line number Diff line number Diff line Loading @@ -103,6 +103,53 @@ export const playlistsRouter = Router(); */ playlistsRouter.get('/', playlistsController.getPlaylists); /** * @swagger * /api/v1/playlists/search: * get: * summary: Search for a playlist by ID, name, userId or clubId * tags: [Playlists] * parameters: * - in: query * name: id * schema: * type: string * description: The ID of the playlist to search * required: false * - in: query * name: name * schema: * type: string * description: The name of the playlist to search * required: false * - in: query * name: userId * schema: * type: string * description: The userId associated with the playlist to search * required: false * - in: query * name: clubId * schema: * type: string * description: The clubId associated with the playlist to search * required: false * responses: * 200: * description: The playlist was successfully found * content: * application/json: * schema: * $ref: '#/components/schemas/Playlist' * 400: * description: Bad request, the provided data did not match the required schema * 404: * description: Bad request, the provided ID, name, userId or clubId did not match any existing playlist * 500: * description: Some server error */ playlistsRouter.get('/search', playlistsController.getPlaylist); /** * @swagger * /api/v1/playlists: Loading Loading @@ -193,54 +240,7 @@ playlistsRouter.put('/:id', playlistsController.updatePlaylist); /** * @swagger * /api/v1/playlists/search: * get: * summary: Search for a playlist by ID, name, userId or clubId * tags: [Playlists] * parameters: * - in: query * name: id * schema: * type: string * description: The ID of the playlist to search * required: false * - in: query * name: name * schema: * type: string * description: The name of the playlist to search * required: false * - in: query * name: userId * schema: * type: string * description: The userId associated with the playlist to search * required: false * - in: query * name: clubId * schema: * type: string * description: The clubId associated with the playlist to search * required: false * responses: * 200: * description: The playlist was successfully found * content: * application/json: * schema: * $ref: '#/components/schemas/Playlist' * 400: * description: Bad request, the provided data did not match the required schema * 404: * description: Bad request, the provided ID, name, userId or clubId did not match any existing playlist * 500: * description: Some server error */ playlistsRouter.get('/search', playlistsController.getPlaylist); /** * @swagger * /api/v1/playlists/add_movies/{id}: * /api/v1/playlists/{id}/add_movies: * put: * summary: Add movies to a playlist * tags: [Playlists] Loading Loading @@ -271,11 +271,11 @@ playlistsRouter.get('/search', playlistsController.getPlaylist); * 500: * description: Some server error */ playlistsRouter.put('/add_movies/:id', playlistsController.addMovies); playlistsRouter.put('/:id/add_movies', playlistsController.addMovies); /** * @swagger * /api/v1/playlists/remove_movies/{id}: * /api/v1/playlists/{id}/remove_movies: * put: * summary: Remove movies from a playlist * tags: [Playlists] Loading Loading @@ -306,4 +306,4 @@ playlistsRouter.put('/add_movies/:id', playlistsController.addMovies); * 500: * description: Some server error */ playlistsRouter.put('/remove_movies/:id', playlistsController.removeMovies); playlistsRouter.put('/:id/remove_movies', playlistsController.removeMovies); backend/src/rest/post/router.ts +26 −26 Original line number Diff line number Diff line Loading @@ -82,32 +82,6 @@ export const postsRouter = Router(); */ postsRouter.get('/', postsController.getPosts); /** * @swagger * /api/v1/posts: * post: * summary: Create a new post * tags: [Posts] * requestBody: * required: true * content: * application/json: * schema: * $ref: '#/components/schemas/CreatePostRequest' * responses: * 201: * description: The post was successfully created * content: * application/json: * schema: * $ref: '#/components/schemas/Post' * 400: * description: Bad request, the provided data did not match the required schema * 500: * description: Some server error */ postsRouter.post('/', postsController.createPost); /** * @swagger * /api/v1/posts/search: Loading Loading @@ -160,3 +134,29 @@ postsRouter.post('/', postsController.createPost); * description: Some server error */ postsRouter.get('/search', postsController.getPost); /** * @swagger * /api/v1/posts: * post: * summary: Create a new post * tags: [Posts] * requestBody: * required: true * content: * application/json: * schema: * $ref: '#/components/schemas/CreatePostRequest' * responses: * 201: * description: The post was successfully created * content: * application/json: * schema: * $ref: '#/components/schemas/Post' * 400: * description: Bad request, the provided data did not match the required schema * 500: * description: Some server error */ postsRouter.post('/', postsController.createPost); backend/src/rest/review/router.ts +41 −41 Original line number Diff line number Diff line Loading @@ -104,6 +104,47 @@ export const reviewsRouter = Router(); */ reviewsRouter.get('/', reviewsController.getReviews); /** * @swagger * /api/v1/reviews/search: * get: * summary: Search for a review by ID, user ID, or movie ID * tags: [Reviews] * parameters: * - in: query * name: id * schema: * type: string * description: The ID of the review to search * required: false * - in: query * name: userId * schema: * type: string * description: The user ID of the review to search * required: false * - in: query * name: movieId * schema: * type: string * description: The movie ID of the review to search * required: false * responses: * 200: * description: The review was successfully found * content: * application/json: * schema: * $ref: '#/components/schemas/Review' * 400: * description: Bad request, the provided data did not match the required schema * 404: * description: Bad request, the provided ID, user ID, or movie ID did not match any existing review * 500: * description: Some server error */ reviewsRouter.get('/search', reviewsController.getReview); /** * @swagger * /api/v1/reviews: Loading Loading @@ -191,44 +232,3 @@ reviewsRouter.delete('/:id', reviewsController.deleteReview); * description: Some server error */ reviewsRouter.put('/:id', reviewsController.updateReview); /** * @swagger * /api/v1/reviews/search: * get: * summary: Search for a review by ID, user ID, or movie ID * tags: [Reviews] * parameters: * - in: query * name: id * schema: * type: string * description: The ID of the review to search * required: false * - in: query * name: userId * schema: * type: string * description: The user ID of the review to search * required: false * - in: query * name: movieId * schema: * type: string * description: The movie ID of the review to search * required: false * responses: * 200: * description: The review was successfully found * content: * application/json: * schema: * $ref: '#/components/schemas/Review' * 400: * description: Bad request, the provided data did not match the required schema * 404: * description: Bad request, the provided ID, user ID, or movie ID did not match any existing review * 500: * description: Some server error */ reviewsRouter.get('/search', reviewsController.getReview); Loading
backend/src/rest/club/router.ts +39 −39 Original line number Diff line number Diff line Loading @@ -112,6 +112,41 @@ export const clubsRouter = Router(); */ clubsRouter.get('/', clubsController.getClubs); /** * @swagger * /api/v1/clubs/search: * get: * summary: Search for a club by ID or name * tags: [Clubs] * parameters: * - in: query * name: id * schema: * type: string * description: The ID of the club to search * required: false * - in: query * name: name * schema: * type: string * description: The name of the club to search * required: false * responses: * 200: * description: The club was successfully found * content: * application/json: * schema: * $ref: '#/components/schemas/Club' * 400: * description: Bad request, the provided data did not match the required schema * 404: * description: Bad request, the provided ID or name did not match any existing club * 500: * description: Some server error */ clubsRouter.get('/search', clubsController.getClub); /** * @swagger * /api/v1/clubs: Loading Loading @@ -202,42 +237,7 @@ clubsRouter.put('/:id', clubsController.updateClub); /** * @swagger * /api/v1/clubs/search: * get: * summary: Search for a club by ID or name * tags: [Clubs] * parameters: * - in: query * name: id * schema: * type: string * description: The ID of the club to search * required: false * - in: query * name: name * schema: * type: string * description: The name of the club to search * required: false * responses: * 200: * description: The club was successfully found * content: * application/json: * schema: * $ref: '#/components/schemas/Club' * 400: * description: Bad request, the provided data did not match the required schema * 404: * description: Bad request, the provided ID or name did not match any existing club * 500: * description: Some server error */ clubsRouter.get('/search', clubsController.getClub); /** * @swagger * /api/v1/clubs/add_playlists/{id}: * /api/v1/clubs/{id}/add_playlists: * put: * summary: Add playlists to a club * tags: [Clubs] Loading Loading @@ -268,11 +268,11 @@ clubsRouter.get('/search', clubsController.getClub); * 500: * description: Some server error */ clubsRouter.put('/add_playlists/:id', clubsController.addPlaylists); clubsRouter.put('/:id/add_playlists', clubsController.addPlaylists); /** * @swagger * /api/v1/clubs/remove_playlists/{id}: * /api/v1/clubs/{id}/remove_playlists: * put: * summary: Remove playlists from a club * tags: [Clubs] Loading Loading @@ -303,4 +303,4 @@ clubsRouter.put('/add_playlists/:id', clubsController.addPlaylists); * 500: * description: Some server error */ clubsRouter.put('/remove_playlists/:id', clubsController.removePlaylists); clubsRouter.put('/:id/remove_playlists', clubsController.removePlaylists);
backend/src/rest/movie/router.ts +27 −27 Original line number Diff line number Diff line Loading @@ -84,6 +84,33 @@ export const moviesRouter = Router(); */ moviesRouter.get('/', moviesController.getMovies); /** * @swagger * /api/v1/movies/{id}: * get: * summary: Retrieve a movie from OUR database * tags: [Movies] * parameters: * - in: path * name: id * schema: * type: string * description: The ID of the movie to retrieve * required: true * responses: * 200: * description: The movie was successfully retrieved * content: * application/json: * schema: * $ref: '#/components/schemas/Movie' * 404: * description: The provided ID did not match any existing movie * 500: * description: Some server error */ moviesRouter.get('/:id', moviesController.getMovie); /** * @swagger * /api/v1/movies/trending: Loading Loading @@ -138,30 +165,3 @@ moviesRouter.get('/trending', moviesController.getTrendingMovies); * description: Some server error */ moviesRouter.get('/search', moviesController.searchMovies); /** * @swagger * /api/v1/movies/{id}: * get: * summary: Retrieve a movie from OUR database * tags: [Movies] * parameters: * - in: path * name: id * schema: * type: string * description: The ID of the movie to retrieve * required: true * responses: * 200: * description: The movie was successfully retrieved * content: * application/json: * schema: * $ref: '#/components/schemas/Movie' * 404: * description: The provided ID did not match any existing movie * 500: * description: Some server error */ moviesRouter.get('/:id', moviesController.getMovie);
backend/src/rest/playlist/router.ts +51 −51 Original line number Diff line number Diff line Loading @@ -103,6 +103,53 @@ export const playlistsRouter = Router(); */ playlistsRouter.get('/', playlistsController.getPlaylists); /** * @swagger * /api/v1/playlists/search: * get: * summary: Search for a playlist by ID, name, userId or clubId * tags: [Playlists] * parameters: * - in: query * name: id * schema: * type: string * description: The ID of the playlist to search * required: false * - in: query * name: name * schema: * type: string * description: The name of the playlist to search * required: false * - in: query * name: userId * schema: * type: string * description: The userId associated with the playlist to search * required: false * - in: query * name: clubId * schema: * type: string * description: The clubId associated with the playlist to search * required: false * responses: * 200: * description: The playlist was successfully found * content: * application/json: * schema: * $ref: '#/components/schemas/Playlist' * 400: * description: Bad request, the provided data did not match the required schema * 404: * description: Bad request, the provided ID, name, userId or clubId did not match any existing playlist * 500: * description: Some server error */ playlistsRouter.get('/search', playlistsController.getPlaylist); /** * @swagger * /api/v1/playlists: Loading Loading @@ -193,54 +240,7 @@ playlistsRouter.put('/:id', playlistsController.updatePlaylist); /** * @swagger * /api/v1/playlists/search: * get: * summary: Search for a playlist by ID, name, userId or clubId * tags: [Playlists] * parameters: * - in: query * name: id * schema: * type: string * description: The ID of the playlist to search * required: false * - in: query * name: name * schema: * type: string * description: The name of the playlist to search * required: false * - in: query * name: userId * schema: * type: string * description: The userId associated with the playlist to search * required: false * - in: query * name: clubId * schema: * type: string * description: The clubId associated with the playlist to search * required: false * responses: * 200: * description: The playlist was successfully found * content: * application/json: * schema: * $ref: '#/components/schemas/Playlist' * 400: * description: Bad request, the provided data did not match the required schema * 404: * description: Bad request, the provided ID, name, userId or clubId did not match any existing playlist * 500: * description: Some server error */ playlistsRouter.get('/search', playlistsController.getPlaylist); /** * @swagger * /api/v1/playlists/add_movies/{id}: * /api/v1/playlists/{id}/add_movies: * put: * summary: Add movies to a playlist * tags: [Playlists] Loading Loading @@ -271,11 +271,11 @@ playlistsRouter.get('/search', playlistsController.getPlaylist); * 500: * description: Some server error */ playlistsRouter.put('/add_movies/:id', playlistsController.addMovies); playlistsRouter.put('/:id/add_movies', playlistsController.addMovies); /** * @swagger * /api/v1/playlists/remove_movies/{id}: * /api/v1/playlists/{id}/remove_movies: * put: * summary: Remove movies from a playlist * tags: [Playlists] Loading Loading @@ -306,4 +306,4 @@ playlistsRouter.put('/add_movies/:id', playlistsController.addMovies); * 500: * description: Some server error */ playlistsRouter.put('/remove_movies/:id', playlistsController.removeMovies); playlistsRouter.put('/:id/remove_movies', playlistsController.removeMovies);
backend/src/rest/post/router.ts +26 −26 Original line number Diff line number Diff line Loading @@ -82,32 +82,6 @@ export const postsRouter = Router(); */ postsRouter.get('/', postsController.getPosts); /** * @swagger * /api/v1/posts: * post: * summary: Create a new post * tags: [Posts] * requestBody: * required: true * content: * application/json: * schema: * $ref: '#/components/schemas/CreatePostRequest' * responses: * 201: * description: The post was successfully created * content: * application/json: * schema: * $ref: '#/components/schemas/Post' * 400: * description: Bad request, the provided data did not match the required schema * 500: * description: Some server error */ postsRouter.post('/', postsController.createPost); /** * @swagger * /api/v1/posts/search: Loading Loading @@ -160,3 +134,29 @@ postsRouter.post('/', postsController.createPost); * description: Some server error */ postsRouter.get('/search', postsController.getPost); /** * @swagger * /api/v1/posts: * post: * summary: Create a new post * tags: [Posts] * requestBody: * required: true * content: * application/json: * schema: * $ref: '#/components/schemas/CreatePostRequest' * responses: * 201: * description: The post was successfully created * content: * application/json: * schema: * $ref: '#/components/schemas/Post' * 400: * description: Bad request, the provided data did not match the required schema * 500: * description: Some server error */ postsRouter.post('/', postsController.createPost);
backend/src/rest/review/router.ts +41 −41 Original line number Diff line number Diff line Loading @@ -104,6 +104,47 @@ export const reviewsRouter = Router(); */ reviewsRouter.get('/', reviewsController.getReviews); /** * @swagger * /api/v1/reviews/search: * get: * summary: Search for a review by ID, user ID, or movie ID * tags: [Reviews] * parameters: * - in: query * name: id * schema: * type: string * description: The ID of the review to search * required: false * - in: query * name: userId * schema: * type: string * description: The user ID of the review to search * required: false * - in: query * name: movieId * schema: * type: string * description: The movie ID of the review to search * required: false * responses: * 200: * description: The review was successfully found * content: * application/json: * schema: * $ref: '#/components/schemas/Review' * 400: * description: Bad request, the provided data did not match the required schema * 404: * description: Bad request, the provided ID, user ID, or movie ID did not match any existing review * 500: * description: Some server error */ reviewsRouter.get('/search', reviewsController.getReview); /** * @swagger * /api/v1/reviews: Loading Loading @@ -191,44 +232,3 @@ reviewsRouter.delete('/:id', reviewsController.deleteReview); * description: Some server error */ reviewsRouter.put('/:id', reviewsController.updateReview); /** * @swagger * /api/v1/reviews/search: * get: * summary: Search for a review by ID, user ID, or movie ID * tags: [Reviews] * parameters: * - in: query * name: id * schema: * type: string * description: The ID of the review to search * required: false * - in: query * name: userId * schema: * type: string * description: The user ID of the review to search * required: false * - in: query * name: movieId * schema: * type: string * description: The movie ID of the review to search * required: false * responses: * 200: * description: The review was successfully found * content: * application/json: * schema: * $ref: '#/components/schemas/Review' * 400: * description: Bad request, the provided data did not match the required schema * 404: * description: Bad request, the provided ID, user ID, or movie ID did not match any existing review * 500: * description: Some server error */ reviewsRouter.get('/search', reviewsController.getReview);