Skip to content

Commit b99a121

Browse files
authored
Merge pull request #454 from alexgordtop/issues/445-upsert_of_objects
#445: Relaxed api to not throw 404 when element was not found on PUT
2 parents ff714d5 + 3f282ea commit b99a121

File tree

14 files changed

+326
-81
lines changed

14 files changed

+326
-81
lines changed

AasxFileServerServiceSpecification/V3.1_SSP-001.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ paths:
150150
put:
151151
tags:
152152
- AASX File Server API
153-
summary: Updates the AASX package at the server
153+
summary: Creates or updates the AASX package at the server
154154
operationId: PutAASXByPackageId
155155
x-semanticIds:
156156
- https://admin-shell.io/aas/API/PutAASXByPackageId/3/0
@@ -175,6 +175,17 @@ paths:
175175
contentType: application/asset-administration-shell-package
176176
required: true
177177
responses:
178+
'201':
179+
description: AASX package stored successfully
180+
headers:
181+
Location:
182+
description: URL of the newly created resource
183+
schema:
184+
type: string
185+
content:
186+
application/json:
187+
schema:
188+
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/schemas/PackageDescription'
178189
'204':
179190
description: AASX package updated successfully
180191
'400':
@@ -183,8 +194,6 @@ paths:
183194
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/unauthorized'
184195
'403':
185196
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/forbidden'
186-
'404':
187-
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/not-found'
188197
'500':
189198
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/internal-server-error'
190199
default:

AssetAdministrationShellRegistryServiceSpecification/V3.1_SSP-001.yaml

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ paths:
119119
put:
120120
tags:
121121
- Asset Administration Shell Registry API
122-
summary: Updates an existing Asset Administration Shell Descriptor
122+
summary: Creates or updates an existing Asset Administration Shell Descriptor
123123
operationId: PutAssetAdministrationShellDescriptorById
124124
x-semanticIds:
125125
- https://admin-shell.io/aas/API/PutAssetAdministrationShellDescriptorById/3/0
@@ -140,14 +140,23 @@ paths:
140140
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/schemas/AssetAdministrationShellDescriptor'
141141
required: true
142142
responses:
143+
'201':
144+
description: Asset Administration Shell Descriptor created successfully
145+
headers:
146+
Location:
147+
description: URL of the newly created resource
148+
schema:
149+
type: string
150+
content:
151+
application/json:
152+
schema:
153+
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/schemas/AssetAdministrationShellDescriptor'
143154
'204':
144155
description: Asset Administration Shell Descriptor updated successfully
145156
'400':
146157
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/bad-request'
147158
'403':
148159
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/forbidden'
149-
'404':
150-
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/not-found'
151160
'500':
152161
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/internal-server-error'
153162
default:
@@ -278,7 +287,7 @@ paths:
278287
put:
279288
tags:
280289
- Asset Administration Shell Registry API
281-
summary: Updates an existing Submodel Descriptor
290+
summary: Creates or updates an existing Submodel Descriptor
282291
operationId: PutSubmodelDescriptorByIdThroughSuperpath
283292
x-semanticIds:
284293
- https://admin-shell.io/aas/API/PutSubmodelDescriptorById/3/0
@@ -290,14 +299,23 @@ paths:
290299
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/schemas/SubmodelDescriptor'
291300
required: true
292301
responses:
302+
'201':
303+
description: Submodel Descriptor created successfully
304+
headers:
305+
Location:
306+
description: URL of the newly created resource
307+
schema:
308+
type: string
309+
content:
310+
application/json:
311+
schema:
312+
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/schemas/SubmodelDescriptor'
293313
'204':
294314
description: Submodel Descriptor updated successfully
295315
'400':
296316
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/bad-request'
297317
'403':
298318
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/forbidden'
299-
'404':
300-
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/not-found'
301319
'500':
302320
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/internal-server-error'
303321
default:

AssetAdministrationShellRegistryServiceSpecification/V3.1_SSP-003.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ paths:
5959
put:
6060
tags:
6161
- Async Bulk Asset Administration Shell Registry API
62-
summary: Updates multiple existing Asset Administration Shell Descriptors
62+
summary: Creates or updates multiple existing Asset Administration Shell Descriptors
6363
operationId: PutBulkAssetAdministrationShellDescriptorsById
6464
x-semanticIds:
6565
- https://admin-shell.io/aas/API/PutBulkAssetAdministrationShellDescriptorsById/3/1

