From a49185ea21079036921fa4c5fb4acccb56753402 Mon Sep 17 00:00:00 2001 From: Nico Kroll Date: Fri, 23 Aug 2024 15:12:24 +0200 Subject: [PATCH] Refactoring a little bit --- src/v2/shop.yaml | 66 +++++++++++++++++++++--------------------------- 1 file changed, 29 insertions(+), 37 deletions(-) diff --git a/src/v2/shop.yaml b/src/v2/shop.yaml index 5b5e1e8..c40dfe0 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 6" + version: "Version 7" servers: - url: "https://musterreifen.com/api/shop" description: "Development server, customers domain" @@ -340,25 +340,6 @@ paths: security: - SessionScheme: [] # Search - /TableConfigs: - get: - tags: - - "Search" - parameters: - - $ref: "#/components/parameters/GuidOnlineService" - responses: - 200: - description: "successful operation" - content: - application/json: - schema: - type: "array" - items: - $ref: "#/components/schemas/TableConfig" - default: - $ref: "#/components/responses/GenericError" - security: - - SessionScheme: [] /FilterSuggestions: get: tags: @@ -439,7 +420,26 @@ paths: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] - /Articles: + /ShopArticleConfigs: + get: + tags: + - "Search" + parameters: + - $ref: "#/components/parameters/GuidOnlineService" + responses: + 200: + description: "successful operation" + content: + application/json: + schema: + type: "array" + items: + $ref: "#/components/schemas/ShopArticleConfig" + default: + $ref: "#/components/responses/GenericError" + security: + - SessionScheme: [] + /ShopArticles: get: tags: - "Search" @@ -490,7 +490,7 @@ paths: schema: type: "array" items: - $ref: "#/components/schemas/Article" + $ref: "#/components/schemas/ShopArticle" default: $ref: "#/components/responses/GenericError" security: @@ -1184,14 +1184,17 @@ components: FaxNumber: null Latitude: 12.34 Longitude: 12.34 - TableConfig: + ShopArticleConfig: type: "object" required: - "Guid" + - "Designation" properties: Guid: type: "string" - DetailColumns: + Designation: + type: "string" + Columns: type: "array" items: type: "object" @@ -1213,18 +1216,7 @@ components: - "boolean" - "date" - "dateTime" - StockColumns: - type: "array" - items: - type: "object" - required: - - "Designation" - - "FieldName" - properties: - Designation: - type: "string" - FieldName: - type: "string" + - "stock" Module: type: "object" required: @@ -1327,7 +1319,7 @@ components: type: "string" ParameterValue: type: "string" - Article: + ShopArticle: type: "object" required: - "Guid"