{ "openapi": "3.0.3", "info": { "title": "@apps/backend", "version": "1.0.0" }, "components": { "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } }, "schemas": {} }, "paths": { "/api/v1/status": { "get": { "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "status": { "type": "string", "pattern": "ok" } }, "required": [ "status" ], "additionalProperties": false } } } } } } }, "/api/v1/auth/login": { "post": { "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "password": { "type": "string", "minLength": 8 }, "deviceInfo": { "type": "string" } }, "required": [ "email", "password" ] } } }, "required": true }, "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "accessToken": { "type": "string" }, "refreshToken": { "type": "string" } }, "required": [ "accessToken", "refreshToken" ], "additionalProperties": false } }, "required": [ "data" ], "additionalProperties": false } } } }, "401": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "links": { "type": "object", "properties": { "about": { "type": "string" }, "type": { "type": "string" } }, "additionalProperties": false }, "status": { "type": "string" }, "code": { "type": "string" }, "title": { "type": "string" }, "detail": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" }, "parameter": { "type": "string" }, "header": { "type": "string" } }, "additionalProperties": false }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "status", "title" ], "additionalProperties": false } } }, "required": [ "errors" ], "additionalProperties": false } } } } } } }, "/api/v1/auth/refresh": { "post": { "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "refreshToken": { "type": "string" } }, "required": [ "refreshToken" ] } } }, "required": true }, "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "accessToken": { "type": "string" }, "refreshToken": { "type": "string" } }, "required": [ "accessToken", "refreshToken" ], "additionalProperties": false } }, "required": [ "data" ], "additionalProperties": false } } } }, "401": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "links": { "type": "object", "properties": { "about": { "type": "string" }, "type": { "type": "string" } }, "additionalProperties": false }, "status": { "type": "string" }, "code": { "type": "string" }, "title": { "type": "string" }, "detail": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" }, "parameter": { "type": "string" }, "header": { "type": "string" } }, "additionalProperties": false }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "status", "title" ], "additionalProperties": false } } }, "required": [ "errors" ], "additionalProperties": false } } } } } } }, "/api/v1/auth/logout": { "post": { "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "refreshToken": { "type": "string" }, "allDevices": { "default": false, "type": "boolean" } }, "required": [ "refreshToken" ] } } }, "required": true }, "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "success": { "type": "boolean" }, "message": { "type": "string" } }, "required": [ "success", "message" ], "additionalProperties": false } }, "required": [ "data" ], "additionalProperties": false } } } }, "401": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "links": { "type": "object", "properties": { "about": { "type": "string" }, "type": { "type": "string" } }, "additionalProperties": false }, "status": { "type": "string" }, "code": { "type": "string" }, "title": { "type": "string" }, "detail": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" }, "parameter": { "type": "string" }, "header": { "type": "string" } }, "additionalProperties": false }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "status", "title" ], "additionalProperties": false } } }, "required": [ "errors" ], "additionalProperties": false } } } } } } }, "/api/v1/users/": { "post": { "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "nullable": true, "type": "string" }, "attributes": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "firstName": { "type": "string" }, "lastName": { "type": "string" }, "password": { "type": "string" } }, "required": [ "email", "firstName", "lastName", "password" ] } }, "required": [ "attributes" ] }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "data" ] } } }, "required": true }, "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "users" ] }, "attributes": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "firstName": { "type": "string" }, "lastName": { "type": "string" } }, "required": [ "email", "firstName", "lastName" ], "additionalProperties": false } }, "required": [ "id", "type", "attributes" ], "additionalProperties": false }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": false } } } } } }, "get": { "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "users" ] }, "attributes": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "firstName": { "type": "string" }, "lastName": { "type": "string" } }, "required": [ "email", "firstName", "lastName" ], "additionalProperties": false } }, "required": [ "id", "type", "attributes" ], "additionalProperties": false } }, "meta": { "type": "object", "properties": { "total": { "type": "number" } }, "required": [ "total" ], "additionalProperties": false } }, "required": [ "data", "meta" ], "additionalProperties": false } } } } } } }, "/api/v1/users/profile": { "get": { "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "users" ] }, "attributes": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "firstName": { "type": "string" }, "lastName": { "type": "string" } }, "required": [ "email", "firstName", "lastName" ], "additionalProperties": false } }, "required": [ "id", "type", "attributes" ], "additionalProperties": false } }, "required": [ "data" ], "additionalProperties": false } } } } } } }, "/api/v1/users/{id}": { "get": { "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "users" ] }, "attributes": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "firstName": { "type": "string" }, "lastName": { "type": "string" } }, "required": [ "email", "firstName", "lastName" ], "additionalProperties": false } }, "required": [ "id", "type", "attributes" ], "additionalProperties": false } }, "required": [ "data" ], "additionalProperties": false } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "links": { "type": "object", "properties": { "about": { "type": "string" }, "type": { "type": "string" } }, "additionalProperties": false }, "status": { "type": "string" }, "code": { "type": "string" }, "title": { "type": "string" }, "detail": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" }, "parameter": { "type": "string" }, "header": { "type": "string" } }, "additionalProperties": false }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "status", "title" ], "additionalProperties": false } } }, "required": [ "errors" ], "additionalProperties": false } } } } } }, "patch": { "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "users" ] }, "attributes": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "firstName": { "type": "string" }, "lastName": { "type": "string" } }, "required": [ "email", "firstName", "lastName" ] } }, "required": [ "id", "type", "attributes" ] }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "data" ] } } }, "required": true }, "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "users" ] }, "attributes": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "pattern": "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, "firstName": { "type": "string" }, "lastName": { "type": "string" } }, "required": [ "email", "firstName", "lastName" ], "additionalProperties": false } }, "required": [ "id", "type", "attributes" ], "additionalProperties": false }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": false } } } }, "403": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "links": { "type": "object", "properties": { "about": { "type": "string" }, "type": { "type": "string" } }, "additionalProperties": false }, "status": { "type": "string" }, "code": { "type": "string" }, "title": { "type": "string" }, "detail": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" }, "parameter": { "type": "string" }, "header": { "type": "string" } }, "additionalProperties": false }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "status", "title" ], "additionalProperties": false } } }, "required": [ "errors" ], "additionalProperties": false } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "links": { "type": "object", "properties": { "about": { "type": "string" }, "type": { "type": "string" } }, "additionalProperties": false }, "status": { "type": "string" }, "code": { "type": "string" }, "title": { "type": "string" }, "detail": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" }, "parameter": { "type": "string" }, "header": { "type": "string" } }, "additionalProperties": false }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "status", "title" ], "additionalProperties": false } } }, "required": [ "errors" ], "additionalProperties": false } } } } } }, "delete": { "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true } ], "responses": { "204": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "null", "enum": [ null ] }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": false } } } }, "403": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "links": { "type": "object", "properties": { "about": { "type": "string" }, "type": { "type": "string" } }, "additionalProperties": false }, "status": { "type": "string" }, "code": { "type": "string" }, "title": { "type": "string" }, "detail": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" }, "parameter": { "type": "string" }, "header": { "type": "string" } }, "additionalProperties": false }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "status", "title" ], "additionalProperties": false } } }, "required": [ "errors" ], "additionalProperties": false } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "links": { "type": "object", "properties": { "about": { "type": "string" }, "type": { "type": "string" } }, "additionalProperties": false }, "status": { "type": "string" }, "code": { "type": "string" }, "title": { "type": "string" }, "detail": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" }, "parameter": { "type": "string" }, "header": { "type": "string" } }, "additionalProperties": false }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "status", "title" ], "additionalProperties": false } } }, "required": [ "errors" ], "additionalProperties": false } } } } } } }, "/api/v1/todos/": { "post": { "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "nullable": true, "type": "string" }, "attributes": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "nullable": true, "type": "string" }, "completed": { "type": "boolean" } }, "required": [ "title" ] } }, "required": [ "attributes" ] }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "data" ] } } }, "required": true }, "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "todos" ] }, "attributes": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "nullable": true, "type": "string" }, "completed": { "type": "boolean" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "title", "description", "completed", "createdAt", "updatedAt" ], "additionalProperties": false } }, "required": [ "id", "type", "attributes" ], "additionalProperties": false }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": false } } } } } }, "get": { "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "todos" ] }, "attributes": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "nullable": true, "type": "string" }, "completed": { "type": "boolean" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "title", "description", "completed", "createdAt", "updatedAt" ], "additionalProperties": false } }, "required": [ "id", "type", "attributes" ], "additionalProperties": false } }, "meta": { "type": "object", "properties": { "total": { "type": "number" } }, "required": [ "total" ], "additionalProperties": false } }, "required": [ "data", "meta" ], "additionalProperties": false } } } } } } }, "/api/v1/todos/{id}": { "get": { "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "todos" ] }, "attributes": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "nullable": true, "type": "string" }, "completed": { "type": "boolean" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "title", "description", "completed", "createdAt", "updatedAt" ], "additionalProperties": false } }, "required": [ "id", "type", "attributes" ], "additionalProperties": false } }, "required": [ "data" ], "additionalProperties": false } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "links": { "type": "object", "properties": { "about": { "type": "string" }, "type": { "type": "string" } }, "additionalProperties": false }, "status": { "type": "string" }, "code": { "type": "string" }, "title": { "type": "string" }, "detail": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" }, "parameter": { "type": "string" }, "header": { "type": "string" } }, "additionalProperties": false }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "status", "title" ], "additionalProperties": false } } }, "required": [ "errors" ], "additionalProperties": false } } } } } }, "patch": { "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "todos" ] }, "attributes": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "nullable": true, "type": "string" }, "completed": { "type": "boolean" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "title", "description", "completed", "createdAt", "updatedAt" ] } }, "required": [ "id", "type", "attributes" ] }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "data" ] } } }, "required": true }, "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true } ], "responses": { "200": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "object", "properties": { "id": { "type": "string" }, "type": { "type": "string", "enum": [ "todos" ] }, "attributes": { "type": "object", "properties": { "title": { "type": "string" }, "description": { "nullable": true, "type": "string" }, "completed": { "type": "boolean" }, "createdAt": { "type": "string" }, "updatedAt": { "type": "string" } }, "required": [ "title", "description", "completed", "createdAt", "updatedAt" ], "additionalProperties": false } }, "required": [ "id", "type", "attributes" ], "additionalProperties": false }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": false } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "links": { "type": "object", "properties": { "about": { "type": "string" }, "type": { "type": "string" } }, "additionalProperties": false }, "status": { "type": "string" }, "code": { "type": "string" }, "title": { "type": "string" }, "detail": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" }, "parameter": { "type": "string" }, "header": { "type": "string" } }, "additionalProperties": false }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "status", "title" ], "additionalProperties": false } } }, "required": [ "errors" ], "additionalProperties": false } } } } } }, "delete": { "parameters": [ { "schema": { "type": "string" }, "in": "path", "name": "id", "required": true } ], "responses": { "204": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "data": { "type": "null", "enum": [ null ] }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "data" ], "additionalProperties": false } } } }, "404": { "description": "Default Response", "content": { "application/json": { "schema": { "type": "object", "properties": { "errors": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "links": { "type": "object", "properties": { "about": { "type": "string" }, "type": { "type": "string" } }, "additionalProperties": false }, "status": { "type": "string" }, "code": { "type": "string" }, "title": { "type": "string" }, "detail": { "type": "string" }, "source": { "type": "object", "properties": { "pointer": { "type": "string" }, "parameter": { "type": "string" }, "header": { "type": "string" } }, "additionalProperties": false }, "meta": { "type": "object", "additionalProperties": {} } }, "required": [ "status", "title" ], "additionalProperties": false } } }, "required": [ "errors" ], "additionalProperties": false } } } } } } } }, "servers": [ { "url": "http://localhost:8000", "description": "" } ], "security": [ { "bearerAuth": [] } ] }