CartArticles as separate endpoint and updating the model

This commit is contained in:
2026-10-08 12:01:35 +02:00
parent 3565f39ce3
commit 1868dbf74b
+126 -19
View File
@@ -1,7 +1,7 @@
openapi: 3.0.0
info:
title: "TyrePro-API, Shop"
version: "Version 21"
version: "Version 22"
servers:
- url: "https://musterreifen.com/api/shop"
description: "Development server, customers domain"
@@ -1174,6 +1174,86 @@ paths:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/CartArticles:
get:
tags:
- "Cart"
parameters:
- $ref: "#/components/parameters/GuidBranch"
- $ref: "#/components/parameters/GuidCalculationProfile"
- $ref: "#/components/parameters/GuidCart"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
type: "array"
items:
$ref: "#/components/schemas/CartArticle"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
post:
tags:
- "Cart"
parameters:
- $ref: "#/components/parameters/GuidCart"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CartArticle"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
$ref: "#/components/schemas/CartArticle"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/CartArticles/{Guid}:
patch:
tags:
- "Cart"
parameters:
- $ref: "#/components/parameters/GuidPath"
- $ref: "#/components/parameters/_HashValue"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CartArticle"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
$ref: "#/components/schemas/CartArticle"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
delete:
tags:
- "Cart"
parameters:
- $ref: "#/components/parameters/GuidPath"
- $ref: "#/components/parameters/_HashValue"
responses:
200:
description: "successful operation"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
components:
schemas:
GenericError:
@@ -1997,24 +2077,51 @@ components:
Articles:
type: "array"
items:
type: "object"
required:
- "Guid"
- "Designation"
- "Amount"
properties:
Guid:
type: "string"
Designation:
type: "string"
readOnly: true
Amount:
type: "number"
PriceNet:
type: "number"
PriceGross:
type: "number"
readOnly: true
$ref: "#/components/schemas/CartArticle"
CartArticle:
type: "object"
required:
- "Guid"
- "GuidCartSet"
- "GuidShopArticle"
- "CreationMoment"
- "LastModificationMoment"
- "Amount"
- "Designation"
- "PriceNet"
- "PriceGross"
properties:
Guid:
type: "string"
readOnly: true
GuidCartSet:
type: "string"
readOnly: true
GuidShopArticle:
type: "string"
readOnly: true
CreationMoment:
type: "string"
format: "date-time"
readOnly: true
LastModificationMoment:
type: "string"
format: "date-time"
readOnly: true
Amount:
type: "number"
Designation:
type: "string"
readOnly: true
PriceNet:
type: "number"
readOnly: true
PriceGross:
type: "number"
readOnly: true
TaxPercentage:
type: "number"
readOnly: true
Download:
type: "object"
required: