-
Notifications
You must be signed in to change notification settings - Fork 12
Open
ballerina-platform/ballerina-language-server
#572Open
Copy link
Labels
Area/DataMapperArtifacts: Datamapper and inline data mapperArtifacts: Datamapper and inline data mapperType/Improvement
Milestone
Description
Current Limitation
Currently, when a user opens a transformation function that returns a json type, the Data Mapper diagram fails to visualize the output structure and the corresponding mapping links.
function transformToJson(Input payload) returns json =>
{
id: payload.id,
name: payload.customerName,
email: payload.customerEmail
};
Suggested Improvement
To enhance the usability and clarity of the Data Mapper for functions returning json, we can go for the following two improvements:
- Enhanced Visualization of Fields and Mapping Links
The Data Mapper should attempt to infer and display the structure of the resulting JSON object based on the transformation function's body.
- Provide Guidance for Improved Type Definition
Since the structure of the json type is dynamic and cannot always be fully inferred at design time, the Data Mapper should encourage users to define a concrete type for better tooling support.
Version
BI v1.5.3 | Ballerina v5.6.3
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area/DataMapperArtifacts: Datamapper and inline data mapperArtifacts: Datamapper and inline data mapperType/Improvement