@celigo/api-specs 0.2.313 → 0.2.314

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.
@@ -484,7 +484,11 @@ components:
484
484
  definitions whose value comes from the trading-partner profile
485
485
  use `referenceValue` to bind a Handlebars template such as
486
486
  `{{{ediProfile.isa01}}}` — the runtime fills the value from
487
- the profile at parse / generate time.
487
+ the profile at parse time.
488
+ - **Generation** — a definition an import generates a file with
489
+ writes each element's `value`: literal text, or a Handlebars
490
+ template filled from the record or the EDI profile. It doesn't
491
+ read `referenceValue`.
488
492
 
489
493
  **Required fields**
490
494
 
@@ -494,7 +498,9 @@ components:
494
498
  columns use `name` only and are read by position. When
495
499
  `value` is set it must be non-empty — the parser uses it as a
496
500
  literal match requirement (`ISA01`, `BEG03`, or the marker
497
- string).
501
+ string). Generation needs a `value` on every element: one
502
+ without it fails with `INVALID_FILE_DEFINITION` (`Every element
503
+ must provide a text or numerical "value" property.`).
498
504
  required:
499
505
  - name
500
506
  properties:
@@ -533,6 +539,12 @@ components:
533
539
  e.g. EDIFACT `UNH02` = `S009` or X12 composites split by
534
540
  the component separator) set `value` to an object with a
535
541
  `delimiter` and nested `elements`. See `CompositeValue`.
542
+
543
+ In a definition that generates a file, a string `value` is the
544
+ text written for the element: literal text, or a Handlebars
545
+ template filled from the record or the EDI profile
546
+ (`{{{[Purchase Order Number]}}}`,
547
+ `{{{ediProfile.controlNumber}}}`).
536
548
  oneOf:
537
549
  - title: literal
538
550
  type: string
@@ -573,7 +585,11 @@ components:
573
585
  Whether the parser should fail when this element is missing
574
586
  or blank. Defaults to false. EDI envelope qualifiers and
575
587
  transaction header fields (ISA/GS/ST elements) are
576
- conventionally marked required.
588
+ conventionally marked required. Generation enforces it only
589
+ on a rule that is itself `required: true`, in a definition
590
+ with `skipEDIValidation: false` and a `format` other than
591
+ `fixed`: an empty value fails with `mandatory_element_absent`.
592
+ Anywhere else an empty value isn't an error.
577
593
  examples:
578
594
  - true
579
595
  - false
@@ -605,9 +621,10 @@ components:
605
621
  those elements. Without it, a blank `isa02` comes out empty
606
622
  and an unpadded interchange id short, and Celigo's own parser
607
623
  refuses that ISA (`Mandatory element "ISA02" is not present`,
608
- `Min. length not met for the field "ISA06"`). A value longer
609
- than `maxLength` fails the generation (`Max. length not met
610
- for the field "<name>"`).
624
+ `Min. length not met for the field "ISA06"`). With
625
+ `skipEDIValidation: false`, in every format but `fixed`, a value
626
+ longer than `maxLength` fails the generation (`Max. length not
627
+ met for the field "<name>"`); otherwise it is written as it is.
611
628
  referenceValue:
612
629
  type: string
613
630
  description: |
@@ -615,7 +632,10 @@ components:
615
632
  runtime instead of being read from the file. Most common use
616
633
  is binding EDI envelope fields to the trading-partner
617
634
  profile, e.g. `{{{ediProfile.isa01}}}` or
618
- `{{{ediProfile.tpInterchangeId}}}`.
635
+ `{{{ediProfile.tpInterchangeId}}}`. Generation doesn't read
636
+ it: a definition that generates a file carries the template
637
+ in `value`, and an element with both is written as its
638
+ `value`.
619
639
 
620
640
  The linked EDI profile's fields resolve under
621
641
  `ediProfile.*`. X12 profiles: `isa01`, `isa02`, `isa03`,
@@ -787,8 +807,9 @@ components:
787
807
  - **Container rule** — sets `container: true`. A loop wrapper
788
808
  that produces no row of its own: a group `name`, a
789
809
  `maxOccurrence` above `1` and no `elements`, with the repeated
