From ca7e29a9054f9e9a07060f74209674bdb545c8be Mon Sep 17 00:00:00 2001
From: Affan Shaikhsurab <51104750+AffanShaikhsurab@users.noreply.github.com>
Date: Wed, 15 Jan 2025 12:48:43 +0530
Subject: [PATCH 1/2] Add platform-specific instructions for running API
Dash-generated Java
Add platform-specific instructions for running API Dash-generated Java code using AsyncHttpClient, HttpClient, OkHttp3, and Unirest libraries.
---
.../instructions_to_run_generated_code.md | 173 +++++++++++++++++-
1 file changed, 169 insertions(+), 4 deletions(-)
diff --git a/doc/user_guide/instructions_to_run_generated_code.md b/doc/user_guide/instructions_to_run_generated_code.md
index ce5c9589..11d5e02e 100644
--- a/doc/user_guide/instructions_to_run_generated_code.md
+++ b/doc/user_guide/instructions_to_run_generated_code.md
@@ -79,19 +79,184 @@ TODO
## Java (asynchttpclient)
-TODO
+Here are the detailed instructions for running the generated API Dash code in **Java (using `AsyncHttpClient`)** for macOS, Windows, and Linux:
+
+---
+
+### **1. Install Java**
+To run Java code, you need to have Java Development Kit (JDK) installed on your system.
+
+- Visit the official **[Java Downloads Page](https://www.oracle.com/in/java/technologies/downloads/#jdk23)** and follow the instructions to install the latest JDK on macOS, Windows, or Linux.
+
+After installation, verify it by running:
+```bash
+java -version
+```
+
+---
+
+### **2. Add the `AsyncHttpClient` Library**
+To use the `AsyncHttpClient` library in Java, you need to add it as a dependency in your project.
+
+#### Using **Maven**:
+1. Add the following dependency to your `pom.xml` file:
+ ```xml
+
+
+ org.asynchttpclient
+ async-http-client
+ 3.0.1
+
+
+ ```
+3. Save the file and run:
+ ```bash
+ mvn install
+ ```
+
+#### Using **Gradle**:
+1. Add the following line to the `dependencies` section in your `build.gradle` file:
+ ```gradle
+ implementation 'org.asynchttpclient:async-http-client:3.0.1'
+ ```
+2. Run the following command to fetch the dependency:
+ ```bash
+ gradle build
+ ```
+
+---
+
+### **3. Run the Generated Code**
+After setting up Java and adding the `AsyncHttpClient` library, follow these steps to execute the generated code:
+
+1. **Create a new Java file**: Save the generated code into a file with a `.java` extension, such as `ApiTest.java`.
+2. **Compile the file**: Use the following command in the terminal:
+ ```bash
+ javac ApiTest.java
+ ```
+3. **Run the compiled program**:
+ ```bash
+ java ApiTest
+ ```
+
+---
## Java (HttpClient)
-TODO
+Here are the detailed instructions for running the generated API Dash code in **Java (using `HttpClient`)** for macOS, Windows, and Linux:
+
+---
+
+### **1. Install Java**
+👉 Follow the instructions provided above under **Java (AsyncHttpClient)** for detailed steps on how to install the Java Development Kit (JDK) on macOS, Windows, or Linux.
+
+---
+
+### **2. `HttpClient` Setup**
+The `HttpClient` library is included as part of the **Java SE 11** (or later) standard library.
+- Ensure you have **Java 11** or a later version installed to use `HttpClient` without needing additional dependencies.
+
+
+To confirm your Java version, run:
+```bash
+java -version
+```
+---
+
+### **3. Run the Generated Code**
+👉 Refer to the instructions above under **Java (AsyncHttpClient)** for steps to save, compile, and execute the Java code.
+
+---
## Java (okhttp3)
-TODO
+Here are the detailed instructions for running the generated API Dash code in **Java (using `okhttp3`)** for macOS, Windows, and Linux:
+
+---
+
+### **1. Install Java**
+👉 Follow the instructions provided above under **Java (AsyncHttpClient)** for detailed steps on how to install the Java Development Kit (JDK) on macOS, Windows, or Linux.
+
+---
+
+### **2. Add the `okhttp3` Library**
+To use `okhttp3` in Java, you need to add it as a dependency in your project.
+
+#### Using **Maven**:
+1. Add the following dependency to your `pom.xml` file:
+ ```xml
+
+ com.squareup.okhttp3
+ okhttp
+ 4.12.0
+
+ ```
+2. Save the file and run:
+ ```bash
+ mvn install
+ ```
+
+#### Using **Gradle**:
+1. Add the following line to the `dependencies` section in your `build.gradle` file:
+ ```gradle
+ implementation 'com.squareup.okhttp3:okhttp:4.12.0'
+ ```
+2. Run the following command to fetch the dependency:
+ ```bash
+ gradle build
+ ```
+
+---
+
+### **3. Run the Generated Code**
+👉 Refer to the instructions provided above under **Java (AsyncHttpClient)** for steps to save, compile, and execute the Java code.
+
+---
## Java (Unirest)
-TODO
+Here are the detailed instructions for running the generated API Dash code in **Java (using `Unirest`)** for macOS, Windows, and Linux:
+
+---
+
+### **1. Install Java**
+👉 Follow the instructions provided above under **Java (AsyncHttpClient)** for detailed steps on how to install the Java Development Kit (JDK) on macOS, Windows, or Linux.
+
+---
+
+### **2. Add the `Unirest` Library**
+To use `Unirest` in Java, you need to add it as a dependency in your project.
+
+#### Using **Maven**:
+1. Add the following dependency to your `pom.xml` file:
+ ```xml
+
+ com.konghq
+ unirest-java
+ 3.14.1
+
+ ```
+2. Save the file and run:
+ ```bash
+ mvn install
+ ```
+
+#### Using **Gradle**:
+1. Add the following line to the `dependencies` section in your `build.gradle` file:
+ ```gradle
+ implementation 'com.konghq:unirest-java:3.14.1'
+ ```
+2. Run the following command to fetch the dependency:
+ ```bash
+ gradle build
+ ```
+
+---
+
+### **3. Run the Generated Code**
+👉 Refer to the instructions provided above under **Java (AsyncHttpClient)** for steps to save, compile, and execute the Java code.
+
+---
## Julia (HTTP)
From d0767d85144e0fde98583c9553bf033efe0da0f4 Mon Sep 17 00:00:00 2001
From: Ashita Prasad
Date: Tue, 21 Jan 2025 20:40:35 +0530
Subject: [PATCH 2/2] Update instructions_to_run_generated_code.md
---
.../instructions_to_run_generated_code.md | 133 ++++++++++++------
1 file changed, 87 insertions(+), 46 deletions(-)
diff --git a/doc/user_guide/instructions_to_run_generated_code.md b/doc/user_guide/instructions_to_run_generated_code.md
index 11d5e02e..3b81d0b9 100644
--- a/doc/user_guide/instructions_to_run_generated_code.md
+++ b/doc/user_guide/instructions_to_run_generated_code.md
@@ -81,24 +81,24 @@ TODO
Here are the detailed instructions for running the generated API Dash code in **Java (using `AsyncHttpClient`)** for macOS, Windows, and Linux:
----
+### 1. Install Java
-### **1. Install Java**
-To run Java code, you need to have Java Development Kit (JDK) installed on your system.
+To run Java code, you need to have Java Development Kit (JDK) installed on your system.
-- Visit the official **[Java Downloads Page](https://www.oracle.com/in/java/technologies/downloads/#jdk23)** and follow the instructions to install the latest JDK on macOS, Windows, or Linux.
+- Visit the official **[Java Downloads Page](https://www.oracle.com/in/java/technologies/downloads/#jdk23)** and follow the instructions to install the latest JDK on macOS, Windows, or Linux.
+
+After installation, verify it by running:
-After installation, verify it by running:
```bash
java -version
```
----
+### 2. Add the `AsyncHttpClient` Library
-### **2. Add the `AsyncHttpClient` Library**
To use the `AsyncHttpClient` library in Java, you need to add it as a dependency in your project.
-#### Using **Maven**:
+#### Using Maven
+
1. Add the following dependency to your `pom.xml` file:
```xml
@@ -109,12 +109,13 @@ To use the `AsyncHttpClient` library in Java, you need to add it as a dependency
```
-3. Save the file and run:
+2. Save the file and run:
```bash
mvn install
```
-#### Using **Gradle**:
+#### Using Gradle
+
1. Add the following line to the `dependencies` section in your `build.gradle` file:
```gradle
implementation 'org.asynchttpclient:async-http-client:3.0.1'
@@ -124,9 +125,8 @@ To use the `AsyncHttpClient` library in Java, you need to add it as a dependency
gradle build
```
----
+### 3. Run the Generated Code
-### **3. Run the Generated Code**
After setting up Java and adding the `AsyncHttpClient` library, follow these steps to execute the generated code:
1. **Create a new Java file**: Save the generated code into a file with a `.java` extension, such as `ApiTest.java`.
@@ -139,50 +139,68 @@ After setting up Java and adding the `AsyncHttpClient` library, follow these ste
java ApiTest
```
----
-
## Java (HttpClient)
Here are the detailed instructions for running the generated API Dash code in **Java (using `HttpClient`)** for macOS, Windows, and Linux:
----
+### 1. Install Java
-### **1. Install Java**
-👉 Follow the instructions provided above under **Java (AsyncHttpClient)** for detailed steps on how to install the Java Development Kit (JDK) on macOS, Windows, or Linux.
+To run Java code, you need to have Java Development Kit (JDK) installed on your system.
----
+- Visit the official **[Java Downloads Page](https://www.oracle.com/in/java/technologies/downloads/#jdk23)** and follow the instructions to install the latest JDK on macOS, Windows, or Linux.
+
+After installation, verify it by running:
+
+```bash
+java -version
+```
+
+### 2. `HttpClient` Setup
-### **2. `HttpClient` Setup**
The `HttpClient` library is included as part of the **Java SE 11** (or later) standard library.
- Ensure you have **Java 11** or a later version installed to use `HttpClient` without needing additional dependencies.
-
To confirm your Java version, run:
```bash
java -version
```
----
-### **3. Run the Generated Code**
-👉 Refer to the instructions above under **Java (AsyncHttpClient)** for steps to save, compile, and execute the Java code.
+### 3. Run the Generated Code
----
+After setting up Java and checking the version, follow these steps to execute the generated code:
+
+1. **Create a new Java file**: Save the generated code into a file with a `.java` extension, such as `ApiTest.java`.
+2. **Compile the file**: Use the following command in the terminal:
+ ```bash
+ javac ApiTest.java
+ ```
+3. **Run the compiled program**:
+ ```bash
+ java ApiTest
+ ```
## Java (okhttp3)
Here are the detailed instructions for running the generated API Dash code in **Java (using `okhttp3`)** for macOS, Windows, and Linux:
----
+### 1. Install Java
-### **1. Install Java**
-👉 Follow the instructions provided above under **Java (AsyncHttpClient)** for detailed steps on how to install the Java Development Kit (JDK) on macOS, Windows, or Linux.
+To run Java code, you need to have Java Development Kit (JDK) installed on your system.
----
+- Visit the official **[Java Downloads Page](https://www.oracle.com/in/java/technologies/downloads/#jdk23)** and follow the instructions to install the latest JDK on macOS, Windows, or Linux.
+
+After installation, verify it by running:
+
+```bash
+java -version
+```
+
+### 2. Add the `okhttp3` Library
-### **2. Add the `okhttp3` Library**
To use `okhttp3` in Java, you need to add it as a dependency in your project.
-#### Using **Maven**:
+#### Using Maven
+
1. Add the following dependency to your `pom.xml` file:
```xml
@@ -196,7 +214,8 @@ To use `okhttp3` in Java, you need to add it as a dependency in your project.
mvn install
```
-#### Using **Gradle**:
+#### Using Gradle
+
1. Add the following line to the `dependencies` section in your `build.gradle` file:
```gradle
implementation 'com.squareup.okhttp3:okhttp:4.12.0'
@@ -206,28 +225,42 @@ To use `okhttp3` in Java, you need to add it as a dependency in your project.
gradle build
```
----
+### 3. Run the Generated Code
-### **3. Run the Generated Code**
-👉 Refer to the instructions provided above under **Java (AsyncHttpClient)** for steps to save, compile, and execute the Java code.
+After setting up Java and adding the `okhttp3` library, follow these steps to execute the generated code:
----
+1. **Create a new Java file**: Save the generated code into a file with a `.java` extension, such as `ApiTest.java`.
+2. **Compile the file**: Use the following command in the terminal:
+ ```bash
+ javac ApiTest.java
+ ```
+3. **Run the compiled program**:
+ ```bash
+ java ApiTest
+ ```
## Java (Unirest)
Here are the detailed instructions for running the generated API Dash code in **Java (using `Unirest`)** for macOS, Windows, and Linux:
----
+### 1. Install Java
-### **1. Install Java**
-👉 Follow the instructions provided above under **Java (AsyncHttpClient)** for detailed steps on how to install the Java Development Kit (JDK) on macOS, Windows, or Linux.
+To run Java code, you need to have Java Development Kit (JDK) installed on your system.
----
+- Visit the official **[Java Downloads Page](https://www.oracle.com/in/java/technologies/downloads/#jdk23)** and follow the instructions to install the latest JDK on macOS, Windows, or Linux.
+
+After installation, verify it by running:
+
+```bash
+java -version
+```
+
+### 2. Add the `Unirest` Library
-### **2. Add the `Unirest` Library**
To use `Unirest` in Java, you need to add it as a dependency in your project.
-#### Using **Maven**:
+#### Using Maven
+
1. Add the following dependency to your `pom.xml` file:
```xml
@@ -241,7 +274,8 @@ To use `Unirest` in Java, you need to add it as a dependency in your project.
mvn install
```
-#### Using **Gradle**:
+#### Using Gradle
+
1. Add the following line to the `dependencies` section in your `build.gradle` file:
```gradle
implementation 'com.konghq:unirest-java:3.14.1'
@@ -251,12 +285,19 @@ To use `Unirest` in Java, you need to add it as a dependency in your project.
gradle build
```
----
+### 3. Run the Generated Code
-### **3. Run the Generated Code**
-👉 Refer to the instructions provided above under **Java (AsyncHttpClient)** for steps to save, compile, and execute the Java code.
+After setting up Java and adding the `Unirest` library, follow these steps to execute the generated code:
----
+1. **Create a new Java file**: Save the generated code into a file with a `.java` extension, such as `ApiTest.java`.
+2. **Compile the file**: Use the following command in the terminal:
+ ```bash
+ javac ApiTest.java
+ ```
+3. **Run the compiled program**:
+ ```bash
+ java ApiTest
+ ```
## Julia (HTTP)