Skip to content

Add docs for the freemarker templates - #601

Open
Nuvindu wants to merge 7 commits into
wso2:mainfrom
Nuvindu:freemarker-docs
Open

Add docs for the freemarker templates#601
Nuvindu wants to merge 7 commits into
wso2:mainfrom
Nuvindu:freemarker-docs

Conversation

@Nuvindu

@Nuvindu Nuvindu commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Purpose

Fixes: wso2/product-integrator#1971

Summary by CodeRabbit

  • Documentation
    • Added comprehensive FreeMarker template-rendering documentation, including file-based and inline rendering examples.
    • Covered conditionals, iteration, nested data, formatting, HTML escaping, nullable fields, and error handling.
    • Added the FreeMarker guide to the Develop → Transform documentation navigation.
Screenshot 2026-07-30 at 08 58 58
Screenshot 2026-07-30 at 08 59 14

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@Nuvindu, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

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 reviews.

How do review limits work?

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

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 1e4026d5-5ba6-428e-a427-5ede5dbe2b80

📥 Commits

Reviewing files that changed from the base of the PR and between b9f2921 and 9b2752d.

⛔ Files ignored due to path filters (6)
  • en/static/img/develop/transform/freemarker/freemarker-file-read-json.png is excluded by !**/*.png
  • en/static/img/develop/transform/freemarker/freemarker-json-variable.png is excluded by !**/*.png
  • en/static/img/develop/transform/freemarker/freemarker-print-inline-result.png is excluded by !**/*.png
  • en/static/img/develop/transform/freemarker/freemarker-print-result.png is excluded by !**/*.png
  • en/static/img/develop/transform/freemarker/freemarker-render-from-file.png is excluded by !**/*.png
  • en/static/img/develop/transform/freemarker/freemarker-render-inline.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • en/docs/develop/transform/freemarker.md
  • en/sidebars.ts
📝 Walkthrough

Walkthrough

Adds a FreeMarker template-rendering documentation page and links it from the Develop → Transform sidebar. The page covers file-based and inline rendering, template syntax, data access, formatting, escaping, nullable fields, and error handling.

Changes

FreeMarker documentation

Layer / File(s) Summary
FreeMarker rendering workflows and navigation
en/docs/develop/transform/freemarker.md, en/sidebars.ts
Documents file-based and inline FreeMarker rendering with Visual Designer and Ballerina examples. Adds the page to the Transform sidebar.
Template syntax and data handling
en/docs/develop/transform/freemarker.md
Documents conditionals, iteration, field access, nested data, formatting, HTML escaping, nullable fields, and freemarker:Error handling.
Related FreeMarker resources
en/docs/develop/transform/freemarker.md
Links to the FreeMarker API, PDF processing, and HTTP service documentation.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: rosensilva, anupama-pathirage, kavinduzoysa, nipunaranasinghe

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes the purpose and issue link, but it omits most required sections, including goals, approach, testing, security, and release details. Complete the required template sections, or mark non-applicable sections with a brief explanation.
Linked Issues check ⚠️ Warning The PR adds comprehensive FreeMarker documentation, but no evidence shows that the FreeMarker library APIs were indexed for visualization as required by issue #1971. Add the required API indexing changes or explain how they are delivered by another linked PR.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the primary change: adding FreeMarker template documentation.
Out of Scope Changes check ✅ Passed The documentation page and sidebar entry are directly related to the FreeMarker template support objective in issue #1971.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ 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 Jul 23, 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

@Nuvindu
Nuvindu marked this pull request as ready for review July 29, 2026 18:41

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@en/docs/develop/transform/freemarker.md`:
- Around line 14-16: Update the “Rendering from a file” guidance around
freemarker:renderFromFile to describe disk templates as trusted,
operator-managed server-side code; remove the suggestion that non-developers can
freely edit them and explicitly state that user-supplied template source is
prohibited.
- Around line 25-32: Add ftl to the themeConfig.prism.additionalLanguages list
in docusaurus.config.ts, preserving the existing registered languages. This
enables syntax highlighting for the FreeMarker fences used throughout
freemarker.md.
- Around line 196-204: Add a best-practice entry near the existing formatting
and nullable-field guidance explaining that interpolated untrusted values must
be HTML-escaped with the ?html built-in, or that templates should use an HTML
output format via .ftlh or output_format="HTML". Clarify that render and
renderFromFile otherwise use FreeMarker’s undefined output format and do not
escape values automatically.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: d1c0080b-1813-4ec1-b57e-27176ec3e9b1

📥 Commits

Reviewing files that changed from the base of the PR and between 0e8e2a6 and 24e9d9d.

⛔ Files ignored due to path filters (6)
  • en/static/img/develop/transform/freemarker/freemarker-file-read-json.png is excluded by !**/*.png
  • en/static/img/develop/transform/freemarker/freemarker-json-variable.png is excluded by !**/*.png
  • en/static/img/develop/transform/freemarker/freemarker-print-inline-result.png is excluded by !**/*.png
  • en/static/img/develop/transform/freemarker/freemarker-print-result.png is excluded by !**/*.png
  • en/static/img/develop/transform/freemarker/freemarker-render-from-file.png is excluded by !**/*.png
  • en/static/img/develop/transform/freemarker/freemarker-render-inline.png is excluded by !**/*.png
📒 Files selected for processing (2)
  • en/docs/develop/transform/freemarker.md
  • en/sidebars.ts

Comment thread en/docs/develop/transform/freemarker.md Outdated
Comment thread en/docs/develop/transform/freemarker.md
Comment thread en/docs/develop/transform/freemarker.md
Comment thread en/docs/develop/transform/freemarker.md Outdated

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@en/docs/develop/transform/freemarker.md`:
- Around line 3-4: Update the frontmatter title and corresponding H1 for the
Template Rendering page to include “FreeMarker” while retaining the concise
freemarker URL slug and existing transform path.
- Line 16: Update the documentation text around freemarker:renderFromFile to
avoid claiming JSON separates content from presentation logic entirely; state
that the JSON file separates input data from the template or keeps business
logic outside it, while preserving the existing security guidance.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: a17d9c5e-65e4-4ba2-9b84-50d747eeaa71

📥 Commits

Reviewing files that changed from the base of the PR and between 07e903a and c0515c8.

📒 Files selected for processing (1)
  • en/docs/develop/transform/freemarker.md

Comment thread en/docs/develop/transform/freemarker.md
Comment thread en/docs/develop/transform/freemarker.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.

Add support for FreeMarker templates

2 participants