[java][okhttp-gson] Remove JAX-RS dependency from generated okhttp-gson java client (#15896)

* Remove JAX-RS dependency from generated okhttp-gson java client

* update samples

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
bcalvez 2023-06-27 10:53:10 +02:00 committed by GitHub
parent dcc53c0d53
commit 7a73f75f70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
73 changed files with 82 additions and 167 deletions

View File

@ -6,7 +6,6 @@ import {{invokerPackage}}.ApiException;
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
import {{javaxPackage}}.ws.rs.core.GenericType;
//import com.fasterxml.jackson.annotation.JsonValue;
@ -35,7 +34,7 @@ public abstract class AbstractOpenApiSchema {
*
* @return an instance of the actual schema/object
*/
public abstract Map<String, GenericType> getSchemas();
public abstract Map<String, Class<?>> getSchemas();
/**
* Get the actual instance

View File

@ -1,4 +1,4 @@
import {{javaxPackage}}.ws.rs.core.GenericType;
import java.io.IOException;
import java.lang.reflect.Type;
@ -113,7 +113,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
}
// store a list of schema names defined in anyOf
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
public static final Map<String, Class<?>> schemas = new HashMap<String, Class<?>>();
public {{classname}}() {
super("anyOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}});
@ -128,13 +128,12 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
{{/anyOf}}
static {
{{#anyOf}}
schemas.put("{{{.}}}", new GenericType<{{{.}}}>() {
});
schemas.put("{{{.}}}", {{{.}}}.class);
{{/anyOf}}
}
@Override
public Map<String, GenericType> getSchemas() {
public Map<String, Class<?>> getSchemas() {
return {{classname}}.schemas;
}

View File

@ -49,7 +49,6 @@ import java.util.Map;
{{#supportStreaming}}
import java.io.InputStream;
{{/supportStreaming}}
import {{javaxPackage}}.ws.rs.core.GenericType;
{{#operations}}
public class {{classname}} {

View File

@ -9,7 +9,6 @@ import java.util.Map.Entry;
import java.util.TreeMap;
{{/caseInsensitiveResponseHeaders}}
import {{javaxPackage}}.ws.rs.core.GenericType;
/**
* <p>ApiException class.</p>
@ -23,7 +22,7 @@ public class ApiException extends{{#useRuntimeException}} RuntimeException {{/us
{{#errorObjectType}}
private {{{errorObjectType}}} errorObject = null;
{{/errorObjectType}}
/**
* <p>Constructor for ApiException.</p>
*/

View File

@ -1,4 +1,4 @@
import {{javaxPackage}}.ws.rs.core.GenericType;
import java.io.IOException;
import java.lang.reflect.Type;
@ -126,7 +126,7 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
}
// store a list of schema names defined in oneOf
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
public static final Map<String, Class<?>> schemas = new HashMap<String, Class<?>>();
public {{classname}}() {
super("oneOf", {{#isNullable}}Boolean.TRUE{{/isNullable}}{{^isNullable}}Boolean.FALSE{{/isNullable}});
@ -141,13 +141,12 @@ public class {{classname}} extends AbstractOpenApiSchema{{#vendorExtensions.x-im
{{/oneOf}}
static {
{{#oneOf}}
schemas.put("{{{.}}}", new GenericType<{{{.}}}>() {
});
schemas.put("{{{.}}}", {{{.}}}.class);
{{/oneOf}}
}
@Override
public Map<String, GenericType> getSchemas() {
public Map<String, Class<?>> getSchemas() {
return {{classname}}.schemas;
}

View File

@ -16,7 +16,6 @@ package org.openapitools.client;
import java.util.Map;
import java.util.List;
import javax.ws.rs.core.GenericType;
/**
* <p>ApiException class.</p>
@ -27,7 +26,7 @@ public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;
private String responseBody = null;
/**
* <p>Constructor for ApiException.</p>
*/

View File

@ -36,7 +36,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class BodyApi {
private ApiClient localVarApiClient;

View File

@ -33,7 +33,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class FormApi {
private ApiClient localVarApiClient;

View File

@ -33,7 +33,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class HeaderApi {
private ApiClient localVarApiClient;

View File

@ -33,7 +33,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class PathApi {
private ApiClient localVarApiClient;

View File

@ -40,7 +40,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class QueryApi {
private ApiClient localVarApiClient;

View File

@ -17,7 +17,6 @@ import org.openapitools.client.ApiException;
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
import javax.ws.rs.core.GenericType;
//import com.fasterxml.jackson.annotation.JsonValue;
@ -46,7 +45,7 @@ public abstract class AbstractOpenApiSchema {
*
* @return an instance of the actual schema/object
*/
public abstract Map<String, GenericType> getSchemas();
public abstract Map<String, Class<?>> getSchemas();
/**
* Get the actual instance

View File

@ -16,7 +16,6 @@ package org.openapitools.client;
import java.util.Map;
import java.util.List;
import javax.ws.rs.core.GenericType;
/**
* <p>ApiException class.</p>
@ -27,7 +26,7 @@ public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;
private String responseBody = null;
/**
* <p>Constructor for ApiException.</p>
*/

View File

@ -35,7 +35,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.io.InputStream;
import javax.ws.rs.core.GenericType;
public class PingApi {
private ApiClient localVarApiClient;

View File

@ -17,7 +17,6 @@ import org.openapitools.client.ApiException;
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
import javax.ws.rs.core.GenericType;
//import com.fasterxml.jackson.annotation.JsonValue;
@ -46,7 +45,7 @@ public abstract class AbstractOpenApiSchema {
*
* @return an instance of the actual schema/object
*/
public abstract Map<String, GenericType> getSchemas();
public abstract Map<String, Class<?>> getSchemas();
/**
* Get the actual instance

View File

@ -16,7 +16,6 @@ package org.openapitools.client;
import java.util.Map;
import java.util.List;
import javax.ws.rs.core.GenericType;
/**
* <p>ApiException class.</p>
@ -27,7 +26,7 @@ public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;
private String responseBody = null;
/**
* <p>Constructor for ApiException.</p>
*/

View File

@ -36,7 +36,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class PetApi {
private ApiClient localVarApiClient;

View File

@ -34,7 +34,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class StoreApi {
private ApiClient localVarApiClient;

View File

@ -35,7 +35,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class UserApi {
private ApiClient localVarApiClient;

View File

@ -17,7 +17,6 @@ import org.openapitools.client.ApiException;
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
import javax.ws.rs.core.GenericType;
//import com.fasterxml.jackson.annotation.JsonValue;
@ -46,7 +45,7 @@ public abstract class AbstractOpenApiSchema {
*
* @return an instance of the actual schema/object
*/
public abstract Map<String, GenericType> getSchemas();
public abstract Map<String, Class<?>> getSchemas();
/**
* Get the actual instance

View File

@ -16,7 +16,6 @@ package org.openapitools.client;
import java.util.Map;
import java.util.List;
import javax.ws.rs.core.GenericType;
/**
* <p>ApiException class.</p>
@ -27,7 +26,7 @@ public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;
private String responseBody = null;
/**
* <p>Constructor for ApiException.</p>
*/

View File

@ -37,7 +37,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class AnotherFakeApi {
private ApiClient localVarApiClient;

View File

@ -45,7 +45,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class FakeApi {
private ApiClient localVarApiClient;

View File

@ -37,7 +37,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class FakeClassnameTags123Api {
private ApiClient localVarApiClient;

View File

@ -40,7 +40,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class PetApi {
private ApiClient localVarApiClient;

View File

@ -37,7 +37,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class StoreApi {
private ApiClient localVarApiClient;

View File

@ -38,7 +38,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class UserApi {
private ApiClient localVarApiClient;

View File

@ -17,7 +17,6 @@ import org.openapitools.client.ApiException;
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
import javax.ws.rs.core.GenericType;
//import com.fasterxml.jackson.annotation.JsonValue;
@ -46,7 +45,7 @@ public abstract class AbstractOpenApiSchema {
*
* @return an instance of the actual schema/object
*/
public abstract Map<String, GenericType> getSchemas();
public abstract Map<String, Class<?>> getSchemas();
/**
* Get the actual instance

View File

@ -16,7 +16,6 @@ package org.openapitools.client;
import java.util.Map;
import java.util.List;
import javax.ws.rs.core.GenericType;
/**
* <p>ApiException class.</p>
@ -27,7 +26,7 @@ public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;
private String responseBody = null;
/**
* <p>Constructor for ApiException.</p>
*/

View File

@ -36,7 +36,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class PetApi {
private ApiClient localVarApiClient;

View File

@ -17,7 +17,6 @@ import org.openapitools.client.ApiException;
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
import javax.ws.rs.core.GenericType;
//import com.fasterxml.jackson.annotation.JsonValue;
@ -46,7 +45,7 @@ public abstract class AbstractOpenApiSchema {
*
* @return an instance of the actual schema/object
*/
public abstract Map<String, GenericType> getSchemas();
public abstract Map<String, Class<?>> getSchemas();
/**
* Get the actual instance

View File

@ -16,7 +16,6 @@ package org.openapitools.client;
import java.util.Map;
import java.util.List;
import javax.ws.rs.core.GenericType;
/**
* <p>ApiException class.</p>
@ -27,7 +26,7 @@ public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;
private String responseBody = null;
/**
* <p>Constructor for ApiException.</p>
*/

View File

@ -36,7 +36,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class PetApi {
private ApiClient localVarApiClient;

View File

@ -34,7 +34,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class StoreApi {
private ApiClient localVarApiClient;

View File

@ -35,7 +35,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class UserApi {
private ApiClient localVarApiClient;

View File

@ -17,7 +17,6 @@ import org.openapitools.client.ApiException;
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
import javax.ws.rs.core.GenericType;
//import com.fasterxml.jackson.annotation.JsonValue;
@ -46,7 +45,7 @@ public abstract class AbstractOpenApiSchema {
*
* @return an instance of the actual schema/object
*/
public abstract Map<String, GenericType> getSchemas();
public abstract Map<String, Class<?>> getSchemas();
/**
* Get the actual instance

View File

@ -16,7 +16,6 @@ package org.openapitools.client;
import java.util.Map;
import java.util.List;
import javax.ws.rs.core.GenericType;
/**
* <p>ApiException class.</p>
@ -27,7 +26,7 @@ public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;
private String responseBody = null;
/**
* <p>Constructor for ApiException.</p>
*/

View File

@ -34,7 +34,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class AnotherFakeApi {
private ApiClient localVarApiClient;

View File

@ -42,7 +42,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class FakeApi {
private ApiClient localVarApiClient;

View File

@ -34,7 +34,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class FakeClassnameTags123Api {
private ApiClient localVarApiClient;

View File

@ -37,7 +37,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class PetApi {
private ApiClient localVarApiClient;

View File

@ -34,7 +34,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class StoreApi {
private ApiClient localVarApiClient;

View File

@ -35,7 +35,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class UserApi {
private ApiClient localVarApiClient;

View File

@ -17,7 +17,6 @@ import org.openapitools.client.ApiException;
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
import javax.ws.rs.core.GenericType;
//import com.fasterxml.jackson.annotation.JsonValue;
@ -46,7 +45,7 @@ public abstract class AbstractOpenApiSchema {
*
* @return an instance of the actual schema/object
*/
public abstract Map<String, GenericType> getSchemas();
public abstract Map<String, Class<?>> getSchemas();
/**
* Get the actual instance

View File

@ -16,7 +16,6 @@ package org.openapitools.client;
import java.util.Map;
import java.util.List;
import javax.ws.rs.core.GenericType;
/**
* <p>ApiException class.</p>
@ -27,7 +26,7 @@ public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;
private String responseBody = null;
/**
* <p>Constructor for ApiException.</p>
*/

View File

@ -36,7 +36,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class PetApi {
private ApiClient localVarApiClient;

View File

@ -34,7 +34,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class StoreApi {
private ApiClient localVarApiClient;

View File

@ -35,7 +35,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class UserApi {
private ApiClient localVarApiClient;

View File

@ -17,7 +17,6 @@ import org.openapitools.client.ApiException;
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
import javax.ws.rs.core.GenericType;
//import com.fasterxml.jackson.annotation.JsonValue;
@ -46,7 +45,7 @@ public abstract class AbstractOpenApiSchema {
*
* @return an instance of the actual schema/object
*/
public abstract Map<String, GenericType> getSchemas();
public abstract Map<String, Class<?>> getSchemas();
/**
* Get the actual instance

View File

@ -16,7 +16,6 @@ package org.openapitools.client;
import java.util.Map;
import java.util.List;
import javax.ws.rs.core.GenericType;
/**
* <p>ApiException class.</p>
@ -27,7 +26,7 @@ public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;
private String responseBody = null;
/**
* <p>Constructor for ApiException.</p>
*/

View File

@ -36,7 +36,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class PetApi {
private ApiClient localVarApiClient;

View File

@ -34,7 +34,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class StoreApi {
private ApiClient localVarApiClient;

View File

@ -35,7 +35,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class UserApi {
private ApiClient localVarApiClient;

View File

@ -17,7 +17,6 @@ import org.openapitools.client.ApiException;
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
import javax.ws.rs.core.GenericType;
//import com.fasterxml.jackson.annotation.JsonValue;
@ -46,7 +45,7 @@ public abstract class AbstractOpenApiSchema {
*
* @return an instance of the actual schema/object
*/
public abstract Map<String, GenericType> getSchemas();
public abstract Map<String, Class<?>> getSchemas();
/**
* Get the actual instance

View File

@ -16,7 +16,6 @@ package org.openapitools.client;
import java.util.Map;
import java.util.List;
import javax.ws.rs.core.GenericType;
/**
* <p>ApiException class.</p>
@ -27,7 +26,7 @@ public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;
private String responseBody = null;
/**
* <p>Constructor for ApiException.</p>
*/

View File

@ -34,7 +34,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class AnotherFakeApi {
private ApiClient localVarApiClient;

View File

@ -34,7 +34,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class DefaultApi {
private ApiClient localVarApiClient;

View File

@ -43,7 +43,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class FakeApi {
private ApiClient localVarApiClient;

View File

@ -34,7 +34,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class FakeClassnameTags123Api {
private ApiClient localVarApiClient;

View File

@ -36,7 +36,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class PetApi {
private ApiClient localVarApiClient;

View File

@ -34,7 +34,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class StoreApi {
private ApiClient localVarApiClient;

View File

@ -35,7 +35,6 @@ import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class UserApi {
private ApiClient localVarApiClient;

View File

@ -17,7 +17,6 @@ import org.openapitools.client.ApiException;
import java.util.Objects;
import java.lang.reflect.Type;
import java.util.Map;
import javax.ws.rs.core.GenericType;
//import com.fasterxml.jackson.annotation.JsonValue;
@ -46,7 +45,7 @@ public abstract class AbstractOpenApiSchema {
*
* @return an instance of the actual schema/object
*/
public abstract Map<String, GenericType> getSchemas();
public abstract Map<String, Class<?>> getSchemas();
/**
* Get the actual instance

View File

@ -25,7 +25,7 @@ import java.math.BigDecimal;
import org.openapitools.client.model.Apple;
import org.openapitools.client.model.Banana;
import javax.ws.rs.core.GenericType;
import java.io.IOException;
import java.lang.reflect.Type;
@ -146,7 +146,7 @@ public class Fruit extends AbstractOpenApiSchema {
}
// store a list of schema names defined in oneOf
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
public static final Map<String, Class<?>> schemas = new HashMap<String, Class<?>>();
public Fruit() {
super("oneOf", Boolean.FALSE);
@ -163,14 +163,12 @@ public class Fruit extends AbstractOpenApiSchema {
}
static {
schemas.put("Apple", new GenericType<Apple>() {
});
schemas.put("Banana", new GenericType<Banana>() {
});
schemas.put("Apple", Apple.class);
schemas.put("Banana", Banana.class);
}
@Override
public Map<String, GenericType> getSchemas() {
public Map<String, Class<?>> getSchemas() {
return Fruit.schemas;
}

View File

@ -25,7 +25,7 @@ import java.math.BigDecimal;
import org.openapitools.client.model.AppleReq;
import org.openapitools.client.model.BananaReq;
import javax.ws.rs.core.GenericType;
import java.io.IOException;
import java.lang.reflect.Type;
@ -146,7 +146,7 @@ public class FruitReq extends AbstractOpenApiSchema {
}
// store a list of schema names defined in oneOf
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
public static final Map<String, Class<?>> schemas = new HashMap<String, Class<?>>();
public FruitReq() {
super("oneOf", Boolean.TRUE);
@ -163,14 +163,12 @@ public class FruitReq extends AbstractOpenApiSchema {
}
static {
schemas.put("AppleReq", new GenericType<AppleReq>() {
});
schemas.put("BananaReq", new GenericType<BananaReq>() {
});
schemas.put("AppleReq", AppleReq.class);
schemas.put("BananaReq", BananaReq.class);
}
@Override
public Map<String, GenericType> getSchemas() {
public Map<String, Class<?>> getSchemas() {
return FruitReq.schemas;
}

View File

@ -25,7 +25,7 @@ import java.math.BigDecimal;
import org.openapitools.client.model.Apple;
import org.openapitools.client.model.Banana;
import javax.ws.rs.core.GenericType;
import java.io.IOException;
import java.lang.reflect.Type;
@ -137,7 +137,7 @@ public class GmFruit extends AbstractOpenApiSchema {
}
// store a list of schema names defined in anyOf
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
public static final Map<String, Class<?>> schemas = new HashMap<String, Class<?>>();
public GmFruit() {
super("anyOf", Boolean.FALSE);
@ -154,14 +154,12 @@ public class GmFruit extends AbstractOpenApiSchema {
}
static {
schemas.put("Apple", new GenericType<Apple>() {
});
schemas.put("Banana", new GenericType<Banana>() {
});
schemas.put("Apple", Apple.class);
schemas.put("Banana", Banana.class);
}
@Override
public Map<String, GenericType> getSchemas() {
public Map<String, Class<?>> getSchemas() {
return GmFruit.schemas;
}

View File

@ -25,7 +25,7 @@ import org.openapitools.client.model.Pig;
import org.openapitools.client.model.Whale;
import org.openapitools.client.model.Zebra;
import javax.ws.rs.core.GenericType;
import java.io.IOException;
import java.lang.reflect.Type;
@ -191,7 +191,7 @@ public class Mammal extends AbstractOpenApiSchema {
}
// store a list of schema names defined in oneOf
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
public static final Map<String, Class<?>> schemas = new HashMap<String, Class<?>>();
public Mammal() {
super("oneOf", Boolean.FALSE);
@ -213,16 +213,13 @@ public class Mammal extends AbstractOpenApiSchema {
}
static {
schemas.put("Pig", new GenericType<Pig>() {
});
schemas.put("Whale", new GenericType<Whale>() {
});
schemas.put("Zebra", new GenericType<Zebra>() {
});
schemas.put("Pig", Pig.class);
schemas.put("Whale", Whale.class);
schemas.put("Zebra", Zebra.class);
}
@Override
public Map<String, GenericType> getSchemas() {
public Map<String, Class<?>> getSchemas() {
return Mammal.schemas;
}

View File

@ -24,7 +24,7 @@ import java.io.IOException;
import org.openapitools.client.model.Quadrilateral;
import org.openapitools.client.model.Triangle;
import javax.ws.rs.core.GenericType;
import java.io.IOException;
import java.lang.reflect.Type;
@ -165,7 +165,7 @@ public class NullableShape extends AbstractOpenApiSchema {
}
// store a list of schema names defined in oneOf
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
public static final Map<String, Class<?>> schemas = new HashMap<String, Class<?>>();
public NullableShape() {
super("oneOf", Boolean.TRUE);
@ -182,14 +182,12 @@ public class NullableShape extends AbstractOpenApiSchema {
}
static {
schemas.put("Quadrilateral", new GenericType<Quadrilateral>() {
});
schemas.put("Triangle", new GenericType<Triangle>() {
});
schemas.put("Quadrilateral", Quadrilateral.class);
schemas.put("Triangle", Triangle.class);
}
@Override
public Map<String, GenericType> getSchemas() {
public Map<String, Class<?>> getSchemas() {
return NullableShape.schemas;
}

View File

@ -24,7 +24,7 @@ import java.io.IOException;
import org.openapitools.client.model.BasquePig;
import org.openapitools.client.model.DanishPig;
import javax.ws.rs.core.GenericType;
import java.io.IOException;
import java.lang.reflect.Type;
@ -165,7 +165,7 @@ public class Pig extends AbstractOpenApiSchema {
}
// store a list of schema names defined in oneOf
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
public static final Map<String, Class<?>> schemas = new HashMap<String, Class<?>>();
public Pig() {
super("oneOf", Boolean.FALSE);
@ -182,14 +182,12 @@ public class Pig extends AbstractOpenApiSchema {
}
static {
schemas.put("BasquePig", new GenericType<BasquePig>() {
});
schemas.put("DanishPig", new GenericType<DanishPig>() {
});
schemas.put("BasquePig", BasquePig.class);
schemas.put("DanishPig", DanishPig.class);
}
@Override
public Map<String, GenericType> getSchemas() {
public Map<String, Class<?>> getSchemas() {
return Pig.schemas;
}

View File

@ -24,7 +24,7 @@ import java.io.IOException;
import org.openapitools.client.model.ComplexQuadrilateral;
import org.openapitools.client.model.SimpleQuadrilateral;
import javax.ws.rs.core.GenericType;
import java.io.IOException;
import java.lang.reflect.Type;
@ -165,7 +165,7 @@ public class Quadrilateral extends AbstractOpenApiSchema {
}
// store a list of schema names defined in oneOf
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
public static final Map<String, Class<?>> schemas = new HashMap<String, Class<?>>();
public Quadrilateral() {
super("oneOf", Boolean.FALSE);
@ -182,14 +182,12 @@ public class Quadrilateral extends AbstractOpenApiSchema {
}
static {
schemas.put("ComplexQuadrilateral", new GenericType<ComplexQuadrilateral>() {
});
schemas.put("SimpleQuadrilateral", new GenericType<SimpleQuadrilateral>() {
});
schemas.put("ComplexQuadrilateral", ComplexQuadrilateral.class);
schemas.put("SimpleQuadrilateral", SimpleQuadrilateral.class);
}
@Override
public Map<String, GenericType> getSchemas() {
public Map<String, Class<?>> getSchemas() {
return Quadrilateral.schemas;
}

View File

@ -24,7 +24,7 @@ import java.io.IOException;
import org.openapitools.client.model.Quadrilateral;
import org.openapitools.client.model.Triangle;
import javax.ws.rs.core.GenericType;
import java.io.IOException;
import java.lang.reflect.Type;
@ -165,7 +165,7 @@ public class Shape extends AbstractOpenApiSchema {
}
// store a list of schema names defined in oneOf
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
public static final Map<String, Class<?>> schemas = new HashMap<String, Class<?>>();
public Shape() {
super("oneOf", Boolean.FALSE);
@ -182,14 +182,12 @@ public class Shape extends AbstractOpenApiSchema {
}
static {
schemas.put("Quadrilateral", new GenericType<Quadrilateral>() {
});
schemas.put("Triangle", new GenericType<Triangle>() {
});
schemas.put("Quadrilateral", Quadrilateral.class);
schemas.put("Triangle", Triangle.class);
}
@Override
public Map<String, GenericType> getSchemas() {
public Map<String, Class<?>> getSchemas() {
return Shape.schemas;
}

View File

@ -24,7 +24,7 @@ import java.io.IOException;
import org.openapitools.client.model.Quadrilateral;
import org.openapitools.client.model.Triangle;
import javax.ws.rs.core.GenericType;
import java.io.IOException;
import java.lang.reflect.Type;
@ -165,7 +165,7 @@ public class ShapeOrNull extends AbstractOpenApiSchema {
}
// store a list of schema names defined in oneOf
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
public static final Map<String, Class<?>> schemas = new HashMap<String, Class<?>>();
public ShapeOrNull() {
super("oneOf", Boolean.TRUE);
@ -182,14 +182,12 @@ public class ShapeOrNull extends AbstractOpenApiSchema {
}
static {
schemas.put("Quadrilateral", new GenericType<Quadrilateral>() {
});
schemas.put("Triangle", new GenericType<Triangle>() {
});
schemas.put("Quadrilateral", Quadrilateral.class);
schemas.put("Triangle", Triangle.class);
}
@Override
public Map<String, GenericType> getSchemas() {
public Map<String, Class<?>> getSchemas() {
return ShapeOrNull.schemas;
}

View File

@ -25,7 +25,7 @@ import org.openapitools.client.model.EquilateralTriangle;
import org.openapitools.client.model.IsoscelesTriangle;
import org.openapitools.client.model.ScaleneTriangle;
import javax.ws.rs.core.GenericType;
import java.io.IOException;
import java.lang.reflect.Type;
@ -191,7 +191,7 @@ public class Triangle extends AbstractOpenApiSchema {
}
// store a list of schema names defined in oneOf
public static final Map<String, GenericType> schemas = new HashMap<String, GenericType>();
public static final Map<String, Class<?>> schemas = new HashMap<String, Class<?>>();
public Triangle() {
super("oneOf", Boolean.FALSE);
@ -213,16 +213,13 @@ public class Triangle extends AbstractOpenApiSchema {
}
static {
schemas.put("EquilateralTriangle", new GenericType<EquilateralTriangle>() {
});
schemas.put("IsoscelesTriangle", new GenericType<IsoscelesTriangle>() {
});
schemas.put("ScaleneTriangle", new GenericType<ScaleneTriangle>() {
});
schemas.put("EquilateralTriangle", EquilateralTriangle.class);
schemas.put("IsoscelesTriangle", IsoscelesTriangle.class);
schemas.put("ScaleneTriangle", ScaleneTriangle.class);
}
@Override
public Map<String, GenericType> getSchemas() {
public Map<String, Class<?>> getSchemas() {
return Triangle.schemas;
}