Skip to content
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
7aed42d
regenerate with prompt-registry.yaml
rpanackal Dec 16, 2025
d4747ad
regenerate with prompt-registry.yaml
rpanackal Dec 16, 2025
03933a0
Remove ServerVariable.java and ServerConfiguration.java files
rpanackal Dec 16, 2025
27cc015
NoArgs ctor preserved but remove Configuration
rpanackal Dec 16, 2025
112360d
Remove apache specific date classes addition. Reuse existing class in…
rpanackal Dec 16, 2025
a9e609b
Pair - Simplify and improve code quality
rpanackal Dec 16, 2025
2f684c6
Remove `Authentication` classes and `authNames` from `ApiClient.invok…
rpanackal Dec 17, 2025
aa60080
make unimported methods private and use ApacheHttpClient5Accessor
rpanackal Dec 17, 2025
73ffecc
Remove invokeAPI methods in BaseApi and *Api.java
rpanackal Dec 18, 2025
f4358bc
Refactoring ApiClient
rpanackal Dec 22, 2025
3ce5400
Refactoring ApiClient
rpanackal Dec 22, 2025
ad8a738
Fix dependency and warning
rpanackal Dec 22, 2025
d8add74
Remove method overloading per operation with additionalHeaders
rpanackal Dec 22, 2025
0c0176c
Extract response handling out of ApiClient into ApiClientResponseHandler
rpanackal Dec 22, 2025
db04109
Make static ApiClient ctors
rpanackal Dec 23, 2025
ffada46
Remove ApiException and use enhanced OpenApiRequestException
rpanackal Dec 23, 2025
cd26cf8
Borrow sample module handling
rpanackal Dec 29, 2025
8357f5f
Apache mustache parity
rpanackal Dec 29, 2025
4d5b97b
Apache mustache parity
rpanackal Dec 29, 2025
e1390af
Apache mustache parity and object mapper config
rpanackal Dec 29, 2025
97c5e03
Revert to sodastore generation in sample
rpanackal Dec 30, 2025
59fedb1
Add apache/OpenApiResponse instead of void returns
rpanackal Dec 30, 2025
c5cba53
Remove guava dependency
rpanackal Dec 30, 2025
e6ec8b9
Update apache pom for general and generator configuration
rpanackal Jan 2, 2026
f16b2c9
Generate and test sodastore and petstore
rpanackal Jan 5, 2026
1b4ffcb
Merge remote-tracking branch 'origin/main' into feat/openapi/refactor…
rpanackal Jan 5, 2026
c56376c
Merge branch 'feat/openapi/refactor-apache-templates' into feat/opena…
rpanackal Jan 5, 2026
0773674
Extending existing integration test
rpanackal Jan 5, 2026
943de3c
Complete and cleanup integration test
rpanackal Jan 6, 2026
cc08bfb
Make url building more forgiving
rpanackal Jan 7, 2026
bdc8c72
Almost @Value class but not final
rpanackal Jan 7, 2026
3387432
Remove as much unnecessary integration test files
rpanackal Jan 7, 2026
64c7bdd
Add unit testing for Apache components
rpanackal Jan 7, 2026
8257a9a
Add unit testing for Apache components
rpanackal Jan 7, 2026
45e4dbc
Merge remote-tracking branch 'origin/feat/openapi/test-apache-client-…
rpanackal Jan 7, 2026
41ef22f
Add unit test for query params, client factory config and objectmappe…
rpanackal Jan 8, 2026
eb21453
Borrow downstream PR changes
rpanackal Jan 8, 2026
acff1d1
Merge branch 'feat/openapi/optional-spring-base' into feat/openapi/re…
rpanackal Jan 8, 2026
9f00a54
Merge branch 'feat/openapi/refactor-apache-templates' into feat/opena…
rpanackal Jan 8, 2026
31d8620
Merge branch 'feat/openapi/optional-spring-base' into feat/openapi/re…
rpanackal Jan 12, 2026
0a71d8e
Merging
rpanackal Jan 12, 2026
119dd09
Merge branch 'feat/openapi/refactor-apache-templates' into feat/opena…
rpanackal Jan 12, 2026
a84b2ca
Merging
rpanackal Jan 12, 2026
476fef7
Fix serialization of null and
rpanackal Jan 12, 2026
5884d6e
fix byte[] test and pmd
rpanackal Jan 12, 2026
5f61ebf
fix oneOf serialization test
rpanackal Jan 13, 2026
16f26ab
Merge branch 'feat/openapi/optional-spring-base' into feat/openapi/te…
rpanackal Jan 14, 2026
4cf87b9
Merge branch 'feat/openapi/optional-spring-base' into feat/openapi/te…
rpanackal Jan 14, 2026
d8bc954
Reeview changes
rpanackal Jan 14, 2026
3b44637
Merge branch 'feat/openapi/optional-spring-base' into feat/openapi/te…
rpanackal Jan 15, 2026
3ac5e85
Merge changes and regenerate (minor)
rpanackal Jan 15, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ updates:
test:
dependency-type: "development"
ignore:
- dependency-name: "org.springframework.boot:*"
versions: [ ">=4.0.0" ]
- dependency-name: "org.springframework:*"
versions: [ ">=7.0.0" ]
# updating leads to ignoring our formatting rules
- dependency-name: 'net.revelc.code.formatter:formatter-maven-plugin'
# updating leads to unintended formatting of POM files
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cache-maven-dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
GH_TOKEN: ${{ secrets.BOT_SDK_JS_FOR_DOCS_REPO_PR }}

- name: "Cache Dependencies"
uses: actions/cache/save@v4
uses: actions/cache/save@v5
with:
path: ${{ env.MAVEN_CACHE_DIR }}
key: ${{ env.MAVEN_CACHE_KEY }}
24 changes: 12 additions & 12 deletions .github/workflows/continuous-integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:

- name: "Restore Dependencies"
id: restore-dependencies
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
key: ${{ env.MAVEN_CACHE_KEY }}
path: ${{ env.MAVEN_CACHE_DIR }}
Expand All @@ -143,14 +143,14 @@ jobs:
fi

- name: "Upload SDK M2"
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: ${{ env.SDK_M2_NAME }}
path: ${{ env.SDK_M2_PATH }}
retention-days: 1

- name: "Upload SDK Targets"
uses: actions/upload-artifact@v5
uses: actions/upload-artifact@v6
with:
name: ${{ env.SDK_TARGETS_NAME }}
path: ${{ env.SDK_TARGETS_PATH }}
Expand All @@ -174,19 +174,19 @@ jobs:

- name: "Restore Dependencies"
id: restore-dependencies
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
key: ${{ env.MAVEN_CACHE_KEY }}
path: ${{ env.M2_ROOT }}

- name: "Restore SDK M2"
uses: actions/download-artifact@v6
uses: actions/download-artifact@v7
with:
name: ${{ env.SDK_M2_NAME }}
path: ${{ env.M2_ROOT }}

- name: "Restore SDK Targets"
uses: actions/download-artifact@v6
uses: actions/download-artifact@v7
with:
name: ${{ env.SDK_TARGETS_NAME }}

Expand Down Expand Up @@ -235,19 +235,19 @@ jobs:

- name: "Restore Dependencies"
id: restore-dependencies
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
key: ${{ env.MAVEN_CACHE_KEY }}
path: ${{ env.M2_ROOT }}

- name: "Restore SDK M2"
uses: actions/download-artifact@v6
uses: actions/download-artifact@v7
with:
name: ${{ env.SDK_M2_NAME }}
path: ${{ env.M2_ROOT }}

- name: "Restore SDK Targets"
uses: actions/download-artifact@v6
uses: actions/download-artifact@v7
with:
name: ${{ env.SDK_TARGETS_NAME }}

Expand Down Expand Up @@ -276,7 +276,7 @@ jobs:

- name: "Restore Dependencies"
id: restore-dependencies
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
key: ${{ env.MAVEN_CACHE_KEY }}
path: ${{ env.MAVEN_CACHE_DIR }}
Expand Down Expand Up @@ -319,13 +319,13 @@ jobs:

- name: "Restore Dependencies"
id: restore-dependencies
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
key: ${{ env.MAVEN_CACHE_KEY }}
path: ${{ env.MAVEN_CACHE_DIR }}

- name: "Restore SDK M2"
uses: actions/download-artifact@v6
uses: actions/download-artifact@v7
with:
name: ${{ env.SDK_M2_NAME }}
path: ${{ env.M2_ROOT }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,14 @@

class ClientCertificateAuthenticationLocalTest
{
private static final String CCA_PASSWORD = "cca-password";
private static final String JKS_PATH =
"src/test/resources/" + ClientCertificateAuthenticationLocalTest.class.getSimpleName() + "/client-cert.pkcs12";
private static final String JKS_PREFIX =
"src/test/resources/" + ClientCertificateAuthenticationLocalTest.class.getSimpleName();
private static final String SERVER_TRUST_STORE = JKS_PREFIX + "/certs/truststore.jks";
private static final String SERVER_TRUST_STORE_PASS = "changeit";
private static final String SERVER_KEY_STORE = JKS_PREFIX + "/certs/server.jks";
private static final String SERVER_KEY_STORE_PASS = "changeit";
private static final String CLIENT_KEY_STORE = JKS_PREFIX + "/certs/client1.p12";
private static final String CLIENT_KEY_STORE_PASS = "changeit";

@RegisterExtension
static final WireMockExtension server =
Expand Down Expand Up @@ -71,7 +76,7 @@ void testClientCorrectlyConfigured()
.authenticationType(AuthenticationType.CLIENT_CERTIFICATE_AUTHENTICATION)
.proxyType(ProxyType.INTERNET)
.keyStore(getClientKeyStore())
.keyStorePassword(CCA_PASSWORD)
.keyStorePassword(CLIENT_KEY_STORE_PASS)
.trustAllCertificates()
.build());

Expand All @@ -82,7 +87,7 @@ void testClientCorrectlyConfigured()

assertThat(context.getUserToken()).isNotNull();
assertThat(context.getUserToken()).isInstanceOf(X500Principal.class);
assertThat(((X500Principal) context.getUserToken()).getName()).contains("CN=localhost");
assertThat(((X500Principal) context.getUserToken()).getName()).contains("CN=client1");

// assert keystore methods have been used
Mockito.verify(destination).getKeyStorePassword();
Expand Down Expand Up @@ -122,8 +127,11 @@ private static WireMockConfiguration buildWireMockConfiguration()
.httpDisabled(true)
.dynamicHttpsPort()
.needClientAuth(true)
.trustStorePath(JKS_PATH)
.trustStorePassword(CCA_PASSWORD)
.keystorePath(SERVER_KEY_STORE)
.keystorePassword(SERVER_KEY_STORE_PASS)
.keyManagerPassword(SERVER_KEY_STORE_PASS)
.trustStorePath(SERVER_TRUST_STORE)
.trustStorePassword(SERVER_TRUST_STORE_PASS)
.trustStoreType("JKS");
}

Expand All @@ -134,7 +142,7 @@ private static KeyStore getClientKeyStore()
NoSuchAlgorithmException
{
final KeyStore keyStore = KeyStore.getInstance("PKCS12");
keyStore.load(new FileInputStream(JKS_PATH), CCA_PASSWORD.toCharArray());
keyStore.load(new FileInputStream(CLIENT_KEY_STORE), CLIENT_KEY_STORE_PASS.toCharArray());
return keyStore;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,112 @@ The credential files are generated from command line. This process can be automa

## CREATE CLIENT CREDENTIALS

* Generate key pair
```bash
openssl req -x509 -newkey rsa:2048 -utf8 -days 3650 -nodes -config client-cert.conf -keyout client-cert.key -out client-cert.crt
* Client keystore
```
docker run --rm -v $(pwd)/certs:/certs eclipse-temurin:17-jre \
keytool -genkeypair \
-alias client1 \
-keyalg RSA \
-keysize 2048 \
-validity 3650 \
-storetype JKS \
-keystore /certs/client1.jks \
-storepass changeit \
-keypass changeit \
-dname "CN=client1"
```

