{"openapi":"3.0.0","paths":{"/":{"get":{"operationId":"AppController_index","parameters":[],"responses":{"200":{"description":""}},"tags":["App"]}},"/sign-in":{"post":{"operationId":"AuthController_asyncLogin","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSignInCreds"}}}},"responses":{"201":{"description":""}},"tags":["Auth"]}},"/sign-up":{"post":{"operationId":"AuthController_SignUp","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserSignUpCreds"}}}},"responses":{"201":{"description":""}},"tags":["Auth"]}},"/post":{"post":{"operationId":"PostController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePostDto"}}}},"responses":{"201":{"description":""}},"tags":["Post"]},"get":{"operationId":"PostController_findAll","parameters":[],"responses":{"200":{"description":""}},"tags":["Post"]}},"/post/authored":{"get":{"operationId":"PostController_findAuthoredPost","parameters":[],"responses":{"200":{"description":""}},"tags":["Post"]}},"/post/{id}":{"get":{"operationId":"PostController_findOne","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Post"]},"patch":{"operationId":"PostController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePostDto"}}}},"responses":{"200":{"description":""}},"tags":["Post"]},"delete":{"operationId":"PostController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Post"]}},"/comment":{"post":{"operationId":"CommentController_create","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCommentDto"}}}},"responses":{"201":{"description":""}},"tags":["Comment"]}},"/comment/by-post/{id}":{"get":{"operationId":"CommentController_findAll","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"responses":{"200":{"description":""}},"tags":["Comment"]}},"/comment/by-user":{"get":{"operationId":"CommentController_findSelfPosted","parameters":[],"responses":{"200":{"description":""}},"tags":["Comment"]}},"/comment/{id}":{"patch":{"operationId":"CommentController_update","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommentDto"}}}},"responses":{"200":{"description":""}},"tags":["Comment"]},"delete":{"operationId":"CommentController_remove","parameters":[{"name":"id","required":true,"in":"path","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCommentDto"}}}},"responses":{"200":{"description":""}},"tags":["Comment"]}}},"info":{"title":"RBAC + ABAC by Vedant Bhavsar","description":"Social Media where User can share their thoughts in form of text. Moderator Manages the Posts and Users from being abusive. Admin is the Super User who can manage everything.","version":"1.0","contact":{}},"tags":[{"name":"RBAC","description":""}],"servers":[],"components":{"securitySchemes":{"defaultBearerAuth":{"scheme":"bearer","bearerFormat":"JWT","type":"http"}},"schemas":{"UserSignInCreds":{"type":"object","properties":{"phoneNumber":{"type":"string"},"password":{"type":"string"}},"required":["phoneNumber","password"]},"UserSignUpCreds":{"type":"object","properties":{"fullName":{"type":"string"},"role":{"type":"array","items":{"type":"string","enum":["ADMIN","MODERATOR","USER"]}},"phoneNumber":{"type":"string"},"password":{"type":"string"}},"required":["fullName","role","phoneNumber","password"]},"CreatePostDto":{"type":"object","properties":{"title":{"type":"string"},"content":{"type":"string"},"isPublished":{"type":"boolean","title":"Is Published","example":true}},"required":["title","content","isPublished"]},"UpdatePostDto":{"type":"object","properties":{"title":{"type":"string"},"content":{"type":"string"},"isPublished":{"type":"boolean","title":"Is Published","example":true}},"required":["title","content","isPublished"]},"CreateCommentDto":{"type":"object","properties":{"content":{"type":"string"},"postId":{"type":"string","description":"post ID","example":"60f1b0e1f9f9b3f1b4f9b3f1"}},"required":["content","postId"]},"UpdateCommentDto":{"type":"object","properties":{"content":{"type":"string"}},"required":["content"]}}}}