update messages
All checks were successful
Build and Publish / Metadata (push) Successful in 13s
Build and Publish / BuildAndDeployAmd64 (push) Successful in 51s
Build and Publish / BuildAndDeployArm64 (push) Successful in 5m9s

This commit is contained in:
matst80
2025-11-18 21:08:42 +01:00
parent 78436f39ae
commit 0994c4f484
6 changed files with 498 additions and 188 deletions

View File

@@ -16,7 +16,7 @@
}
],
"paths": {
"/cart/": {
"/cart": {
"get": {
"summary": "Get (or create) current cart (cookie based)",
"description": "Returns the current cart. If no cartid cookie is present a new cart is created and Set-Cart-Id response header plus a Set-Cookie header are sent.",
@@ -263,6 +263,76 @@
}
}
},
"/cart/voucher": {
"put": {
"summary": "Add voucher to cart",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/AddVoucherRequest" }
}
}
},
"responses": {
"200": {
"description": "Voucher added",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/CartGrain" }
}
}
},
"400": { "description": "Invalid body" },
"500": { "description": "Server error" }
}
}
},
"/cart/subscription-details": {
"put": {
"summary": "Upsert subscription details",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpsertSubscriptionDetails"
}
}
}
},
"responses": {
"200": {
"description": "Subscription details updated",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/CartGrain" }
}
}
},
"400": { "description": "Invalid body" },
"500": { "description": "Server error" }
}
}
},
"/cart/voucher/{voucherId}": {
"delete": {
"summary": "Remove voucher from cart",
"parameters": [{ "$ref": "#/components/parameters/VoucherIdParam" }],
"responses": {
"200": {
"description": "Voucher removed",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/CartGrain" }
}
}
},
"400": { "description": "Invalid id" },
"500": { "description": "Server error" }
}
}
},
"/cart/byid/{id}": {
"get": {
"summary": "Get cart by explicit id",
@@ -452,6 +522,53 @@
}
}
},
"/cart/byid/{id}/voucher": {
"put": {
"summary": "Add voucher (by id variant)",
"parameters": [{ "$ref": "#/components/parameters/CartIdParam" }],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/AddVoucherRequest" }
}
}
},
"responses": {
"200": {
"description": "Voucher added",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/CartGrain" }
}
}
},
"400": { "description": "Invalid body" },
"500": { "description": "Server error" }
}
}
},
"/cart/byid/{id}/voucher/{voucherId}": {
"delete": {
"summary": "Remove voucher (by id variant)",
"parameters": [
{ "$ref": "#/components/parameters/CartIdParam" },
{ "$ref": "#/components/parameters/VoucherIdParam" }
],
"responses": {
"200": {
"description": "Voucher removed",
"content": {
"application/json": {
"schema": { "$ref": "#/components/schemas/CartGrain" }
}
}
},
"400": { "description": "Invalid ids" },
"500": { "description": "Server error" }
}
}
},
"/healthz": {
"get": {
"summary": "Liveness & capacity probe",
@@ -517,6 +634,12 @@
"in": "path",
"required": true,
"schema": { "type": "integer", "format": "int64", "minimum": 0 }
},
"VoucherIdParam": {
"name": "voucherId",
"in": "path",
"required": true,
"schema": { "type": "integer", "format": "int64", "minimum": 0 }
}
},
"schemas": {
@@ -542,7 +665,17 @@
"processing": { "type": "boolean" },
"paymentInProgress": { "type": "boolean" },
"orderReference": { "type": "string" },
"paymentStatus": { "type": "string" }
"paymentStatus": { "type": "string" },
"vouchers": {
"type": "array",
"items": { "$ref": "#/components/schemas/Voucher" }
},
"subscriptionDetails": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/SubscriptionDetails"
}
}
},
"required": ["id", "items", "totalPrice", "totalTax", "totalDiscount"]
},
@@ -670,6 +803,48 @@
"pickupPoint": { "$ref": "#/components/schemas/PickupPoint" }
},
"required": ["provider", "items"]
},
"AddVoucherRequest": {
"type": "object",
"properties": {
"code": { "type": "string" }
},
"required": ["code"]
},
"UpsertSubscriptionDetails": {
"type": "object",
"properties": {
"id": { "type": "string" },
"offeringCode": { "type": "string" },
"signingType": { "type": "string" },
"data": { "type": "object" }
},
"required": ["offeringCode", "signingType"]
},
"Voucher": {
"type": "object",
"properties": {
"code": { "type": "string" },
"applied": { "type": "boolean" },
"rules": {
"type": "array",
"items": { "type": "string" }
},
"description": { "type": "string" },
"id": { "type": "integer", "format": "int64" },
"value": { "type": "integer", "format": "int64" }
},
"required": ["code", "applied", "rules", "id", "value"]
},
"SubscriptionDetails": {
"type": "object",
"properties": {
"id": { "type": "string" },
"offeringCode": { "type": "string" },
"signingType": { "type": "string" },
"data": { "type": "object" }
},
"required": ["id"]
}
}
},