Version 4 with more endpoints

This commit is contained in:
Nico Kroll 2024-07-12 17:06:10 +02:00
parent 3360b4c652
commit ad34e634ca
2 changed files with 419 additions and 64 deletions

View File

@ -1,12 +1,14 @@
openapi: 3.0.0
info:
title: "TyrePro-API, Shop"
version: "Version 3"
version: "Version 4"
servers:
- url: "https://musterreifen.com/api/shop"
description: "Development server, customers domain"
- url: "https://onlineservices.dev.rz2.prm-ag.de/q7U4PLrRfa7vrzFR2Kvb3Q/api/shop"
description: "Development server, generic domain"
- url: "http://localhost/ROOT/api/shop"
description: "Local development server"
paths:
/AddressStates:
get:
@ -203,6 +205,315 @@ paths:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/MaterialTypes:
get:
tags:
- "Calculation"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
type: "array"
items:
$ref: "#/components/schemas/MaterialType"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/MaterialGroups:
get:
tags:
- "Calculation"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
type: "array"
items:
$ref: "#/components/schemas/MaterialGroup"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/MaterialSubGroups:
get:
tags:
- "Calculation"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
type: "array"
items:
$ref: "#/components/schemas/MaterialSubGroup"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/CalculationProfiles:
get:
tags:
- "Calculation"
parameters:
- $ref: "#/components/parameters/GuidOnlineService"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
type: "array"
items:
$ref: "#/components/schemas/CalculationProfile"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
post:
tags:
- "Calculation"
parameters:
- $ref: "#/components/parameters/GuidOnlineService"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CalculationProfile"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
$ref: "#/components/schemas/CalculationProfile"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/CalculationProfiles/{Guid}:
patch:
tags:
- "Calculation"
parameters:
- $ref: "#/components/parameters/GuidPath"
- $ref: "#/components/parameters/_HashValue"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CalculationProfile"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
$ref: "#/components/schemas/CalculationProfile"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
delete:
tags:
- "Calculation"
parameters:
- $ref: "#/components/parameters/GuidPath"
- $ref: "#/components/parameters/_HashValue"
responses:
200:
description: "successful operation"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/Calculations:
get:
tags:
- "Calculation"
parameters:
- name: "GuidCalculationProfile"
in: "query"
required: true
schema:
type: "string"
default: null
example: "ebb89e89-8d25-809e-7814-c53b686ae164"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
type: "array"
items:
$ref: "#/components/schemas/Calculation"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
post:
tags:
- "Calculation"
parameters:
- name: "GuidCalculationProfile"
in: "query"
required: true
schema:
type: "string"
default: null
example: "ebb89e89-8d25-809e-7814-c53b686ae164"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Calculation"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
$ref: "#/components/schemas/Calculation"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/Calculations/{Guid}:
patch:
tags:
- "Calculation"
parameters:
- $ref: "#/components/parameters/GuidPath"
- $ref: "#/components/parameters/_HashValue"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Calculation"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
$ref: "#/components/schemas/Calculation"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
delete:
tags:
- "Calculation"
parameters:
- $ref: "#/components/parameters/GuidPath"
- $ref: "#/components/parameters/_HashValue"
responses:
200:
description: "successful operation"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/CalculationSurcharges:
get:
tags:
- "Calculation"
parameters:
- name: "GuidCalculation"
in: "query"
required: true
schema:
type: "string"
default: null
example: "ebb89e89-8d25-809e-7814-c53b686ae164"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
type: "array"
items:
$ref: "#/components/schemas/CalculationSurcharge"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
post:
tags:
- "Calculation"
parameters:
- name: "GuidCalculation"
in: "query"
required: true
schema:
type: "string"
default: null
example: "ebb89e89-8d25-809e-7814-c53b686ae164"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CalculationSurcharge"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
$ref: "#/components/schemas/CalculationSurcharge"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/CalculationSurcharges/{Guid}:
patch:
tags:
- "Calculation"
parameters:
- $ref: "#/components/parameters/GuidPath"
- $ref: "#/components/parameters/_HashValue"
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/CalculationSurcharge"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
$ref: "#/components/schemas/CalculationSurcharge"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
delete:
tags:
- "Calculation"
parameters:
- $ref: "#/components/parameters/GuidPath"
- $ref: "#/components/parameters/_HashValue"
responses:
200:
description: "successful operation"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
components:
schemas:
GenericError:
@ -316,17 +627,19 @@ components:
properties:
Guid:
type: "string"
Columns:
DetailColumns:
type: "array"
items:
type: "object"
required:
- "Designation"
- "DataType"
- "FieldName"
- "DataType"
properties:
Designation:
type: "string"
FieldName:
type: "string"
DataType:
type: "string"
enum:
@ -336,6 +649,16 @@ components:
- "boolean"
- "date"
- "dateTime"
StockColumns:
type: "array"
items:
type: "object"
required:
- "Designation"
- "FieldName"
properties:
Designation:
type: "string"
FieldName:
type: "string"
Module:
@ -352,8 +675,6 @@ components:
Type:
type: "string"
enum:
- "Search"
- "Offers"
- "Downloads"
- "Link"
LinkPath:
@ -446,15 +767,12 @@ components:
type: "object"
required:
- "Guid"
- "Designation"
- "StockType"
- "AmountInCart"
- "NumberOfDecimalPlacesForStock"
properties:
Guid:
type: "string"
Designation:
type: "string"
Price:
type: "number"
StockType:
@ -475,6 +793,99 @@ components:
type: "integer"
Stock-1:
type: "number"
MaterialType:
type: "object"
required:
- "Guid"
- "Designation"
properties:
Guid:
type: "string"
Designation:
type: "string"
MaterialGroup:
type: "object"
required:
- "Guid"
- "Designation"
properties:
Guid:
type: "string"
Designation:
type: "string"
MaterialSubGroup:
type: "object"
required:
- "Guid"
- "Designation"
properties:
Guid:
type: "string"
Designation:
type: "string"
CalculationProfile:
type: "object"
required:
- "Guid"
- "Designation"
- "SequenceNumber"
properties:
Guid:
type: "string"
Designation:
type: "string"
SequenceNumber:
type: "integer"
Calculation:
type: "object"
required:
- "Guid"
- "Designation"
- "SequenceNumber"
properties:
Guid:
type: "string"
Designation:
type: "string"
SequenceNumber:
type: "integer"
MaterialTypes:
type: "array"
items:
type: "string"
MaterialGroups:
type: "array"
items:
type: "string"
MaterialSubGroups:
type: "array"
items:
type: "string"
CalculationSurcharge:
type: "object"
required:
- "Guid"
- "SequenceNumber"
- "NetPrice"
- "Mode"
- "PercentalSurcharge"
- "FixedSurcharge"
properties:
Guid:
type: "string"
SequenceNumber:
type: "integer"
NetPrice:
type: "number"
Mode:
type: "string"
enum:
- "PercentalBeforeFixed"
- "FixedBeforePercental"
PercentalSurcharge:
type: "number"
FixedSurcharge:
type: "number"
securitySchemes:
SessionScheme:
type: http

View File

@ -1,59 +1,3 @@
/MaterialGroups:
get:
tags:
- "Filters"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
type: "array"
items:
$ref: "#/components/schemas/MaterialGroup"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/MaterialSubGroups:
get:
tags:
- "Filters"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
type: "array"
items:
$ref: "#/components/schemas/MaterialSubGroup"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/CalculationProfiles:
get:
post:
delete:
patch:
/Calculations:
get:
post:
delete:
patch:
/CalculationGroups:
get:
post:
delete:
patch:
- Teileart und Waren~ als Array übergeben
- SequenceNumber nach außen liefern. Patch sollte im Idealfall selbst dafür sorgen, dass die neu gegebene Nummer dann gültig ist - die Konflikte soll der Server lösen.
/CalculationSurcharges:
get:
post:
delete:
patch:
/Configs:
get:
patch: