Skip to content

Align EDI docs with the envelope-aware module and tool#551

Open
niveathika wants to merge 6 commits into
wso2:mainfrom
niveathika:edi-docs-rewrite
Open

Align EDI docs with the envelope-aware module and tool#551
niveathika wants to merge 6 commits into
wso2:mainfrom
niveathika:edi-docs-rewrite

Conversation

@niveathika

@niveathika niveathika commented Jun 22, 2026

Copy link
Copy Markdown
Member

Updates the EDI documentation to reflect the envelope-aware ballerina/edi API (v1.6.0) and the matching bal edi codegen.

Reference / EDI

  • State the module version (v1.6.0).
  • Expand the Functions table with the header/envelope API: interchangeFromEdiString, interchangeToEdiString, headersFromEdiString/headersFromEdiFile, and the schema-free x12Headers* / edifactHeaders* peeks.
  • Add a fail-safe interchange-parsing example.

Tools / EDI Tool

  • Document the envelope-aware functions codegen emits for X12/EDIFACT schemas (headersFromEdiString, interchangeFromEdiString, interchangeToEdiString) and the <Name>Interchange wrapper records.

Develop / EDI Processing

  • Add a callout pointing to the prebuilt EDIFACT D03A packages as the zero-code path.

Docs-only; no nav changes.

Summary by CodeRabbit

Release Notes

  • Documentation
    • Enhanced EDIFACT code generation guidance with clearer examples and envelope-aware parsing information
    • Expanded EDI processing documentation with improved code examples and setup workflows
    • Added instructions for using prebuilt EDI packages
    • Improved documentation patterns for EDI file handling and full interchange parsing

- Reference/EDI: add the module version, the header/envelope functions
  (interchangeFromEdiString, headers*, x12/edifact header peeks) to the
  Functions table, and a fail-safe interchange-parsing example.
- Tools/EDI Tool: document the envelope-aware generated functions.
- Develop/EDI: add a callout for the prebuilt EDIFACT D03A packages.
@coderabbitai

coderabbitai Bot commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@niveathika, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 48 minutes and 19 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more credits in the billing tab to continue.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 8757395e-2e50-4a0b-99e2-56ed983063da

📥 Commits

Reviewing files that changed from the base of the PR and between 0c30144 and 8e1c269.

📒 Files selected for processing (2)
  • en/docs/develop/transform/edi.md
  • en/docs/reference/data-formats/edi.md
📝 Walkthrough

Walkthrough

Documentation updates across three EDI-related pages: edi-tool.md corrects codegen output paths to orders.bal and adds an envelope-aware codegen note; edi.md adds EDIFACT D03A callout, a new EDIFACT ORDERS code-generation workflow, condenses the X12 section, adds an ESL-first note, and adds an interchange parsing subsection; reference/edi.md adds io imports, pins ballerina/edi to v1.6.0, and expands the interchange parsing section with fail-safe transaction handling and new API entries.

Changes

EDI Documentation Updates

Layer / File(s) Summary
edi-tool.md: codegen output paths and envelope-aware note
en/docs/develop/tools/integration-tools/edi-tool.md
EDIFACT, X12, and custom-schema codegen examples now show orders.bal as the output target. A new note documents that schemas with an envelope definition cause codegen to emit additional header/interchange parsing functions and typed wrapper record types.
edi.md: ESL intro, EDIFACT/X12 code-generation workflow, ESL-first note
en/docs/develop/transform/edi.md
ESL introductory text is reworded and a callout about prebuilt EDIFACT D03A packages is added. A new EDIFACT ORDERS workflow covers convertEdifactSchema, JSON schema output location, library UI setup, and generated artifacts. The X12 section now points to the CLI flag reference instead of listing flags inline. A note instructs ESL users to run convertESL before codegen.
Interchange parsing with interchangeFromEdiString
en/docs/develop/transform/edi.md, en/docs/reference/data-formats/edi.md
A new "Parsing the full interchange" subsection in the transform guide demonstrates interchangeFromEdiString with per-transaction quarantine/continue error handling and mentions headersFromEdiString. The reference page expands the same section with a fail-safe txn.body is error code example and extends the functions table with interchangeFromEdiString and interchangeToEdiString.
reference/edi.md: io import, version pin, prebuilt snippet fix
en/docs/reference/data-formats/edi.md
Both prebuilt EDIFACT usage snippets add a ballerina/io import and replace inline EDI strings with check io:fileReadString(...). The Module section pins ballerina/edi to v1.6.0.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐇 Hoppin' through the EDI trail,
Paths now shorter, none shall fail,
orders.bal — how neat and trim!
Envelopes parsed on every whim.
The interchange unwraps with care,
A tidy doc beyond compare! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: updating EDI documentation to align with the envelope-aware module and tool features.
Description check ✅ Passed The PR description provides clear subsections (Reference/EDI, Tools/EDI Tool, Develop/EDI Processing) with specific details about what was updated, though it deviates from the repository's formal template structure.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

