Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 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
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 33 additions & 3 deletions datamodel/openapi/openapi-api-apache-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,36 @@
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
</dependency>
<!-- test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.wiremock</groupId>
<artifactId>wiremock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-params</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down Expand Up @@ -82,11 +112,11 @@
<phase>generate-sources</phase>
<configuration>
<inputSpec>${project.basedir}/src/main/resources/sodastore.yaml</inputSpec>
<apiPackage>com.sap.cloud.sdk.datamodel.openapi.apache.sample.api</apiPackage>
<modelPackage>com.sap.cloud.sdk.datamodel.openapi.apache.sample.model</modelPackage>
<apiPackage>com.sap.cloud.sdk.datamodel.openapi.apache.sodastore.api</apiPackage>
<modelPackage>com.sap.cloud.sdk.datamodel.openapi.apache.sodastore.model</modelPackage>
<typeMappings>File=byte[]</typeMappings>
<additionalProperties>
<library>apache-httpclient</library>
<supportUrlQuery>false</supportUrlQuery>
<pojoBuilderMethodName>create</pojoBuilderMethodName>
<pojoConstructorVisibility>protected</pojoConstructorVisibility>
<useOneOfInterfaces>true</useOneOfInterfaces>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,13 +99,13 @@ public Pet addPet( @Nonnull final PetInput pet )

final String[] localVarAccepts = { "application/json" };
final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts);

final String[] localVarContentTypes = { "application/json" };
final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes);

final TypeReference<Pet> localVarReturnType = new TypeReference<Pet>()
{
};

return apiClient
.invokeAPI(
localVarPath,
Expand Down Expand Up @@ -161,7 +161,6 @@ public OpenApiResponse deletePet( @Nonnull final Long id )

final String[] localVarAccepts = { "application/json" };
final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts);

final String[] localVarContentTypes = {

};
Expand All @@ -170,6 +169,7 @@ public OpenApiResponse deletePet( @Nonnull final Long id )
final TypeReference<OpenApiResponse> localVarReturnType = new TypeReference<OpenApiResponse>()
{
};

return apiClient
.invokeAPI(
localVarPath,
Expand Down Expand Up @@ -225,7 +225,6 @@ public Pet findPetById( @Nonnull final Long id )

final String[] localVarAccepts = { "application/json", "application/xml", "text/xml", "text/html" };
final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts);

final String[] localVarContentTypes = {

};
Expand All @@ -234,6 +233,7 @@ public Pet findPetById( @Nonnull final Long id )
final TypeReference<Pet> localVarReturnType = new TypeReference<Pet>()
{
};

return apiClient
.invokeAPI(
localVarPath,
Expand Down Expand Up @@ -287,7 +287,6 @@ public List<Pet> findPets( @Nullable final List<String> tags, @Nullable final In

final String[] localVarAccepts = { "application/json", "application/xml", "text/xml", "text/html" };
final String localVarAccept = ApiClient.selectHeaderAccept(localVarAccepts);

final String[] localVarContentTypes = {

};
Expand All @@ -296,6 +295,7 @@ public List<Pet> findPets( @Nullable final List<String> tags, @Nullable final In
final TypeReference<List<Pet>> localVarReturnType = new TypeReference<List<Pet>>()
{
};

return apiClient
.invokeAPI(
localVarPath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@

package com.sap.cloud.sdk.datamodel.openapi.apache.petstore.model;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.Set;
import java.util.StringJoiner;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
Expand Down Expand Up @@ -232,78 +229,4 @@ private String toIndentedString( final java.lang.Object o )
return o.toString().replace("\n", "\n ");
}

/**
* Convert the instance into URL query string.
*
* @return URL query string
*/
public String toUrlQueryString()
{
return toUrlQueryString(null);
}

/**
* Convert the instance into URL query string.
*
* @param prefix
* prefix of the query string
* @return URL query string
*/
public String toUrlQueryString( String prefix )
{
String suffix = "";
String containerSuffix = "";
String containerPrefix = "";
if( prefix == null ) {
// style=form, explode=true, e.g. /pet?name=cat&type=manx
prefix = "";
} else {
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
prefix = prefix + "[";
suffix = "]";
containerSuffix = "]";
containerPrefix = "[";
}

StringJoiner joiner = new StringJoiner("&");

// add `code` to the URL query string
if( getCode() != null ) {
try {
joiner
.add(
String
.format(
"%scode%s=%s",
prefix,
suffix,
URLEncoder.encode(String.valueOf(getCode()), "UTF-8").replaceAll("\\+", "%20")));
}
catch( UnsupportedEncodingException e ) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}

// add `message` to the URL query string
if( getMessage() != null ) {
try {
joiner
.add(
String
.format(
"%smessage%s=%s",
prefix,
suffix,
URLEncoder.encode(String.valueOf(getMessage()), "UTF-8").replaceAll("\\+", "%20")));
}
catch( UnsupportedEncodingException e ) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}

return joiner.toString();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@

package com.sap.cloud.sdk.datamodel.openapi.apache.petstore.model;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.Set;
import java.util.StringJoiner;

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
Expand Down Expand Up @@ -275,96 +272,4 @@ private String toIndentedString( final java.lang.Object o )
return o.toString().replace("\n", "\n ");
}

/**
* Convert the instance into URL query string.
*
* @return URL query string
*/
public String toUrlQueryString()
{
return toUrlQueryString(null);
}

/**
* Convert the instance into URL query string.
*
* @param prefix
* prefix of the query string
* @return URL query string
*/
public String toUrlQueryString( String prefix )
{
String suffix = "";
String containerSuffix = "";
String containerPrefix = "";
if( prefix == null ) {
// style=form, explode=true, e.g. /pet?name=cat&type=manx
prefix = "";
} else {
// deepObject style e.g. /pet?id[name]=cat&id[type]=manx
prefix = prefix + "[";
suffix = "]";
containerSuffix = "]";
containerPrefix = "[";
}

StringJoiner joiner = new StringJoiner("&");

// add `id` to the URL query string
if( getId() != null ) {
try {
joiner
.add(
String
.format(
"%sid%s=%s",
prefix,
suffix,
URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
}
catch( UnsupportedEncodingException e ) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}

// add `name` to the URL query string
if( getName() != null ) {
try {
joiner
.add(
String
.format(
"%sname%s=%s",
prefix,
suffix,
URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
}
catch( UnsupportedEncodingException e ) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}

// add `tag` to the URL query string
if( getTag() != null ) {
try {
joiner
.add(
String
.format(
"%stag%s=%s",
prefix,
suffix,
URLEncoder.encode(String.valueOf(getTag()), "UTF-8").replaceAll("\\+", "%20")));
}
catch( UnsupportedEncodingException e ) {
// Should never happen, UTF-8 is always supported
throw new RuntimeException(e);
}
}

return joiner.toString();
}

}
Loading