Skip to content

Commit b298521

Browse files
authored
Merge pull request #95 from Systems-Modeling/feature/ST5AS-231
feat: ST5AS-231 separate commit created and (paginated) conflicting r…
2 parents 77fda93 + ac0122e commit b298521

5 files changed

Lines changed: 150 additions & 278 deletions

File tree

conf/json/schema/api/schemas-sans-metamodel-requests.json

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -685,58 +685,6 @@
685685
],
686686
"additionalProperties": false
687687
},
688-
"MergeResult": {
689-
"$id": "https://www.omg.org/spec/SystemsModelingAPI/20230201/MergeResult",
690-
"title": "MergeResult",
691-
"allOf": [
692-
{
693-
"oneOf": [
694-
{
695-
"type": "object",
696-
"properties": {
697-
"@type": {
698-
"type": "string",
699-
"const": "MergeResult"
700-
},
701-
"conflict": {
702-
"type": "array",
703-
"maxItems": 0
704-
},
705-
"mergeCommit": {
706-
"$ref": "https://www.omg.org/spec/SystemsModelingAPI/20230201/Commit"
707-
}
708-
}
709-
},
710-
{
711-
"type": "object",
712-
"properties": {
713-
"@type": {
714-
"type": "string",
715-
"const": "MergeResult"
716-
},
717-
"conflict": {
718-
"type": "array",
719-
"items": {
720-
"$ref": "https://www.omg.org/spec/SystemsModelingAPI/20230201/DataIdentity"
721-
},
722-
"minItems": 1
723-
},
724-
"mergeCommit": {
725-
"type": "null"
726-
}
727-
}
728-
}
729-
]
730-
},
731-
{
732-
"required": [
733-
"@type",
734-
"conflict",
735-
"mergeCommit"
736-
]
737-
}
738-
]
739-
},
740688
"Query": {
741689
"$id": "https://www.omg.org/spec/SystemsModelingAPI/20230201/Query",
742690
"title": "Query",

conf/json/schema/api/schemas.json

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -685,58 +685,6 @@
685685
],
686686
"additionalProperties": false
687687
},
688-
"MergeResult": {
689-
"$id": "https://www.omg.org/spec/SystemsModelingAPI/20230201/MergeResult",
690-
"title": "MergeResult",
691-
"allOf": [
692-
{
693-
"oneOf": [
694-
{
695-
"type": "object",
696-
"properties": {
697-
"@type": {
698-
"type": "string",
699-
"const": "MergeResult"
700-
},
701-
"conflict": {
702-
"type": "array",
703-
"maxItems": 0
704-
},
705-
"mergeCommit": {
706-
"$ref": "https://www.omg.org/spec/SystemsModelingAPI/20230201/Commit"
707-
}
708-
}
709-
},
710-
{
711-
"type": "object",
712-
"properties": {
713-
"@type": {
714-
"type": "string",
715-
"const": "MergeResult"
716-
},
717-
"conflict": {
718-
"type": "array",
719-
"items": {
720-
"$ref": "https://www.omg.org/spec/SystemsModelingAPI/20230201/DataIdentity"
721-
},
722-
"minItems": 1
723-
},
724-
"mergeCommit": {
725-
"type": "null"
726-
}
727-
}
728-
}
729-
]
730-
},
731-
{
732-
"required": [
733-
"@type",
734-
"conflict",
735-
"mergeCommit"
736-
]
737-
}
738-
]
739-
},
740688
"Query": {
741689
"$id": "https://www.omg.org/spec/SystemsModelingAPI/20230201/Query",
742690
"title": "Query",

public/docs/openapi-sans-schemas.json

Lines changed: 50 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,15 @@
11301130
},
11311131
{
11321132
"$ref": "#/components/parameters/mergeDescription"
1133+
},
1134+
{
1135+
"$ref": "#/components/parameters/pageAfter"
1136+
},
1137+
{
1138+
"$ref": "#/components/parameters/pageBefore"
1139+
},
1140+
{
1141+
"$ref": "#/components/parameters/pageSize"
11331142
}
11341143
],
11351144
"requestBody": {
@@ -1161,22 +1170,34 @@
11611170
"required": false
11621171
},
11631172
"responses": {
1164-
"200": {
1165-
"description": "OK",
1173+
"201": {
1174+
"description": "Created",
1175+
"content": {
1176+
"application/json": {
1177+
"schema": {
1178+
"$ref": "#/components/schemas/Commit"
1179+
},
1180+
"examples": {
1181+
"Merged": {
1182+
"$ref": "#/components/examples/MergeCommit"
1183+
}
1184+
}
1185+
}
1186+
}
1187+
},
1188+
"409": {
1189+
"description": "Conflict",
11661190
"content": {
11671191
"application/json": {
11681192
"schema": {
11691193
"type": "array",
11701194
"items": {
1171-
"$ref": "#/components/schemas/MergeResult"
1195+
"$ref": "#/components/schemas/DataIdentity"
11721196
}
11731197
},
11741198
"examples": {
1175-
"ConflictFreeMergeResult": {
1176-
"$ref": "#/components/examples/ConflictFreeMergeResult"
1177-
},
1178-
"ConflictingMergeResult": {
1179-
"$ref": "#/components/examples/ConflictingMergeResult"
1199+
"Conflicting": {
1200+
"$ref": "#/components/examples/MergeConflicting"
11801201
}
11811202
}
11821203
}
@@ -2323,27 +2344,32 @@
23232344
}
23242345
]
23252346
},
2326-
"ConflictFreeMergeResult": {
2347+
"MergeCommit": {
23272348
"value": {
2328-
"@type": "MergeResult",
2329-
"conflict": [
2330-
],
2331-
"mergeCommit": {
2332-
"$ref": "#/components/examples/Commit/value"
2333-
}
2334-
}
2335-
},
2336-
"ConflictingMergeResult": {
2337-
"value": {
2338-
"@type": "MergeResult",
2339-
"conflict": [
2349+
"@id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
2350+
"@type": "Commit",
2351+
"created": "1970-01-01T00:00:00.000Z",
2352+
"description": "string",
2353+
"owningProject": {
2354+
"@id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
2355+
},
2356+
"previousCommit": [
23402357
{
2341-
"$ref": "#/components/examples/DataIdentity/value"
2358+
"@id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
2359+
},
2360+
{
2361+
"@id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
23422362
}
2343-
],
2344-
"mergeCommit": null
2363+
]
23452364
}
23462365
},
2366+
"MergeConflicting": {
2367+
"value": [
2368+
{
2369+
"$ref": "#/components/examples/DataIdentity/value"
2370+
}
2371+
]
2372+
},
23472373
"Query": {
23482374
"value": {
23492375
"@id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",

public/docs/openapi-x.json

Lines changed: 50 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1133,6 +1133,15 @@
11331133
},
11341134
{
11351135
"$ref": "#/components/parameters/mergeDescription"
1136+
},
1137+
{
1138+
"$ref": "#/components/parameters/pageAfter"
1139+
},
1140+
{
1141+
"$ref": "#/components/parameters/pageBefore"
1142+
},
1143+
{
1144+
"$ref": "#/components/parameters/pageSize"
11361145
}
11371146
],
11381147
"requestBody": {
@@ -1164,22 +1173,34 @@
11641173
"required": false
11651174
},
11661175
"responses": {
1167-
"200": {
1168-
"description": "OK",
1176+
"201": {
1177+
"description": "Created",
1178+
"content": {
1179+
"application/json": {
1180+
"schema": {
1181+
"$ref": "#/components/schemas/Commit"
1182+
},
1183+
"examples": {
1184+
"Merged": {
1185+
"$ref": "#/components/examples/MergeCommit"
1186+
}
1187+
}
1188+
}
1189+
}
1190+
},
1191+
"409": {
1192+
"description": "Conflict",
11691193
"content": {
11701194
"application/json": {
11711195
"schema": {
11721196
"type": "array",
11731197
"items": {
1174-
"$ref": "#/components/schemas/MergeResult"
1198+
"$ref": "#/components/schemas/DataIdentity"
11751199
}
11761200
},
11771201
"examples": {
1178-
"ConflictFreeMergeResult": {
1179-
"$ref": "#/components/examples/ConflictFreeMergeResult"
1180-
},
1181-
"ConflictingMergeResult": {
1182-
"$ref": "#/components/examples/ConflictingMergeResult"
1202+
"Conflicting": {
1203+
"$ref": "#/components/examples/MergeConflicting"
11831204
}
11841205
}
11851206
}
@@ -2798,58 +2819,6 @@
27982819
],
27992820
"additionalProperties": false
28002821
},
2801-
"MergeResult": {
2802-
"$id": "https://www.omg.org/spec/SystemsModelingAPI/20230201/MergeResult",
2803-
"title": "MergeResult",
2804-
"allOf": [
2805-
{
2806-
"oneOf": [
2807-
{
2808-
"type": "object",
2809-
"properties": {
2810-
"@type": {
2811-
"type": "string",
2812-
"const": "MergeResult"
2813-
},
2814-
"conflict": {
2815-
"type": "array",
2816-
"maxItems": 0
2817-
},
2818-
"mergeCommit": {
2819-
"$ref": "#/components/schemas/Commit"
2820-
}
2821-
}
2822-
},
2823-
{
2824-
"type": "object",
2825-
"properties": {
2826-
"@type": {
2827-
"type": "string",
2828-
"const": "MergeResult"
2829-
},
2830-
"conflict": {
2831-
"type": "array",
2832-
"items": {
2833-
"$ref": "#/components/schemas/DataIdentity"
2834-
},
2835-
"minItems": 1
2836-
},
2837-
"mergeCommit": {
2838-
"type": "null"
2839-
}
2840-
}
2841-
}
2842-
]
2843-
},
2844-
{
2845-
"required": [
2846-
"@type",
2847-
"conflict",
2848-
"mergeCommit"
2849-
]
2850-
}
2851-
]
2852-
},
28532822
"Query": {
28542823
"$id": "https://www.omg.org/spec/SystemsModelingAPI/20230201/Query",
28552824
"title": "Query",
@@ -229273,26 +229242,32 @@
229273229242
}
229274229243
]
229275229244
},
229276-
"ConflictFreeMergeResult": {
229245+
"MergeCommit": {
229277229246
"value": {
229278-
"@type": "MergeResult",
229279-
"conflict": [],
229280-
"mergeCommit": {
229281-
"$ref": "#/components/examples/Commit/value"
229282-
}
229283-
}
229284-
},
229285-
"ConflictingMergeResult": {
229286-
"value": {
229287-
"@type": "MergeResult",
229288-
"conflict": [
229247+
"@id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
229248+
"@type": "Commit",
229249+
"created": "1970-01-01T00:00:00.000Z",
229250+
"description": "string",
229251+
"owningProject": {
229252+
"@id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
229253+
},
229254+
"previousCommit": [
229255+
{
229256+
"@id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
229257+
},
229289229258
{
229290-
"$ref": "#/components/examples/DataIdentity/value"
229259+
"@id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
229291229260
}
229292-
],
229293-
"mergeCommit": null
229261+
]
229294229262
}
229295229263
},
229264+
"MergeConflicting": {
229265+
"value": [
229266+
{
229267+
"$ref": "#/components/examples/DataIdentity/value"
229268+
}
229269+
]
229270+
},
229296229271
"Query": {
229297229272
"value": {
229298229273
"@id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",

0 commit comments

Comments
 (0)