Add query parameters section to creating data services documentation#2176
Add query parameters section to creating data services documentation#2176
Conversation
Added instructions for adding query parameters to a data service resource, including steps and an example SQL query.
WalkthroughA 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
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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
📒 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 |
There was a problem hiding this comment.
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**. |
There was a problem hiding this comment.
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.
| 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: |
There was a problem hiding this comment.
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=Engineeringor 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 |
There was a problem hiding this comment.
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.
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: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
Security checks
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