790
- row's rule under `children`. It is the only shape that repeats
791
- rows (see `container`).
810
+ row's rule under `children`. On parse it is the only shape
811
+ that repeats rows (see `container`); generation repeats a rule
812
+ from its own `maxOccurrence` (see `maxOccurrence`).
792
813
 
793
814
  **Envelopes and `closeRule`**
794
815
 
@@ -799,8 +820,8 @@ components:
799
820
  - The matching trailer lives on the opening rule's `closeRule`.
800
821
 
801
822
  `closeRule` accepts both an object (single trailer rule) and a
802
- one-element array of trailer rules; the parser treats them
803
- equivalently. In practice the **root** envelope (e.g. IEA / UNZ)
823
+ one-element array of trailer rules; the parser and the generator
824
+ treat them equivalently. In practice the **root** envelope (e.g. IEA / UNZ)
804
825
  is written as an object, and **inner** envelopes (e.g. GE / SE /
805
826
  UNE) are written as a one-element array — both shapes are valid
806
827
  against this schema.
@@ -857,14 +878,16 @@ components:
857
878
  - A one-element array of `Rule` objects (typical for inner
858
879
  envelopes, e.g. GE / SE / UNE).
859
880
 
860
- Both shapes are accepted by the parser; tooling that
861
- round-trips file definitions should preserve whichever shape
862
- the source document uses.
881
+ Both shapes are accepted by the parser and the generator, with
882
+ the same result; tooling that round-trips file definitions
883
+ should preserve whichever shape the source document uses.
863
884
 
864
885
  Put it on the rule that opens the envelope (ISA, GS, ST, UNB,
865
886
  UNH), never on a `container` wrapper. A container's close rule
866
887
  saves and parses without an error, but it consumes the row it
867
888
  names, so the rule meant to read that row comes back empty.
889
+ Generation writes a close rule after the children of the rule
890
+ that carries it, a `container` wrapper included.
868
891
 
869
892
  For non-EDI / non-loop rules `closeRule` is omitted.
870
893
  oneOf:
@@ -878,8 +901,8 @@ components:
878
901
  type: boolean
879
902
  description: |
880
903
  Marks this rule as a pure loop wrapper that does not emit a
881
- row of its own, and is the only way rows repeat: give the
882
- wrapper a group `name`, a `maxOccurrence` above `1` and no
904
+ row of its own, and on parse is the only way rows repeat: give
905
+ the wrapper a group `name`, a `maxOccurrence` above `1` and no
883
906
  `elements`, and put the repeated row's rule under its
884
907
  `children` (for EDI, the `ST` or `UNH` rule with its elements,
885
908
  children and `closeRule`). Parsed rows come back as an array
@@ -895,6 +918,9 @@ components:
895
918
  "SE" is missing on line: 6`). A rule outside any container
896
919
  matches one row the same way. Give the wrapper the most rows
897
920
  the file can hold, such as `1000`.
921
+
922
+ On generation a rule repeats from its own `maxOccurrence`,
923
+ whether or not it is a `container` (see `maxOccurrence`).
898
924
  default: false
899
925
  examples:
900
926
  - true
@@ -904,7 +930,7 @@ components:
904
930
  minimum: 1
905
931
  description: |
906
932
  Upper bound on how many times this rule may repeat at its
907
- current position. Rows repeat only under a `container`
933
+ current position. On parse rows repeat only under a `container`
908
934
  wrapper, so larger values such as `1000` go on the wrapper of
909
935
  an `ST` transaction set or a line-item loop; EDI envelopes use
910
936
  `1` (one ISA per file, one GS per group).
@@ -915,6 +941,15 @@ components:
915
941
  segment "<name>" is applicable only if it is a
916
942
  container/loop.` `0` is refused on save and on parse (`if
917
943
  present, maxOccurrence must be greater than or equal to 1`).
944
+
945
+ Generation reads it on the rule itself: a child rule is written
946
+ once per item of the array at its `relativeDataPath` only when
947
+ its `maxOccurrence` is above `1`, whether or not it is a
948
+ `container`. With `1`, or without the key, the row is built
949
+ once and elements that take their values from the array's
950
+ items come out empty, without an error; a row left with no
951
+ value after its first element is then written empty or left
952
+ out, as any such row is (see `required`).
918
953
  examples:
919
954
  - 1
