Skip to content

Correct the Type Diagram Content#190

Open
samithkavishke wants to merge 2 commits intowso2:mainfrom
samithkavishke:other_artifacts
Open

Correct the Type Diagram Content#190
samithkavishke wants to merge 2 commits intowso2:mainfrom
samithkavishke:other_artifacts

Conversation

@samithkavishke
Copy link
Copy Markdown
Contributor

@samithkavishke samithkavishke commented Apr 28, 2026

Purpose

Fixes the type diagram content

Goals

Describe the solutions that this feature/fix will introduce to resolve the problems described above

Approach

Describe how you are implementing the solutions. Include an animated GIF or screenshot if the change affects the UI (email documentation@wso2.com to review all UI text). Include a link to a Markdown file or Google doc if the feature write-up is too long to paste here.

User stories

Summary of user stories addressed by this change>

Release note

Brief description of the new feature or bug fix as it will appear in the release notes

Documentation

Link(s) to product documentation that addresses the changes of this PR. If no doc impact, enter �N/A� plus brief explanation of why there�s no doc impact

Training

Link to the PR for changes to the training content in https://github.com/wso2/WSO2-Training, if applicable

Certification

Type �Sent� when you have provided new/updated certification questions, plus four answers for each question (correct answer highlighted in bold), based on this change. Certification questions/answers should be sent to certification@wso2.com and NOT pasted in this PR. If there is no impact on certification exams, type �N/A� and explain why.

Marketing

Link to drafts of marketing content that will describe and promote this feature, including product page changes, technical articles, blog posts, videos, etc., if applicable

Automation tests

  • Unit tests

    Code coverage information

  • Integration tests

    Details about the test cases and coverage

Security checks

Samples

Provide high-level details about the samples related to this feature

Related PRs

List any other related PRs

Migrations (if applicable)

Describe migration steps and platforms on which migration has been tested

Test environment

List all JDK versions, operating systems, databases, and browser/versions on which this feature/fix was tested

Learning

Describe the research phase and any blog posts, patterns, libraries, or add-ons you used to solve the problem.

Summary by CodeRabbit

  • Documentation
    • Updated type guidance to align with the visual designer: Record, Enum, Service Class, Union, and Array now have expanded explanations, examples, and per-kind editing controls (including field-level options and advanced flags).
    • Removed Table docs; added Array examples and options.
    • Added Map guidance explaining designer limitations and recommending record-based modeling.
    • Revised best practices for readonly, open/closed records, and using records over maps.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 28, 2026

Note

.coderabbit.yaml has unrecognized properties

CodeRabbit is using all valid settings from your configuration. Unrecognized properties (listed below) have been ignored and may indicate typos or deprecated fields that can be removed.

⚠️ Parsing warnings (1)
Validation error: Unrecognized key(s) in object: 'path_instructions'
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • You can also validate your configuration using the online YAML validator.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
📝 Walkthrough

Walkthrough

Documentation updated to align type-kind coverage with the visual designer: types now include Record, Enum, Service Class, Union, and Array; Tables removed. Record/field-level controls, service resource methods, array options, map-to-record guidance, and revised best practices were added.

Changes

Cohort / File(s) Summary
Documentation: types guide
en/docs/develop/integration-artifacts/supporting/types.md
Rewrote the types documentation to match the visual designer: replaced Table with Array; documented Record field-level controls (inline/optional/default/description/readonly, open/closed, readonly wrapper, public), Enum member expressions, new Service Class workflows (resource methods, class vars, Implement flow), Union options, Array member type/length/readonly/public, Map types guidance, and updated best practices.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I nibble notes on Record and Enum, bright—
I hop through Service Classes, methods in sight.
Arrays stretch long, Unions branch and play,
Maps tuck into Records, and Tables run away.
Hooray for types, I thump and say: hooray!

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description contains only the 'Purpose' section filled with minimal content ('Fixes the type diagram content'), while all other required sections remain as empty placeholders without substantive information. Complete all required sections including Goals, Approach, User stories, Release note, Documentation, and others. Provide actual content instead of placeholder text or N/A explanations where applicable.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Correct the Type Diagram Content' is directly related to the changeset, which updates documentation to align type-kind coverage with the visual designer and corrects type diagram content.
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 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: 2