<details><summary>(Windows)</summary>

* Generate _PKCS#12_ keystore
```bash
openssl pkcs12 -export -inkey client-cert.key -in client-cert.crt -out client-cert.p12 -password "pass:cca-password"
```
docker run --rm -v ${pwd}/certs:/certs eclipse-temurin:17-jre keytool -genkeypair -alias client1 -keyalg RSA -keysize 2048 -validity 3650 -storetype JKS -keystore /certs/client1.jks -storepass changeit -keypass changeit -dname "CN=client1"
```

* Transform to JKS
</details>

* Export client certificate
```
docker run --rm -v $(pwd)/certs:/certs eclipse-temurin:17-jre \
keytool -exportcert \
-alias client1 \
-keystore /certs/client1.jks \
-storepass changeit \
-file /certs/client1.cer
```

<details><summary>(Windows)</summary>

```
docker run --rm -v ${pwd}/certs:/certs eclipse-temurin:17-jre keytool -exportcert -alias client1 -keystore /certs/client1.jks -storepass changeit -file /certs/client1.cer
```

```bash
keytool -importkeystore -deststorepass "cca-password" -destkeypass "cca-password" -srckeystore client-cert.p12 -srcstorepass "cca-password" -deststoretype pkcs12 -destkeystore client-cert.pkcs12
</details>