AssetAdministrationShellRepositoryServiceSpecification/V3.1_SSP-001.yaml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ paths:
152152
put:
153153
tags:
154154
- Asset Administration Shell Repository API
155-
summary: Updates an existing Asset Administration Shell
155+
summary: Creates or updates an existing Asset Administration Shell
156156
operationId: PutAssetAdministrationShellById
157157
x-semanticIds:
158158
- https://admin-shell.io/aas/API/PutAssetAdministrationShellById/3/0
@@ -164,6 +164,17 @@ paths:
164164
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.1.0#/components/schemas/AssetAdministrationShell'
165165
required: true
166166
responses:
167+
'201':
168+
description: Asset Administration Shell created successfully
169+
headers:
170+
Location:
171+
description: URL of the newly created resource
172+
schema:
173+
type: string
174+
content:
175+
application/json:
176+
schema:
177+
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.1.0#/components/schemas/AssetAdministrationShell'
167178
'204':
168179
description: Asset Administration Shell updated successfully
169180
'400':
@@ -172,8 +183,6 @@ paths:
172183
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/unauthorized'
173184
'403':
174185
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/forbidden'
175-
'404':
176-
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/not-found'
177186
'500':
178187
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/internal-server-error'
179188
default:
@@ -514,7 +523,7 @@ paths:
514523
put:
515524
tags:
516525
- Asset Administration Shell Repository API
517-
summary: Updates the Submodel
526+
summary: Creates or updates the Submodel
518527
operationId: PutSubmodelById_AasRepository
519528
x-semanticIds:
520529
- https://admin-shell.io/aas/API/PutSubmodel/3/0
@@ -526,6 +535,17 @@ paths:
526535
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.1.0#/components/schemas/Submodel'
527536
required: true
528537
responses:
538+
'201':
539+
description: Submodel reference created successfully
540+
headers:
541+
Location:
542+
description: URL of the newly created resource
543+
schema:
544+
type: string
545+
content:
546+
application/json:
547+
schema:
548+
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.1.0#/components/schemas/Reference'
529549
'204':
530550
description: Submodel updated successfully
531551
'400':
@@ -1099,7 +1119,7 @@ paths:
10991119
put:
11001120
tags:
11011121
- Asset Administration Shell Repository API
1102-
summary: Updates an existing submodel element at a specified path within submodel elements hierarchy
1122+
summary: Creates or updates an existing submodel element at a specified path within submodel elements hierarchy
11031123
operationId: PutSubmodelElementByPath_AasRepository
11041124
x-semanticIds:
11051125
- https://admin-shell.io/aas/API/PutSubmodelElementByPath/3/0
@@ -1112,6 +1132,17 @@ paths:
11121132
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.1.0#/components/schemas/SubmodelElement'
11131133
required: true
11141134
responses:
1135+
'201':
1136+
description: Submodel element created successfully
1137+
headers:
1138+
Location:
1139+
description: URL of the newly created resource
1140+
schema:
1141+
type: string
1142+
content:
1143+
application/json:
1144+
schema:
1145+
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.1.0#/components/schemas/SubmodelElement'
11151146
'204':
11161147
description: Submodel element updated successfully
11171148
'400':

AssetAdministrationShellServiceSpecification/V3.1_SSP-001.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,6 @@ paths:
389389
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/unauthorized'
390390
'403':
391391
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/forbidden'
392-
'404':
393-
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/not-found'
394392
'500':
395393
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/internal-server-error'
396394
default:
@@ -957,7 +955,7 @@ paths:
957955
put:
958956
tags:
959957
- Asset Administration Shell API
960-
summary: Updates an existing submodel element at a specified path within submodel elements hierarchy
958+
summary: Creates or updates an existing submodel element at a specified path within submodel elements hierarchy
961959
operationId: PutSubmodelElementByPath
962960
x-semanticIds:
963961
- https://admin-shell.io/aas/API/PutSubmodelElementByPath/3/0
@@ -970,6 +968,17 @@ paths:
970968
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.1.0#/components/schemas/SubmodelElement'
971969
required: true
972970
responses:
971+
'201':
972+
description: Submodel element created successfully
973+
headers:
974+
Location:
975+
description: URL of the newly created resource
976+
schema:
977+
type: string
978+
content:
979+
application/json:
980+
schema:
981+
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.1.0#/components/schemas/SubmodelElement'
973982
'204':
974983
description: Submodel element updated successfully
975984
'400':

ConceptDescriptionRepositoryServiceSpecification/V3.1_SSP-001.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ paths:
144144
put:
145145
tags:
146146
- Concept Description Repository API
147-
summary: Updates an existing Concept Description
147+
summary: Creates or updates an existing Concept Description
148148
operationId: PutConceptDescriptionById
149149
x-semanticIds:
150150
- https://admin-shell.io/aas/API/PutConceptDescriptionById/3/0
@@ -165,14 +165,23 @@ paths:
165165
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.1.0#/components/schemas/ConceptDescription'
166166
required: true
167167
responses:
168+
'201':
169+
description: Concept Description created successfully
170+
headers:
171+
Location:
172+
description: URL of the newly created resource
173+
schema:
174+
type: string
175+
content:
176+
application/json:
177+
schema:
178+
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part1-MetaModel-Schemas/V3.1.0#/components/schemas/ConceptDescription'
168179
'204':
169180
description: Concept Description updated successfully
170181
'400':
171182
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/bad-request'
172183
'403':
173184
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/forbidden'
174-
'404':
175-
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/not-found'
176185
'500':
177186
$ref: 'https://api.swaggerhub.com/domains/Plattform_i40/Part2-API-Schemas/V3.1.0#/components/responses/internal-server-error'
178187
default:

0 commit comments

Comments
 (0)