Compare commits

..

No commits in common. "master" and "development" have entirely different histories.

4 changed files with 254 additions and 952 deletions

View File

@ -19,7 +19,6 @@ https://www.astera.com/de/type/blog/api-design-best-practices
https://www.citusdata.com/blog/2016/03/30/five-ways-to-paginate/ https://www.citusdata.com/blog/2016/03/30/five-ways-to-paginate/
https://stackoverflow.blog/2021/10/06/best-practices-for-authentication-and-authorization-for-rest-apis/ https://stackoverflow.blog/2021/10/06/best-practices-for-authentication-and-authorization-for-rest-apis/
https://www.akamai.com/blog/security/rest-api-security-best-practices https://www.akamai.com/blog/security/rest-api-security-best-practices
https://jakarta.ee/specifications/data/1.0/
# Examples # Examples

View File

@ -1287,62 +1287,6 @@ paths:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
security: security:
- SessionScheme: [] - SessionScheme: []
/Documents/{Guid}/custommethods/AcceptOffer:
post:
tags:
- "Documents"
description: "Accepts an offer. Dependant on the implementation, it could be that the offer is after the operation an order."
parameters:
- $ref: "#/components/parameters/GuidPathParameter"
- $ref: "#/components/parameters/_HashValueParameter"
- name: "Comment"
in: "query"
required: false
schema:
type: "string"
default: null
example: "Thanks you!"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
$ref: "#/components/schemas/Document"
401:
$ref: "#/components/responses/SessionOfOnlineUserOrHigherRequired"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/Documents/{Guid}/custommethods/RejectOffer:
post:
tags:
- "Documents"
description: "Rejects an offer. Dependant on the implementation, the offer keeps beeing open for further responses or gets historic."
parameters:
- $ref: "#/components/parameters/GuidPathParameter"
- $ref: "#/components/parameters/_HashValueParameter"
- name: "Comment"
in: "query"
required: false
schema:
type: "string"
default: null
example: "The price is higher than excepted. Can you make another offer?"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
$ref: "#/components/schemas/Document"
401:
$ref: "#/components/responses/SessionOfOnlineUserOrHigherRequired"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/DocumentPositions: /DocumentPositions:
get: get:
tags: tags:
@ -4262,7 +4206,6 @@ components:
- "UsersMayEnterANewLicenceTag" - "UsersMayEnterANewLicenceTag"
- "IsConnectedWithATyreStorage" - "IsConnectedWithATyreStorage"
- "DeadlineTimeInSecondsSinceMidnight" - "DeadlineTimeInSecondsSinceMidnight"
- "DeadlineTimeInSecondsSinceMidnight"
properties: properties:
Guid: Guid:
type: "string" type: "string"
@ -4287,16 +4230,6 @@ components:
type: "boolean" type: "boolean"
DeadlineTimeInSecondsSinceMidnight: DeadlineTimeInSecondsSinceMidnight:
type: "integer" type: "integer"
RedirectUrlType:
type: "string"
enum:
- "None"
- "NewTab"
- "SameTab"
RedirectUrl:
type: "string"
RedirectUrlShallBeShownAsOptionalButton:
type: "boolean"
_HashValue: _HashValue:
$ref: "#/components/schemas/_HashValue" $ref: "#/components/schemas/_HashValue"
example: example:

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
openapi: 3.0.0 openapi: 3.0.0
info: info:
title: "TyrePro-API, TPMS" title: "TyrePro-API, TPMS"
version: "Version 7" version: "Version 4"
servers: servers:
- url: "https://musterreifen.com/api/tpms" - url: "https://musterreifen.com/api/tpms"
description: "Development server" description: "Development server"
@ -167,23 +167,6 @@ paths:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
security: security:
- SessionScheme: [] - SessionScheme: []
/CustomerStorages/{Guid}/custommethods/Rearrange:
post:
tags:
- "TPMS / customer storage"
parameters:
- $ref: "#/components/parameters/GuidPathParameter"
responses:
200:
description: "successful operation"
content:
application/json:
schema:
$ref: "#/components/schemas/CustomerStorage"
default:
$ref: "#/components/responses/GenericError"
security:
- SessionScheme: []
/CustomerStoragePositions/{Guid}: /CustomerStoragePositions/{Guid}:
get: get:
tags: tags:
@ -589,7 +572,6 @@ paths:
$ref: "#/components/schemas/Customer" $ref: "#/components/schemas/Customer"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/CustomerStorages: /CustomerStorages:
@ -617,7 +599,6 @@ paths:
$ref: "#/components/schemas/CustomerStorage" $ref: "#/components/schemas/CustomerStorage"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/CustomerVehicles: /CustomerVehicles:
@ -644,7 +625,6 @@ paths:
$ref: "#/components/schemas/CustomerVehicle" $ref: "#/components/schemas/CustomerVehicle"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/CustomerVehicles/{Guid}/CustomerStorages: /CustomerVehicles/{Guid}/CustomerStorages:
@ -673,7 +653,6 @@ paths:
$ref: "#/components/schemas/CustomerStorage" $ref: "#/components/schemas/CustomerStorage"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/CustomerVehicles/{Guid}/TpmsMeasurements: /CustomerVehicles/{Guid}/TpmsMeasurements:
@ -701,7 +680,6 @@ paths:
$ref: "#/components/schemas/TpmsMeasurement" $ref: "#/components/schemas/TpmsMeasurement"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
post: post:
@ -724,7 +702,6 @@ paths:
$ref: "#/components/schemas/TpmsMeasurement" $ref: "#/components/schemas/TpmsMeasurement"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/DbBlobs/{Guid}: /DbBlobs/{Guid}:
@ -745,7 +722,6 @@ paths:
$ref: "#/components/schemas/DbBlob" $ref: "#/components/schemas/DbBlob"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/DmsFiles: /DmsFiles:
@ -767,7 +743,6 @@ paths:
$ref: "#/components/schemas/DmsFile" $ref: "#/components/schemas/DmsFile"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/Documents: /Documents:
@ -807,7 +782,6 @@ paths:
$ref: "#/components/schemas/Document" $ref: "#/components/schemas/Document"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/Documents/{Guid}: /Documents/{Guid}:
@ -825,7 +799,6 @@ paths:
$ref: "#/components/schemas/Document" $ref: "#/components/schemas/Document"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/Employees: /Employees:
@ -853,7 +826,6 @@ paths:
$ref: "#/components/schemas/Employee" $ref: "#/components/schemas/Employee"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/Employees/{Guid}: /Employees/{Guid}:
@ -871,7 +843,6 @@ paths:
$ref: "#/components/schemas/Employee" $ref: "#/components/schemas/Employee"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/TpmsMeasurements: /TpmsMeasurements:
@ -893,7 +864,6 @@ paths:
$ref: "#/components/schemas/TpmsMeasurement" $ref: "#/components/schemas/TpmsMeasurement"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/TpmsMeasurements/{Guid}: /TpmsMeasurements/{Guid}:
@ -911,7 +881,6 @@ paths:
$ref: "#/components/schemas/TpmsMeasurement" $ref: "#/components/schemas/TpmsMeasurement"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
patch: patch:
@ -935,7 +904,6 @@ paths:
$ref: "#/components/schemas/TpmsMeasurement" $ref: "#/components/schemas/TpmsMeasurement"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/TpmsMeasurements/{Guid}/DmsFiles: /TpmsMeasurements/{Guid}/DmsFiles:
@ -963,7 +931,6 @@ paths:
$ref: "#/components/schemas/DmsFile" $ref: "#/components/schemas/DmsFile"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
post: post:
@ -986,7 +953,6 @@ paths:
$ref: "#/components/schemas/DmsFile" $ref: "#/components/schemas/DmsFile"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/TpmsMeasurements/{Guid}/TpmsMeasurementPositions: /TpmsMeasurements/{Guid}/TpmsMeasurementPositions:
@ -1014,7 +980,6 @@ paths:
$ref: "#/components/schemas/TpmsMeasurementPosition" $ref: "#/components/schemas/TpmsMeasurementPosition"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
post: post:
@ -1037,7 +1002,6 @@ paths:
$ref: "#/components/schemas/TpmsMeasurementPosition" $ref: "#/components/schemas/TpmsMeasurementPosition"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/TpmsMeasurementPositions: /TpmsMeasurementPositions:
@ -1059,7 +1023,6 @@ paths:
$ref: "#/components/schemas/TpmsMeasurementPosition" $ref: "#/components/schemas/TpmsMeasurementPosition"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/TpmsMeasurementPositions/{Guid}: /TpmsMeasurementPositions/{Guid}:
@ -1077,7 +1040,6 @@ paths:
$ref: "#/components/schemas/TpmsMeasurementPosition" $ref: "#/components/schemas/TpmsMeasurementPosition"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
patch: patch:
@ -1101,7 +1063,6 @@ paths:
$ref: "#/components/schemas/TpmsMeasurementPosition" $ref: "#/components/schemas/TpmsMeasurementPosition"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/TpmsMeasurementPositions/{Guid}/DmsFiles: /TpmsMeasurementPositions/{Guid}/DmsFiles:
@ -1129,7 +1090,6 @@ paths:
$ref: "#/components/schemas/DmsFile" $ref: "#/components/schemas/DmsFile"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
post: post:
@ -1152,7 +1112,6 @@ paths:
$ref: "#/components/schemas/DmsFile" $ref: "#/components/schemas/DmsFile"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/VehicleTypes: /VehicleTypes:
@ -1180,7 +1139,6 @@ paths:
$ref: "#/components/schemas/VehicleType" $ref: "#/components/schemas/VehicleType"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
/VehicleTypes/{Guid}: /VehicleTypes/{Guid}:
@ -1198,7 +1156,6 @@ paths:
$ref: "#/components/schemas/VehicleType" $ref: "#/components/schemas/VehicleType"
default: default:
$ref: "#/components/responses/GenericError" $ref: "#/components/responses/GenericError"
deprecated: true
security: security:
- SessionScheme: [] - SessionScheme: []
components: components:
@ -1276,13 +1233,10 @@ components:
type: "object" type: "object"
required: required:
- "Guid" - "Guid"
- "Score"
- "Number" - "Number"
properties: properties:
Guid: Guid:
type: "string" type: "string"
Score:
type: "number"
Number: Number:
type: "integer" type: "integer"
Name1: Name1:
@ -1301,14 +1255,11 @@ components:
type: "object" type: "object"
required: required:
- "Guid" - "Guid"
- "Score"
- "GuidCustomer" - "GuidCustomer"
- "CustomerNumber" - "CustomerNumber"
properties: properties:
Guid: Guid:
type: "string" type: "string"
Score:
type: "number"
LicenceTagNumber: LicenceTagNumber:
type: "string" type: "string"
GuidCustomer: GuidCustomer:
@ -1323,24 +1274,14 @@ components:
type: "object" type: "object"
required: required:
- "Guid" - "Guid"
- "Score"
- "Number" - "Number"
- "ContractStartDate"
- "IsActive"
- "GuidCustomer" - "GuidCustomer"
- "CustomerNumber" - "CustomerNumber"
properties: properties:
Guid: Guid:
type: "string" type: "string"
Score:
type: "number"
Number: Number:
type: "integer" type: "integer"
ContractStartDate:
type: "string"
format: "date"
IsActive:
type: "boolean"
DimensionFrontLeft: DimensionFrontLeft:
type: "string" type: "string"
LicenceTagNumber: LicenceTagNumber:
@ -1353,19 +1294,12 @@ components:
type: "integer" type: "integer"
CustomerName1: CustomerName1:
type: "string" type: "string"
StorageDesignation:
type: "string"
StoragePlaceDesignation:
type: "string"
RemoteStorageReference:
type: "string"
Documents: Documents:
type: "array" type: "array"
items: items:
type: "object" type: "object"
required: required:
- "Guid" - "Guid"
- "Score"
- "DocumentTypeDesignation" - "DocumentTypeDesignation"
- "Date" - "Date"
- "Number" - "Number"
@ -1376,8 +1310,6 @@ components:
properties: properties:
Guid: Guid:
type: "string" type: "string"
Score:
type: "number"
DocumentTypeDesignation: DocumentTypeDesignation:
type: "string" type: "string"
Date: Date:
@ -1407,15 +1339,12 @@ components:
type: "object" type: "object"
required: required:
- "Guid" - "Guid"
- "Score"
- "StartMoment" - "StartMoment"
- "Designation" - "Designation"
- "WasCreatedByOnlineScheduler" - "WasCreatedByOnlineScheduler"
properties: properties:
Guid: Guid:
type: "string" type: "string"
Score:
type: "number"
StartMoment: StartMoment:
type: "string" type: "string"
format: "date-time" format: "date-time"
@ -1464,8 +1393,6 @@ components:
type: "string" type: "string"
GuidStorageLocation: GuidStorageLocation:
type: "string" type: "string"
RemoteStorageReference:
type: "string"
CommentExternal: CommentExternal:
type: "string" type: "string"
CommentInternal: CommentInternal:
@ -1478,7 +1405,6 @@ components:
- "Guid" - "Guid"
- "GuidCustomerStorage" - "GuidCustomerStorage"
- "PositionDescription" - "PositionDescription"
- "PositionDescriptionDesignation"
properties: properties:
Guid: Guid:
type: "string" type: "string"
@ -1488,10 +1414,6 @@ components:
readOnly: true readOnly: true
PositionDescription: PositionDescription:
type: "string" type: "string"
PositionDescriptionDesignation:
type: "string"
GuidArticleTyre:
type: "string"
TyreDimension: TyreDimension:
type: "string" type: "string"
TyreManufacturer: TyreManufacturer:
@ -1508,8 +1430,6 @@ components:
type: "integer" type: "integer"
TyreDotWeek: TyreDotWeek:
type: "integer" type: "integer"
GuidArticleRim:
type: "string"
RimDimension: RimDimension:
type: "string" type: "string"
RimManufacturer: RimManufacturer:
@ -1525,8 +1445,6 @@ components:
- "SteelRim" - "SteelRim"
- "WithoutRim" - "WithoutRim"
- "Unknown" - "Unknown"
GuidArticleTpms:
type: "string"
TpmsSensorId: TpmsSensorId:
type: "string" type: "string"
TpmsSensorBatteryInPercent: TpmsSensorBatteryInPercent:
@ -1558,13 +1476,10 @@ components:
type: "object" type: "object"
readOnly: true readOnly: true
required: required:
- "Guid"
- "Type" - "Type"
- "Designation" - "Designation"
- "Axles" - "Axles"
properties: properties:
Guid:
type: "string"
Type: Type:
type: "string" type: "string"
enum: enum:
@ -1588,7 +1503,6 @@ components:
- "IsDrivingAxle" - "IsDrivingAxle"
- "IsReserveAxle" - "IsReserveAxle"
- "IsSteeringAxle" - "IsSteeringAxle"
- "Designation"
- "Positions" - "Positions"
properties: properties:
BlockNumberFrontToBack: BlockNumberFrontToBack:
@ -1599,8 +1513,6 @@ components:
type: "boolean" type: "boolean"
IsSteeringAxle: IsSteeringAxle:
type: "boolean" type: "boolean"
Designation:
type: "string"
Positions: Positions:
type: "array" type: "array"
items: items:
@ -1608,14 +1520,11 @@ components:
required: required:
- "BlockNumberLeftToRight" - "BlockNumberLeftToRight"
- "PositionDescription" - "PositionDescription"
- "Designation"
properties: properties:
BlockNumberLeftToRight: BlockNumberLeftToRight:
type: "integer" type: "integer"
PositionDescription: PositionDescription:
type: "string" type: "string"
Designation:
type: "string"
ChassisNumber: ChassisNumber:
type: "string" type: "string"
EgTypeApprovalNumber: EgTypeApprovalNumber:
@ -1660,7 +1569,6 @@ components:
type: "object" type: "object"
required: required:
- "Guid" - "Guid"
- "ProgramIdentifier"
- "ProgramIdentifierDesignation" - "ProgramIdentifierDesignation"
- "Type" - "Type"
- "Designation" - "Designation"
@ -1672,9 +1580,6 @@ components:
ProgramIdentifierDesignation: ProgramIdentifierDesignation:
type: "string" type: "string"
readOnly: true readOnly: true
ProgramIdentifier:
type: "string"
readOnly: true
Type: Type:
type: "string" type: "string"
enum: enum: