@celigo/api-specs 0.2.309 → 0.2.310
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/processor.yml +27 -10
- package/package.json +1 -1
- package/schemas.json +2 -2
package/dist/processor.yml
CHANGED
|
@@ -866,12 +866,23 @@ paths:
|
|
|
866
866
|
|
|
867
867
|
Unlike the parser endpoint, the generator places file definition
|
|
868
868
|
fields directly in `rules` (no `fileDefinition` wrapper). Each
|
|
869
|
-
element in the definition must include a `value
|
|
870
|
-
|
|
869
|
+
element in the definition must include a `value`: a Handlebars
|
|
870
|
+
template that produces the text for that field. Literal text is
|
|
871
|
+
output as written. A reference is replaced with a field of the
|
|
872
|
+
context its rule is output with, or with nothing when that context
|
|
873
|
+
has no such field: a rule that repeats is output once for each
|
|
874
|
+
object in `data` and reads that object (`{{firstName}}`), while a
|
|
875
|
+
root rule with no `maxOccurrence` is output once and reads the
|
|
876
|
+
whole array, so it reaches a record by index (`{{0.firstName}}`).
|
|
871
877
|
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
878
|
+
An X12 definition with `skipEDIValidation: false` fails the request
|
|
879
|
+
with `mandatory_element_absent` when the template of a `required`
|
|
880
|
+
element comes out empty; with `skipEDIValidation: true` the element
|
|
881
|
+
is output empty.
|
|
882
|
+
|
|
883
|
+
The `data` array carries the records those references read. The
|
|
884
|
+
response has `mediaType: "text"` with the generated content as one
|
|
885
|
+
string, and does not include `dataRecordTraceKeys` or
|
|
875
886
|
`traceKeysDuplicate`.
|
|
876
887
|
|
|
877
888
|
**Required file definition fields** — `name`, `version` (string
|
|
@@ -894,10 +905,13 @@ paths:
|
|
|
894
905
|
data:
|
|
895
906
|
type: array
|
|
896
907
|
description: |-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
908
|
+
Records read by the Handlebars references in element
|
|
909
|
+
`value`s. A rule that repeats outputs its rows once for
|
|
910
|
+
each object in the array, with that object as the context
|
|
911
|
+
for its elements and child rules. A root rule with no
|
|
912
|
+
`maxOccurrence` outputs one row with the whole array as
|
|
913
|
+
its context, so it reads a record by index
|
|
914
|
+
(`{{0.firstName}}`).
|
|
901
915
|
items:
|
|
902
916
|
type: object
|
|
903
917
|
additionalProperties: true
|
|
@@ -993,7 +1007,8 @@ paths:
|
|
|
993
1007
|
description: |-
|
|
994
1008
|
Array of segment definitions. Each segment has a `name`
|
|
995
1009
|
and `elements` array. Each element must have `name` and
|
|
996
|
-
`value` (
|
|
1010
|
+
`value` (a Handlebars template that produces the field's
|
|
1011
|
+
text).
|
|
997
1012
|
items:
|
|
998
1013
|
type: object
|
|
999
1014
|
additionalProperties: true
|
|
@@ -1022,6 +1037,8 @@ paths:
|
|
|
1022
1037
|
rules:
|
|
1023
1038
|
- name: HDR
|
|
1024
1039
|
elements:
|
|
1040
|
+
- name: HDR
|
|
1041
|
+
value: HDR
|
|
1025
1042
|
- name: firstName
|
|
1026
1043
|
value: John
|
|
1027
1044
|
- name: lastName
|
package/package.json
CHANGED