diff --git a/openapi.yaml b/openapi.yaml index f340549..41c82cf 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2,37 +2,9 @@ openapi: 3.0.3 info: title: Classic Models API — Catalog domain version: 4.7.0 - description: Catalog domain (productlines, products) subset of the shared classic-models-api backend. Kong exposes only these paths for the catalog domain's Control Plane. + description: 'Products and product lines in the Classic Models catalogue. Catalog domain subset of the shared classic-models-api backend, as exposed by the catalog domain''s Kong gateway. Paths and server below are the gateway''s, not the backend''s: the gateway rewrites /catalog/v1/... onto /classic-models/api/v1/... upstream. Requires a bearer token from the classic-models realm.' paths: - /classic-models/api/v1/productlines/: - post: - operationId: create_product_line - description: Add a new product line category to the system. - summary: Create a new product line - tags: - - Product Lines - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ProductLineRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ProductLineRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/ProductLineRequest' - required: true - security: - - ApiKeyAuth: [] - - JWTAuth: [] - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/ProductLine' - description: "" + /catalog/v1/productlines/: get: operationId: list_product_lines description: Retrieve a paginated list of all product line categories in the system. @@ -62,7 +34,77 @@ paths: schema: $ref: '#/components/schemas/PaginatedProductLineList' description: "" - /classic-models/api/v1/productlines/{productline}/: + post: + operationId: create_product_line + description: Add a new product line category to the system. + summary: Create a new product line + tags: + - Product Lines + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductLineRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ProductLineRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/ProductLineRequest' + required: true + security: + - ApiKeyAuth: [] + - JWTAuth: [] + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/ProductLine' + description: "" + /catalog/v1/productlines/{productline}/: + get: + operationId: get_product_line + description: Retrieve detailed information about a specific product line by its identifier. + summary: Get a specific product line + parameters: + - in: path + name: productline + schema: + type: string + description: A unique value identifying this product line. + required: true + tags: + - Product Lines + security: + - ApiKeyAuth: [] + - JWTAuth: [] + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/ProductLine' + description: "" + delete: + operationId: delete_product_line + description: Remove a product line from the system. + summary: Delete a product line + parameters: + - in: path + name: productline + schema: + type: string + description: A unique value identifying this product line. + required: true + tags: + - Product Lines + security: + - ApiKeyAuth: [] + - JWTAuth: [] + responses: + "204": + description: No response body patch: operationId: patch_product_line description: Update specific fields of an existing product line. @@ -97,29 +139,6 @@ paths: schema: $ref: '#/components/schemas/ProductLine' description: "" - get: - operationId: get_product_line - description: Retrieve detailed information about a specific product line by its identifier. - summary: Get a specific product line - parameters: - - in: path - name: productline - schema: - type: string - description: A unique value identifying this product line. - required: true - tags: - - Product Lines - security: - - ApiKeyAuth: [] - - JWTAuth: [] - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/ProductLine' - description: "" put: operationId: update_product_line description: Update all fields of an existing product line. @@ -155,26 +174,7 @@ paths: schema: $ref: '#/components/schemas/ProductLine' description: "" - delete: - operationId: delete_product_line - description: Remove a product line from the system. - summary: Delete a product line - parameters: - - in: path - name: productline - schema: - type: string - description: A unique value identifying this product line. - required: true - tags: - - Product Lines - security: - - ApiKeyAuth: [] - - JWTAuth: [] - responses: - "204": - description: No response body - /classic-models/api/v1/productlines/{productline}/products/: + /catalog/v1/productlines/{productline}/products/: get: operationId: get_product_line_products description: Retrieve all products in a specific product line category. This endpoint allows browsing products by category. @@ -210,35 +210,7 @@ paths: schema: $ref: '#/components/schemas/PaginatedProductList' description: "" - /classic-models/api/v1/products/: - post: - operationId: create_product - description: Add a new product to the catalog with all required information. - summary: Create a new product - tags: - - Products - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/ProductRequest' - application/x-www-form-urlencoded: - schema: - $ref: '#/components/schemas/ProductRequest' - multipart/form-data: - schema: - $ref: '#/components/schemas/ProductRequest' - required: true - security: - - ApiKeyAuth: [] - - JWTAuth: [] - responses: - "201": - content: - application/json: - schema: - $ref: '#/components/schemas/Product' - description: "" + /catalog/v1/products/: get: operationId: list_products description: Retrieve a paginated list of all products in the catalog with their details. @@ -268,7 +240,35 @@ paths: schema: $ref: '#/components/schemas/PaginatedProductList' description: "" - /classic-models/api/v1/products/{productcode}/: + post: + operationId: create_product + description: Add a new product to the catalog with all required information. + summary: Create a new product + tags: + - Products + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/ProductRequest' + application/x-www-form-urlencoded: + schema: + $ref: '#/components/schemas/ProductRequest' + multipart/form-data: + schema: + $ref: '#/components/schemas/ProductRequest' + required: true + security: + - ApiKeyAuth: [] + - JWTAuth: [] + responses: + "201": + content: + application/json: + schema: + $ref: '#/components/schemas/Product' + description: "" + /catalog/v1/products/{productcode}/: patch: operationId: patch_product description: Update specific fields of an existing product. @@ -303,29 +303,6 @@ paths: schema: $ref: '#/components/schemas/Product' description: "" - get: - operationId: get_product - description: Retrieve detailed information about a specific product by its code. - summary: Get a specific product - parameters: - - in: path - name: productcode - schema: - type: string - description: A unique value identifying this product. - required: true - tags: - - Products - security: - - ApiKeyAuth: [] - - JWTAuth: [] - responses: - "200": - content: - application/json: - schema: - $ref: '#/components/schemas/Product' - description: "" put: operationId: update_product description: Update all fields of an existing product in the catalog. @@ -380,7 +357,30 @@ paths: responses: "204": description: No response body - /classic-models/api/v1/products/{productcode}/order-details/: + get: + operationId: get_product + description: Retrieve detailed information about a specific product by its code. + summary: Get a specific product + parameters: + - in: path + name: productcode + schema: + type: string + description: A unique value identifying this product. + required: true + tags: + - Products + security: + - ApiKeyAuth: [] + - JWTAuth: [] + responses: + "200": + content: + application/json: + schema: + $ref: '#/components/schemas/Product' + description: "" + /catalog/v1/products/{productcode}/order-details/: get: operationId: get_product_order_details description: Retrieve all order details (sales) for a specific product. This endpoint provides the complete sales history for the product. @@ -703,5 +703,5 @@ components: scheme: bearer bearerFormat: JWT servers: - - url: http://localhost:8000 - description: API Server + - url: https://catalog-dev.sttlab.local + description: Catalog gateway (dev)