openapi: 3.0.3 info: title: 'product-management-app API Documentation' description: 'This is an assessment for Pay4Me.app to build a crud application using filament, with some unit tests and documentation to be done using Laravel Scribe' version: 1.0.0 servers: - url: 'https://pay4me.laravel.cloud' tags: - name: Health description: "\nEndpoints for checking health of api" - name: Product description: "\nProduct Related Apis" paths: /api/v1/ping: get: summary: 'Check Program Health' operationId: checkProgramHealth description: '' parameters: [] responses: 200: description: '' content: application/json: schema: type: array items: type: string example: - Pong tags: - Health security: [] /api/v1/products: get: summary: 'List all products' operationId: listAllProducts description: 'This endpoint returns a paginated list of all products' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: data: - id: 1 name: 'Scribe Product' category: electronics status: active created_at: '2025-03-26T21:52:20.000000Z' updated_at: '2025-03-26T21:52:20.000000Z' - id: 1 name: 'Scribe Product' category: electronics status: active created_at: '2025-03-26T21:52:20.000000Z' updated_at: '2025-03-26T21:52:20.000000Z' links: first: '/?page=1' last: '/?page=1' prev: null next: null meta: current_page: 1 from: 1 last_page: 1 links: - url: null label: '« Previous' active: false - url: '/?page=1' label: '1' active: true - url: null label: 'Next »' active: false path: / per_page: 10 to: 2 total: 2 properties: data: type: array example: - id: 1 name: 'Scribe Product' category: electronics status: active created_at: '2025-03-26T21:52:20.000000Z' updated_at: '2025-03-26T21:52:20.000000Z' - id: 1 name: 'Scribe Product' category: electronics status: active created_at: '2025-03-26T21:52:20.000000Z' updated_at: '2025-03-26T21:52:20.000000Z' items: type: object properties: id: type: integer example: 1 name: type: string example: 'Scribe Product' category: type: string example: electronics status: type: string example: active created_at: type: string example: '2025-03-26T21:52:20.000000Z' updated_at: type: string example: '2025-03-26T21:52:20.000000Z' links: type: object properties: first: type: string example: '/?page=1' last: type: string example: '/?page=1' prev: type: string example: null next: type: string example: null meta: type: object properties: current_page: type: integer example: 1 from: type: integer example: 1 last_page: type: integer example: 1 links: type: array example: - url: null label: '« Previous' active: false - url: '/?page=1' label: '1' active: true - url: null label: 'Next »' active: false items: type: object properties: url: type: string example: null label: type: string example: '« Previous' active: type: boolean example: false path: type: string example: / per_page: type: integer example: 10 to: type: integer example: 2 total: type: integer example: 2 tags: - Product security: [] post: summary: 'Create New Product' operationId: createNewProduct description: 'This endpoint creates a new product' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: data: id: 1 name: 'Scribe Product' category: electronics status: active created_at: '2025-03-26T21:52:20.000000Z' updated_at: '2025-03-26T21:52:20.000000Z' properties: data: type: object properties: id: type: integer example: 1 name: type: string example: 'Scribe Product' category: type: string example: electronics status: type: string example: active created_at: type: string example: '2025-03-26T21:52:20.000000Z' updated_at: type: string example: '2025-03-26T21:52:20.000000Z' tags: - Product requestBody: required: true content: application/json: schema: type: object properties: name: type: string description: 'The name of the product' example: 'Monkey King Wukong' nullable: false category: type: string description: 'The category of the product' example: game nullable: false status: type: string description: 'An integer representing status' example: inactive nullable: false enum: - active - inactive required: - name - category - status security: [] '/api/v1/products/{id}': get: summary: 'Display Single Product' operationId: displaySingleProduct description: 'This endpoint displays a specific product' parameters: [] responses: 200: description: '' content: application/json: schema: type: object example: data: id: 1 name: 'Scribe Product' category: electronics status: active created_at: '2025-03-26T21:52:20.000000Z' updated_at: '2025-03-26T21:52:20.000000Z' properties: data: type: object properties: id: type: integer example: 1 name: type: string example: 'Scribe Product' category: type: string example: electronics status: type: string example: active created_at: type: string example: '2025-03-26T21:52:20.000000Z' updated_at: type: string example: '2025-03-26T21:52:20.000000Z' 404: description: '' content: text/plain: schema: type: string example: '{"message": "App\Models\Product not found"}' tags: - Product security: [] parameters: - in: path name: id description: 'The ID of the product.' example: 1 required: true schema: type: integer