openapi: 3.1.0 info: title: "API Documentation" version: "0.1.0" security: - bearerAuth: [] paths: /api/V1/example: get: summary: "Example endpoint" description: "An example endpoint to demonstrate the API structure." responses: '200': description: "Successful response" content: application/json: schema: $ref: '#/components/schemas/SuccessResponse' '400': description: "Bad request" content: application/json: schema: $ref: '#/components/schemas/BadRequestResponse' '404': description: "Not found" content: application/json: schema: $ref: '#/components/schemas/NotFoundResponse' # /api/v1/auth/login: # $ref: "./auth/login.yml" components: securitySchemes: bearerAuth: type: http scheme: bearer bearerFormat: JWT jwtAuth: type: apiKey in: header name: Authorization schemas: # Common Responses SuccessResponse: type: object properties: result: type: string enum: - success code: type: integer default: 200 message: type: array items: type: object FoundResponse: type: object properties: result: type: string enum: - error code: type: integer default: 302 message: type: array items: type: object BadRequestResponse: type: object properties: result: type: string enum: - error code: type: integer default: 400 message: type: array items: type: object NotFoundResponse: type: object properties: result: type: string enum: - error code: type: integer default: 404 message: type: array items: type: object UnauthorizedResponse: type: object properties: result: type: string enum: - error code: type: integer default: 401 message: type: string ForbiddenResponse: type: object properties: result: type: string enum: - error code: type: integer default: 403 message: type: string InternalServerErrorReponse: type: object properties: result: type: string enum: - error code: type: integer default: 500 message: type: string default: "Internal server error" # Common Pagination Pagination: type: object properties: totalItems: type: string itemsPerPage: type: integer currentPage: type: integer totalPages: type: integer PaginationFilters: type: object properties: page: type: integer default: 1 itemsPerPage: type: integer default: 10 sortBy: type: string sortOrder: type: string enum: - null - "asc" - "desc"