920
955
  - 1000
@@ -925,6 +960,18 @@ components:
925
960
  true and the rule does not match, the parser raises a
926
961
  validation error. EDI envelope segments (ISA/GS/ST) are
927
962
  always required; optional summary segments are not.
963
+
964
+ Generation reads it differently. `false` leaves the rule's row
965
+ out, without an error, whenever no element after its first
966
+ produces a value. `true` doesn't force a row: where the
967
+ generator leaves such a row out anyway (`delimited/x12` and
968
+ `delimited/edifact` definitions with `version` `2`, and those
969
+ two and `delimited` with `skipEDIValidation: false`), a required
970
+ rule is left out the same way. With `skipEDIValidation: false`,
971
+ in every format but `fixed`, `true` does make the rule's
972
+ `required` elements mandatory (see `Element.required`). A rule
973
+ without the key writes its rows as with `true`, and its
974
+ `required` elements aren't enforced.
928
975
  examples:
929
976
  - true
930
977
  - false
@@ -1111,6 +1158,10 @@ components:
1111
1158
  the parent file definition document. A save doesn't parse a sample,
1112
1159
  so a tree that saves can still fail or drop rows when parsed; test
1113
1160
  it against a sample with `POST /v1/processors/structuredFileParser`.
1161
+ A definition an import generates a file with is tested the same
1162
+ way with `POST /v1/processors/structuredFileGenerator`, which
1163
+ reads the rules differently (see `Rule.maxOccurrence` and
1164
+ `Element.referenceValue`).
1114
1165
  items:
1115
1166
  $ref: '#/components/schemas/Rule'
1116
1167
  fixed:
@@ -1266,12 +1317,13 @@ components:
1266
1317
  EDI (X12 / EDIFACT) the root rule's `children` build the envelope → group → transaction →
1267
1318
  segment hierarchy.
1268
1319
  - |-
