Skip to content

Add query parameters section to creating data services documentation#2176

Open
sanavi-nk wants to merge 1 commit intowso2:mainfrom
sanavi-nk:sanavi-nk-patch-1
Open

Add query parameters section to creating data services documentation#2176
sanavi-nk wants to merge 1 commit intowso2:mainfrom
sanavi-nk:sanavi-nk-patch-1

Conversation

@sanavi-nk
Copy link
Copy Markdown

@sanavi-nk sanavi-nk commented Apr 12, 2026

Purpose

Resolves #1635 — The "Add a Resource" section in the creating data services
documentation was missing guidance on how to add query parameters to a
data service resource.

Goals

Add a clear, step-by-step section explaining how to configure query parameters
for a data service resource using the MI for VS Code extension.

Approach

Added a new "Add query parameters to a resource" subsection under the
"Add a resource" section in creating-data-services.md. The section includes:

  • Step-by-step instructions using the current VS Code extension UI
  • An example SQL query using a named variable
  • An example input mapping table showing QUERY parameter type
  • A note distinguishing query parameters from path parameters
  • A sample curl/URL invocation example

User stories

As a developer using WSO2 Integrator: MI, I want to understand how to add
query parameters to a data service resource so that I can filter data via
URL query strings.

Release note

N/A — documentation fix only.

Documentation

This PR is itself the documentation change.

Training

N/A

Certification

N/A — minor documentation addition with no impact on certification exams.

Marketing

N/A

Automation tests

  • Unit tests: N/A — documentation only
  • Integration tests: N/A — documentation only

Security checks

  • Followed secure coding standards: yes
  • Ran FindSecurityBugs plugin: N/A — documentation only
  • Confirmed no secrets committed: yes

Samples

N/A

Related PRs

N/A

Migrations

N/A

Test environment

N/A — documentation only

Learning

Referred to the existing tutorial at
https://mi.docs.wso2.com/en/latest/learn/integration-tutorials/sending-a-simple-message-to-a-datasource/
for UI flow consistency and terminology used in the VS Code extension.

Summary by CodeRabbit

  • Documentation
    • Added comprehensive guide on configuring and adding query parameters to REST data service resources. Includes step-by-step instructions for defining SQL queries with named variables, creating input parameters, mapping parameter configurations, and enabling dynamic resource invocation through URL query parameters.

Added instructions for adding query parameters to a data service resource, including steps and an example SQL query.
@sanavi-nk sanavi-nk requested a review from rosensilva as a code owner April 12, 2026 12:57
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 12, 2026

CLA assistant check
All committers have signed the CLA.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 12, 2026

Walkthrough

A new documentation section was added to the data services guide describing how to configure REST resource query parameters through SQL query variables, input parameter mapping, and URL invocation. A trailing newline was also appended to the file.

Changes

Cohort / File(s) Summary
Documentation
en/docs/develop/creating-artifacts/data-services/creating-data-services.md
Added instructional section "Add query parameters to a resource" with steps for configuring query parameters, parameter types, and SQL type mappings for REST resource invocation.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

🐰 A hop through the docs, so clear and so neat,
Query parameters now make REST queries complete!
With SQL variables and mappings aligned,
Our resources fetch data so precisely designed! ✨

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The PR does not address the linked issue #1635's core objective of replacing old XPath/jsonpath expressions with new Synapse expressions; instead, it adds documentation about query parameters. Review whether this PR correctly resolves issue #1635, or if the issue link is incorrect. The PR content focuses on query parameter documentation, not expression syntax updates.
Out of Scope Changes check ⚠️ Warning The PR's documentation addition about query parameters appears out of scope relative to the linked issue #1635, which targets updating expression syntax references, not adding new sections on query parameters. Clarify the relationship between the query parameter documentation addition and the expression syntax update requirements in issue #1635, or verify the correct linked issue.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: adding a section about query parameters to the creating data services documentation.
Description check ✅ Passed The PR description follows the required template with all major sections completed, including purpose, goals, approach, user stories, and appropriate N/A entries for documentation-only changes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ 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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@en/docs/develop/creating-artifacts/data-services/creating-data-services.md`:
- Line 362: The documentation contains an incomplete sentence "For more
information" in creating-data-services.md; either complete it by appending a
specific resource (e.g., linking to a relevant guide, API reference, or
tutorial) or remove the fragment entirely; update the line that currently reads
"For more information" so it becomes a full sentence with a URL or reference
text, or delete it if it was added accidentally.
- Line 127: Add a concrete invocation example immediately after the sentence
"The resource can now be invoked with a query parameter:" showing both a curl
command and a browser URL; for example demonstrate calling the service endpoint
/services/YourDataService/resource with the query parameter
dept_name=Engineering (e.g., curl
http://localhost:8290/services/YourDataService/resource?dept_name=Engineering
and the equivalent browser URL
http://localhost:8290/services/YourDataService/resource?dept_name=Engineering)
so readers see a runnable example.
- Line 105: Replace the inconsistent term "Data Service Designer" with the
canonical UI name "Service Designer" in this sentence (the string "In the **Data
Service Designer**, click the resource you created under **Resources**.") so it
matches other occurrences (e.g., "Service Designer" used elsewhere); ensure any
other instances of "Data Service Designer" in this document are updated to
"Service Designer" for consistent UI terminology.
- Line 98: The "Add query parameters to a resource" heading currently uses level
2 ("## Add query parameters to a resource") but should be a subsection under
"Add a resource"; change that heading to level 4 by replacing the leading "##"
with "####" so it becomes "#### Add query parameters to a resource" to match the
document hierarchy.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f0ec2395-eb6c-461e-9c51-d4f0f57e0265

📥 Commits

Reviewing files that changed from the base of the PR and between d623323 and 3e1b517.

📒 Files selected for processing (1)
  • en/docs/develop/creating-artifacts/data-services/creating-data-services.md


<a href="{{base_path}}/assets/img/integrate/tutorials/data_services/resource-graphical-view.png" class="glightbox"><img src="{{base_path}}/assets/img/integrate/tutorials/data_services/resource-graphical-view.png" width="80%"></a>

## Add query parameters to a resource
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.

⚠️ Potential issue | 🟡 Minor

Fix heading level to match document structure.

This section uses ## (level 2), making it equivalent to "Tutorials" and "Examples". However, according to the PR description, this should be a subsection under "Add a resource" (which uses ###). Use #### to create a proper subsection hierarchy.

📝 Proposed fix for heading level
-## Add query parameters to a resource
+#### Add query parameters to a resource
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@en/docs/develop/creating-artifacts/data-services/creating-data-services.md`
at line 98, The "Add query parameters to a resource" heading currently uses
level 2 ("## Add query parameters to a resource") but should be a subsection
under "Add a resource"; change that heading to level 4 by replacing the leading
"##" with "####" so it becomes "#### Add query parameters to a resource" to
match the document hierarchy.


