update messages
This commit is contained in:
@@ -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"]
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user