-
Notifications
You must be signed in to change notification settings - Fork 1
/
openapi3.json
1 lines (1 loc) · 27.8 KB
/
openapi3.json
1
{"openapi":"3.0.3","info":{"title":"starterpack","description":"Best API REST building with GoaDesign","contact":{"name":"Guillaume MORIN","url":"https://guillaume-morin.fr/","email":"guillaume.morin@epitech.eu"},"license":{"name":"GOA X GM","url":"https://guillaume-morin.fr/"},"version":"1.0"},"servers":[{"url":"https://localhost:8088"}],"paths":{"/authorization":{"post":{"tags":["oAuth"],"summary":"oAuth oAuth","description":"oAuth","operationId":"oAuth#oAuth","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthRequestBody"},"example":{"client_id":"Accusamus dolore sint.","client_secret":"Voluptas sunt.","grant_type":"Labore quisquam quo."}}}},"responses":{"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthResponse"},"example":{"access_token":"Id ab soluta tempora.","expires_in":4484882972777029123,"success":true,"token_type":"Nihil voluptates dolor qui."}}}},"400":{"description":"Bad Request response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OAuthResponse"},"example":{"access_token":"Commodi tenetur reiciendis aut eligendi.","expires_in":158009050374148575,"success":true,"token_type":"Velit distinctio."}}}},"401":{"description":"unauthorized: Unauthorized response.","content":{"application/json":{"schema":{"type":"string","example":"Eos explicabo nihil esse ut."}}}},"403":{"description":"oauth_error: Forbidden response.","content":{"application/json":{"schema":{"type":"string","example":"Libero unde cumque molestiae eveniet suscipit molestiae."}}}},"500":{"description":"unknown_error: Error not identified (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError"}}}}}}},"/openapi.json":{"get":{"tags":["openapi"],"summary":"Download openapi3.json","description":"Postman generated by Goa","operationId":"openapi#/openapi.json","responses":{"200":{"description":"File downloaded"}},"externalDocs":{"description":"cd Public \u0026\u0026 live-server to see the Documentation of the API","url":"http://127.0.0.1:8080/"}}},"/public/{*path}":{"get":{"tags":["fileapi"],"summary":"Download bin/public","description":"Serve static content.","operationId":"fileapi#/public/{*path}","parameters":[{"name":"path","in":"path","description":"Relative file path","required":true}],"responses":{"200":{"description":"File not found"},"404":{"description":"File not found"}}}},"/refresh":{"post":{"tags":["jwtToken"],"summary":"refresh jwtToken","description":"Refresh Token","operationId":"jwtToken#refresh","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RefreshRequestBody"},"example":{"refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sign"},"example":{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","success":false}}}},"500":{"description":"unknown_error: Error not identified (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError"}}}}},"security":[{"OAuth2_header_Authorization":["api:read"]}]}},"/signin":{"post":{"tags":["jwtToken"],"summary":"signin jwtToken","description":"signin","operationId":"jwtToken#signin","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SigninRequestBody"},"example":{"email":"guillaume@epitech.eu","password":"JeSuisUnTest974"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sign"},"example":{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","success":true}}}},"500":{"description":"unknown_error: Error not identified (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError"}}}}},"security":[{"OAuth2_header_Authorization":["api:read"]}]}},"/signup":{"post":{"tags":["jwtToken"],"summary":"signup jwtToken","description":"signup to generate jwt token","operationId":"jwtToken#signup","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequestBody"},"example":{"confirm_password":"JeSuisUnTest974","email":"guillaume@epitech.eu","password":"JeSuisUnTest974"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sign"},"example":{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","success":false}}}},"500":{"description":"unknown_error: Error not identified (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError"}}}}},"security":[{"OAuth2_header_Authorization":["api:read"]}]}},"/v1/email-exist":{"post":{"tags":["auth"],"summary":"email-exist auth","description":"Check if email exist in database","operationId":"auth#email-exist","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailExistRequestBody"},"example":{"email":"guillaume@gmail.com"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailExistResponseBody"},"example":{"exist":false,"success":false}}}},"500":{"description":"unknown_error: Error not identified (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError"}}}}},"security":[{"OAuth2_header_Authorization":["api:read"]}]}},"/v1/file/add":{"post":{"tags":["files"],"summary":"importFile files","description":"Import file","operationId":"files#importFile","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ImportFileRequestBody"},"example":{"files":[{"content":"RGVsZW5pdGkgcmVwZWxsZW5kdXMu","filename":"foo.jpg","format":"image/jpeg","h":453901555597122463,"size":4908872163727939995,"url":"Similique tenetur ratione est.","w":6121017000915498524},{"content":"RGVsZW5pdGkgcmVwZWxsZW5kdXMu","filename":"foo.jpg","format":"image/jpeg","h":453901555597122463,"size":4908872163727939995,"url":"Similique tenetur ratione est.","w":6121017000915498524},{"content":"RGVsZW5pdGkgcmVwZWxsZW5kdXMu","filename":"foo.jpg","format":"image/jpeg","h":453901555597122463,"size":4908872163727939995,"url":"Similique tenetur ratione est.","w":6121017000915498524}]}}}},"responses":{"201":{"description":"Created response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportFileResponseBody"},"example":{"file":[{"id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","mime":"Ut vero sit.","name":"foo.png","size":4120569230563613071,"url":"Ad nam ab reiciendis tempore et."},{"id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","mime":"Ut vero sit.","name":"foo.png","size":4120569230563613071,"url":"Ad nam ab reiciendis tempore et."}],"success":false}}}},"500":{"description":"unknown_error: Error not identified (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError"}}}}},"security":[{"OAuth2_header_Authorization":["api:read"]}]}},"/v1/file/remove":{"patch":{"tags":["files"],"summary":"deleteFile files","description":"Delete one file by ID","operationId":"files#deleteFile","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeleteFileRequestBody"},"example":{"url":"/public/uploads/2021/12/2ca51d10-b660-4b2c-b27f-f7a119642885.png"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordResponseBody"},"example":{"success":false}}}},"500":{"description":"unknown_error: Error not identified (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError"}}}}},"security":[{"OAuth2_header_Authorization":["api:read"]}]}},"/v1/lost":{"post":{"tags":["auth"],"summary":"send-confirmation auth","description":"Check if email exist in database and send code by email to reset password","operationId":"auth#send-confirmation","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailExistRequestBody"},"example":{"email":"guillaume@gmail.com"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailExistResponseBody"},"example":{"exist":false,"success":false}}}},"500":{"description":"unknown_error: Error not identified (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError"}}}}},"security":[{"OAuth2_header_Authorization":["api:read"]}]}},"/v1/reset-password":{"put":{"tags":["auth"],"summary":"reset-password auth","description":"Reset forget password of the user with the correct confirm code","operationId":"auth#reset-password","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordRequestBody"},"example":{"code":"ZGI5E","confirm_password":"JeSuisUnTest974","email":"guillaume@gmail.com","password":"JeSuisUnTest974"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordResponseBody"},"example":{"success":true}}}},"500":{"description":"unknown_error: Error not identified (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError"}}}}},"security":[{"OAuth2_header_Authorization":["api:read"]}]}},"/v1/web/user/edit/avatar":{"put":{"tags":["users"],"summary":"updateAvatar users","description":"Update avatar","operationId":"users#updateAvatar","parameters":[{"name":"jwtToken","in":"header","description":"Jwt token","allowEmptyValue":true,"schema":{"type":"string","description":"Jwt token","example":"Bearer 𬾬𫽸","pattern":"^Bearer [^ ]+$"},"example":"Bearer "}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAvatarRequestBody"},"example":{"avatar":"Sed sunt.","id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionResponseBody"},"example":{"success":true,"user":{"avatar":"/public/uploads/2022/02/eedf427a-559a-4faf-9e75-357fbb5d65fb.png","email":"guillaume@gmail.com","firstname":"Guillaume","id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","lastname":"Morin","role":"Est distinctio veritatis quibusdam."}}}}},"500":{"description":"unknown_error: Error not identified (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError"}}}}},"security":[{"OAuth2_header_Authorization":["api:read"],"jwt_header_jwtToken":["api:read","api:write"]}]}},"/v1/web/user/edit/description":{"put":{"tags":["users"],"summary":"updateDescription users","description":"Update main info like email, firstname, lastname","operationId":"users#updateDescription","parameters":[{"name":"jwtToken","in":"header","description":"Jwt token","allowEmptyValue":true,"schema":{"type":"string","description":"Jwt token","example":"Bearer 𩀔","pattern":"^Bearer [^ ]+$"},"example":"Bearer "}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionRequestBody"},"example":{"email":"guillaume@gmail.com","firstname":"Guillaume","id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","lastname":"Morin"}}}},"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateDescriptionResponseBody"},"example":{"success":true,"user":{"avatar":"/public/uploads/2022/02/eedf427a-559a-4faf-9e75-357fbb5d65fb.png","email":"guillaume@gmail.com","firstname":"Guillaume","id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","lastname":"Morin","role":"Est distinctio veritatis quibusdam."}}}}},"500":{"description":"unknown_error: Error not identified (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError"}}}}},"security":[{"OAuth2_header_Authorization":["api:read"],"jwt_header_jwtToken":["api:read","api:write"]}]}},"/v1/web/user/remove/{id}":{"delete":{"tags":["users"],"summary":"deleteUser users","description":"Delete one User by ID","operationId":"users#deleteUser","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","example":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","format":"uuid"},"example":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25"},{"name":"jwtToken","in":"header","description":"Jwt token","allowEmptyValue":true,"schema":{"type":"string","description":"Jwt token","example":"Bearer ","pattern":"^Bearer [^ ]+$"},"example":"Bearer 𨝤"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResetPasswordResponseBody"},"example":{"success":true}}}},"500":{"description":"unknown_error: Error not identified (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError"}}}}},"security":[{"OAuth2_header_Authorization":["api:read"],"jwt_header_jwtToken":["api:read","api:write"]}]}},"/v1/web/user/{id}":{"get":{"tags":["users"],"summary":"getUserByID users","description":"Get one User","operationId":"users#getUserByID","parameters":[{"name":"id","in":"path","description":"Unique ID of the User","required":true,"schema":{"type":"string","description":"Unique ID of the User","example":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","format":"uuid"},"example":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25"},{"name":"jwtToken","in":"header","description":"Jwt token","allowEmptyValue":true,"schema":{"type":"string","description":"Jwt token","example":"Bearer 𪆫","pattern":"^Bearer [^ ]+$"},"example":"Bearer 𝌕"}],"responses":{"200":{"description":"OK response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GetUserByIDResponseBody"},"example":{"success":false,"user":{"avatar":"/public/uploads/2022/02/eedf427a-559a-4faf-9e75-357fbb5d65fb.png","email":"guillaume@gmail.com","firstname":"Guillaume","id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","lastname":"Morin","role":"Est distinctio veritatis quibusdam."}}}}},"500":{"description":"unknown_error: Error not identified (500)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnknownError"}}}}},"security":[{"OAuth2_header_Authorization":["api:read"],"jwt_header_jwtToken":["api:read","api:write"]}]}}},"components":{"schemas":{"DeleteFileRequestBody":{"type":"object","properties":{"url":{"type":"string","example":"/public/uploads/2021/12/2ca51d10-b660-4b2c-b27f-f7a119642885.png","minLength":23}},"example":{"url":"/public/uploads/2021/12/2ca51d10-b660-4b2c-b27f-f7a119642885.png"},"required":["url"]},"EmailExistRequestBody":{"type":"object","properties":{"email":{"type":"string","example":"guillaume@gmail.com","format":"email"}},"example":{"email":"guillaume@gmail.com"},"required":["email"]},"EmailExistResponseBody":{"type":"object","properties":{"exist":{"type":"boolean","example":true},"success":{"type":"boolean","example":true}},"example":{"exist":true,"success":false},"required":["exist","success"]},"GetUserByIDResponseBody":{"type":"object","properties":{"success":{"type":"boolean","example":true},"user":{"$ref":"#/components/schemas/ResUser"}},"example":{"success":true,"user":{"avatar":"/public/uploads/2022/02/eedf427a-559a-4faf-9e75-357fbb5d65fb.png","email":"guillaume@gmail.com","firstname":"Guillaume","id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","lastname":"Morin","role":"Est distinctio veritatis quibusdam."}},"required":["user","success"]},"ImportFileRequestBody":{"type":"object","properties":{"files":{"type":"array","items":{"$ref":"#/components/schemas/PayloadFile"},"description":"Files to import","example":[{"content":"RGVsZW5pdGkgcmVwZWxsZW5kdXMu","filename":"foo.jpg","format":"image/jpeg","h":453901555597122463,"size":4908872163727939995,"url":"Similique tenetur ratione est.","w":6121017000915498524},{"content":"RGVsZW5pdGkgcmVwZWxsZW5kdXMu","filename":"foo.jpg","format":"image/jpeg","h":453901555597122463,"size":4908872163727939995,"url":"Similique tenetur ratione est.","w":6121017000915498524},{"content":"RGVsZW5pdGkgcmVwZWxsZW5kdXMu","filename":"foo.jpg","format":"image/jpeg","h":453901555597122463,"size":4908872163727939995,"url":"Similique tenetur ratione est.","w":6121017000915498524},{"content":"RGVsZW5pdGkgcmVwZWxsZW5kdXMu","filename":"foo.jpg","format":"image/jpeg","h":453901555597122463,"size":4908872163727939995,"url":"Similique tenetur ratione est.","w":6121017000915498524}]}},"example":{"files":[{"content":"RGVsZW5pdGkgcmVwZWxsZW5kdXMu","filename":"foo.jpg","format":"image/jpeg","h":453901555597122463,"size":4908872163727939995,"url":"Similique tenetur ratione est.","w":6121017000915498524},{"content":"RGVsZW5pdGkgcmVwZWxsZW5kdXMu","filename":"foo.jpg","format":"image/jpeg","h":453901555597122463,"size":4908872163727939995,"url":"Similique tenetur ratione est.","w":6121017000915498524},{"content":"RGVsZW5pdGkgcmVwZWxsZW5kdXMu","filename":"foo.jpg","format":"image/jpeg","h":453901555597122463,"size":4908872163727939995,"url":"Similique tenetur ratione est.","w":6121017000915498524}]},"required":["files"]},"ImportFileResponseBody":{"type":"object","properties":{"file":{"type":"array","items":{"$ref":"#/components/schemas/ResFile"},"example":[{"id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","mime":"Ut vero sit.","name":"foo.png","size":4120569230563613071,"url":"Ad nam ab reiciendis tempore et."},{"id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","mime":"Ut vero sit.","name":"foo.png","size":4120569230563613071,"url":"Ad nam ab reiciendis tempore et."},{"id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","mime":"Ut vero sit.","name":"foo.png","size":4120569230563613071,"url":"Ad nam ab reiciendis tempore et."}]},"success":{"type":"boolean","example":true}},"example":{"file":[{"id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","mime":"Ut vero sit.","name":"foo.png","size":4120569230563613071,"url":"Ad nam ab reiciendis tempore et."},{"id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","mime":"Ut vero sit.","name":"foo.png","size":4120569230563613071,"url":"Ad nam ab reiciendis tempore et."}],"success":true},"required":["success","file"]},"OAuthRequestBody":{"type":"object","properties":{"client_id":{"type":"string","example":"Perferendis labore numquam accusamus odio laborum."},"client_secret":{"type":"string","example":"Aut asperiores."},"grant_type":{"type":"string","example":"Sit praesentium dolores distinctio atque et."}},"example":{"client_id":"Rerum sed ab.","client_secret":"Qui sit nam.","grant_type":"Molestias voluptatum et occaecati."},"required":["client_id","client_secret","grant_type"]},"OAuthResponse":{"type":"object","properties":{"access_token":{"type":"string","example":"Sed repellendus laboriosam velit rerum earum."},"expires_in":{"type":"integer","example":905489999438370610,"format":"int64"},"success":{"type":"boolean","example":true},"token_type":{"type":"string","example":"Id vitae."}},"example":{"access_token":"Voluptate atque in iusto non et.","expires_in":1827198877104942018,"success":false,"token_type":"Sed qui et."},"required":["access_token","token_type","expires_in","success"]},"PayloadFile":{"type":"object","properties":{"content":{"type":"string","description":"content of image","example":"U3VudCBkaXN0aW5jdGlvIHNpbnQgYXV0IG5paGlsLg==","format":"binary"},"filename":{"type":"string","description":"uploaded file name","example":"foo.jpg","minLength":2},"format":{"type":"string","description":"uploaded file format","example":"image/jpeg","enum":["image/jpeg","image/png","image/jpg"]},"h":{"type":"integer","description":"height of image if you crop","example":531640318569623122,"format":"int64"},"size":{"type":"integer","description":"size of image","example":6681480776762861306,"format":"int64"},"url":{"type":"string","description":"url file","example":"Omnis aut."},"w":{"type":"integer","description":"width of image if you crop","example":8441994472517798801,"format":"int64"}},"example":{"content":"TWluaW1hIGNvcnJ1cHRpLg==","filename":"foo.jpg","format":"image/jpeg","h":6695150015291329825,"size":1468524805186468882,"url":"Quas perferendis fuga.","w":3079156405173066483},"required":["filename","content","format","size","url"]},"RefreshRequestBody":{"type":"object","properties":{"refresh_token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","minLength":32}},"example":{"refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"required":["refresh_token"]},"ResFile":{"type":"object","properties":{"id":{"type":"string","example":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","format":"uuid"},"mime":{"type":"string","example":"Voluptate nihil."},"name":{"type":"string","example":"foo.png"},"size":{"type":"integer","example":5553575870671356874,"format":"int64"},"url":{"type":"string","example":"Sint sint quo modi ab qui dolore."}},"example":{"id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","mime":"Voluptas consequatur impedit quia et doloremque.","name":"foo.png","size":6586627390712349755,"url":"Pariatur deleniti a voluptatem nam corrupti."},"required":["id","name","url"]},"ResUser":{"type":"object","properties":{"avatar":{"type":"string","example":"/public/uploads/2022/02/eedf427a-559a-4faf-9e75-357fbb5d65fb.png"},"email":{"type":"string","example":"guillaume@gmail.com"},"firstname":{"type":"string","example":"Guillaume"},"id":{"type":"string","example":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25"},"lastname":{"type":"string","example":"Morin"},"role":{"type":"string","description":"User is admin or not","example":"Minus numquam."}},"example":{"avatar":"/public/uploads/2022/02/eedf427a-559a-4faf-9e75-357fbb5d65fb.png","email":"guillaume@gmail.com","firstname":"Guillaume","id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","lastname":"Morin","role":"Quod officiis esse minima quis."},"required":["id","email","firstname","lastname","avatar"]},"ResetPasswordRequestBody":{"type":"object","properties":{"code":{"type":"string","example":"ZGI5E","pattern":"^[A-Za-z0-9]+$","minLength":5,"maxLength":5},"confirm_password":{"type":"string","description":"Minimum 9 charactères / Chiffre Obligatoire","example":"JeSuisUnTest974","pattern":"\\d","minLength":9},"email":{"type":"string","example":"guillaume@gmail.com","format":"email"},"password":{"type":"string","description":"Minimum 9 charactères / Chiffre Obligatoire","example":"JeSuisUnTest974","pattern":"\\d","minLength":9}},"example":{"code":"ZGI5E","confirm_password":"JeSuisUnTest974","email":"guillaume@gmail.com","password":"JeSuisUnTest974"},"required":["email","code","password","confirm_password"]},"ResetPasswordResponseBody":{"type":"object","properties":{"success":{"type":"boolean","example":true}},"example":{"success":true},"required":["success"]},"Sign":{"type":"object","properties":{"access_token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"refresh_token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ"},"success":{"type":"boolean","example":true}},"example":{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","refresh_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ","success":true},"required":["access_token","refresh_token","success"]},"SigninRequestBody":{"type":"object","properties":{"email":{"type":"string","example":"guillaume@epitech.eu","format":"email"},"password":{"type":"string","description":"Minimum 9 charactères / Chiffre Obligatoire","example":"JeSuisUnTest974","pattern":"\\d","minLength":9}},"example":{"email":"guillaume@epitech.eu","password":"JeSuisUnTest974"},"required":["password","email"]},"SignupRequestBody":{"type":"object","properties":{"confirm_password":{"type":"string","description":"Minimum 9 charactères / Chiffre Obligatoire","example":"JeSuisUnTest974","pattern":"\\d","minLength":9},"email":{"type":"string","example":"guillaume@epitech.eu","format":"email"},"password":{"type":"string","description":"Minimum 9 charactères / Chiffre Obligatoire","example":"JeSuisUnTest974","pattern":"\\d","minLength":9}},"example":{"confirm_password":"JeSuisUnTest974","email":"guillaume@epitech.eu","password":"JeSuisUnTest974"},"required":["email","password","confirm_password"]},"UnknownError":{"type":"object","properties":{"err":{"type":"string","example":"sql no rows affected"},"error_code":{"type":"string","example":"TX_UPDATE_ITEM"},"success":{"type":"boolean","default":false,"example":true}},"description":"Error not identified (500)","example":{"err":"sql no rows affected","error_code":"TX_UPDATE_ITEM","success":true},"required":["err","success","error_code"]},"UpdateAvatarRequestBody":{"type":"object","properties":{"avatar":{"type":"string","description":"Url of the avatar and stock in db","example":"Dolor accusantium quia."},"id":{"type":"string","example":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","format":"uuid"}},"example":{"avatar":"Dolorem asperiores.","id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25"},"required":["id","avatar"]},"UpdateDescriptionRequestBody":{"type":"object","properties":{"email":{"type":"string","example":"guillaume@gmail.com","format":"email"},"firstname":{"type":"string","example":"Guillaume","minLength":2,"maxLength":20},"id":{"type":"string","example":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","format":"uuid"},"lastname":{"type":"string","example":"Morin","minLength":2,"maxLength":20}},"example":{"email":"guillaume@gmail.com","firstname":"Guillaume","id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","lastname":"Morin"},"required":["email","id"]},"UpdateDescriptionResponseBody":{"type":"object","properties":{"success":{"type":"boolean","example":false},"user":{"$ref":"#/components/schemas/ResUser"}},"example":{"success":false,"user":{"avatar":"/public/uploads/2022/02/eedf427a-559a-4faf-9e75-357fbb5d65fb.png","email":"guillaume@gmail.com","firstname":"Guillaume","id":"5dfb0bf7-597a-4250-b7ad-63a43ff59c25","lastname":"Morin","role":"Est distinctio veritatis quibusdam."}},"required":["success"]}},"securitySchemes":{"OAuth2_header_Authorization":{"type":"oauth2","description":"Use OAuth2 to authenticate","flows":{"clientCredentials":{"tokenUrl":"/authorization","refreshUrl":"/refresh","scopes":{"api:read":"Provides read access"}}}},"jwt_header_jwtToken":{"type":"http","description":"Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes \"api:read\" and \"api:write\".","scheme":"bearer"}}},"tags":[{"name":"openapi"},{"name":"fileapi"},{"name":"auth","description":"Forget password / reset password / send Email Code"},{"name":"files","description":"files of the api"},{"name":"jwtToken","description":"Use Token to authenticate. Signin and Signup"},{"name":"oAuth","description":"Oauth to authentificate"},{"name":"users","description":"users of the api"}]}