Follow the steps below to add a query parameter to a data service resource.

1. In the **Data Service Designer**, click the resource you created under **Resources**.
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.

⚠️ Potential issue | 🟡 Minor

Inconsistent UI terminology.

This line references "Data Service Designer", but the same UI component is called "Service Designer" elsewhere in the document (lines 33, 90). Use consistent terminology throughout.

📝 Proposed fix for terminology consistency
-1. In the **Data Service Designer**, click the resource you created under **Resources**.
+1. In the **Service Designer**, click the resource you created under **Resources**.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
1. In the **Data Service Designer**, click the resource you created under **Resources**.
1. In the **Service Designer**, click the resource you created under **Resources**.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@en/docs/develop/creating-artifacts/data-services/creating-data-services.md`
at line 105, Replace the inconsistent term "Data Service Designer" with the
canonical UI name "Service Designer" in this sentence (the string "In the **Data
Service Designer**, click the resource you created under **Resources**.") so it
matches other occurrences (e.g., "Service Designer" used elsewhere); ensure any
other instances of "Data Service Designer" in this document are updated to
"Service Designer" for consistent UI terminology.


6. Click **Save** to save the input mapping, then click **Submit** to apply.

The resource can now be invoked with a query parameter:
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.

⚠️ Potential issue | 🟡 Minor

Missing invocation example.

Line 127 states "The resource can now be invoked with a query parameter:" but no example follows. The PR description mentions including "A sample curl/URL invocation example." Provide the promised example.

📝 Suggested addition

Add an example after line 127, such as:

```bash
curl http://localhost:8290/services/YourDataService/resource?dept_name=Engineering

or invoke via browser:

http://localhost:8290/services/YourDataService/resource?dept_name=Engineering

</details>

<details>
<summary>🤖 Prompt for AI Agents</summary>

Verify each finding against the current code and only fix it if needed.

In @en/docs/develop/creating-artifacts/data-services/creating-data-services.md
at line 127, Add a concrete invocation example immediately after the sentence
"The resource can now be invoked with a query parameter:" showing both a curl
command and a browser URL; for example demonstrate calling the service endpoint
/services/YourDataService/resource with the query parameter
dept_name=Engineering (e.g., curl
http://localhost:8290/services/YourDataService/resource?dept_name=Engineering
and the equivalent browser URL
http://localhost:8290/services/YourDataService/resource?dept_name=Engineering)
so readers see a runnable example.


</details>

<!-- fingerprinting:phantom:triton:puma:ef323996-04b0-40f1-99ff-0caeca9f6aa9 -->

<!-- This is an auto-generated comment by CodeRabbit -->

2. In the **Samples** tab, go to the **REST Data Service** and click on **Download**. This will download the project to your chosen directory and open it in a new VS Code window.

For more information No newline at end of file
For more information
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.

⚠️ Potential issue | 🟡 Minor

Incomplete documentation text.

Line 362 contains "For more information" without completion. Either complete this sentence with a relevant link or reference, or remove it if added unintentionally.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@en/docs/develop/creating-artifacts/data-services/creating-data-services.md`
at line 362, The documentation contains an incomplete sentence "For more
information" in creating-data-services.md; either complete it by appending a
specific resource (e.g., linking to a relevant guide, API reference, or
tutorial) or remove the fragment entirely; update the line that currently reads
"For more information" so it becomes a full sentence with a URL or reference
text, or delete it if it was added accidentally.

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.

Replace old xpath/jsonpath expressions with new Synapse expressions

2 participants