Skip to content

Commit 83464d3

Browse files
authored
Update instructions_to_run_generated_code.md
1 parent 5a7b527 commit 83464d3

File tree

1 file changed

+20
-15
lines changed

1 file changed

+20
-15
lines changed

doc/user_guide/instructions_to_run_generated_code.md

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -98,17 +98,18 @@ TODO
9898
TODO
9999

100100
## Kotlin (okhttp3)
101+
101102
Here are the detailed instructions for running the generated API Dash code in Kotlin (using okhttp3) for macOS, Windows, and Linux:
102103

103-
### 1. Install Kotlin:
104-
To run Kotlin code, you need to install Kotlin first. You can install Kotlin from the official Kotlin website:
104+
### 1. Install Kotlin
105+
106+
To run Kotlin code, you need to install Kotlin by following the below instructions:
105107

106108
- Go to [Kotlin Installation Guide](https://kotlinlang.org/docs/getting-started.html#install-kotlin) for detailed steps.
107-
- Remember: `Kotlin is included in each IntelliJ IDEA and Android Studio release. Download and install one of these IDEs to start using Kotlin`.
109+
- Kotlin is also included in IntelliJ IDEA and Android Studio. You can also download and install one of these IDEs to start using Kotlin.
108110

109-
Once Kotlin is installed, proceed with adding `okhttp` and running the generated code.
111+
### 2. Add `okhttp` library
110112

111-
### 2. Add `okhttp` library:
112113
To use `okhttp3` in your Kotlin project, you need to include it as a dependency. If you're using **Gradle**, follow these steps:
113114

114115
- Open the `build.gradle` file in your project.
@@ -120,25 +121,29 @@ implementation("com.squareup.okhttp3:okhttp:4.12.0")
120121

121122
- Sync your project to apply the dependency.
122123

123-
### 3. Execute the generated code:
124+
### 3. Execute the generated code
125+
124126
After setting up Kotlin and `okhttp3`, follow these steps to run the generated code:
125127

126-
1. **Open your IDE** ✍️ (like Android Studio).
127-
2. **Create a new Kotlin file** 📝 (or use an existing one).
128-
3. **Copy the generated code** 📋 from API Dash.
129-
4. **Paste the code** into the Kotlin file 🔄.
130-
5. **Run the Kotlin file** by clicking the "Run" button in your IDE or by using the command line.
128+
#### Using IDE
131129

132-
#### If you're running from the command line:
133-
1. **Navigate to the project directory** using the terminal or command prompt.
134-
2. **Compile and run the Kotlin file** with these commands:
130+
1. Open the installed IDE like Android Studio.
131+
2. Create a new Kotlin file.
132+
3. Copy the generated code from API Dash and paste it in the Kotlin file.
133+
4. Run the Kotlin file by clicking the `Run` button in the IDE or by using the command line.
134+
135+
#### Using command line
136+
137+
1. Create a new Kotlin file.
138+
2. Copy the generated code from API Dash and paste it in the Kotlin file (`api_test.kt`).
139+
3. Navigate to the project directory using the terminal or command prompt.
140+
4. Compile and run the Kotlin file by executing:
135141

136142
```bash
137143
kotlinc api_test.kt -include-runtime -d api_test.jar
138144
java -jar api_test.jar
139145
```
140146

141-
142147
## PHP (curl)
143148

144149
TODO

0 commit comments

Comments
 (0)