Regenerate the spec against the gateway, not the backend

This spec predated the other four and documented the wrong surface: the
paths were the backend's (/classic-models/api/v1/...) and the server was
http://localhost:8000. Neither is reachable from the developer portal,
so every operation it published failed as written — the gateway serves
/catalog/v1/... and rewrites onto the backend path upstream.

Regenerated the same way as the other four domains: from the backend's
drf-spectacular schema, filtered to the operations this domain's gateway
exposes, derived from the Kong routes and their request-transformer
rewrites in Konnect. All 14 REST routes resolved to a backend operation.
Same six paths as before, now expressed as the gateway's, with
https://catalog-dev.sttlab.local as the server and path parameters
renamed to the gateway's capture names.

The five published specs now follow one convention.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Stéphane Tailland
2026-08-27 06:42:02 +02:00
parent 454c4c66e2
commit c210ffbaae
+130 -130
View File
@@ -2,37 +2,9 @@ openapi: 3.0.3
info: info:
title: Classic Models API — Catalog domain title: Classic Models API — Catalog domain
version: 4.7.0 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: paths:
/classic-models/api/v1/productlines/: /catalog/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: ""
get: get:
operationId: list_product_lines operationId: list_product_lines
description: Retrieve a paginated list of all product line categories in the system. description: Retrieve a paginated list of all product line categories in the system.
@@ -62,7 +34,77 @@ paths:
schema: schema:
$ref: '#/components/schemas/PaginatedProductLineList' $ref: '#/components/schemas/PaginatedProductLineList'
description: "" 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: patch:
operationId: patch_product_line operationId: patch_product_line
description: Update specific fields of an existing product line. description: Update specific fields of an existing product line.
@@ -97,29 +139,6 @@ paths:
schema: schema:
$ref: '#/components/schemas/ProductLine' $ref: '#/components/schemas/ProductLine'
description: "" 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: put:
operationId: update_product_line operationId: update_product_line
description: Update all fields of an existing product line. description: Update all fields of an existing product line.
@@ -155,26 +174,7 @@ paths:
schema: schema:
$ref: '#/components/schemas/ProductLine' $ref: '#/components/schemas/ProductLine'
description: "" description: ""
delete: /catalog/v1/productlines/{productline}/products/:
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/:
get: get:
operationId: get_product_line_products operationId: get_product_line_products
description: Retrieve all products in a specific product line category. This endpoint allows browsing products by category. description: Retrieve all products in a specific product line category. This endpoint allows browsing products by category.
@@ -210,35 +210,7 @@ paths:
schema: schema:
$ref: '#/components/schemas/PaginatedProductList' $ref: '#/components/schemas/PaginatedProductList'
description: "" description: ""
/classic-models/api/v1/products/: /catalog/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: ""
get: get:
operationId: list_products operationId: list_products
description: Retrieve a paginated list of all products in the catalog with their details. description: Retrieve a paginated list of all products in the catalog with their details.
@@ -268,7 +240,35 @@ paths:
schema: schema:
$ref: '#/components/schemas/PaginatedProductList' $ref: '#/components/schemas/PaginatedProductList'
description: "" 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: patch:
operationId: patch_product operationId: patch_product
description: Update specific fields of an existing product. description: Update specific fields of an existing product.
@@ -303,29 +303,6 @@ paths:
schema: schema:
$ref: '#/components/schemas/Product' $ref: '#/components/schemas/Product'
description: "" 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: put:
operationId: update_product operationId: update_product
description: Update all fields of an existing product in the catalog. description: Update all fields of an existing product in the catalog.
@@ -380,7 +357,30 @@ paths:
responses: responses:
"204": "204":
description: No response body 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: get:
operationId: get_product_order_details 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. 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 scheme: bearer
bearerFormat: JWT bearerFormat: JWT
servers: servers:
- url: http://localhost:8000 - url: https://catalog-dev.sttlab.local
description: API Server description: Catalog gateway (dev)