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 openapi: 3.0.0
info: info:
title: "TyrePro-API, Shop" title: "TyrePro-API, Shop"
version: "Version 3" version: "Version 4"
servers: servers:
- url: "https://musterreifen.com/api/shop" - url: "https://musterreifen.com/api/shop"
description: "Development server, customers domain" description: "Development server, customers domain"
- url: "https://onlineservices.dev.rz2.prm-ag.de/q7U4PLrRfa7vrzFR2Kvb3Q/api/shop" - url: "https://onlineservices.dev.rz2.prm-ag.de/q7U4PLrRfa7vrzFR2Kvb3Q/api/shop"
description: "Development server, generic domain" description: "Development server, generic domain"
- url: "http://localhost/ROOT/api/shop"
description: "Local development server"
paths: paths:
/AddressStates: /AddressStates:
get: get:
@ -203,6 +205,315 @@ paths:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
security: security:
- SessionScheme: [] - 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: components:
schemas: schemas:
GenericError: GenericError:
@ -316,17 +627,19 @@ components:
properties: properties:
Guid: Guid:
type: "string" type: "string"
Columns: DetailColumns:
type: "array" type: "array"
items: items:
type: "object" type: "object"
required: required:
- "Designation" - "Designation"
- "DataType"
- "FieldName" - "FieldName"
- "DataType"
properties: properties:
Designation: Designation:
type: "string" type: "string"
FieldName:
type: "string"
DataType: DataType:
type: "string" type: "string"
enum: enum:
@ -336,6 +649,16 @@ components:
- "boolean" - "boolean"
- "date" - "date"
- "dateTime" - "dateTime"
StockColumns:
type: "array"
items:
type: "object"
required:
- "Designation"
- "FieldName"
properties:
Designation:
type: "string"
FieldName: FieldName:
type: "string" type: "string"
Module: Module:
@ -352,8 +675,6 @@ components:
Type: Type:
type: "string" type: "string"
enum: enum:
- "Search"
- "Offers"
- "Downloads" - "Downloads"
- "Link" - "Link"
LinkPath: LinkPath:
@ -446,15 +767,12 @@ components:
type: "object" type: "object"
required: required:
- "Guid" - "Guid"
- "Designation"
- "StockType" - "StockType"
- "AmountInCart" - "AmountInCart"
- "NumberOfDecimalPlacesForStock" - "NumberOfDecimalPlacesForStock"
properties: properties:
Guid: Guid:
type: "string" type: "string"
Designation:
type: "string"
Price: Price:
type: "number" type: "number"
StockType: StockType:
@ -475,6 +793,99 @@ components:
type: "integer" type: "integer"
Stock-1: Stock-1:
type: "number" 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: securitySchemes:
SessionScheme: SessionScheme:
type: http 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: /Configs:
get: get:
patch: patch: