Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ protected Object[] getConfigsList() {
{Path.of("configurable_variable2.json")},
{Path.of("function_def7.json")},
{Path.of("variable53.json")},
{Path.of("variable55.json")},
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2375,7 +2375,7 @@
"typeMembers": [
{
"type": "HttpVersion",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "BASIC_TYPE",
"selected": false
Expand Down Expand Up @@ -2405,7 +2405,7 @@
"typeMembers": [
{
"type": "ClientHttp1Settings",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -2435,7 +2435,7 @@
"typeMembers": [
{
"type": "ClientHttp2Settings",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -2525,7 +2525,7 @@
"typeMembers": [
{
"type": "PoolConfiguration",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -2555,7 +2555,7 @@
"typeMembers": [
{
"type": "CacheConfig",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -2585,7 +2585,7 @@
"typeMembers": [
{
"type": "Compression",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "BASIC_TYPE",
"selected": false
Expand Down Expand Up @@ -2615,7 +2615,7 @@
"typeMembers": [
{
"type": "CircuitBreakerConfig",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -2645,7 +2645,7 @@
"typeMembers": [
{
"type": "RetryConfig",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -2675,7 +2675,7 @@
"typeMembers": [
{
"type": "ResponseLimitConfigs",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -2705,7 +2705,7 @@
"typeMembers": [
{
"type": "ClientSecureSocket",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -2735,7 +2735,7 @@
"typeMembers": [
{
"type": "ProxyConfig",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"source": "variable33.bal",
"description": "Sample diagram node",
"codedata": {
"node": "VARIABLE",
"lineRange": {
"fileName": "variable33.bal",
"startLine": {
"line": 12,
"offset": 12
},
"endLine": {
"line": 12,
"offset": 41
}
},
"sourceCode": "Student student = {};"
},
"position": {
"line": 12,
"offset": 12
},
"propertyKey": "expression",
"targetField": "details",
"model": {
"inputs": [],
"output": {
"fields": [],
"name": "details",
"displayName": "details",
"typeName": "PurchaseDetails",
"kind": "record",
"ref": "2079257237"
},
"mappings": [],
"refs": {
"2079257237": {
"fields": [
{
"name": "rewardId",
"displayName": "rewardId",
"typeName": "string",
"kind": "string",
"optional": true
},
{
"name": "skuId",
"displayName": "skuId",
"typeName": "string",
"kind": "string",
"optional": true
},
{
"name": "quantity",
"displayName": "quantity",
"typeName": "int:Signed32",
"kind": "int:Signed32",
"optional": true
}
],
"typeName": "PurchaseDetails",
"kind": "record"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import ballerina/http;

public type PurchaseDetails record {
string rewardId?;
string skuId?;
int:Signed32 quantity?;
}

service OASServiceType on new http:Listener(9090) {

resource function get pet() returns int|http:NotFound {
do {
PurchaseDetails details = {};
} on fail error e {
return http:NOT_FOUND;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -733,7 +733,7 @@
"typeMembers": [
{
"type": "HttpVersion",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "BASIC_TYPE",
"selected": false
Expand Down Expand Up @@ -763,7 +763,7 @@
"typeMembers": [
{
"type": "ClientHttp1Settings",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -793,7 +793,7 @@
"typeMembers": [
{
"type": "ClientHttp2Settings",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -883,7 +883,7 @@
"typeMembers": [
{
"type": "PoolConfiguration",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -913,7 +913,7 @@
"typeMembers": [
{
"type": "CacheConfig",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -943,7 +943,7 @@
"typeMembers": [
{
"type": "Compression",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "BASIC_TYPE",
"selected": false
Expand Down Expand Up @@ -973,7 +973,7 @@
"typeMembers": [
{
"type": "CircuitBreakerConfig",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -1003,7 +1003,7 @@
"typeMembers": [
{
"type": "RetryConfig",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -1033,7 +1033,7 @@
"typeMembers": [
{
"type": "ResponseLimitConfigs",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -1063,7 +1063,7 @@
"typeMembers": [
{
"type": "ClientSecureSocket",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down Expand Up @@ -1093,7 +1093,7 @@
"typeMembers": [
{
"type": "ProxyConfig",
"packageInfo": "ballerina:http:2.14.6",
"packageInfo": "ballerina:http:2.14.7",
"packageName": "http",
"kind": "RECORD_TYPE",
"selected": false
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ stdlibUuidVersion=1.10.0-20250311-135800-d38a5b5
# Stdlib Level 04
stdlibAuthVersion=2.14.0-20250311-141100-33e5fab
stdlibOAuth2Version=2.14.0-20250311-141600-1d12813
stdlibJsonDataVersion=1.1.1
stdlibJsonDataVersion=1.1.3

# Stdlib Level 05
stdlibHttpVersion=2.14.7
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ public static RefType fromSemanticSymbol(Symbol symbol, List<Symbol> typeDefSymb
public static RefType fromSemanticSymbol(TypeSymbol symbol, String name, ModuleID moduleID,
List<Symbol> typeDefSymbols) {
TypeDescKind kind = symbol.typeKind();
RefType primitiveType = getPrimitiveType(kind, name);
RefType primitiveType = getPrimitiveType(kind);
if (primitiveType != null) {
return primitiveType;
}
Expand Down Expand Up @@ -320,35 +320,43 @@ public static RefType fromSemanticSymbol(TypeSymbol symbol, String name, ModuleI
tupleType.memberTypes.add(refType);
}
return tupleType;
} else if (kind == TypeDescKind.REGEXP) {
return new RefType("regexp:RegExp");
}

throw new UnsupportedOperationException(
"Unsupported type kind: " + kind + " for symbol: " + symbol.getName().orElse("unknown"));
}

private static RefType getPrimitiveType(TypeDescKind kind, String name) {
if (kind == TypeDescKind.INT || kind == TypeDescKind.STRING || kind == TypeDescKind.FLOAT ||
kind == TypeDescKind.BOOLEAN || kind == TypeDescKind.NIL || kind == TypeDescKind.DECIMAL ||
kind == TypeDescKind.NEVER) {
return createPrimitiveRefType(kind, name);
private static RefType getPrimitiveType(TypeDescKind kind) {
String primitiveTypeName = getPrimitiveTypeName(kind);
if (primitiveTypeName == null) {
return null;
}
return null;
RefType refType = new RefType(primitiveTypeName);
refType.typeName = primitiveTypeName;
return refType;
}

private static RefType createPrimitiveRefType(TypeDescKind kind, String name) {
RefType refType = new RefType(name);
refType.typeName = switch (kind) {
private static String getPrimitiveTypeName(TypeDescKind kind) {
return switch (kind) {
case INT -> "int";
case INT_SIGNED8 -> "int:Signed8";
case INT_SIGNED16 -> "int:Signed16";
case INT_SIGNED32 -> "int:Signed32";
case INT_UNSIGNED8 -> "int:Unsigned8";
case INT_UNSIGNED16 -> "int:Unsigned16";
case INT_UNSIGNED32 -> "int:Unsigned32";
case STRING -> "string";
case FLOAT -> "float";
case BOOLEAN -> "boolean";
case NIL -> "()";
case DECIMAL -> "decimal";
case BYTE -> "byte";
case STRING_CHAR -> "string:Char";
case NEVER -> "never";
default -> throw new UnsupportedOperationException("Unsupported primitive type: " + kind);
default -> null;
};
refType.name = refType.typeName;
return refType;
}


Expand Down
Loading