Files
slm-design/examples/demo-backend/openapi/complex.json

7468 lines
194 KiB
JSON
Raw Normal View History

{
"openapi": "3.0.0",
"paths": {
"/api/v1/health": {
"get": {
"operationId": "ComplexHealth_health",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HealthResponseDto"
}
}
}
}
},
"summary": "Check Complex API availability",
"tags": [
"Health"
]
}
},
"/api/v1/auth/login": {
"post": {
"operationId": "ComplexAuth_login",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplexLoginDto"
}
}
}
},
"responses": {
"200": {
"headers": {
"Set-Cookie": {
"description": "Sets demo_session (HttpOnly) and demo_csrf cookies.",
"schema": {
"type": "string"
}
}
},
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CookieSessionResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"summary": "Login and establish HttpOnly cookie session",
"tags": [
"Auth"
]
}
},
"/api/v1/auth/refresh": {
"post": {
"operationId": "ComplexAuth_refresh",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CookieSessionResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"csrf": []
},
{
"cookieSession": []
}
],
"summary": "Rotate the current cookie session and CSRF token",
"tags": [
"Auth"
]
}
},
"/api/v1/auth/logout": {
"post": {
"operationId": "ComplexAuth_logout",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
}
],
"responses": {
"204": {
"description": ""
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"csrf": []
},
{
"cookieSession": []
}
],
"summary": "Revoke cookie session and clear authentication cookies",
"tags": [
"Auth"
]
}
},
"/api/v1/users/me": {
"get": {
"operationId": "ComplexUsers_me",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplexUserResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "Get the authenticated user and available organizations",
"tags": [
"Users"
]
}
},
"/api/v1/users": {
"get": {
"operationId": "ComplexUsers_list",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplexUsersResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List users in the current tenant",
"tags": [
"Users"
]
}
},
"/api/v1/organizations": {
"get": {
"operationId": "Organizations_list",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OrganizationsResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List organizations available to the current user",
"tags": [
"Organizations"
]
}
},
"/api/v1/organizations/{id}": {
"get": {
"operationId": "Organizations_get",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/OrganizationResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "Get one available organization",
"tags": [
"Organizations"
]
}
},
"/api/v1/organizations/{id}/members": {
"get": {
"operationId": "Organizations_members",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MembersResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List organization members and their roles",
"tags": [
"Organizations"
]
}
},
"/api/v1/products": {
"get": {
"operationId": "ComplexProducts_list",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "limit",
"required": false,
"in": "query",
"schema": {
"minimum": 1,
"maximum": 100,
"default": 20,
"allOf": [
{
"$ref": "#/components/schemas/Object"
}
]
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"schema": {
"example": "complex-product-mouse",
"type": "string"
}
},
{
"name": "search",
"required": false,
"in": "query",
"schema": {
"example": "keyboard",
"type": "string"
}
},
{
"name": "status",
"required": false,
"in": "query",
"schema": {
"type": "string",
"enum": [
"draft",
"active",
"archived"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplexProductsResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List tenant products using cursor pagination",
"tags": [
"Products"
]
},
"post": {
"operationId": "ComplexProducts_create",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateComplexProductDto"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplexProductResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
},
{
"csrf": []
}
],
"summary": "Create a tenant product with variants",
"tags": [
"Products"
]
}
},
"/api/v1/products/{id}": {
"get": {
"operationId": "ComplexProducts_get",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplexProductResponseDto"
}
}
}
},
"304": {
"description": ""
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "Get a rich product with variants and ETag support",
"tags": [
"Products"
]
},
"patch": {
"operationId": "ComplexProducts_update",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateComplexProductDto"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplexProductResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"409": {
"description": "Business or optimistic-lock conflict.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
},
{
"csrf": []
}
],
"summary": "Update a product using optimistic locking",
"tags": [
"Products"
]
}
},
"/api/v1/categories": {
"get": {
"operationId": "ComplexCatalog_categories",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplexCategoriesResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List a recursive category tree",
"tags": [
"Catalog"
]
}
},
"/api/v1/brands": {
"get": {
"operationId": "ComplexCatalog_brands",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BrandsResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List product brands",
"tags": [
"Catalog"
]
}
},
"/api/v1/warehouses": {
"get": {
"operationId": "ComplexInventory_warehouses",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WarehousesResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List tenant warehouses",
"tags": [
"Inventory"
]
}
},
"/api/v1/inventory": {
"get": {
"operationId": "ComplexInventory_inventory",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "productId",
"required": true,
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InventoryResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List inventory with optional product filter",
"tags": [
"Inventory"
]
}
},
"/api/v1/inventory/{id}/adjust": {
"post": {
"operationId": "ComplexInventory_adjust",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AdjustInventoryDto"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InventoryItemResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"409": {
"description": "Business or optimistic-lock conflict.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
},
{
"csrf": []
}
],
"summary": "Adjust stock using optimistic locking",
"tags": [
"Inventory"
]
}
},
"/api/v1/customers": {
"get": {
"operationId": "Customers_list",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "page",
"required": false,
"in": "query",
"schema": {
"minimum": 1,
"default": 1,
"allOf": [
{
"$ref": "#/components/schemas/Object"
}
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"schema": {
"minimum": 1,
"maximum": 100,
"default": 20,
"allOf": [
{
"$ref": "#/components/schemas/Object"
}
]
}
},
{
"name": "search",
"required": false,
"in": "query",
"schema": {
"example": "ada",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomersResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List customers using offset pagination and search",
"tags": [
"Customers"
]
}
},
"/api/v1/customers/{id}": {
"get": {
"operationId": "Customers_get",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CustomerResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "Get one customer with nested address",
"tags": [
"Customers"
]
}
},
"/api/v1/orders": {
"get": {
"operationId": "ComplexOrders_list",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "limit",
"required": false,
"in": "query",
"schema": {
"minimum": 1,
"maximum": 100,
"default": 20,
"allOf": [
{
"$ref": "#/components/schemas/Object"
}
]
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"schema": {
"example": "complex-order-001",
"type": "string"
}
},
{
"name": "status",
"required": false,
"in": "query",
"schema": {
"type": "string",
"enum": [
"draft",
"awaiting-payment",
"paid",
"fulfillment",
"shipped",
"cancelled"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplexOrdersResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List tenant orders using cursor pagination",
"tags": [
"Orders"
]
},
"post": {
"operationId": "ComplexOrders_create",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "idempotency-key",
"required": true,
"in": "header",
"schema": {
"type": "string"
}
},
{
"name": "Idempotency-Key",
"in": "header",
"description": "Repeating a request with the same key returns the original order.",
"required": true,
"schema": {
"type": "string",
"example": "checkout-6c5f92ad"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateComplexOrderDto"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplexOrderResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"409": {
"description": "Business or optimistic-lock conflict.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
},
{
"csrf": []
}
],
"summary": "Create an order idempotently",
"tags": [
"Orders"
]
}
},
"/api/v1/orders/{id}": {
"get": {
"operationId": "ComplexOrders_get",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplexOrderResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "Get one order and its state",
"tags": [
"Orders"
]
}
},
"/api/v1/orders/{id}/cancel": {
"post": {
"operationId": "ComplexOrders_cancel",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplexOrderResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"409": {
"description": "Business or optimistic-lock conflict.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
},
{
"csrf": []
}
],
"summary": "Apply a validated order state transition",
"tags": [
"Orders"
]
}
},
"/api/v1/payments": {
"get": {
"operationId": "Payments_payments",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PaymentsResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List payments for tenant orders",
"tags": [
"Payments and promotions"
]
}
},
"/api/v1/promotions": {
"get": {
"operationId": "Payments_promotions",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PromotionsResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List active and expired promotion contracts",
"tags": [
"Payments and promotions"
]
}
},
"/api/v1/reviews": {
"get": {
"operationId": "Reviews_list",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "productId",
"required": true,
"in": "query",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReviewsResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List reviews with moderation state",
"tags": [
"Reviews"
]
},
"post": {
"operationId": "Reviews_create",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateReviewDto"
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ReviewResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
},
{
"csrf": []
}
],
"summary": "Create a review in pending moderation state",
"tags": [
"Reviews"
]
}
},
"/api/v1/notifications": {
"get": {
"operationId": "Notifications_list",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "limit",
"required": false,
"in": "query",
"schema": {
"minimum": 1,
"maximum": 100,
"default": 20,
"allOf": [
{
"$ref": "#/components/schemas/Object"
}
]
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"schema": {
"example": "notification-020",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotificationsResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List polymorphic notifications using cursor pagination",
"tags": [
"Notifications"
]
}
},
"/api/v1/notifications/{id}/read": {
"post": {
"operationId": "Notifications_markRead",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotificationResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
},
{
"csrf": []
}
],
"summary": "Mark a notification as read",
"tags": [
"Notifications"
]
}
},
"/api/v1/files": {
"get": {
"operationId": "Files_list",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FilesResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List uploaded file metadata",
"tags": [
"Files"
]
},
"post": {
"operationId": "Files_upload",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
}
],
"requestBody": {
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"required": [
"file"
],
"properties": {
"file": {
"type": "string",
"format": "binary"
}
}
}
}
}
},
"responses": {
"201": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/FileResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
},
{
"csrf": []
}
],
"summary": "Upload a file up to 5 MiB and retain it in memory",
"tags": [
"Files"
]
}
},
"/api/v1/files/{id}/download": {
"get": {
"operationId": "Files_download",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Binary file content.",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/octet-stream": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/octet-stream": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/octet-stream": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/octet-stream": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/octet-stream": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/octet-stream": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "Download an in-memory file",
"tags": [
"Files"
]
}
},
"/api/v1/audit-events": {
"get": {
"operationId": "Audit_list",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "page",
"required": false,
"in": "query",
"schema": {
"minimum": 1,
"default": 1,
"allOf": [
{
"$ref": "#/components/schemas/Object"
}
]
}
},
{
"name": "limit",
"required": false,
"in": "query",
"schema": {
"minimum": 1,
"maximum": 100,
"default": 20,
"allOf": [
{
"$ref": "#/components/schemas/Object"
}
]
}
},
{
"name": "action",
"required": false,
"in": "query",
"schema": {
"example": "product.updated",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AuditEventsResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List immutable audit events using offset pagination",
"tags": [
"Audit"
]
}
},
"/api/v1/exports/orders": {
"post": {
"operationId": "Jobs_startExport",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
}
],
"responses": {
"202": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JobResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
},
{
"csrf": []
}
],
"summary": "Start an asynchronous orders export",
"tags": [
"Background jobs"
]
}
},
"/api/v1/jobs/{id}": {
"get": {
"operationId": "Jobs_getJob",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/JobResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "Poll background job progress",
"tags": [
"Background jobs"
]
}
},
"/api/v1/jobs/{id}/result": {
"get": {
"operationId": "Jobs_result",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Generated orders CSV.",
"content": {
"text/csv": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"text/csv": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"text/csv": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"text/csv": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"text/csv": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"409": {
"description": "Business or optimistic-lock conflict.",
"content": {
"text/csv": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"text/csv": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"text/csv": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "Download a completed export; returns 409 while processing",
"tags": [
"Background jobs"
]
}
},
"/api/v1/conversations": {
"get": {
"operationId": "Chat_list",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConversationsResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "List conversations available to the current user",
"tags": [
"Chat"
]
}
},
"/api/v1/conversations/{id}": {
"get": {
"operationId": "Chat_get",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConversationResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "Get one conversation",
"tags": [
"Chat"
]
}
},
"/api/v1/conversations/{id}/messages": {
"get": {
"operationId": "Chat_messages",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
},
{
"name": "limit",
"required": false,
"in": "query",
"schema": {
"minimum": 1,
"maximum": 100,
"default": 20,
"allOf": [
{
"$ref": "#/components/schemas/Object"
}
]
}
},
{
"name": "cursor",
"required": false,
"in": "query",
"schema": {
"example": "notification-020",
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessagesResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
}
],
"summary": "Load message history using cursor pagination",
"tags": [
"Chat"
]
},
"post": {
"operationId": "Chat_send",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "X-Organization-Id",
"in": "header",
"description": "Current tenant. The authenticated user must be a member.",
"required": true,
"schema": {
"type": "string",
"example": "org-acme"
}
},
{
"name": "id",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SendMessageDto"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"cookieSession": []
},
{
"csrf": []
}
],
"summary": "Send an idempotent message through REST and broadcast it over Socket.IO",
"tags": [
"Chat"
]
}
},
"/api/v1/testing/scenarios": {
"get": {
"operationId": "ComplexTesting_scenarios",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ScenariosResponseDto"
}
}
}
}
},
"summary": "List deterministic X-Demo-Scenario values",
"tags": [
"Testing"
]
}
},
"/api/v1/testing/reset": {
"post": {
"operationId": "ComplexTesting_reset",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestingActionResponseDto"
}
}
}
}
},
"summary": "Reset all Complex API data and active sessions",
"tags": [
"Testing"
]
}
},
"/api/v1/testing/seed/{preset}": {
"post": {
"operationId": "ComplexTesting_seed",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "preset",
"required": true,
"in": "path",
"schema": {
"enum": [
"small",
"large"
],
"type": "string"
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestingActionResponseDto"
}
}
}
}
},
"summary": "Select a small or large deterministic dataset",
"tags": [
"Testing"
]
}
},
"/api/v1/testing/session/expire": {
"post": {
"operationId": "ComplexTesting_expireSession",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
}
],
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestingActionResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"401": {
"description": "Authentication is missing or expired.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"403": {
"description": "The current user lacks permission.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"security": [
{
"csrf": []
},
{
"cookieSession": []
}
],
"summary": "Expire the current cookie session after this response",
"tags": [
"Testing"
]
}
},
"/api/v1/testing/users/{userId}/role": {
"post": {
"operationId": "ComplexTesting_changeRole",
"parameters": [
{
"name": "X-Demo-Scenario",
"in": "header",
"description": "Forces a deterministic frontend-testing scenario for this request.",
"required": false,
"schema": {
"type": "string",
"enum": [
"normal",
"slow",
"timeout",
"server-error",
"rate-limited",
"empty",
"expired-auth",
"forbidden",
"conflict",
"large-dataset"
]
}
},
{
"name": "userId",
"required": true,
"in": "path",
"schema": {
"type": "string"
}
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChangeComplexRoleDto"
}
}
}
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ComplexUserResponseDto"
}
}
}
},
"400": {
"description": "Invalid request or validation error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"404": {
"description": "The requested resource does not exist.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"429": {
"description": "Demo rate limit scenario.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
},
"500": {
"description": "Unexpected or simulated server error.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponseDto"
}
}
}
}
},
"summary": "Change a role while sessions remain active",
"tags": [
"Testing"
]
}
}
},
"info": {
"title": "Demo Complex API",
"description": "Cookie-session, multitenant and realtime API for large frontend applications.",
"version": "1.0.0",
"contact": {}
},
"tags": [],
"servers": [
{
"url": "http://localhost:3002",
"description": "Local development"
}
],
"components": {
"securitySchemes": {
"cookieSession": {
"type": "apiKey",
"in": "cookie",
"name": "demo_session"
},
"csrf": {
"type": "apiKey",
"in": "header",
"name": "X-CSRF-Token",
"description": "Required for authenticated mutations."
}
},
"schemas": {
"HealthDataDto": {
"type": "object",
"properties": {
"application": {
"type": "string",
"enum": [
"simple",
"complex"
],
"example": "simple"
},
"status": {
"type": "string",
"enum": [
"ok"
],
"example": "ok"
},
"timestamp": {
"type": "string",
"format": "date-time"
},
"version": {
"type": "string",
"example": "1.0.0"
}
},
"required": [
"application",
"status",
"timestamp",
"version"
]
},
"HealthResponseDto": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/HealthDataDto"
}
},
"required": [
"data"
]
},
"ComplexLoginDto": {
"type": "object",
"properties": {
"email": {
"type": "string",
"format": "email",
"example": "admin@complex.demo"
},
"password": {
"type": "string",
"format": "password",
"example": "demo1234",
"minLength": 8
}
},
"required": [
"email",
"password"
]
},
"ComplexUserDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "complex-user-admin"
},
"email": {
"type": "string",
"format": "email",
"example": "admin@complex.demo"
},
"name": {
"type": "string",
"example": "Complex Admin"
},
"role": {
"type": "string",
"enum": [
"admin",
"manager",
"support",
"viewer"
]
},
"avatarUrl": {
"type": "object",
"nullable": true,
"example": "https://i.pravatar.cc/160?img=20"
},
"organizationIds": {
"example": [
"org-acme",
"org-globex"
],
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"email",
"name",
"role",
"avatarUrl",
"organizationIds"
]
},
"CookieSessionDataDto": {
"type": "object",
"properties": {
"user": {
"$ref": "#/components/schemas/ComplexUserDto"
},
"csrfToken": {
"type": "string",
"example": "5f2642ca-2ba4-4ee3-bf2e-d5d37a97686c",
"description": "Send this value in X-CSRF-Token for authenticated mutations."
},
"expiresAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"user",
"csrfToken",
"expiresAt"
]
},
"CookieSessionResponseDto": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/CookieSessionDataDto"
}
},
"required": [
"data"
]
},
"ErrorDetailDto": {
"type": "object",
"properties": {
"field": {
"type": "string",
"example": "email"
},
"message": {
"type": "string",
"example": "must be an email"
},
"code": {
"type": "string",
"example": "isEmail"
}
},
"required": [
"message"
]
},
"ErrorResponseDto": {
"type": "object",
"properties": {
"statusCode": {
"type": "number",
"example": 404
},
"code": {
"type": "string",
"example": "PRODUCT_NOT_FOUND"
},
"message": {
"type": "string",
"example": "Product not found"
},
"details": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ErrorDetailDto"
}
},
"timestamp": {
"type": "string",
"format": "date-time",
"example": "2026-07-30T12:00:00.000Z"
},
"path": {
"type": "string",
"example": "/api/v1/products/product-404"
},
"requestId": {
"type": "string",
"example": "req-5c9f7a3d"
}
},
"required": [
"statusCode",
"code",
"message",
"details",
"timestamp",
"path",
"requestId"
]
},
"ComplexUserResponseDto": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/ComplexUserDto"
}
},
"required": [
"data"
]
},
"ComplexUsersResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ComplexUserDto"
}
}
},
"required": [
"data"
]
},
"OrganizationDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "org-acme"
},
"name": {
"type": "string",
"example": "Acme Commerce"
},
"plan": {
"type": "string",
"enum": [
"starter",
"business",
"enterprise"
]
},
"timezone": {
"type": "string",
"example": "Europe/Berlin"
},
"currency": {
"type": "string",
"enum": [
"USD",
"EUR"
],
"example": "USD"
},
"createdAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"name",
"plan",
"timezone",
"currency",
"createdAt"
]
},
"OrganizationsResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/OrganizationDto"
}
}
},
"required": [
"data"
]
},
"OrganizationResponseDto": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/OrganizationDto"
}
},
"required": [
"data"
]
},
"MemberDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "member-001"
},
"organizationId": {
"type": "string",
"example": "org-acme"
},
"userId": {
"type": "string",
"example": "complex-user-manager"
},
"userName": {
"type": "string",
"example": "Complex Manager"
},
"email": {
"type": "string",
"format": "email",
"example": "manager@complex.demo"
},
"role": {
"type": "string",
"enum": [
"admin",
"manager",
"support",
"viewer"
]
},
"status": {
"type": "string",
"enum": [
"active",
"invited",
"suspended"
],
"example": "active"
}
},
"required": [
"id",
"organizationId",
"userId",
"userName",
"email",
"role",
"status"
]
},
"MembersResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MemberDto"
}
}
},
"required": [
"data"
]
},
"Object": {
"type": "object",
"properties": {}
},
"MoneyDto": {
"type": "object",
"properties": {
"amount": {
"type": "string",
"example": "129.90",
"pattern": "^\\d+\\.\\d{2}$",
"description": "Decimal string; never parse money as a floating-point number."
},
"currency": {
"type": "string",
"enum": [
"USD",
"EUR"
],
"example": "USD"
}
},
"required": [
"amount",
"currency"
]
},
"ProductVariantDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "variant-keyboard-black"
},
"sku": {
"type": "string",
"example": "KEYBOARD-BLACK-US"
},
"attributes": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"example": {
"color": "black",
"layout": "US"
}
},
"price": {
"$ref": "#/components/schemas/MoneyDto"
}
},
"required": [
"id",
"sku",
"attributes",
"price"
]
},
"ComplexProductDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "complex-product-keyboard"
},
"organizationId": {
"type": "string",
"example": "org-acme"
},
"name": {
"type": "string",
"example": "Pro Mechanical Keyboard"
},
"slug": {
"type": "string",
"example": "pro-mechanical-keyboard"
},
"description": {
"type": "string",
"example": "Configurable keyboard sold in multiple variants."
},
"status": {
"type": "string",
"enum": [
"draft",
"active",
"archived"
]
},
"categoryId": {
"type": "string",
"example": "complex-category-electronics"
},
"brandId": {
"type": "string",
"example": "brand-northstar"
},
"price": {
"$ref": "#/components/schemas/MoneyDto"
},
"variants": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProductVariantDto"
}
},
"tags": {
"example": [
"featured",
"office"
],
"type": "array",
"items": {
"type": "string"
}
},
"publishedAt": {
"type": "object",
"format": "date-time",
"nullable": true
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"version": {
"type": "number",
"example": 3,
"description": "Optimistic-lock version."
}
},
"required": [
"id",
"organizationId",
"name",
"slug",
"description",
"status",
"categoryId",
"brandId",
"price",
"variants",
"tags",
"publishedAt",
"createdAt",
"version"
]
},
"CursorMetaDto": {
"type": "object",
"properties": {
"limit": {
"type": "number",
"example": 20,
"minimum": 1
},
"nextCursor": {
"type": "object",
"nullable": true,
"example": "product-020"
},
"hasMore": {
"type": "boolean",
"example": true
}
},
"required": [
"limit",
"hasMore"
]
},
"ComplexProductsResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ComplexProductDto"
}
},
"meta": {
"$ref": "#/components/schemas/CursorMetaDto"
}
},
"required": [
"data",
"meta"
]
},
"ComplexProductResponseDto": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/ComplexProductDto"
}
},
"required": [
"data"
]
},
"CreateVariantDto": {
"type": "object",
"properties": {
"sku": {
"type": "string",
"example": "KEYBOARD-WHITE-US"
},
"attributes": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"example": {
"color": "white",
"layout": "US"
}
},
"priceAmount": {
"type": "string",
"example": "139.90"
}
},
"required": [
"sku",
"attributes",
"priceAmount"
]
},
"CreateComplexProductDto": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "Pro Mechanical Keyboard"
},
"description": {
"type": "string",
"example": "Configurable keyboard sold in multiple variants."
},
"status": {
"type": "string",
"enum": [
"draft",
"active",
"archived"
],
"default": "draft"
},
"categoryId": {
"type": "string",
"example": "complex-category-electronics"
},
"brandId": {
"type": "string",
"example": "brand-northstar"
},
"priceAmount": {
"type": "string",
"example": "129.90"
},
"variants": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CreateVariantDto"
}
},
"tags": {
"example": [
"featured"
],
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"name",
"description",
"status",
"categoryId",
"brandId",
"priceAmount",
"variants"
]
},
"UpdateComplexProductDto": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "Pro Mechanical Keyboard"
},
"description": {
"type": "string",
"example": "Configurable keyboard sold in multiple variants."
},
"status": {
"type": "string",
"enum": [
"draft",
"active",
"archived"
],
"default": "draft"
},
"categoryId": {
"type": "string",
"example": "complex-category-electronics"
},
"brandId": {
"type": "string",
"example": "brand-northstar"
},
"priceAmount": {
"type": "string",
"example": "129.90"
},
"variants": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CreateVariantDto"
}
},
"tags": {
"example": [
"featured"
],
"type": "array",
"items": {
"type": "string"
}
},
"version": {
"type": "number",
"minimum": 1,
"example": 3,
"description": "Version last read by the frontend."
}
},
"required": [
"version"
]
},
"ComplexCategoryDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "complex-category-electronics"
},
"organizationId": {
"type": "string",
"example": "org-acme"
},
"name": {
"type": "string",
"example": "Electronics"
},
"parentId": {
"type": "object",
"nullable": true,
"example": null
},
"childIds": {
"example": [
"complex-category-keyboards"
],
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"id",
"organizationId",
"name",
"parentId",
"childIds"
]
},
"ComplexCategoriesResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ComplexCategoryDto"
}
}
},
"required": [
"data"
]
},
"BrandDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "brand-northstar"
},
"organizationId": {
"type": "string",
"example": "org-acme"
},
"name": {
"type": "string",
"example": "Northstar"
},
"logoUrl": {
"type": "object",
"format": "uri",
"nullable": true
}
},
"required": [
"id",
"organizationId",
"name",
"logoUrl"
]
},
"BrandsResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/BrandDto"
}
}
},
"required": [
"data"
]
},
"WarehouseDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "warehouse-berlin"
},
"organizationId": {
"type": "string",
"example": "org-acme"
},
"name": {
"type": "string",
"example": "Berlin Warehouse"
},
"countryCode": {
"type": "string",
"example": "DE"
},
"status": {
"type": "string",
"enum": [
"active",
"maintenance"
],
"example": "active"
}
},
"required": [
"id",
"organizationId",
"name",
"countryCode",
"status"
]
},
"WarehousesResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/WarehouseDto"
}
}
},
"required": [
"data"
]
},
"InventoryItemDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "inventory-keyboard-berlin"
},
"productId": {
"type": "string",
"example": "complex-product-keyboard"
},
"variantId": {
"type": "string",
"example": "variant-keyboard-black"
},
"warehouseId": {
"type": "string",
"example": "warehouse-berlin"
},
"available": {
"type": "number",
"example": 42
},
"reserved": {
"type": "number",
"example": 5
},
"reorderPoint": {
"type": "number",
"example": 10
},
"version": {
"type": "number",
"example": 2
}
},
"required": [
"id",
"productId",
"variantId",
"warehouseId",
"available",
"reserved",
"reorderPoint",
"version"
]
},
"InventoryResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/InventoryItemDto"
}
}
},
"required": [
"data"
]
},
"AdjustInventoryDto": {
"type": "object",
"properties": {
"delta": {
"type": "number",
"example": -2,
"description": "Signed stock adjustment."
},
"reason": {
"type": "string",
"example": "Damaged during delivery"
},
"version": {
"type": "number",
"example": 2,
"description": "Version last read by the frontend."
}
},
"required": [
"delta",
"reason",
"version"
]
},
"InventoryItemResponseDto": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/InventoryItemDto"
}
},
"required": [
"data"
]
},
"AddressDto": {
"type": "object",
"properties": {
"line1": {
"type": "string",
"example": "Friedrichstrasse 100"
},
"line2": {
"type": "object",
"nullable": true,
"example": null
},
"city": {
"type": "string",
"example": "Berlin"
},
"postalCode": {
"type": "string",
"example": "10117"
},
"countryCode": {
"type": "string",
"example": "DE"
}
},
"required": [
"line1",
"line2",
"city",
"postalCode",
"countryCode"
]
},
"CustomerDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "customer-ada"
},
"organizationId": {
"type": "string",
"example": "org-acme"
},
"name": {
"type": "string",
"example": "Ada Lovelace"
},
"email": {
"type": "string",
"format": "email",
"example": "ada@example.test"
},
"defaultAddress": {
"$ref": "#/components/schemas/AddressDto"
},
"tags": {
"example": [
"vip",
"newsletter"
],
"type": "array",
"items": {
"type": "string"
}
},
"createdAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"organizationId",
"name",
"email",
"defaultAddress",
"tags",
"createdAt"
]
},
"PageMetaDto": {
"type": "object",
"properties": {
"page": {
"type": "number",
"example": 1,
"minimum": 1
},
"limit": {
"type": "number",
"example": 20,
"minimum": 1
},
"total": {
"type": "number",
"example": 48,
"minimum": 0
},
"totalPages": {
"type": "number",
"example": 3,
"minimum": 0
}
},
"required": [
"page",
"limit",
"total",
"totalPages"
]
},
"CustomersResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CustomerDto"
}
},
"meta": {
"$ref": "#/components/schemas/PageMetaDto"
}
},
"required": [
"data",
"meta"
]
},
"CustomerResponseDto": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/CustomerDto"
}
},
"required": [
"data"
]
},
"ComplexOrderItemDto": {
"type": "object",
"properties": {
"productId": {
"type": "string",
"example": "complex-product-keyboard"
},
"variantId": {
"type": "string",
"example": "variant-keyboard-black"
},
"name": {
"type": "string",
"example": "Pro Mechanical Keyboard"
},
"quantity": {
"type": "number",
"example": 1
},
"unitPrice": {
"$ref": "#/components/schemas/MoneyDto"
}
},
"required": [
"productId",
"variantId",
"name",
"quantity",
"unitPrice"
]
},
"ComplexOrderDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "complex-order-001"
},
"organizationId": {
"type": "string",
"example": "org-acme"
},
"customerId": {
"type": "string",
"example": "customer-ada"
},
"status": {
"type": "string",
"enum": [
"draft",
"awaiting-payment",
"paid",
"fulfillment",
"shipped",
"cancelled"
]
},
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ComplexOrderItemDto"
}
},
"subtotal": {
"$ref": "#/components/schemas/MoneyDto"
},
"discount": {
"$ref": "#/components/schemas/MoneyDto"
},
"total": {
"$ref": "#/components/schemas/MoneyDto"
},
"shippingAddress": {
"$ref": "#/components/schemas/AddressDto"
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"version": {
"type": "number",
"example": 1
}
},
"required": [
"id",
"organizationId",
"customerId",
"status",
"items",
"subtotal",
"discount",
"total",
"shippingAddress",
"createdAt",
"version"
]
},
"ComplexOrdersResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ComplexOrderDto"
}
},
"meta": {
"$ref": "#/components/schemas/CursorMetaDto"
}
},
"required": [
"data",
"meta"
]
},
"ComplexOrderResponseDto": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/ComplexOrderDto"
}
},
"required": [
"data"
]
},
"CreateComplexOrderItemDto": {
"type": "object",
"properties": {
"productId": {
"type": "string",
"example": "complex-product-keyboard"
},
"variantId": {
"type": "string",
"example": "variant-keyboard-black"
},
"quantity": {
"type": "number",
"example": 1,
"minimum": 1,
"maximum": 50
}
},
"required": [
"productId",
"variantId",
"quantity"
]
},
"CreateComplexOrderDto": {
"type": "object",
"properties": {
"customerId": {
"type": "string",
"example": "customer-ada"
},
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CreateComplexOrderItemDto"
}
},
"promotionCode": {
"type": "string",
"example": "WELCOME10"
}
},
"required": [
"customerId",
"items"
]
},
"PaymentDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "payment-001"
},
"orderId": {
"type": "string",
"example": "complex-order-001"
},
"status": {
"type": "string",
"enum": [
"pending",
"succeeded",
"failed",
"refunded"
],
"example": "succeeded"
},
"method": {
"type": "string",
"enum": [
"card",
"bank-transfer"
],
"example": "card"
},
"amount": {
"$ref": "#/components/schemas/MoneyDto"
},
"createdAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"orderId",
"status",
"method",
"amount",
"createdAt"
]
},
"PaymentsResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PaymentDto"
}
}
},
"required": [
"data"
]
},
"PromotionDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "promotion-welcome"
},
"code": {
"type": "string",
"example": "WELCOME10"
},
"type": {
"type": "string",
"enum": [
"percentage",
"fixed"
],
"example": "percentage"
},
"value": {
"type": "string",
"example": "10.00"
},
"validUntil": {
"type": "string",
"format": "date-time"
},
"active": {
"type": "boolean",
"example": true
}
},
"required": [
"id",
"code",
"type",
"value",
"validUntil",
"active"
]
},
"PromotionsResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/PromotionDto"
}
}
},
"required": [
"data"
]
},
"ReviewDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "review-001"
},
"productId": {
"type": "string",
"example": "complex-product-keyboard"
},
"customerId": {
"type": "string",
"example": "customer-ada"
},
"rating": {
"type": "number",
"example": 5,
"minimum": 1,
"maximum": 5
},
"comment": {
"type": "string",
"example": "Excellent keyboard for daily development."
},
"status": {
"type": "string",
"enum": [
"pending",
"published",
"rejected"
],
"example": "published"
},
"createdAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"productId",
"customerId",
"rating",
"comment",
"status",
"createdAt"
]
},
"ReviewsResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ReviewDto"
}
}
},
"required": [
"data"
]
},
"CreateReviewDto": {
"type": "object",
"properties": {
"productId": {
"type": "string",
"example": "complex-product-keyboard"
},
"customerId": {
"type": "string",
"example": "customer-ada"
},
"rating": {
"type": "number",
"minimum": 1,
"maximum": 5,
"example": 5
},
"comment": {
"type": "string",
"example": "Excellent keyboard for daily development."
}
},
"required": [
"productId",
"customerId",
"rating",
"comment"
]
},
"ReviewResponseDto": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/ReviewDto"
}
},
"required": [
"data"
]
},
"OrderNotificationPayloadDto": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"order"
],
"example": "order"
},
"orderId": {
"type": "string",
"example": "complex-order-001"
},
"status": {
"type": "string",
"enum": [
"paid",
"shipped",
"cancelled"
],
"example": "shipped"
}
},
"required": [
"type",
"orderId",
"status"
]
},
"InventoryNotificationPayloadDto": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"inventory"
],
"example": "inventory"
},
"productId": {
"type": "string",
"example": "complex-product-keyboard"
},
"remaining": {
"type": "number",
"example": 4
}
},
"required": [
"type",
"productId",
"remaining"
]
},
"SystemNotificationPayloadDto": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"system"
],
"example": "system"
},
"text": {
"type": "string",
"example": "Scheduled maintenance begins at 02:00 UTC."
}
},
"required": [
"type",
"text"
]
},
"NotificationDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "notification-001"
},
"kind": {
"type": "string",
"enum": [
"order",
"inventory",
"system"
]
},
"title": {
"type": "string",
"example": "Order shipped"
},
"payload": {
"oneOf": [
{
"$ref": "#/components/schemas/OrderNotificationPayloadDto"
},
{
"$ref": "#/components/schemas/InventoryNotificationPayloadDto"
},
{
"$ref": "#/components/schemas/SystemNotificationPayloadDto"
}
],
"discriminator": {
"propertyName": "type",
"mapping": {
"order": "#/components/schemas/OrderNotificationPayloadDto",
"inventory": "#/components/schemas/InventoryNotificationPayloadDto",
"system": "#/components/schemas/SystemNotificationPayloadDto"
}
}
},
"read": {
"type": "boolean",
"example": false
},
"createdAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"kind",
"title",
"payload",
"read",
"createdAt"
]
},
"NotificationsResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/NotificationDto"
}
},
"meta": {
"$ref": "#/components/schemas/CursorMetaDto"
}
},
"required": [
"data",
"meta"
]
},
"NotificationResponseDto": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/NotificationDto"
}
},
"required": [
"data"
]
},
"FileMetadataDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "file-001"
},
"name": {
"type": "string",
"example": "products.csv"
},
"mimeType": {
"type": "string",
"example": "text/csv"
},
"size": {
"type": "number",
"example": 18432
},
"downloadUrl": {
"type": "string",
"format": "uri",
"example": "/api/v1/files/file-001/download"
},
"createdAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"name",
"mimeType",
"size",
"downloadUrl",
"createdAt"
]
},
"FilesResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/FileMetadataDto"
}
}
},
"required": [
"data"
]
},
"FileResponseDto": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/FileMetadataDto"
}
},
"required": [
"data"
]
},
"AuditEventDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "audit-001"
},
"action": {
"type": "string",
"example": "product.updated"
},
"actorId": {
"type": "string",
"example": "complex-user-admin"
},
"resourceType": {
"type": "string",
"example": "product"
},
"resourceId": {
"type": "string",
"example": "complex-product-keyboard"
},
"metadata": {
"type": "object",
"additionalProperties": true,
"example": {
"version": 4
}
},
"createdAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"action",
"actorId",
"resourceType",
"resourceId",
"metadata",
"createdAt"
]
},
"AuditEventsResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AuditEventDto"
}
},
"meta": {
"$ref": "#/components/schemas/PageMetaDto"
}
},
"required": [
"data",
"meta"
]
},
"JobDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "job-001"
},
"type": {
"type": "string",
"enum": [
"orders-export"
],
"example": "orders-export"
},
"status": {
"type": "string",
"enum": [
"pending",
"processing",
"completed",
"failed"
]
},
"progress": {
"type": "number",
"example": 75,
"minimum": 0,
"maximum": 100
},
"resultUrl": {
"type": "object",
"format": "uri",
"nullable": true,
"example": "/api/v1/jobs/job-001/result"
},
"error": {
"type": "object",
"nullable": true,
"example": null
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"type",
"status",
"progress",
"resultUrl",
"error",
"createdAt",
"updatedAt"
]
},
"JobResponseDto": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/JobDto"
}
},
"required": [
"data"
]
},
"ConversationDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "conversation-support"
},
"organizationId": {
"type": "string",
"example": "org-acme"
},
"title": {
"type": "string",
"example": "Order support"
},
"participantIds": {
"example": [
"complex-user-admin",
"complex-user-support"
],
"type": "array",
"items": {
"type": "string"
}
},
"lastMessagePreview": {
"type": "object",
"nullable": true,
"example": "Can you check order complex-order-001?"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"organizationId",
"title",
"participantIds",
"lastMessagePreview",
"updatedAt"
]
},
"ConversationsResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ConversationDto"
}
}
},
"required": [
"data"
]
},
"ConversationResponseDto": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/ConversationDto"
}
},
"required": [
"data"
]
},
"ChatMessageDto": {
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "message-001"
},
"conversationId": {
"type": "string",
"example": "conversation-support"
},
"senderId": {
"type": "string",
"example": "complex-user-support"
},
"text": {
"type": "string",
"example": "The order has already been packed."
},
"clientMessageId": {
"type": "string",
"example": "client-message-4c08",
"description": "Frontend-generated key used to deduplicate retries."
},
"createdAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"conversationId",
"senderId",
"text",
"clientMessageId",
"createdAt"
]
},
"MessagesResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ChatMessageDto"
}
},
"meta": {
"$ref": "#/components/schemas/CursorMetaDto"
}
},
"required": [
"data",
"meta"
]
},
"SendMessageDto": {
"type": "object",
"properties": {
"text": {
"type": "string",
"example": "The order has already been packed."
},
"clientMessageId": {
"type": "string",
"example": "client-message-4c08"
}
},
"required": [
"text",
"clientMessageId"
]
},
"MessageResponseDto": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/ChatMessageDto"
}
},
"required": [
"data"
]
},
"ScenarioDto": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "slow"
},
"description": {
"type": "string",
"example": "Delays the response to exercise loading and cancellation states."
}
},
"required": [
"name",
"description"
]
},
"ScenariosResponseDto": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ScenarioDto"
}
}
},
"required": [
"data"
]
},
"TestingActionDataDto": {
"type": "object",
"properties": {
"success": {
"type": "boolean",
"example": true
},
"message": {
"type": "string",
"example": "State reset to the default deterministic seed."
}
},
"required": [
"success",
"message"
]
},
"TestingActionResponseDto": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/TestingActionDataDto"
}
},
"required": [
"data"
]
},
"ChangeComplexRoleDto": {
"type": "object",
"properties": {
"role": {
"type": "string",
"enum": [
"admin",
"manager",
"support",
"viewer"
],
"example": "viewer"
}
},
"required": [
"role"
]
}
}
}
}