🧹 Nitpick comments (1)
en/docs/develop/integration-artifacts/supporting/types.md (1)

201-201: Use a more descriptive example for the resource path/name.

The example name1 is generic and doesn't illustrate best practices. Consider using a domain-specific example like products, orders, or users to better demonstrate typical resource naming.

📝 Proposed improvement
-| **Name** | The resource path/name (for example, `name1`). |
+| **Name** | The resource path/name (for example, `products`). |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@en/docs/develop/integration-artifacts/supporting/types.md` at line 201,
Replace the generic example `name1` used for "The resource path/name" with a
domain-specific, descriptive example such as `products`, `orders`, or `users` so
readers see a realistic resource-name convention; update the table cell that
currently contains `name1` (the "**Name** | The resource path/name (for example,
`name1`)." entry) to use one of these concrete examples or list a couple of them
separated by commas.
🤖 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/integration-artifacts/supporting/types.md`:
- Around line 208-215: The text currently refers to the editing panel as "Edit
Type: Object" but elsewhere and for this kind of type it should be "Edit Type:
Service Class"; update the phrase "Edit Type: Object" to "Edit Type: Service
Class" in the paragraph describing the service class editing panel (the line
containing the control list and the reference to "Implement" / "Service Class
Designer") so the panel title matches the documented type kind and the "Service
Class Designer" wording.
- Line 226: The markdown table cell containing the example return type
"string|error" is being parsed as a pipe delimiter; update the inline code to
escape the pipe so the linter treats it as literal (replace the example
`string|error` with an escaped-pipe version such as using backticks with the
pipe escaped inside the inline code). Locate the table row with "**Field Type**
| The return type (for example, `string|error`)." and change the inline code
example accordingly to silence the linter.

---

