Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 95bea6c

Browse files
committedNov 7, 2024·
Pass reference rewrites between ecursive calls
1 parent 76401cb commit 95bea6c

File tree

9 files changed

+884
-4
lines changed

9 files changed

+884
-4
lines changed
 

‎app/src/main/java/io/apicurio/registry/storage/impl/sql/RegistryContentUtils.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public static RewrittenContentHolder recursivelyResolveReferencesWithContext(Typ
7272
// First we resolve all the references tree, re-writing the nested contents to use the artifact
7373
// version coordinates instead of the reference name.
7474
return resolveReferencesWithContext(mainContent, mainContentType, resolvedReferences, references,
75-
loader);
75+
loader, new HashMap<>());
7676
}
7777
}
7878

@@ -84,8 +84,7 @@ public static RewrittenContentHolder recursivelyResolveReferencesWithContext(Typ
8484
*/
8585
private static RewrittenContentHolder resolveReferencesWithContext(TypedContent mainContent,
8686
String schemaType, Map<String, TypedContent> partialRecursivelyResolvedReferences,
87-
List<ArtifactReferenceDto> references, Function<ArtifactReferenceDto, ContentWrapperDto> loader) {
88-
Map<String, String> referencesRewrites = new HashMap<>();
87+
List<ArtifactReferenceDto> references, Function<ArtifactReferenceDto, ContentWrapperDto> loader, Map<String, String> referencesRewrites) {
8988
if (references != null && !references.isEmpty()) {
9089
for (ArtifactReferenceDto reference : references) {
9190
if (reference.getArtifactId() == null || reference.getName() == null
@@ -112,7 +111,7 @@ private static RewrittenContentHolder resolveReferencesWithContext(TypedContent
112111
RewrittenContentHolder rewrittenContentHolder = resolveReferencesWithContext(
113112
TypedContent.create(nested.getContent(), nested.getArtifactType()),
114113
nested.getArtifactType(), partialRecursivelyResolvedReferences,
115-
nested.getReferences(), loader);
114+
nested.getReferences(), loader, referencesRewrites);
116115
referencesRewrites.put(refName, referenceCoordinates);
117116
TypedContent rewrittenContent = typeUtilProvider.getContentDereferencer()
118117
.rewriteReferences(rewrittenContentHolder.getRewrittenContent(),
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>apicurio-registry-examples</artifactId>
7+
<groupId>io.apicurio</groupId>
8+
<version>2.6.6-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>apicurio-registry-examples-json-maven-with-references-auto</artifactId>
13+
<packaging>jar</packaging>
14+
15+
<build>
16+
<plugins>
17+
<plugin>
18+
<groupId>io.apicurio</groupId>
19+
<artifactId>apicurio-registry-maven-plugin</artifactId>
20+
<version>${project.version}</version>
21+
<executions>
22+
<execution>
23+
<id>register-artifact</id>
24+
<goals>
25+
<goal>register</goal>
26+
</goals>
27+
<phase>process-test-resources</phase>
28+
<configuration>
29+
<registryUrl>http://localhost:8080/apis/registry/v2</registryUrl>
30+
<artifacts>
31+
<artifact>
32+
<groupId>json-maven-with-references-auto</groupId>
33+
<artifactId>stockAdjustment</artifactId>
34+
<version>1.0.0</version>
35+
<type>JSON</type>
36+
<file>
37+
${project.basedir}/src/main/resources/schemas/FLIStockAdjustment.json
38+
</file>
39+
<ifExists>RETURN_OR_UPDATE</ifExists>
40+
<canonicalize>true</canonicalize>
41+
<analyzeDirectory>true</analyzeDirectory>
42+
<autoRefs>true</autoRefs>
43+
</artifact>
44+
</artifacts>
45+
<existingReferences></existingReferences>
46+
</configuration>
47+
</execution>
48+
</executions>
49+
</plugin>
50+
</plugins>
51+
</build>
52+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "FLIBusinessUnitBaseTypes.json",
4+
"type": "object",
5+
"$defs": {
6+
"buCodeType": {
7+
"type": "string",
8+
"pattern": "(^[0-9A-Z]{3,5})|AP"
9+
},
10+
"buTypeType": {
11+
"type": "string",
12+
"pattern": "(^[A-Z]{2,3})"
13+
},
14+
"buNumber":{
15+
"type": "string",
16+
"pattern": "(^[A-Z]{2,3})"
17+
},
18+
"BusinessUnitReferenceType": {
19+
"type": "object",
20+
"required": [
21+
"BusinessUnitCode",
22+
"BusinessUnitType"
23+
],
24+
"properties": {
25+
"BusinessUnitCode": {
26+
"$ref": "#/$defs/buCodeType"
27+
},
28+
"BusinessUnitType": {
29+
"$ref": "#/$defs/buTypeType"
30+
}
31+
},
32+
"additionalProperties": false
33+
},
34+
"BusinessUnitReferenceDuplicateType": {
35+
"type": "object",
36+
"required": [
37+
"BusinessUnitCode",
38+
"BusinessUnitType"
39+
],
40+
"properties": {
41+
"BusinessUnitCode": {
42+
"$ref": "#/$defs/buCodeType"
43+
},
44+
"BusinessUnitType": {
45+
"$ref": "#/$defs/buTypeType"
46+
}
47+
},
48+
"additionalProperties": false
49+
},
50+
"BusinessUnitAddressReferenceType": {
51+
"type": "object",
52+
"required": [
53+
"BusinessUnitCode",
54+
"BusinessUnitType",
55+
"BusinessUnitSequence"
56+
],
57+
"properties": {
58+
"BusinessUnitCode": {
59+
"$ref": "#/$defs/buCodeType"
60+
},
61+
"BusinessUnitType": {
62+
"$ref": "#/$defs/buTypeType"
63+
},
64+
"BusinessUnitSequence": {
65+
"$ref": "FLIServiceTypes.json#/$defs/positiveInteger4"
66+
}
67+
},
68+
"additionalProperties": false
69+
}
70+
},
71+
"anyOf": [
72+
{
73+
"$ref": "#/$defs/BusinessUnitReferenceType"
74+
},
75+
{
76+
"$ref": "#/$defs/BusinessUnitAddressReferenceType"
77+
}
78+
]
79+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "FLIItemBaseTypes.json",
4+
"$defs": {
5+
"ItemReferenceType": {
6+
"type": "object",
7+
"properties": {
8+
"ItemNumber": {
9+
"type": "string",
10+
"minLength": 1,
11+
"maxLength": 15
12+
},
13+
"ItemType": {
14+
"type": "string",
15+
"enum": [
16+
"ADS",
17+
"ART",
18+
"CCI",
19+
"HM",
20+
"OAD",
21+
"SGR",
22+
"SPR"
23+
]
24+
}
25+
},
26+
"required": [
27+
"ItemNumber",
28+
"ItemType"
29+
],
30+
"additionalProperties": false
31+
},
32+
"ItemSKUType": {
33+
"type": "string",
34+
"minLength": 1,
35+
"maxLength": 20
36+
},
37+
"DWPReferenceType": {
38+
"type": "object",
39+
"properties": {
40+
"ItemReference": {
41+
"$ref": "#/$defs/ItemReferenceType"
42+
},
43+
"ItemSupplierReference": {
44+
"$ref": "FLIBusinessUnitBaseTypes.json#/$defs/BusinessUnitReferenceType"
45+
},
46+
"DWPNumber": { "type": "integer" },
47+
"DWPEdition": { "type": "integer" },
48+
"DWPFromPackagingDate": {
49+
"type": "string",
50+
"format": "date"
51+
}
52+
},
53+
"required": [
54+
"ItemReference",
55+
"ItemSupplierReference",
56+
"DWPNumber",
57+
"DWPEdition",
58+
"DWPFromPackagingDate"
59+
],
60+
"additionalProperties": false
61+
}
62+
},
63+
"anyOf": [
64+
{ "$ref": "#/$defs/ItemReferenceType" },
65+
{ "$ref": "#/$defs/DWPReferenceType" }
66+
]
67+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "FLIMessageHeader.json",
4+
"$defs": {
5+
"MsgHeaderType": {
6+
"type": "object",
7+
"properties": {
8+
"MsgName": {
9+
"type": "string",
10+
"minLength": 1,
11+
"maxLength": 36
12+
},
13+
"MsgVersNo": {
14+
"type": "string",
15+
"minLength": 1,
16+
"maxLength": 10
17+
},
18+
"MsgDateTime": {
19+
"type": "string",
20+
"format": "date-time",
21+
"pattern": "^(.{20})([0-9]{3})[+-]((2[0-3]|[01][0-9])[:]([0-5][0-9]))$"
22+
},
23+
"MsgReference": {
24+
"type": "string",
25+
"minLength": 1,
26+
"maxLength": 36
27+
},
28+
"SendingSystem": {
29+
"type": "string",
30+
"minLength": 1,
31+
"maxLength": 20
32+
},
33+
"SendingUnit": {
34+
"type": "object",
35+
"properties": {
36+
"BUCode": {
37+
"type": "string",
38+
"minLength": 3,
39+
"maxLength": 5
40+
},
41+
"BUType": {
42+
"type": "string",
43+
"minLength": 2,
44+
"maxLength": 3
45+
}
46+
},
47+
"required": [
48+
"BUCode",
49+
"BUType"
50+
],
51+
"additionalProperties": false
52+
},
53+
"LogicalRoutingIdentifier": {
54+
"type": "object",
55+
"properties": {
56+
"SourceCode": {
57+
"type": "string",
58+
"minLength": 1
59+
},
60+
"SourceType": {
61+
"type": "string",
62+
"minLength": 1
63+
},
64+
"SourceLookupType": {
65+
"type": "string",
66+
"minLength": 1
67+
}
68+
},
69+
"required": [
70+
"SourceCode",
71+
"SourceType"
72+
],
73+
"additionalProperties": false
74+
}
75+
},
76+
"additionalProperties": false,
77+
"required": [
78+
"MsgName",
79+
"MsgVersNo",
80+
"MsgDateTime",
81+
"MsgReference",
82+
"SendingSystem"
83+
]
84+
}
85+
},
86+
"type": "object",
87+
"properties": {
88+
"MsgHeader": {
89+
"$ref": "#/$defs/MsgHeaderType"
90+
}
91+
},
92+
"required": [
93+
"MsgHeader"
94+
],
95+
"additionalProperties": false
96+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,308 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "FLIServiceTypes.json",
4+
"$defs": {
5+
"fliDate": {
6+
"type": "string",
7+
"format": "date"
8+
},
9+
"fliDateTime": {
10+
"type": "string",
11+
"format": "date-time",
12+
"pattern": "^(.{20})([0-9]{3})[+-]((2[0-3]|[01][0-9])[:]([0-5][0-9]))$"
13+
},
14+
"positiveInteger": {
15+
"type": "integer",
16+
"minimum": 0
17+
},
18+
"positiveInteger4": {
19+
"type": "integer",
20+
"minimum": 0,
21+
"maximum": 99
22+
},
23+
"positiveIntegerMax100": {
24+
"type": "integer",
25+
"minimum": 0,
26+
"maximum": 100
27+
},
28+
"integer2": {
29+
"type": "integer",
30+
"minimum": -99,
31+
"maximum": 99
32+
},
33+
"integer3": {
34+
"type": "integer",
35+
"minimum": -999,
36+
"maximum": 9999
37+
},
38+
"integer4": {
39+
"type": "integer",
40+
"minimum": -9999,
41+
"maximum": 9999
42+
},
43+
"integer6": {
44+
"type": "integer",
45+
"minimum": -999999,
46+
"maximum": 999999
47+
},
48+
"integer11": {
49+
"type": "integer",
50+
"minimum": -99999999999,
51+
"maximum": 99999999999
52+
},
53+
"decimal7-3": {
54+
"type": "number",
55+
"minimum": -9999.999,
56+
"maximum": 9999.999,
57+
"multipleOf": 0.001
58+
},
59+
"decimal9-2": {
60+
"type": "number",
61+
"minimum": -9999999.99,
62+
"maximum": 9999999.99,
63+
"multipleOf": 0.01
64+
},
65+
"decimal9-5": {
66+
"type": "number",
67+
"minimum": -9999.99999,
68+
"maximum": 9999.99999,
69+
"multipleOf": 0.00001
70+
},
71+
"decimal11-2": {
72+
"type": "number",
73+
"minimum": -999999999.99,
74+
"maximum": 999999999.99,
75+
"multipleOf": 0.01
76+
},
77+
"decimal15-5": {
78+
"type": "number",
79+
"minimum": -9999999999.99999,
80+
"maximum": 9999999999.99999,
81+
"multipleOf": 0.00001
82+
},
83+
"string1": {
84+
"type": "string",
85+
"maxLength": 1
86+
},
87+
"string2": {
88+
"type": "string",
89+
"maxLength": 2
90+
},
91+
"string4": {
92+
"type": "string",
93+
"maxLength": 4
94+
},
95+
"string8": {
96+
"type": "string",
97+
"maxLength": 8
98+
},
99+
"string10": {
100+
"type": "string",
101+
"maxLength": 10
102+
},
103+
"string24": {
104+
"type": "string",
105+
"maxLength": 24
106+
},
107+
"string35": {
108+
"type": "string",
109+
"maxLength": 35
110+
},
111+
"string36": {
112+
"type": "string",
113+
"maxLength": 36
114+
},
115+
"string40": {
116+
"type": "string",
117+
"maxLength": 40
118+
},
119+
"string50": {
120+
"type": "string",
121+
"maxLength": 50
122+
},
123+
"string70": {
124+
"type": "string",
125+
"maxLength": 70
126+
},
127+
"string100": {
128+
"type": "string",
129+
"maxLength": 100
130+
},
131+
"string160": {
132+
"type": "string",
133+
"maxLength": 160
134+
},
135+
"string500": {
136+
"type": "string",
137+
"maxLength": 500
138+
},
139+
"nonEmptyString4000": {
140+
"type": "string",
141+
"maxLength": 4000,
142+
"minLength": 1
143+
},
144+
"nonEmptyString1000": {
145+
"type": "string",
146+
"maxLength": 1000,
147+
"minLength": 1
148+
},
149+
"nonEmptyString500": {
150+
"type": "string",
151+
"maxLength": 500,
152+
"minLength": 1
153+
},
154+
"nonEmptyString200": {
155+
"type": "string",
156+
"maxLength": 200,
157+
"minLength": 1
158+
},
159+
"nonEmptyString160": {
160+
"type": "string",
161+
"maxLength": 160,
162+
"minLength": 1
163+
},
164+
"nonEmptyString150": {
165+
"type": "string",
166+
"maxLength": 150,
167+
"minLength": 1
168+
},
169+
"nonEmptyString100": {
170+
"type": "string",
171+
"maxLength": 100,
172+
"minLength": 1
173+
},
174+
"nonEmptyString80": {
175+
"type": "string",
176+
"maxLength": 80,
177+
"minLength": 1
178+
},
179+
"nonEmptyString70": {
180+
"type": "string",
181+
"maxLength": 70,
182+
"minLength": 1
183+
},
184+
"nonEmptyString50": {
185+
"type": "string",
186+
"maxLength": 50,
187+
"minLength": 1
188+
},
189+
"nonEmptyString40": {
190+
"type": "string",
191+
"maxLength": 40,
192+
"minLength": 1
193+
},
194+
"nonEmptyString36": {
195+
"type": "string",
196+
"maxLength": 36,
197+
"minLength": 1
198+
},
199+
"nonEmptyString35": {
200+
"type": "string",
201+
"maxLength": 35,
202+
"minLength": 1
203+
},
204+
"nonEmptyString30": {
205+
"type": "string",
206+
"maxLength": 30,
207+
"minLength": 1
208+
},
209+
"nonEmptyString25": {
210+
"type": "string",
211+
"maxLength": 25,
212+
"minLength": 1
213+
},
214+
"nonEmptyString24": {
215+
"type": "string",
216+
"maxLength": 24,
217+
"minLength": 1
218+
},
219+
"nonEmptyString20": {
220+
"type": "string",
221+
"maxLength": 20,
222+
"minLength": 1
223+
},
224+
"nonEmptyString18": {
225+
"type": "string",
226+
"maxLength": 18,
227+
"minLength": 1
228+
},
229+
"nonEmptyString15": {
230+
"type": "string",
231+
"maxLength": 15,
232+
"minLength": 1
233+
},
234+
"nonEmptyString10": {
235+
"type": "string",
236+
"maxLength": 10,
237+
"minLength": 1
238+
},
239+
"nonEmptyString8": {
240+
"type": "string",
241+
"maxLength": 8,
242+
"minLength": 1
243+
},
244+
"nonEmptyString5": {
245+
"type": "string",
246+
"maxLength": 5,
247+
"minLength": 1
248+
},
249+
"nonEmptyString4": {
250+
"type": "string",
251+
"maxLength": 4,
252+
"minLength": 1
253+
},
254+
"nonEmptyString3": {
255+
"type": "string",
256+
"maxLength": 3,
257+
"minLength": 1
258+
},
259+
"nonEmptyString2": {
260+
"type": "string",
261+
"maxLength": 2,
262+
"minLength": 1
263+
},
264+
"nonEmptyString1": {
265+
"type": "string",
266+
"maxLength": 1,
267+
"minLength": 1
268+
},
269+
"nonEmptyString": {
270+
"type": "string",
271+
"minLength": 1
272+
},
273+
"CountryCodeType": {
274+
"type": "string",
275+
"pattern": "(^[A-Z]{2}$)"
276+
},
277+
"ServiceResponseType": {
278+
"type": "object",
279+
"properties": {
280+
"ServiceName": {
281+
"$ref": "#/$defs/nonEmptyString100"
282+
},
283+
"MessageReference": {
284+
"$ref": "#/$defs/nonEmptyString36"
285+
},
286+
"ReturnCode": {
287+
"$ref": "#/$defs/nonEmptyString4"
288+
},
289+
"ErrorMessage": {
290+
"$ref": "#/$defs/nonEmptyString100"
291+
},
292+
"ErrorDetails": {
293+
"$ref": "#/$defs/nonEmptyString500"
294+
}
295+
},
296+
"required": [
297+
"ServiceName",
298+
"MessageReference",
299+
"ReturnCode"
300+
],
301+
"additionalProperties": false
302+
}
303+
},
304+
"type": "object",
305+
"anyOf": [
306+
{ "$ref": "#/$defs/ServiceResponseType" }
307+
]
308+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "FLIStockAdjustment.json",
4+
"title": "Stock adjustment schema for GIS",
5+
"description": "Schema for the validation of stock adjustment messages.",
6+
"$defs": {
7+
"LUStockAdjustment": {
8+
"type": "object",
9+
"properties": {
10+
"LogId": {
11+
"type": "integer"
12+
},
13+
"TransactionType": {
14+
"type": "string",
15+
"maxLength": 3
16+
},
17+
"ReportDateTime": {
18+
"$ref": "FLIServiceTypes.json#/$defs/fliDateTime"
19+
},
20+
"TransactionDateTime": {
21+
"$ref": "FLIServiceTypes.json#/$defs/fliDateTime"
22+
},
23+
"AdjustmentQuantity": {
24+
"$ref": "FLIServiceTypes.json#/$defs/decimal11-2"
25+
},
26+
"UOMCodeQuantity": {
27+
"$ref": "FLIServiceTypes.json#/$defs/nonEmptyString10"
28+
},
29+
"ChangeNote": {
30+
"$ref": "FLIServiceTypes.json#/$defs/nonEmptyString35"
31+
},
32+
"OutBoundReferences": {
33+
"$ref": "FLIStockTypes.json#/$defs/OutBoundReferences"
34+
},
35+
"RuleIdentifier": {
36+
"type": "integer"
37+
},
38+
"SubCode": {
39+
"$ref": "FLIStockTypes.json#/$defs/StockStatusSubCode"
40+
}
41+
},
42+
"required": [
43+
"LogId",
44+
"TransactionType",
45+
"ReportDateTime",
46+
"TransactionDateTime",
47+
"AdjustmentQuantity",
48+
"UOMCodeQuantity"
49+
],
50+
"additionalProperties": false
51+
},
52+
"StockAdjustment": {
53+
"type": "object",
54+
"properties": {
55+
"LogisticUnitReference": {
56+
"$ref": "FLIBusinessUnitBaseTypes.json#/$defs/BusinessUnitReferenceType"
57+
},
58+
"LUStock": {
59+
"$ref": "FLIStockTypes.json#/$defs/LUStock"
60+
},
61+
"LUStockAdjustment": {
62+
"$ref": "#/$defs/LUStockAdjustment"
63+
}
64+
},
65+
"required": [
66+
"LogisticUnitReference",
67+
"LUStock",
68+
"LUStockAdjustment"
69+
],
70+
"additionalProperties": false
71+
}
72+
},
73+
"type": "object",
74+
"properties": {
75+
"MsgHeader": {
76+
"$ref": "FLIMessageHeader.json#/$defs/MsgHeaderType"
77+
},
78+
"MsgBody": {
79+
"type": "object",
80+
"properties": {
81+
"StockAdjustments": {
82+
"type": "array",
83+
"items": {
84+
"$ref": "#/$defs/StockAdjustment"
85+
},
86+
"minItems": 1
87+
}
88+
},
89+
"required": [
90+
"StockAdjustments"
91+
],
92+
"additionalProperties": false
93+
}
94+
},
95+
"required": [
96+
"MsgHeader",
97+
"MsgBody"
98+
],
99+
"additionalProperties": false
100+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2019-09/schema",
3+
"$id": "FLIStockTypes.json",
4+
"type": "object",
5+
"$defs": {
6+
"LUStock": {
7+
"description": "This object models the stock object.",
8+
"type": "object",
9+
"properties": {
10+
"ItemReference": {
11+
"$ref": "FLIItemBaseTypes.json#/$defs/ItemReferenceType"
12+
},
13+
"SupplierReference": {
14+
"$ref": "FLIBusinessUnitBaseTypes.json#/$defs/BusinessUnitAddressReferenceType"
15+
},
16+
"ItemDWPReference": {
17+
"$ref": "FLIItemBaseTypes.json#/$defs/DWPReferenceType"
18+
},
19+
"RegistrationDateTime": {
20+
"$ref": "FLIServiceTypes.json#/$defs/fliDateTime"
21+
},
22+
"ProductionDate": {
23+
"$ref": "FLIServiceTypes.json#/$defs/fliDate"
24+
},
25+
"StockLocationId": {
26+
"$ref": "FLIServiceTypes.json#/$defs/nonEmptyString30"
27+
},
28+
"Quantity": {
29+
"$ref": "FLIServiceTypes.json#/$defs/decimal11-2"
30+
},
31+
"UOMCodeQuantity": {
32+
"$ref": "FLIServiceTypes.json#/$defs/nonEmptyString10"
33+
},
34+
"InboundConsignmentLineReference": {
35+
"$ref": "#/$defs/ConsignmentLineReference"
36+
},
37+
"CountryOfOrigin": {
38+
"$ref": "FLIServiceTypes.json#/$defs/string2"
39+
},
40+
"TradeStatus": {
41+
"$ref": "#/$defs/TradeStatus"
42+
},
43+
"OrderReference": {
44+
"$ref": "FLIServiceTypes.json#/$defs/nonEmptyString24"
45+
},
46+
"OrderType": {
47+
"$ref": "FLIServiceTypes.json#/$defs/nonEmptyString10"
48+
},
49+
"BondedFlag": {
50+
"type": "boolean"
51+
},
52+
"LUStockStatus": {
53+
"type": "array",
54+
"items": {
55+
"$ref": "#/$defs/LUStockStatus"
56+
}
57+
}
58+
},
59+
"required": [
60+
"ItemReference",
61+
"SupplierReference",
62+
"ItemDWPReference",
63+
"RegistrationDateTime",
64+
"ProductionDate",
65+
"StockLocationId",
66+
"Quantity",
67+
"UOMCodeQuantity",
68+
"CountryOfOrigin",
69+
"TradeStatus",
70+
"BondedFlag"
71+
],
72+
"additionalProperties": false
73+
},
74+
"ConsignmentLineReference": {
75+
"type": "object",
76+
"properties": {
77+
"ConsignmentId": {
78+
"$ref": "#/$defs/ConsignmentId"
79+
},
80+
"ConsignmentLineNumber": {
81+
"$ref": "#/$defs/ConsignmentLineNumber"
82+
}
83+
},
84+
"required": [
85+
"ConsignmentId",
86+
"ConsignmentLineNumber"
87+
],
88+
"additionalProperties": false
89+
},
90+
"TradeStatus": {
91+
"type": "integer",
92+
"enum": [
93+
0,
94+
1,
95+
2
96+
]
97+
},
98+
"StockStatusSubCode": {
99+
"type": "integer",
100+
"minimum": 0,
101+
"maximum": 99
102+
},
103+
"LUStockStatus": {
104+
"type": "object",
105+
"properties": {
106+
"StockStatus": {
107+
"type": "string"
108+
},
109+
"StockStatusSubCode":
110+
{
111+
"$ref": "#/$defs/StockStatusSubCode"
112+
}
113+
},
114+
"required": [
115+
"StockStatus"
116+
],
117+
"additionalProperties": false
118+
},
119+
"ConsignmentId": {
120+
"type": "object",
121+
"properties": {
122+
"CreatorReference": {
123+
"$ref": "FLIBusinessUnitBaseTypes.json#/$defs/BusinessUnitReferenceType"
124+
},
125+
"ConsignmentNumber": {
126+
"type": "string",
127+
"maxLength": 12,
128+
"minLength": 1
129+
}
130+
},
131+
"required": [
132+
"CreatorReference",
133+
"ConsignmentNumber"
134+
],
135+
"additionalProperties": false
136+
},
137+
"ConsignmentLineNumber": {
138+
"$ref": "FLIServiceTypes.json#/$defs/positiveInteger"
139+
},
140+
"orderSource": {
141+
"$ref": "FLIServiceTypes.json#/$defs/nonEmptyString10"
142+
},
143+
"executableOrderId": {
144+
"$ref": "FLIServiceTypes.json#/$defs/nonEmptyString40"
145+
},
146+
"executableOrderLineId": {
147+
"$ref": "FLIServiceTypes.json#/$defs/integer4"
148+
},
149+
"OutBoundReferences": {
150+
"type": "object",
151+
"properties": {
152+
"OutboundConsignmentLineReference": {
153+
"$ref": "#/$defs/ConsignmentLineReference"
154+
},
155+
"OrderSource": {
156+
"$ref": "#/$defs/orderSource"
157+
},
158+
"ExecutableOrderLineReference": {
159+
"type": "object",
160+
"properties": {
161+
"ExecutableOrderId": {
162+
"$ref": "#/$defs/executableOrderId"
163+
},
164+
"ExecutableOrderLineId": {
165+
"$ref": "#/$defs/executableOrderLineId"
166+
}
167+
},
168+
"required": [
169+
"ExecutableOrderId",
170+
"ExecutableOrderLineId"
171+
],
172+
"additionalProperties": false
173+
}
174+
},
175+
"additionalProperties": false
176+
}
177+
}
178+
}

‎examples/pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
<module>serdes-with-references</module>
4545
<module>avro-maven-with-references</module>
4646
<module>avro-maven-with-references-auto</module>
47+
<module>json-maven-with-references-auto</module>
4748
<module>protobuf-validation</module>
4849
<module>simple-protobuf</module>
4950
<module>protobuf-find-latest</module>

0 commit comments

Comments
 (0)
Please sign in to comment.