Broken links, images & orphan pages

Passing — no broken links or images found.

Links/images come from one crawl of the production build (baseUrl-aware). Orphans are docs not referenced by sidebars.ts.

Summary

  • Broken links & images — total 0 · 🆕 introduced 0 · 📄 already on main 0
  • Orphan pages — total 8 · 🆕 introduced 0 · 📄 already on main 8

Broken links & images

Introduced by this PR

No new broken link(s)/image(s) introduced by this PR. ✅

Already on main — 0 total

None.

Orphan pages

Introduced by this PR

No new orphan page(s) introduced by this PR. ✅

Already on main — 8 total

Already present on the base branch (not caused by this PR):

Show 8
  • docs/deploy-operate/observe/datadog-integration
  • docs/deploy-operate/observe/elastic-stack-elk
  • docs/deploy-operate/observe/metrics-prometheus-grafana
  • docs/deploy-operate/observe/opensearch-integration
  • docs/deploy-operate/observe/recipe-elk-stack
  • docs/deploy-operate/observe/recipe-kubernetes-production
  • docs/deploy-operate/observe/recipe-local-development
  • docs/deploy-operate/observe/recipe-opensearch-setup

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the EDI documentation to match the envelope-aware ballerina/edi API (v1.6.0) and the corresponding bal edi codegen outputs, including new header/interchange parsing workflows.

Changes:

  • State the ballerina/edi module version and expand the EDI function reference to include envelope/header APIs.
  • Add a full-interchange parsing example that demonstrates fail-safe per-transaction body handling.
  • Add guidance pointing users to prebuilt EDIFACT D03A packages as a zero-code path, and document the envelope-aware functions emitted by bal edi codegen.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
en/docs/reference/data-formats/edi.md Adds module version, a full interchange parsing example, and expands the functions table for envelope/header APIs.
en/docs/develop/transform/edi.md Adds an info callout recommending prebuilt EDIFACT D03A packages and linking to the reference section.
en/docs/develop/tools/integration-tools/edi-tool.md Documents additional envelope-aware functions and wrapper record types emitted by codegen.

Comment thread en/docs/reference/data-formats/edi.md Outdated
Comment thread en/docs/reference/data-formats/edi.md Outdated
- Reference: move getSchema to the last row of the Functions table.
- EDI Tool: generate codegen output into the default module (-o
  orders.bal) and mention the Ballerina workspace concept.
- Correct prebuilt package type name (EDI_INVOIC_Invoice_message) and add the
  missing ballerina/io import in the examples.
- Fix ESL: EDI Schema Language, not Electronic Shelf Labeling.
- Reorganize code-generation sections as EDIFACT -> X12 -> ESL/custom.
- Rename 'ESL or custom schema' section to 'custom schema'; reference ESL
  as a conversion path within it.
- Add a 'Parsing the full interchange' example using interchangeFromEdiString
  (fail-safe bodies) and note headersFromEdiString for header-only routing.
- codegen reads <output-dir>/ORDERS.json from convertEdifactSchema.
- 'interchange headers' -> 'envelope headers' (the listed segments span
  interchange, group, and message levels).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread en/docs/reference/data-formats/edi.md Outdated
Comment thread en/docs/develop/transform/edi.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants