{ "openapi": "3.1.0", "info": { "title": "API Films", "description": "", "version": "1.0.0" }, "servers": [ { "url": "http://localhost:5001/" } ], "tags": [ { "name": "Publique", "description": "Routes accessibles sans token d'authentification" }, { "name": "Admin", "description": "Routes accessibles avec un token Administrateur" }, { "name": "User", "description": "Routes accessibles avec un token Utilisateur (ou Administrateur)" } ], "paths": { "/admin/login": { "post": { "tags": [ "Publique" ], "description": "", "responses": { "201": { "description": "Created" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "example": "any" }, "password": { "example": "any" } } } } } } } }, "/admin/movies/": { "post": { "tags": [ "Admin" ], "description": "", "responses": { "201": { "description": "Created" }, "400": { "description": "Bad Request" }, "500": { "description": "Internal Server Error" } } }, "patch": { "tags": [ "Admin" ], "description": "", "parameters": [ { "name": "id", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } }, "delete": { "tags": [ "Admin" ], "description": "", "parameters": [ { "name": "id", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/admin/users/getAll": { "get": { "tags": [ "Admin" ], "description": "", "responses": { "200": { "description": "OK" }, "204": { "description": "No Content" }, "500": { "description": "Internal Server Error" } } } }, "/admin/users/getOne": { "get": { "tags": [ "Admin" ], "description": "", "parameters": [ { "name": "id", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/movies/getOne/": { "get": { "tags": [ "Publique" ], "description": "", "parameters": [ { "name": "id", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/movies/getAll/": { "get": { "tags": [ "Publique" ], "description": "", "parameters": [ { "name": "page", "in": "query", "schema": { "type": "string" } }, { "name": "limit", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "204": { "description": "No Content" }, "500": { "description": "Internal Server Error" } } } }, "/movies/search/": { "get": { "tags": [ "Publique" ], "description": "", "parameters": [ { "name": "title", "in": "query", "schema": { "type": "string" } }, { "name": "year", "in": "query", "schema": { "type": "string" } }, { "name": "genre", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "204": { "description": "No Content" }, "400": { "description": "Bad Request" }, "500": { "description": "Internal Server Error" } } } }, "/user/register": { "post": { "tags": [ "Publique" ], "description": "", "responses": { "201": { "description": "Created" }, "400": { "description": "Bad Request" }, "409": { "description": "Conflict" }, "500": { "description": "Internal Server Error" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "example": "any" }, "name": { "example": "any" }, "surname": { "example": "any" }, "password": { "example": "any" } } } } } } } }, "/user/login": { "post": { "tags": [ "Publique" ], "description": "", "responses": { "201": { "description": "Created" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "example": "any" }, "password": { "example": "any" } } } } } } } }, "/user/": { "patch": { "tags": [ "User" ], "description": "", "parameters": [ { "name": "id", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/user/favorites/": { "post": { "tags": [ "User" ], "description": "", "parameters": [ { "name": "id", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "409": { "description": "Conflict" }, "500": { "description": "Internal Server Error" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "example": "any" } } } } } } }, "get": { "tags": [ "User" ], "description": "", "parameters": [ { "name": "id", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } }, "delete": { "tags": [ "User" ], "description": "", "parameters": [ { "name": "id", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "example": "any" } } } } } } } }, "/user/watchlist/": { "post": { "tags": [ "User" ], "description": "", "parameters": [ { "name": "id", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } }, "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "example": "any" }, "statusId": { "example": "any" } } } } } } } }, "/user/history": { "get": { "tags": [ "User" ], "description": "", "parameters": [ { "name": "id", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } }, "/user/deleteAccount/": { "patch": { "tags": [ "User" ], "description": "", "parameters": [ { "name": "id", "in": "query", "schema": { "type": "string" } } ], "responses": { "200": { "description": "OK" }, "400": { "description": "Bad Request" }, "404": { "description": "Not Found" }, "500": { "description": "Internal Server Error" } } } } }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } }, "security": [ { "bearerAuth": [] } ] }