Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
aashikam committed Mar 6, 2024
1 parent b368beb commit 1e9ef69
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,31 @@ export JAVA_OPTS="$JAVA_OPTS -DmaxYamlCodePoints=99999999"

Generate the Ballerina project for the OpenAPI spec using the Ballerina Open API tool with the following commands.

1. Create a new Ballerina project, naming the project as desired (e.g., custom_types, salesforce_types, etc.).

```bash
bal new custom_types
```

2. Customize the package details by editing the `Ballerina.toml` file. For instance, you can modify the [package] section as follows:

```toml
[package]
org = "example"
name = "salesforce.types"
version = "0.1.0"
```

Feel free to replace "salesforce.types" with one of the suitable desired names like "custom.types" or "integration.types," or come up with your own unique package name.

4. Move the OpenAPI spec into the newly created project directory and execute the following command:

```bash
bal openapi -i oas.json --mode client --client-methods resource
```

This will generate the Ballerina project structure, record types that correspond to the SObject definitions, and client methods based on the provided OpenAPI specification.

### Step 4: Edit the Generated Client and Push it to Local Repository

#### Step 4.1 Delete the utils.bal and clients.bal files.
Expand Down
21 changes: 21 additions & 0 deletions ballerina/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,31 @@ export JAVA_OPTS="$JAVA_OPTS -DmaxYamlCodePoints=99999999"

Generate the Ballerina project for the OpenAPI spec using the Ballerina Open API tool with the following commands.

1. Create a new Ballerina project, naming the project as desired (e.g., custom_types, salesforce_types, etc.).

```bash
bal new custom_types
```

2. Customize the package details by editing the `Ballerina.toml` file. For instance, you can modify the [package] section as follows:

```toml
[package]
org = "example"
name = "salesforce.types"
version = "0.1.0"
```

Feel free to replace "salesforce.types" with one of the suitable desired names like "custom.types" or "integration.types," or come up with your own unique package name.

4. Move the OpenAPI spec into the newly created project directory and execute the following command:

```bash
bal openapi -i oas.json --mode client --client-methods resource
```

This will generate the Ballerina project structure, record types that correspond to the SObject definitions, and client methods based on the provided OpenAPI specification.

### Step 4: Edit the Generated Client and Push it to Local Repository

#### Step 4.1 Delete the utils.bal and clients.bal files.
Expand Down
21 changes: 21 additions & 0 deletions ballerina/Package.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,31 @@ export JAVA_OPTS="$JAVA_OPTS -DmaxYamlCodePoints=99999999"

Generate the Ballerina project for the OpenAPI spec using the Ballerina Open API tool with the following commands.

1. Create a new Ballerina project, naming the project as desired (e.g., custom_types, salesforce_types, etc.).

```bash
bal new custom_types
```

2. Customize the package details by editing the `Ballerina.toml` file. For instance, you can modify the [package] section as follows:

```toml
[package]
org = "example"
name = "salesforce.types"
version = "0.1.0"
```

Feel free to replace "salesforce.types" with one of the suitable desired names like "custom.types" or "integration.types," or come up with your own unique package name.

4. Move the OpenAPI spec into the newly created project directory and execute the following command:

```bash
bal openapi -i oas.json --mode client --client-methods resource
```

This will generate the Ballerina project structure, record types that correspond to the SObject definitions, and client methods based on the provided OpenAPI specification.

### Step 4: Edit the Generated Client and Push it to Local Repository

#### Step 4.1 Delete the utils.bal and clients.bal files.
Expand Down

0 comments on commit 1e9ef69

Please sign in to comment.