Fix editing of anonymous records in HTTP and enable imported types for data binding#650
Merged
LakshanWeerasinghe merged 8 commits intoballerina-platform:1.5.xfrom Jan 27, 2026
Conversation
1f5eff7 to
c6483e1
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request addresses two key issues in the service model generator:
Purpose:
Fixes editing capabilities for HTTP responses containing anonymous records and adds support for imported types in data binding parameters for triggers like Kafka and RabbitMQ.
Changes:
- Modified HTTP response generation to allow editing of anonymous records by setting the
editableflag appropriately - Extended data binding functionality to handle imported types by extracting and propagating import information through type definition creation
- Updated the HttpResponse model to support setting
editableandenabledflags via the builder pattern
Reviewed changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| HttpUtil.java | Refactored HTTP response building to properly set editable and enabled flags, enabling editing of anonymous record responses |
| DatabindUtil.java | Added support for extracting and propagating import information from data binding parameters to type definitions |
| HttpResponse.java | Enhanced builder pattern to accept editable and enabled flags, simplifying response construction |
| kafka_bind_imported_type.json | Test configuration demonstrating imported type handling in Kafka data binding |
| add_kafka_on_consumer_record.json | Test configuration for adding Kafka consumer with imported types |
| http_response_*.json | Updated test expectations to reflect editable anonymous records |
| http_methods_*.json | Updated test expectations for various HTTP methods with editable responses |
| Ballerina.toml | Test project configuration files |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...-extension/src/main/java/io/ballerina/servicemodelgenerator/extension/util/DatabindUtil.java
Outdated
Show resolved
Hide resolved
NipunaRanasinghe
approved these changes
Jan 27, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 17 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
54 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
$subject
HTTP Response Form
Fixed an issue where responses containing anonymous records could not be edited.
Fixes wso2/product-ballerina-integrator#1661
Data Binding
Added support for imported types in data binding parameters for triggers like Kafka and RabbitMQ.
Fixes wso2/product-ballerina-integrator#1931