Skip to content

Commit 8f1f652

Browse files
authored
Updated with review comments
1 parent cb44eb4 commit 8f1f652

1 file changed

Lines changed: 21 additions & 14 deletions

File tree

documentation/Functions.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ This function has only one parameter
152152
- **Required**
153153
- **Type**- String
154154
- **Description**- path to a new workspace (relative to working directory)
155-
#### example
155+
#### Example:
156156
* changeWorkspace("devonfw/workspaces/project")
157157
will set the workspace directory to "[working directory]/devonfw/workspaces/project"
158158

@@ -181,7 +181,7 @@ This function consists of four parameters.
181181
3. Third parameter:
182182
- **Required**
183183
- **Type**- JSON object
184-
- **Description**- JSON object with optional fields
184+
- **Description**- This parameter consist of three attribute. It is a JSON object with optional fields
185185
* First attribute: (Optional) Directory where the command will be executed, if not in current directory (relative to workspace)
186186
Example: {"dir": string}
187187
* Second attribute: (Optional) Synchronous or asynchronous process. Use asynchronous when starting a server. Default is synchronous.
@@ -192,7 +192,12 @@ This function consists of four parameters.
192192
4. Fourth parameter:
193193
- **Required**
194194
- **Type**- JSON object
195-
- **Description**-Assertion information needed if you start a server to check server availability. Only required when you start a asynchronous server. This parameter is only needed when the command is an asynchronous command.
195+
- **Description**- This parameter consist of three attributes which are the assertion information. Assertion information is needed if you start a server to check server availability. Only required when you start a asynchronous server. This parameter is only needed when the command is an asynchronous command.
196+
* First attribute: "startupTime" which is the time in seconds to wait before checking if the server is running
197+
* Second attribute: "port" which is the port number on which the server is running
198+
* Third attribute: "path" which is the path to the URL path on which is checked if the server is running
199+
200+
196201

197202
#### Commands:
198203
It is needed to pass a command for Windows and also for Linux-based systems because both systems will always be tested.
@@ -334,9 +339,9 @@ This function consist of 2 parameters
334339
- **Required**
335340
- **Type**- JSON Object
336341
- **Description**-This parameter consist of 3 attributes:
337-
* First attribute:- The content that you want to insert into the file or the filepath of a file from where you want to insert the content.
338-
* Second attribute:- (Optional) Name of a placeholder
339-
* Third attribute:- (Optional) Line number where you want to insert your code. (Possible lines are: 1...n+1 for N = number of existing lines. File cant be empty)
342+
* First attribute: The content that you want to insert into the file or the filepath of a file from where you want to insert the content.
343+
* Second attribute: It is Optional. Name of a placeholder
344+
* Third attribute: It is Optional. Line number where you want to insert your code. (Possible lines are: 1...n+1 for N = number of existing lines. File cant be empty)
340345
#### Example:
341346
changeFile("cobigenexample/core/src/main/java/com/example/application/cobigenexample/customermanagement/dataaccess/api/CustomerEntity.java", { "file": "files/Placeholder.java", "placeholder": "private static final long serialVersionUID = 1L;" })
342347
#### Details:
@@ -436,10 +441,12 @@ This functions consists of two parameters.
436441
- **Required**
437442
- **Type**- JSON object
438443
- **Description**- This parameter consist of three attributes which are the assertion information. Only needed for the console runner to check if the server was started properly.
439-
* First attribute i.e. "startupTime" which is the time in seconds to wait before checking if the server is running
440-
* Second attribute i.e. "port" which is the port number on which the server is running
441-
* Third attribute i.e. "path" which is the path to the URL path on which is checked if the server is running
442-
runServerJava("devonfw/workspaces/main/jump-the-queue/java/jtqj/server", { "startupTime": 40, "port": 8081, "path": "jumpthequeue" })
444+
* First attribute: "startupTime" which is the time in seconds to wait before checking if the server is running
445+
* Second attribute: "port" which is the port number on which the server is running
446+
* Third attribute: "path" which is the path to the URL path on which is checked if the server is running
447+
448+
#### Example:
449+
* runServerJava("devonfw/workspaces/main/jump-the-queue/java/jtqj/server", { "startupTime": 40, "port": 8081, "path": "jumpthequeue" })
443450

444451
##### Note:
445452
1. If the tutorial should be tested on the console environment, you have to specify a port.
@@ -464,7 +471,7 @@ This function consist of two parameters.
464471
Example: {"name": string }
465472
* Second attribute: It is optional and it is for global or local installation. Default is local, therefore false.
466473
Example: {"global" : boolean }
467-
* Third attribute*: It is optional and it is the array of npm arguments.
474+
* Third attribute: It is optional and it is the array of npm arguments.
468475
Example: {"args": string[]}
469476

470477
#### Example:
@@ -603,9 +610,9 @@ Note: The title should never be empty and it is of type string.
603610
- **Required**
604611
- **Type**- Array of JSON objects with files, content, or images to be rendered within the Katacoda step.
605612
- **Description**-This function consists of three attributes. The use for this function is to display an image and some descriptive text. No Katacoda syntax is allowed in the files or the content!
606-
* First attribute i.e. "file": Path to a file whose content is to be displayed in the Katacoda step (e.g. .asciidoc or .txt file). The file should be following the formating of asciidoc files.
607-
* Second attribute i.e. "content": Plain text to be displayed in the Katacoda step. This Text should be following the formating of asciidoc files.
608-
* Third attribute i.e. "image": Path to an image to be displayed in the Katacoda step. It should be placed under subfolder of the playbook directory.
613+
* First attribute: "file": Path to a file whose content is to be displayed in the Katacoda step (e.g. .asciidoc or .txt file). The file should be following the formating of asciidoc files.
614+
* Second attribute: "content": Plain text to be displayed in the Katacoda step. This Text should be following the formating of asciidoc files.
615+
* Third attribute: "image": Path to an image to be displayed in the Katacoda step. It should be placed under subfolder of the playbook directory.
609616

610617
#### Example:
611618
* displayContent("Step title", [{ "file": "files/description.asciidoc" }, { "content": "This is just plain content." }, { "image": "files/image.png" }])

0 commit comments

Comments
 (0)