Skip to content

Properly handle the typeName of unions in Mappings API#279

Merged
madushajg merged 1 commit intoballerina-platform:1.2.xfrom
pasindufernando1:unionNameFix
Sep 4, 2025
Merged

Properly handle the typeName of unions in Mappings API#279
madushajg merged 1 commit intoballerina-platform:1.2.xfrom
pasindufernando1:unionNameFix

Conversation

@pasindufernando1
Copy link
Contributor

Copilot AI review requested due to automatic review settings September 4, 2025 06:04
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses proper handling of union type names in the Mappings API by ensuring they display the constituent member types rather than generic or empty type names.

  • Updates union type name generation to concatenate member type names with pipe separators
  • Changes nil type representation from "nil" to "()" for consistency
  • Updates test data files to reflect the corrected union type name formatting

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

File Description
ReferenceType.java Changes nil type name representation from "nil" to "()"
DataMapManager.java Implements logic to build union type names from member type names
union*.json, enum*.json, variable*.json Updates test data to reflect proper union type name formatting

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@madushajg madushajg merged commit 0589618 into ballerina-platform:1.2.x Sep 4, 2025
3 checks passed
@pasindufernando1 pasindufernando1 deleted the unionNameFix branch September 8, 2025 08:11
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.

3 participants