{ "openapi": "3.0.0", "paths": { "/": { "get": { "operationId": "AppController_getHome", "parameters": [], "responses": { "200": { "description": "" } }, "tags": ["App"] } }, "/profile": { "get": { "operationId": "AppController_getProfile", "parameters": [], "responses": { "200": { "description": "" } }, "tags": ["App"] } }, "/users": { "post": { "operationId": "UserController_create", "parameters": [], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateUserDto" } } } }, "responses": { "201": { "description": "", "content": { "application/json": { "schema": { "allOf": [ { "properties": { "data": { "$ref": "#/components/schemas/UserResponseDto" }, "meta": { "type": "object", "additionalProperties": true } } } ] } } } } }, "tags": ["users"] }, "get": { "operationId": "UserController_findAll", "parameters": [], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "allOf": [ { "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/UserResponseDto" } }, "meta": { "type": "object", "additionalProperties": true } } } ] } } } } }, "tags": ["users"] } }, "/users/{id}": { "get": { "operationId": "UserController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "allOf": [ { "properties": { "data": { "$ref": "#/components/schemas/UserResponseDto" }, "meta": { "type": "object", "additionalProperties": true } } } ] } } } } }, "tags": ["users"] }, "patch": { "operationId": "UserController_update", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateUserDto" } } } }, "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "allOf": [ { "properties": { "data": { "$ref": "#/components/schemas/UserResponseDto" }, "meta": { "type": "object", "additionalProperties": true } } } ] } } } } }, "tags": ["users"] }, "delete": { "operationId": "UserController_remove", "parameters": [ { "name": "id", "required": true, "in": "path", "schema": { "type": "string" } } ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { "allOf": [ { "properties": { "data": { "$ref": "#/components/schemas/UserResponseDto" }, "meta": { "type": "object", "additionalProperties": true } } } ] } } } } }, "tags": ["users"] } }, "/articles": { "get": { "operationId": "ArticleController_findAll", "parameters": [], "responses": { "200": { "description": "Return all articles.", "content": { "application/json": { "schema": { "type": "array", "items": { "$ref": "#/components/schemas/ArticleResponseDto" } } } } } }, "summary": "Get all articles", "tags": ["Articles"] } }, "/articles/{id}": { "get": { "operationId": "ArticleController_findOne", "parameters": [ { "name": "id", "required": true, "in": "path", "description": "Article ID", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Return article by ID.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ArticleResponseDto" } } } } }, "summary": "Get article by ID", "tags": ["Articles"] } } }, "info": { "title": "API Documentation", "description": "The API description", "version": "1.0", "contact": {} }, "tags": [], "servers": [], "components": { "securitySchemes": { "bearer": { "scheme": "bearer", "bearerFormat": "JWT", "type": "http" } }, "schemas": { "UserResponseDto": { "type": "object", "properties": { "id": { "type": "string", "description": "The unique identifier of the user" }, "email": { "type": "string", "description": "The email address of the user" }, "name_en": { "type": "object", "description": "The full name of the user in English", "example": "Somchai Jaidee", "nullable": true }, "name_th": { "type": "object", "description": "The full name of the user in Thai", "example": "สมชาย ใจดี", "nullable": true }, "createdAt": { "format": "date-time", "type": "string", "description": "The date and time when the user was created" }, "updatedAt": { "format": "date-time", "type": "string", "description": "The date and time when the user was last updated" } }, "required": ["id", "email", "createdAt", "updatedAt"] }, "CreateUserDto": { "type": "object", "properties": { "email": { "type": "string", "format": "email" }, "name_en": { "type": "string", "minLength": 2, "maxLength": 50 }, "name_th": { "type": "string", "minLength": 2, "maxLength": 50 } }, "required": ["email"] }, "UpdateUserDto": { "type": "object", "properties": { "email": { "type": "string", "format": "email" }, "name_en": { "type": "string", "minLength": 2, "maxLength": 50 }, "name_th": { "type": "string", "minLength": 2, "maxLength": 50 } } }, "ArticleResponseDto": { "type": "object", "properties": { "title": { "type": "object", "properties": { "en": { "type": "string" }, "th": { "type": "string" } }, "required": ["en", "th"], "x-nestjs_zod-self-required": true }, "content": { "type": "object", "properties": { "en": { "type": "string" }, "th": { "type": "string" } }, "required": ["en", "th"], "x-nestjs_zod-self-required": true } }, "required": ["title", "content"] } } } }