Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
regenerate
  • Loading branch information
Eric Durand-Tremblay committed Jun 14, 2022
commit 687dbf90224f6ddbf210f77df2d60c78f858dd10
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,18 @@ public ApiResponse<ModelWithNullableObjectProperty> operationWithHttpInfo() thro
if (memberVarResponseInterceptor != null) {
memberVarResponseInterceptor.accept(localVarResponse);
}
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("operation", localVarResponse);
}
return new ApiResponse<ModelWithNullableObjectProperty>(
try {
if (localVarResponse.statusCode()/ 100 != 2) {
throw getApiException("operation", localVarResponse);
}
return new ApiResponse<ModelWithNullableObjectProperty>(
localVarResponse.statusCode(),
localVarResponse.headers().map(),
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<ModelWithNullableObjectProperty>() {})
memberVarObjectMapper.readValue(localVarResponse.body(), new TypeReference<ModelWithNullableObjectProperty>() {}) // closes the InputStream

);
} finally {
}
} catch (IOException e) {
throw new ApiException(e);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public class ModelWithNullableObjectProperty {
public static final String JSON_PROPERTY_PROPERTY_WITH_NULL_AND_TWO_TYPES = "propertyWithNullAndTwoTypes";
private JsonNullable<OneOfnullPropertyTypeOtherPropertyType> propertyWithNullAndTwoTypes = JsonNullable.<OneOfnullPropertyTypeOtherPropertyType>undefined();

public ModelWithNullableObjectProperty() {
}

public ModelWithNullableObjectProperty propertyName(PropertyType propertyName) {
this.propertyName = propertyName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public class OtherPropertyType {
public static final String JSON_PROPERTY_BAR = "bar";
private String bar;

public OtherPropertyType() {
}

public OtherPropertyType bar(String bar) {
this.bar = bar;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ public class PropertyType {
public static final String JSON_PROPERTY_FOO = "foo";
private String foo;

public PropertyType() {
}

public PropertyType foo(String foo) {
this.foo = foo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ package org.openapitools.client.apis
import org.openapitools.client.models.ModelWithNullableObjectProperty

import org.openapitools.client.infrastructure.ApiClient
import org.openapitools.client.infrastructure.ApiInfrastructureResponse
import org.openapitools.client.infrastructure.ClientException
import org.openapitools.client.infrastructure.ClientError
import org.openapitools.client.infrastructure.ServerException
Expand Down Expand Up @@ -53,11 +54,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath
@Suppress("UNCHECKED_CAST")
@Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class)
fun operation() : ModelWithNullableObjectProperty? {
val localVariableConfig = operationRequestConfig()

val localVarResponse = request<Unit, ModelWithNullableObjectProperty>(
localVariableConfig
)
val localVarResponse = operationWithHttpInfo()

return when (localVarResponse.responseType) {
ResponseType.Success -> (localVarResponse as Success<*>).data as ModelWithNullableObjectProperty?
Expand All @@ -74,6 +71,24 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath) : ApiClient(basePath
}
}

/**
*
*
* @return ApiInfrastructureResponse<ModelWithNullableObjectProperty?>
* @throws UnsupportedOperationException If the API returns an informational or redirection response
* @throws ClientException If the API returns a client error response
* @throws ServerException If the API returns a server error response
*/
@Suppress("UNCHECKED_CAST")
@Throws(UnsupportedOperationException::class, ClientException::class, ServerException::class)
fun operationWithHttpInfo() : ApiInfrastructureResponse<ModelWithNullableObjectProperty?> {
val localVariableConfig = operationRequestConfig()

return request<Unit, ModelWithNullableObjectProperty>(
localVariableConfig
)
}

/**
* To obtain the request config of the operation operation
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ import {
OtherPropertyTypeFromJSON,
OtherPropertyTypeFromJSONTyped,
OtherPropertyTypeToJSON,
} from './OtherPropertyType';
import {
PropertyType,
PropertyTypeFromJSON,
PropertyTypeFromJSONTyped,
PropertyTypeToJSON,
} from './';
} from './PropertyType';

/**
*
Expand Down