Nitpick comments:
In `@en/docs/develop/integration-artifacts/supporting/types.md`:
- Line 201: Replace the generic example `name1` used for "The resource
path/name" with a domain-specific, descriptive example such as `products`,
`orders`, or `users` so readers see a realistic resource-name convention; update
the table cell that currently contains `name1` (the "**Name** | The resource
path/name (for example, `name1`)." entry) to use one of these concrete examples
or list a couple of them separated by commas.
🪄 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

Run ID: e572cd04-d04b-40a9-9b91-e6b84e3edc9a

📥 Commits

Reviewing files that changed from the base of the PR and between 0acf05b and daf6a7d.

⛔ Files ignored due to path filters (4)
  • en/static/img/develop/integration-artifacts/supporting/types/service-class-designer.png is excluded by !**/*.png
  • en/static/img/develop/integration-artifacts/supporting/types/step-1.png is excluded by !**/*.png
  • en/static/img/develop/integration-artifacts/supporting/types/step-2.png is excluded by !**/*.png
  • en/static/img/develop/integration-artifacts/supporting/types/step-3.png is excluded by !**/*.png
📒 Files selected for processing (1)
  • en/docs/develop/integration-artifacts/supporting/types.md

Comment thread en/docs/develop/integration-artifacts/supporting/types.md Outdated
Comment thread en/docs/develop/integration-artifacts/supporting/types.md Outdated
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: 1

🧹 Nitpick comments (1)
en/docs/develop/integration-artifacts/supporting/types.md (1)

186-217: Minor doc consistency: normalize “Service Class” casing + clarify “Edit a field”.

  • The section heading is ### Service class but elsewhere you consistently use Service Class (title-casing). This is minor but creates avoidable inconsistency.
  • #### Edit a field (within the Service class flow) is slightly ambiguous—these “fields” are actually resource methods/method fields in the UI designer context. Consider renaming to something like “Edit a resource method” for clarity.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@en/docs/develop/integration-artifacts/supporting/types.md` around lines 186 -
217, Normalize the heading casing and clarify the ambiguous subheading: change
the section heading "### Service class" to title case "### Service Class" to
match other occurrences, and rename the subheading "#### Edit a field" to
something explicit like "#### Edit a resource method" (or "Edit a resource
method/field") so it's clear these fields are resource methods in the Service
Class UI; update any matching references in this block (the "Service class"
block including the Create/Edit descriptions and the "Edit the service class"
section) to maintain consistency.
🤖 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/integration-artifacts/supporting/types.md`:
- Around line 223-227: Replace the backslash-escaped pipe inside the inline code
example for the "Field Type" cell: locate the table row containing "**Field
Type**" and the example `string\|error` and change the inline code to use the
HTML entity for pipe (e.g., `string|error`) so the pipe displays correctly
without a visible backslash.

---

Nitpick comments:
In `@en/docs/develop/integration-artifacts/supporting/types.md`:
- Around line 186-217: Normalize the heading casing and clarify the ambiguous
subheading: change the section heading "### Service class" to title case "###
Service Class" to match other occurrences, and rename the subheading "#### Edit
a field" to something explicit like "#### Edit a resource method" (or "Edit a
resource method/field") so it's clear these fields are resource methods in the
Service Class UI; update any matching references in this block (the "Service
class" block including the Create/Edit descriptions and the "Edit the service
class" section) to maintain consistency.
🪄 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

Run ID: 80adee1a-64ff-4e7e-b110-2e1aac00ec91

📥 Commits

Reviewing files that changed from the base of the PR and between daf6a7d and 6afb42e.

📒 Files selected for processing (1)
  • en/docs/develop/integration-artifacts/supporting/types.md

Comment on lines +223 to +227
| **Field Name** | The resource path/name. |
| **Description** | Documentation for the field. |
| **Arguments** | Use **+ Add Argument** to define input parameters for the resource method. |
| **Field Type** | The return type (for example, `string\|error`). |

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

🧩 Analysis chain

🏁 Script executed:

# Check if the file exists and examine the content around lines 223-227
if [ -f "en/docs/develop/integration-artifacts/supporting/types.md" ]; then
  echo "=== File found. Content at lines 223-227 ==="
  sed -n '223,227p' "en/docs/develop/integration-artifacts/supporting/types.md" | cat -n
  echo ""
  echo "=== Broader context (lines 215-235) ==="
  sed -n '215,235p' "en/docs/develop/integration-artifacts/supporting/types.md" | cat -n
else
  echo "File not found at expected path"
fi

Repository: wso2/docs-integrator

Length of output: 1483


🏁 Script executed:

# Search for similar escape patterns with pipes in this file
echo "=== Searching for backslash-escaped pipes in the file ==="
rg '\\\\\\|' en/docs/develop/integration-artifacts/supporting/types.md

Repository: wso2/docs-integrator

Length of output: 13225


🏁 Script executed:

# Check file size to understand its scope
wc -l en/docs/develop/integration-artifacts/supporting/types.md

Repository: wso2/docs-integrator

Length of output: 126


Use HTML entity | instead of backslash-escaped pipe in inline code.

In the "Edit a field" table, the return type example uses string\|error. When backslash-escaped pipes appear inside inline code blocks within Markdown tables, they may render as visible backslashes depending on the Markdown processor. Use the HTML entity | instead, which consistently renders as | without backslashes.

Proposed change
-| **Field Type** | The return type (for example, `string\|error`). |
+| **Field Type** | The return type (for example, `string|error`). |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@en/docs/develop/integration-artifacts/supporting/types.md` around lines 223 -
227, Replace the backslash-escaped pipe inside the inline code example for the
"Field Type" cell: locate the table row containing "**Field Type**" and the
example `string\|error` and change the inline code to use the HTML entity for
pipe (e.g., `string|error`) so the pipe displays correctly without a
visible backslash.

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.

1 participant