* PKCS12 keystore for client

```
docker run --rm -v $(pwd)/certs:/certs eclipse-temurin:17-jre \
keytool -importkeystore \
-srckeystore /certs/client1.jks \
-srcstoretype JKS \
-srcstorepass changeit \
-destkeystore /certs/client1.p12 \
-deststoretype PKCS12 \
-deststorepass changeit \
-destkeypass changeit
```

<details><summary>(Windows)</summary>

```
docker run --rm -v ${pwd}/certs:/certs eclipse-temurin:17-jre keytool -importkeystore -srckeystore /certs/client1.jks -srcstoretype JKS -srcstorepass changeit -destkeystore /certs/client1.p12 -deststoretype PKCS12 -deststorepass changeit -destkeypass changeit
```

</details>


## CREATE SERVER CREDENTIALS

* Server keystore. Run once
```
docker run --rm -v $(pwd)/certs:/certs eclipse-temurin:17-jre \
keytool -genkeypair \
-alias wiremock-server \
-keyalg RSA \
-keysize 2048 \
-validity 3650 \
-storetype JKS \
-keystore /certs/server.jks \
-storepass changeit \
-keypass changeit \
-dname "CN=localhost" \
-ext SAN=dns:localhost,ip:127.0.0.1
```

<details><summary>(Windows)</summary>

```
docker run --rm -v ${pwd}/certs:/certs eclipse-temurin:17-jre keytool -genkeypair -alias wiremock-server -keyalg RSA -keysize 2048 -validity 3650 -storetype JKS -keystore /certs/server.jks -storepass changeit -keypass changeit -dname "CN=localhost" -ext SAN=dns:localhost,ip:127.0.0.1
```

</details>

* Truststore for wiremock

```
docker run --rm -v $(pwd)/certs:/certs eclipse-temurin:17-jre \
keytool -importcert \
-alias client1 \
-file /certs/client1.cer \
-keystore /certs/truststore.jks \
-storepass changeit \
-noprompt
```

<details><summary>(Windows)</summary>

```
docker run --rm -v ${pwd}/certs:/certs eclipse-temurin:17-jre keytool -importcert -alias client1 -file /certs/client1.cer -keystore /certs/truststore.jks -storepass changeit -noprompt
```

</details>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Loading