1269
- Rows repeat only under an elements-less `container: true` rule (a group `name`,
1320
+ On parse, rows repeat only under an elements-less `container: true` rule (a group `name`,
1270
1321
  `maxOccurrence` above 1, no `elements`) whose child rule carries the row's elements. A
1271
1322
  row-marker rule with no such container above it, or under a container whose
1272
1323
  `maxOccurrence` is 1 or unset, matches only the first row: in fixed-width and delimited
1273
1324
  files the parser drops the rest without an error, and an X12 parse fails at the next row,
1274
- naming a mandatory segment as missing.
1325
+ naming a mandatory segment as missing. A definition an import generates a file with
1326
+ repeats a rule from that rule's own `maxOccurrence` instead (see `Rule.maxOccurrence`).
1275
1327
  - |-
1276
1328
  Cloning an export that uses a file definition also creates a new file definition, with the
1277
1329
  same name, and points the cloned export at it: the export's clone preview lists it as a
@@ -870,15 +870,19 @@ paths:
870
870
  template that produces the text for that field. Literal text is
871
871
  output as written. A reference is replaced with a field of the
872
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}}`).
873
+ has no such field: a root rule that repeats is output once for
874
+ each object in `data` and reads that object (`{{firstName}}`),
875
+ while a root rule with no `maxOccurrence` is output once and reads
876
+ the whole array, so it reaches a record by index
877
+ (`{{0.firstName}}`). A child rule with a `relativeDataPath` and a
878
+ `maxOccurrence` above `1` is output once for each item of the
879
+ array at that path and reads that item.
877
880
 
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.
881
+ With `skipEDIValidation: false` in any `format` but `fixed`, a
882
+ `required` element on a `required` rule fails the request with
883
+ `mandatory_element_absent` when its template comes out empty. In a
884
+ `fixed` definition, with the flag absent or `true`, or on a rule
885
+ that isn't `required`, an empty value isn't an error.
882
886
 
883
887
  The `data` array carries the records those references read. The
884
888
  response has `mediaType: "text"` with the generated content as one
@@ -892,6 +896,53 @@ paths:
892
896
  `value`. This is a stateless transformation. File definition fields
893
897
  go directly in `rules` (no `fileDefinition` wrapper, unlike the
894
898
  parser endpoint).
899
+ x-celigo-ai-guidance:
900
+ - |-
901
+ A 200 with non-empty `data` doesn't show that a given rule wrote its row, so read
902
+ the returned content for the row you expect. A row with no value after its first
903
+ element (its only element is its tag, or its other templates come out empty) is
904
+ left out with no error in three cases: its rule is `required: false`; the
905
+ definition is `delimited/x12` or `delimited/edifact` with `version` `2`; or it is
906
+ `delimited`, `delimited/x12` or `delimited/edifact` with
907
+ `skipEDIValidation: false`. `required: true` on the rule doesn't keep the row in
908
+ the last two, but with `skipEDIValidation: false` it turns an empty
909
+ `required: true` element of the row into a 422 `mandatory_element_absent`.
910
+ - |-
911
+ In any other case such a row is written: a `delimited`, `delimited/x12` or
912
+ `delimited/edifact` row with its empty elements between delimiters, a `fixed`
913
+ row as padding. `skipEmptyEndColDelimiter: true` drops a delimited row's trailing
914
+ empty elements and leaves out a row whose elements are all empty.
915
+ - |-
916
+ A row is its elements joined by `colDelimiter` in order, ended with `rowSuffix`
917
+ (unless the rule sets `skipRowSuffix`) and `rowDelimiter`; an empty element in
918
+ the middle keeps its place. For a row whose text contains the delimiter itself,
919
+ such as the EDIFACT service string advice `UNA:+.? '` with `colDelimiter` `+`,
920
+ split at it: a rule of its own ahead of the interchange header rule, with a
921
+ first element `UNA:` and a second `.? `.
922
+ - |-
923
+ A child rule is written once per item of the array at its `relativeDataPath`
924
+ only when its `maxOccurrence` is above `1`, with or without `container: true`.
925
+ With `maxOccurrence` `1` or absent the row is built once and templates that name
926
+ the items' fields come out empty; a row that then has no value after its first
927
+ element is written empty or left out like any other such row.
928
+ - |-
929
+ `referenceValue` isn't read: bind an EDI profile field in `value` itself
930
+ (`{{{ediProfile.myInterchangeId}}}`). An element with a `referenceValue` and a
931
+ `value` such as `ISA06` is written as the text `ISA06`, and an element with no
932
+ `value` fails the request with `INVALID_FILE_DEFINITION`.
933
+ - |-
934
+ `closeRule` is written after the rule's children, wherever the rule sits, and a
935
+ single rule object and a one-element array produce the same content. Keep the
936
+ shape a definition already uses.
937
+ - |-
938
+ With `skipEDIValidation: false` in any `format` but `fixed`, a 422 on a value
939
+ names the element, not whether the record or a literal in the rule produced it:
940
+ `maxLength_not_met`, `minLength_not_met`, `datatype_mismatch`,
941
+ `value_not_present_in_enum`, and `mandatory_element_absent` for an empty
942
+ `required: true` element on a `required: true` rule, whether or not its row has
943
+ another value. Send a record that carries the fields before reading such a
944
+ failure as a defect in the rules. With the flag absent or `true` the same values
945
+ are written as they are, and a `fixed` definition returns none of these codes.
895
946
  requestBody:
896
947
  required: true
897
948
  content:
@@ -906,7 +957,7 @@ paths:
906
957
  type: array
907
958
  description: |-
908
959
  Records read by the Handlebars references in element
909
- `value`s. A rule that repeats outputs its rows once for
960
+ `value`s. A root rule that repeats outputs its rows once for
910
961
  each object in the array, with that object as the context
911
962
  for its elements and child rules. A root rule with no
912
963
  `maxOccurrence` outputs one row with the whole array as
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@celigo/api-specs",
3
- "version": "0.2.313",
3
+ "version": "0.2.314",
4
4
  "private": false,
5
5
  "description": "Public OpenAPI bundles (dist/) and the celigo-cli lint schema pack (schemas.json).",
6
6
  "keywords": [
package/schemas.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "provenance": {
3
3
  "repo": "celigo/integrator-api-specs",
4
- "iasCommit": "f6578f95",
5
- "generatedAt": "2026-11-18"
4
+ "iasCommit": "508d6a0a",
5
+ "generatedAt": "2026-11-19"
6
6
  },
7
7
  "roots": {
8
8
  "aiagent": 130,