Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 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
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
5 changes: 3 additions & 2 deletions datamodel/openapi/openapi-api-apache-sample/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
<artifactId>openapi-core</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<groupId>com.sap.cloud.sdk.cloudplatform</groupId>
<artifactId>cloudplatform-connectivity</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand All @@ -41,6 +41,7 @@
<groupId>com.sap.cloud.sdk.datamodel</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<configuration>
<apiMaturity>released</apiMaturity>
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
<enableOneOfAnyOfGeneration>true</enableOneOfAnyOfGeneration>
<deleteOutputDirectory>true</deleteOutputDirectory>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,102 +1,104 @@
/*
* SodaStore API
* API for managing soda products and orders in SodaStore.
*
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
* Copyright (c) 2025 SAP SE or an SAP affiliate company. All rights reserved.
*/

package com.sap.cloud.sdk.datamodel.openapi.apache.sample.api;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.StringJoiner;

import javax.annotation.Nonnull;

import com.fasterxml.jackson.core.type.TypeReference;
import com.sap.cloud.sdk.cloudplatform.connectivity.Destination;
import com.sap.cloud.sdk.datamodel.openapi.apache.sample.model.Order;
import com.sap.cloud.sdk.services.openapi.apache.ApiClient;
import com.sap.cloud.sdk.services.openapi.apache.ApiException;
import com.sap.cloud.sdk.services.openapi.apache.BaseApi;
import com.sap.cloud.sdk.services.openapi.apache.Configuration;
import com.sap.cloud.sdk.services.openapi.apache.Pair;
import com.sap.cloud.sdk.services.openapi.core.OpenApiRequestException;

/**
* SodaStore API in version 1.0.0.
*
* API for managing soda products and orders in SodaStore.
*/
public class OrdersApi extends BaseApi
{

/**
* Instantiates this API class to invoke operations on the SodaStore API
*/
public OrdersApi()
{
super(Configuration.getDefaultApiClient());
}

public OrdersApi( ApiClient apiClient )
/**
* Instantiates this API class to invoke operations on the SodaStore API.
*
* @param httpDestination
* The destination that API should be used with
*/
public OrdersApi( @Nonnull final Destination httpDestination )
{
super(apiClient);
super(httpDestination);
}

/**
* Create a new order
* Instantiates this API class to invoke operations on the SodaStore API based on a given {@link ApiClient}.
*
* @param order
* The order details (required)
* @return Order
* @throws ApiException
* if fails to make API call
* @param apiClient
* ApiClient to invoke the API on
*/
public Order ordersPost( @javax.annotation.Nonnull Order order )
throws ApiException
public OrdersApi( @Nonnull final ApiClient apiClient )
{
return this.ordersPost(order, Collections.emptyMap());
super(apiClient);
}

/**
* <p>
* Create a new order
* <p>
* <p>
* <b>201</b> - The created order
*
* @param order
* The order details (required)
* @param additionalHeaders
* additionalHeaders for this call
* The order details
* @return Order
* @throws ApiException
* if fails to make API call
* @throws OpenApiRequestException
* if an error occurs while attempting to invoke the API
*/
public Order ordersPost( @javax.annotation.Nonnull Order order, Map<String, String> additionalHeaders )
throws ApiException
@Nonnull
public Order ordersPost( @Nonnull final Order order )
throws OpenApiRequestException
{
Object localVarPostBody = order;
final Object localVarPostBody = order;

// verify the required parameter 'order' is set
if( order == null ) {
throw new ApiException(400, "Missing the required parameter 'order' when calling ordersPost");
throw new OpenApiRequestException("Missing the required parameter 'order' when calling ordersPost")
.statusCode(400);
}

// create path and map variables
String localVarPath = "/orders";
final String localVarPath = "/orders";

StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
final StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();

localVarHeaderParams.putAll(additionalHeaders);
final List<Pair> localVarQueryParams = new ArrayList<Pair>();
final List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
final Map<String, String> localVarHeaderParams = new HashMap<String, String>();
final Map<String, Object> localVarFormParams = new HashMap<String, Object>();

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

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

String[] localVarAuthNames = new String[] { "apiKeyAuth" };
final String localVarContentType = ApiClient.selectHeaderContentType(localVarContentTypes);

TypeReference<Order> localVarReturnType = new TypeReference<Order>()
final TypeReference<Order> localVarReturnType = new TypeReference<Order>()
{
};
return apiClient
Expand All @@ -108,55 +110,9 @@ public Order ordersPost( @javax.annotation.Nonnull Order order, Map<String, Stri
localVarQueryStringJoiner.toString(),
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType);
}

@Override
public <T> T invokeAPI(
String url,
String method,
Object request,
TypeReference<T> returnType,
Map<String, String> additionalHeaders )
throws ApiException
{
String localVarPath = url.replace(apiClient.getBaseURL(), "");
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();

localVarHeaderParams.putAll(additionalHeaders);

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

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

String[] localVarAuthNames = new String[] { "apiKeyAuth" };

return apiClient
.invokeAPI(
localVarPath,
method,
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),
request,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
returnType);
}
}
Loading