From 1868dbf74b87aade8252672c5ae28871e4b9523f Mon Sep 17 00:00:00 2001 From: Nico Kroll Date: Thu, 8 Oct 2026 12:01:35 +0200 Subject: [PATCH] CartArticles as separate endpoint and updating the model --- src/v2/shop.yaml | 145 ++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 126 insertions(+), 19 deletions(-) diff --git a/src/v2/shop.yaml b/src/v2/shop.yaml index dae0d4b..571c185 100644 --- a/src/v2/shop.yaml +++ b/src/v2/shop.yaml @@ -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: