-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42809 from KavinduZoysa/fix-issue-42304
Support update documentation CA for included record params
- Loading branch information
Showing
8 changed files
with
180 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
41 changes: 41 additions & 0 deletions
41
...re/src/test/resources/command/update-documentation/config/updateDocumentationConfig6.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"arguments": { | ||
"node.range": { | ||
"start": { | ||
"line": 5, | ||
"character": 0 | ||
}, | ||
"end": { | ||
"line": 11, | ||
"character": 1 | ||
} | ||
} | ||
}, | ||
"source": "updateDocumentationSource6.bal", | ||
"expected": { | ||
"result": { | ||
"edit": { | ||
"documentChanges": [ | ||
{ | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 5, | ||
"character": 0 | ||
}, | ||
"end": { | ||
"line": 8, | ||
"character": 34 | ||
} | ||
}, | ||
"newText": "# Description.\n#\n# + id - parameter description \n# + value - parameter description \n# + config - parameter description" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"jsonrpc": "2.0" | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
...re/src/test/resources/command/update-documentation/config/updateDocumentationConfig7.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"arguments": { | ||
"node.range": { | ||
"start": { | ||
"line": 6, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 12, | ||
"character": 5 | ||
} | ||
} | ||
}, | ||
"source": "updateDocumentationSource7.bal", | ||
"expected": { | ||
"result": { | ||
"edit": { | ||
"documentChanges": [ | ||
{ | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 6, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 9, | ||
"character": 38 | ||
} | ||
}, | ||
"newText": "# Description.\n #\n # + id - parameter description \n # + value - parameter description \n # + config - parameter description" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"jsonrpc": "2.0" | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
...re/src/test/resources/command/update-documentation/config/updateDocumentationConfig8.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"arguments": { | ||
"node.range": { | ||
"start": { | ||
"line": 12, | ||
"character": 3 | ||
}, | ||
"end": { | ||
"line": 18, | ||
"character": 4 | ||
} | ||
} | ||
}, | ||
"source": "updateDocumentationSource8.bal", | ||
"expected": { | ||
"result": { | ||
"edit": { | ||
"documentChanges": [ | ||
{ | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 12, | ||
"character": 3 | ||
}, | ||
"end": { | ||
"line": 15, | ||
"character": 40 | ||
} | ||
}, | ||
"newText": "# Description.\n #\n # + val - parameter description \n # + args - parameter description\n # + return - return value description" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
}, | ||
"jsonrpc": "2.0" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...ore/src/test/resources/command/update-documentation/source/updateDocumentationSource6.bal
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
type ParamConfig record {| | ||
string timeEntry; | ||
string msg; | ||
|}; | ||
|
||
# Description. | ||
# | ||
# + id - parameter description | ||
# + config - parameter description | ||
function logMsg(int id, int value, *ParamConfig config) { | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
...ore/src/test/resources/command/update-documentation/source/updateDocumentationSource7.bal
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
type ParamConfig record {| | ||
string timeEntry; | ||
string msg; | ||
|}; | ||
|
||
class Log { | ||
# Description. | ||
# | ||
# + id - parameter description | ||
# + config - parameter description | ||
function logMsg(int id, int value, *ParamConfig config) { | ||
|
||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...ore/src/test/resources/command/update-documentation/source/updateDocumentationSource8.bal
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
type Args record {| | ||
decimal x; | ||
decimal y; | ||
|}; | ||
|
||
type Response record {| | ||
decimal result; | ||
|}; | ||
|
||
listener http:Listener ln = new (9090); | ||
|
||
service /calc on ln { | ||
# Description. | ||
# | ||
# + args - parameter description | ||
# + return - return value description | ||
resource function post add(int val, *Args args) returns Response { | ||
return {result: args.x + args.y}; | ||
} | ||
} |