forked from loafle/openapi-generator-original
update java petstore sample, reenable test for resttemplate-withxml
This commit is contained in:
@@ -833,7 +833,8 @@
|
||||
<module>samples/client/petstore/java/retrofit2rx</module>
|
||||
<module>samples/client/petstore/jaxrs-cxf-client</module>
|
||||
<module>samples/client/petstore/java/resttemplate</module>
|
||||
<!--<module>samples/client/petstore/java/resttemplate-withXml</module>-->
|
||||
<module>samples/client/petstore/java/resttemplate-withXml</module>
|
||||
<module>samples/client/petstore/java/vertx</module>
|
||||
<module>samples/client/petstore/ruby</module>
|
||||
<module>samples/client/petstore/kotlin/</module>
|
||||
<!-- comment out bash as it's failing after switching to CircleCI
|
||||
|
||||
@@ -45,6 +45,8 @@ public class ApiClient {
|
||||
RequestInterceptor auth;
|
||||
if ("api_key".equals(authName)) {
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else if ("api_key_query".equals(authName)) {
|
||||
auth = new ApiKeyAuth("query", "api_key_query");
|
||||
} else if ("http_basic_test".equals(authName)) {
|
||||
auth = new HttpBasicAuth();
|
||||
} else if ("petstore_auth".equals(authName)) {
|
||||
|
||||
@@ -661,8 +661,9 @@ public class ApiClient {
|
||||
response = builder.type(contentType).delete(ClientResponse.class, serialize(body, contentType, formParams));
|
||||
} else if ("PATCH".equals(method)) {
|
||||
response = builder.type(contentType).header("X-HTTP-Method-Override", "PATCH").post(ClientResponse.class, serialize(body, contentType, formParams));
|
||||
}
|
||||
else {
|
||||
} else if ("HEAD".equals(method)) {
|
||||
response = builder.head();
|
||||
} else {
|
||||
throw new ApiException(500, "unknown method type " + method);
|
||||
}
|
||||
return response;
|
||||
|
||||
@@ -626,7 +626,7 @@ public class ApiClient {
|
||||
*
|
||||
* @param <T> Type
|
||||
* @param path The sub-path of the HTTP URL
|
||||
* @param method The request method, one of "GET", "POST", "PUT", and "DELETE"
|
||||
* @param method The request method, one of "GET", "POST", "PUT", "HEAD" and "DELETE"
|
||||
* @param queryParams The query parameters
|
||||
* @param body The request body object
|
||||
* @param headerParams The header parameters
|
||||
@@ -687,6 +687,8 @@ public class ApiClient {
|
||||
response = invocationBuilder.delete();
|
||||
} else if ("PATCH".equals(method)) {
|
||||
response = invocationBuilder.method("PATCH", entity);
|
||||
} else if ("HEAD".equals(method)) {
|
||||
response = invocationBuilder.head();
|
||||
} else {
|
||||
throw new ApiException(500, "unknown method type " + method);
|
||||
}
|
||||
|
||||
@@ -16,9 +16,19 @@ To test class name in snake case
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiClient;
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.Configuration;
|
||||
//import io.swagger.client.auth.*;
|
||||
//import io.swagger.client.api.FakeClassnameTags123Api;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: api_key_query
|
||||
ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
|
||||
api_key_query.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key_query.setApiKeyPrefix("Token");
|
||||
|
||||
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api();
|
||||
Client body = new Client(); // Client | client model
|
||||
@@ -43,7 +53,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ import javax.ws.rs.core.Response.Status;
|
||||
|
||||
import org.glassfish.jersey.client.ClientConfig;
|
||||
import org.glassfish.jersey.client.ClientProperties;
|
||||
import org.glassfish.jersey.client.HttpUrlConnectorProvider;
|
||||
import org.glassfish.jersey.jackson.JacksonFeature;
|
||||
import org.glassfish.jersey.logging.LoggingFeature;
|
||||
import org.glassfish.jersey.media.multipart.FormDataBodyPart;
|
||||
@@ -79,6 +80,7 @@ public class ApiClient {
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
authentications = new HashMap<String, Authentication>();
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
|
||||
authentications.put("http_basic_test", new HttpBasicAuth());
|
||||
authentications.put("petstore_auth", new OAuth());
|
||||
// Prevent the authentications from being modified.
|
||||
@@ -624,7 +626,7 @@ public class ApiClient {
|
||||
*
|
||||
* @param <T> Type
|
||||
* @param path The sub-path of the HTTP URL
|
||||
* @param method The request method, one of "GET", "POST", "PUT", and "DELETE"
|
||||
* @param method The request method, one of "GET", "POST", "PUT", "HEAD" and "DELETE"
|
||||
* @param queryParams The query parameters
|
||||
* @param body The request body object
|
||||
* @param headerParams The header parameters
|
||||
@@ -684,7 +686,9 @@ public class ApiClient {
|
||||
} else if ("DELETE".equals(method)) {
|
||||
response = invocationBuilder.delete();
|
||||
} else if ("PATCH".equals(method)) {
|
||||
response = invocationBuilder.header("X-HTTP-Method-Override", "PATCH").post(entity);
|
||||
response = invocationBuilder.method("PATCH", entity);
|
||||
} else if ("HEAD".equals(method)) {
|
||||
response = invocationBuilder.head();
|
||||
} else {
|
||||
throw new ApiException(500, "unknown method type " + method);
|
||||
}
|
||||
@@ -735,6 +739,7 @@ public class ApiClient {
|
||||
clientConfig.register(MultiPartFeature.class);
|
||||
clientConfig.register(json);
|
||||
clientConfig.register(JacksonFeature.class);
|
||||
clientConfig.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true);
|
||||
if (debugging) {
|
||||
clientConfig.register(new LoggingFeature(java.util.logging.Logger.getLogger(LoggingFeature.DEFAULT_LOGGER_NAME), java.util.logging.Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY, 1024*50 /* Log payloads up to 50K */));
|
||||
clientConfig.property(LoggingFeature.LOGGING_FEATURE_VERBOSITY, LoggingFeature.Verbosity.PAYLOAD_ANY);
|
||||
|
||||
@@ -70,7 +70,7 @@ public class FakeClassnameTags123Api {
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
String[] localVarAuthNames = new String[] { "api_key_query" };
|
||||
|
||||
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
||||
return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||
|
||||
@@ -626,7 +626,7 @@ public class ApiClient {
|
||||
*
|
||||
* @param <T> Type
|
||||
* @param path The sub-path of the HTTP URL
|
||||
* @param method The request method, one of "GET", "POST", "PUT", and "DELETE"
|
||||
* @param method The request method, one of "GET", "POST", "PUT", "HEAD" and "DELETE"
|
||||
* @param queryParams The query parameters
|
||||
* @param body The request body object
|
||||
* @param headerParams The header parameters
|
||||
@@ -687,6 +687,8 @@ public class ApiClient {
|
||||
response = invocationBuilder.delete();
|
||||
} else if ("PATCH".equals(method)) {
|
||||
response = invocationBuilder.method("PATCH", entity);
|
||||
} else if ("HEAD".equals(method)) {
|
||||
response = invocationBuilder.head();
|
||||
} else {
|
||||
throw new ApiException(500, "unknown method type " + method);
|
||||
}
|
||||
|
||||
@@ -16,9 +16,19 @@ To test class name in snake case
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiClient;
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.Configuration;
|
||||
//import io.swagger.client.auth.*;
|
||||
//import io.swagger.client.api.FakeClassnameTags123Api;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: api_key_query
|
||||
ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
|
||||
api_key_query.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key_query.setApiKeyPrefix("Token");
|
||||
|
||||
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api();
|
||||
Client body = new Client(); // Client | client model
|
||||
@@ -43,7 +53,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
|
||||
@@ -90,6 +90,7 @@ public class ApiClient {
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
authentications = new HashMap<String, Authentication>();
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
|
||||
authentications.put("http_basic_test", new HttpBasicAuth());
|
||||
authentications.put("petstore_auth", new OAuth());
|
||||
// Prevent the authentications from being modified.
|
||||
|
||||
@@ -99,7 +99,7 @@ public class FakeClassnameTags123Api {
|
||||
});
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
String[] localVarAuthNames = new String[] { "api_key_query" };
|
||||
return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,9 +16,19 @@ To test class name in snake case
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiClient;
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.Configuration;
|
||||
//import io.swagger.client.auth.*;
|
||||
//import io.swagger.client.api.FakeClassnameTags123Api;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: api_key_query
|
||||
ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
|
||||
api_key_query.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key_query.setApiKeyPrefix("Token");
|
||||
|
||||
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api();
|
||||
Client body = new Client(); // Client | client model
|
||||
@@ -43,7 +53,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
|
||||
@@ -90,6 +90,7 @@ public class ApiClient {
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
authentications = new HashMap<String, Authentication>();
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
|
||||
authentications.put("http_basic_test", new HttpBasicAuth());
|
||||
authentications.put("petstore_auth", new OAuth());
|
||||
// Prevent the authentications from being modified.
|
||||
|
||||
@@ -99,7 +99,7 @@ public class FakeClassnameTags123Api {
|
||||
});
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
String[] localVarAuthNames = new String[] { "api_key_query" };
|
||||
return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
|
||||
}
|
||||
|
||||
|
||||
@@ -16,9 +16,19 @@ To test class name in snake case
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiClient;
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.Configuration;
|
||||
//import io.swagger.client.auth.*;
|
||||
//import io.swagger.client.api.FakeClassnameTags123Api;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: api_key_query
|
||||
ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
|
||||
api_key_query.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key_query.setApiKeyPrefix("Token");
|
||||
|
||||
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api();
|
||||
Client body = new Client(); // Client | client model
|
||||
@@ -43,7 +53,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ public class ApiClient {
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
authentications = new HashMap<String, Authentication>();
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
|
||||
authentications.put("http_basic_test", new HttpBasicAuth());
|
||||
authentications.put("petstore_auth", new OAuth());
|
||||
// Prevent the authentications from being modified.
|
||||
@@ -555,7 +556,7 @@ public class ApiClient {
|
||||
* Invoke API by sending HTTP request with the given options.
|
||||
*
|
||||
* @param path The sub-path of the HTTP URL
|
||||
* @param method The request method, one of "GET", "POST", "PUT", and "DELETE"
|
||||
* @param method The request method, one of "GET", "POST", "PUT", "HEAD" and "DELETE"
|
||||
* @param queryParams The query parameters
|
||||
* @param body The request body object
|
||||
* @param headerParams The header parameters
|
||||
@@ -613,6 +614,8 @@ public class ApiClient {
|
||||
response = invocationBuilder.delete();
|
||||
} else if ("PATCH".equals(method)) {
|
||||
response = invocationBuilder.header("X-HTTP-Method-Override", "PATCH").post(entity);
|
||||
} else if ("HEAD".equals(method)) {
|
||||
response = invocationBuilder.head();
|
||||
} else {
|
||||
throw new ApiException(500, "unknown method type " + method);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public class FakeClassnameTags123Api {
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
String[] localVarAuthNames = new String[] { "api_key_query" };
|
||||
|
||||
GenericType<Client> localVarReturnType = new GenericType<Client>() {};
|
||||
return apiClient.invokeAPI(localVarPath, "PATCH", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||
|
||||
@@ -16,9 +16,19 @@ To test class name in snake case
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiClient;
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.Configuration;
|
||||
//import io.swagger.client.auth.*;
|
||||
//import io.swagger.client.api.FakeClassnameTags123Api;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: api_key_query
|
||||
ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
|
||||
api_key_query.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key_query.setApiKeyPrefix("Token");
|
||||
|
||||
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api();
|
||||
Client body = new Client(); // Client | client model
|
||||
@@ -43,7 +53,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
|
||||
0
samples/client/petstore/java/resttemplate-withXml/gradlew
vendored
Executable file → Normal file
0
samples/client/petstore/java/resttemplate-withXml/gradlew
vendored
Executable file → Normal file
@@ -116,6 +116,7 @@ public class ApiClient {
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
authentications = new HashMap<String, Authentication>();
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
|
||||
authentications.put("http_basic_test", new HttpBasicAuth());
|
||||
authentications.put("petstore_auth", new OAuth());
|
||||
// Prevent the authentications from being modified.
|
||||
@@ -416,6 +417,11 @@ public class ApiClient {
|
||||
* @return boolean true if the MediaType represents JSON, false otherwise
|
||||
*/
|
||||
public boolean isJsonMime(String mediaType) {
|
||||
// "* / *" is default to JSON
|
||||
if ("*/*".equals(mediaType)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
try {
|
||||
return isJsonMime(MediaType.parseMediaType(mediaType));
|
||||
} catch (InvalidMediaTypeException e) {
|
||||
|
||||
@@ -76,7 +76,7 @@ public class FakeClassnameTags123Api {
|
||||
};
|
||||
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
String[] authNames = new String[] { "api_key_query" };
|
||||
|
||||
ParameterizedTypeReference<Client> returnType = new ParameterizedTypeReference<Client>() {};
|
||||
return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
||||
|
||||
@@ -22,25 +22,29 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* AdditionalPropertiesClass
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "AdditionalPropertiesClass")
|
||||
|
||||
@XmlRootElement(name = "AdditionalPropertiesClass")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "AdditionalPropertiesClass")
|
||||
public class AdditionalPropertiesClass {
|
||||
@JsonProperty("map_property")
|
||||
@JacksonXmlProperty(localName = "map_property")
|
||||
@XmlElement(name = "map_property")
|
||||
// Is a container wrapped=false
|
||||
// items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace=
|
||||
// items.example= items.type=String
|
||||
@XmlElement(name = "inner")
|
||||
private Map<String, String> mapProperty = null;
|
||||
|
||||
@JsonProperty("map_of_map_property")
|
||||
@JacksonXmlProperty(localName = "map_of_map_property")
|
||||
@XmlElement(name = "map_of_map_property")
|
||||
// Is a container wrapped=false
|
||||
// items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace=
|
||||
// items.example= items.type=Map<String, String>
|
||||
@XmlElement(name = "inner")
|
||||
private Map<String, Map<String, String>> mapOfMapProperty = null;
|
||||
|
||||
public AdditionalPropertiesClass mapProperty(Map<String, String> mapProperty) {
|
||||
|
||||
@@ -21,8 +21,7 @@ import com.fasterxml.jackson.annotation.JsonTypeInfo;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
@@ -33,9 +32,10 @@ import javax.xml.bind.annotation.*;
|
||||
@JsonSubTypes.Type(value = Dog.class, name = "Dog"),
|
||||
@JsonSubTypes.Type(value = Cat.class, name = "Cat"),
|
||||
})
|
||||
@JacksonXmlRootElement(localName = "Animal")
|
||||
|
||||
@XmlRootElement(name = "Animal")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "Animal")
|
||||
public class Animal {
|
||||
@JsonProperty("className")
|
||||
@JacksonXmlProperty(localName = "className")
|
||||
|
||||
@@ -17,16 +17,16 @@ import java.util.Objects;
|
||||
import io.swagger.client.model.Animal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* AnimalFarm
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "AnimalFarm")
|
||||
|
||||
@XmlRootElement(name = "AnimalFarm")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "AnimalFarm")
|
||||
public class AnimalFarm extends ArrayList<Animal> {
|
||||
|
||||
@Override
|
||||
|
||||
@@ -22,20 +22,22 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* ArrayOfArrayOfNumberOnly
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "ArrayOfArrayOfNumberOnly")
|
||||
|
||||
@XmlRootElement(name = "ArrayOfArrayOfNumberOnly")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "ArrayOfArrayOfNumberOnly")
|
||||
public class ArrayOfArrayOfNumberOnly {
|
||||
@JsonProperty("ArrayArrayNumber")
|
||||
@JacksonXmlProperty(localName = "ArrayArrayNumber")
|
||||
@XmlElement(name = "ArrayArrayNumber")
|
||||
// Is a container wrapped=false
|
||||
// items.name=arrayArrayNumber items.baseName=arrayArrayNumber items.xmlName= items.xmlNamespace=
|
||||
// items.example= items.type=List<BigDecimal>
|
||||
@XmlElement(name = "arrayArrayNumber")
|
||||
private List<List<BigDecimal>> arrayArrayNumber = null;
|
||||
|
||||
public ArrayOfArrayOfNumberOnly arrayArrayNumber(List<List<BigDecimal>> arrayArrayNumber) {
|
||||
|
||||
@@ -22,20 +22,22 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* ArrayOfNumberOnly
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "ArrayOfNumberOnly")
|
||||
|
||||
@XmlRootElement(name = "ArrayOfNumberOnly")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "ArrayOfNumberOnly")
|
||||
public class ArrayOfNumberOnly {
|
||||
@JsonProperty("ArrayNumber")
|
||||
@JacksonXmlProperty(localName = "ArrayNumber")
|
||||
@XmlElement(name = "ArrayNumber")
|
||||
// Is a container wrapped=false
|
||||
// items.name=arrayNumber items.baseName=arrayNumber items.xmlName= items.xmlNamespace=
|
||||
// items.example= items.type=BigDecimal
|
||||
@XmlElement(name = "arrayNumber")
|
||||
private List<BigDecimal> arrayNumber = null;
|
||||
|
||||
public ArrayOfNumberOnly arrayNumber(List<BigDecimal> arrayNumber) {
|
||||
|
||||
@@ -22,30 +22,36 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.client.model.ReadOnlyFirst;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* ArrayTest
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "ArrayTest")
|
||||
|
||||
@XmlRootElement(name = "ArrayTest")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "ArrayTest")
|
||||
public class ArrayTest {
|
||||
@JsonProperty("array_of_string")
|
||||
@JacksonXmlProperty(localName = "array_of_string")
|
||||
@XmlElement(name = "array_of_string")
|
||||
// Is a container wrapped=false
|
||||
// items.name=arrayOfString items.baseName=arrayOfString items.xmlName= items.xmlNamespace=
|
||||
// items.example= items.type=String
|
||||
@XmlElement(name = "arrayOfString")
|
||||
private List<String> arrayOfString = null;
|
||||
|
||||
@JsonProperty("array_array_of_integer")
|
||||
@JacksonXmlProperty(localName = "array_array_of_integer")
|
||||
@XmlElement(name = "array_array_of_integer")
|
||||
// Is a container wrapped=false
|
||||
// items.name=arrayArrayOfInteger items.baseName=arrayArrayOfInteger items.xmlName= items.xmlNamespace=
|
||||
// items.example= items.type=List<Long>
|
||||
@XmlElement(name = "arrayArrayOfInteger")
|
||||
private List<List<Long>> arrayArrayOfInteger = null;
|
||||
|
||||
@JsonProperty("array_array_of_model")
|
||||
@JacksonXmlProperty(localName = "array_array_of_model")
|
||||
@XmlElement(name = "array_array_of_model")
|
||||
// Is a container wrapped=false
|
||||
// items.name=arrayArrayOfModel items.baseName=arrayArrayOfModel items.xmlName= items.xmlNamespace=
|
||||
// items.example= items.type=List<ReadOnlyFirst>
|
||||
@XmlElement(name = "arrayArrayOfModel")
|
||||
private List<List<ReadOnlyFirst>> arrayArrayOfModel = null;
|
||||
|
||||
public ArrayTest arrayOfString(List<String> arrayOfString) {
|
||||
|
||||
@@ -19,16 +19,16 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* Capitalization
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "Capitalization")
|
||||
|
||||
@XmlRootElement(name = "Capitalization")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "Capitalization")
|
||||
public class Capitalization {
|
||||
@JsonProperty("smallCamel")
|
||||
@JacksonXmlProperty(localName = "smallCamel")
|
||||
|
||||
@@ -20,16 +20,16 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.client.model.Animal;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* Cat
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "Cat")
|
||||
|
||||
@XmlRootElement(name = "Cat")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "Cat")
|
||||
public class Cat extends Animal {
|
||||
@JsonProperty("declawed")
|
||||
@JacksonXmlProperty(localName = "declawed")
|
||||
@@ -46,7 +46,7 @@ public class Cat extends Animal {
|
||||
* @return declawed
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Boolean getDeclawed() {
|
||||
public Boolean isDeclawed() {
|
||||
return declawed;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,16 +19,16 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* Category
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "Category")
|
||||
|
||||
@XmlRootElement(name = "Category")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "Category")
|
||||
public class Category {
|
||||
@JsonProperty("id")
|
||||
@JacksonXmlProperty(localName = "id")
|
||||
|
||||
@@ -19,17 +19,17 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* Model for testing model with \"_class\" property
|
||||
*/
|
||||
@ApiModel(description = "Model for testing model with \"_class\" property")
|
||||
@JacksonXmlRootElement(localName = "ClassModel")
|
||||
|
||||
@XmlRootElement(name = "ClassModel")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "ClassModel")
|
||||
public class ClassModel {
|
||||
@JsonProperty("_class")
|
||||
@JacksonXmlProperty(localName = "_class")
|
||||
|
||||
@@ -19,16 +19,16 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* Client
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "Client")
|
||||
|
||||
@XmlRootElement(name = "Client")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "Client")
|
||||
public class Client {
|
||||
@JsonProperty("client")
|
||||
@JacksonXmlProperty(localName = "client")
|
||||
|
||||
@@ -20,16 +20,16 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.client.model.Animal;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* Dog
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "Dog")
|
||||
|
||||
@XmlRootElement(name = "Dog")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "Dog")
|
||||
public class Dog extends Animal {
|
||||
@JsonProperty("breed")
|
||||
@JacksonXmlProperty(localName = "breed")
|
||||
|
||||
@@ -21,16 +21,16 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* EnumArrays
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "EnumArrays")
|
||||
|
||||
@XmlRootElement(name = "EnumArrays")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "EnumArrays")
|
||||
public class EnumArrays {
|
||||
/**
|
||||
* Gets or Sets justSymbol
|
||||
@@ -108,8 +108,10 @@ public class EnumArrays {
|
||||
}
|
||||
|
||||
@JsonProperty("array_enum")
|
||||
@JacksonXmlProperty(localName = "array_enum")
|
||||
@XmlElement(name = "array_enum")
|
||||
// Is a container wrapped=false
|
||||
// items.name=arrayEnum items.baseName=arrayEnum items.xmlName= items.xmlNamespace=
|
||||
// items.example= items.type=String
|
||||
@XmlElement(name = "arrayEnum")
|
||||
private List<ArrayEnumEnum> arrayEnum = null;
|
||||
|
||||
public EnumArrays justSymbol(JustSymbolEnum justSymbol) {
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
|
||||
@@ -20,16 +20,16 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.client.model.OuterEnum;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* EnumTest
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "EnumTest")
|
||||
|
||||
@XmlRootElement(name = "EnumTest")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "EnumTest")
|
||||
public class EnumTest {
|
||||
/**
|
||||
* Gets or Sets enumString
|
||||
|
||||
@@ -23,16 +23,16 @@ import java.math.BigDecimal;
|
||||
import java.util.UUID;
|
||||
import org.threeten.bp.LocalDate;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* FormatTest
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "FormatTest")
|
||||
|
||||
@XmlRootElement(name = "FormatTest")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "FormatTest")
|
||||
public class FormatTest {
|
||||
@JsonProperty("integer")
|
||||
@JacksonXmlProperty(localName = "integer")
|
||||
|
||||
@@ -19,16 +19,16 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* HasOnlyReadOnly
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "HasOnlyReadOnly")
|
||||
|
||||
@XmlRootElement(name = "HasOnlyReadOnly")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "HasOnlyReadOnly")
|
||||
public class HasOnlyReadOnly {
|
||||
@JsonProperty("bar")
|
||||
@JacksonXmlProperty(localName = "bar")
|
||||
|
||||
@@ -22,20 +22,22 @@ import io.swagger.annotations.ApiModelProperty;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* MapTest
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "MapTest")
|
||||
|
||||
@XmlRootElement(name = "MapTest")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "MapTest")
|
||||
public class MapTest {
|
||||
@JsonProperty("map_map_of_string")
|
||||
@JacksonXmlProperty(localName = "map_map_of_string")
|
||||
@XmlElement(name = "map_map_of_string")
|
||||
// Is a container wrapped=false
|
||||
// items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace=
|
||||
// items.example= items.type=Map<String, String>
|
||||
@XmlElement(name = "inner")
|
||||
private Map<String, Map<String, String>> mapMapOfString = null;
|
||||
|
||||
/**
|
||||
@@ -74,8 +76,10 @@ public class MapTest {
|
||||
}
|
||||
|
||||
@JsonProperty("map_of_enum_string")
|
||||
@JacksonXmlProperty(localName = "map_of_enum_string")
|
||||
@XmlElement(name = "map_of_enum_string")
|
||||
// Is a container wrapped=false
|
||||
// items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace=
|
||||
// items.example= items.type=String
|
||||
@XmlElement(name = "inner")
|
||||
private Map<String, InnerEnum> mapOfEnumString = null;
|
||||
|
||||
public MapTest mapMapOfString(Map<String, Map<String, String>> mapMapOfString) {
|
||||
|
||||
@@ -25,16 +25,16 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* MixedPropertiesAndAdditionalPropertiesClass
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "MixedPropertiesAndAdditionalPropertiesClass")
|
||||
|
||||
@XmlRootElement(name = "MixedPropertiesAndAdditionalPropertiesClass")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "MixedPropertiesAndAdditionalPropertiesClass")
|
||||
public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
@JsonProperty("uuid")
|
||||
@JacksonXmlProperty(localName = "uuid")
|
||||
@@ -47,8 +47,10 @@ public class MixedPropertiesAndAdditionalPropertiesClass {
|
||||
private OffsetDateTime dateTime = null;
|
||||
|
||||
@JsonProperty("map")
|
||||
@JacksonXmlProperty(localName = "map")
|
||||
@XmlElement(name = "map")
|
||||
// Is a container wrapped=false
|
||||
// items.name=inner items.baseName=inner items.xmlName= items.xmlNamespace=
|
||||
// items.example= items.type=Animal
|
||||
@XmlElement(name = "inner")
|
||||
private Map<String, Animal> map = null;
|
||||
|
||||
public MixedPropertiesAndAdditionalPropertiesClass uuid(UUID uuid) {
|
||||
|
||||
@@ -19,17 +19,17 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* Model for testing model name starting with number
|
||||
*/
|
||||
@ApiModel(description = "Model for testing model name starting with number")
|
||||
@JacksonXmlRootElement(localName = "Name")
|
||||
|
||||
@XmlRootElement(name = "Name")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "Name")
|
||||
public class Model200Response {
|
||||
@JsonProperty("name")
|
||||
@JacksonXmlProperty(localName = "name")
|
||||
|
||||
@@ -19,16 +19,16 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* ModelApiResponse
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "ModelApiResponse")
|
||||
|
||||
@XmlRootElement(name = "ModelApiResponse")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "ModelApiResponse")
|
||||
public class ModelApiResponse {
|
||||
@JsonProperty("code")
|
||||
@JacksonXmlProperty(localName = "code")
|
||||
|
||||
@@ -19,17 +19,17 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* Model for testing reserved words
|
||||
*/
|
||||
@ApiModel(description = "Model for testing reserved words")
|
||||
@JacksonXmlRootElement(localName = "Return")
|
||||
|
||||
@XmlRootElement(name = "Return")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "Return")
|
||||
public class ModelReturn {
|
||||
@JsonProperty("return")
|
||||
@JacksonXmlProperty(localName = "return")
|
||||
|
||||
@@ -19,17 +19,17 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* Model for testing model name same as property name
|
||||
*/
|
||||
@ApiModel(description = "Model for testing model name same as property name")
|
||||
@JacksonXmlRootElement(localName = "Name")
|
||||
|
||||
@XmlRootElement(name = "Name")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "Name")
|
||||
public class Name {
|
||||
@JsonProperty("name")
|
||||
@JacksonXmlProperty(localName = "name")
|
||||
|
||||
@@ -20,16 +20,16 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* NumberOnly
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "NumberOnly")
|
||||
|
||||
@XmlRootElement(name = "NumberOnly")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "NumberOnly")
|
||||
public class NumberOnly {
|
||||
@JsonProperty("JustNumber")
|
||||
@JacksonXmlProperty(localName = "JustNumber")
|
||||
|
||||
@@ -20,16 +20,16 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* Order
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "Order")
|
||||
|
||||
@XmlRootElement(name = "Order")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "Order")
|
||||
public class Order {
|
||||
@JsonProperty("id")
|
||||
@JacksonXmlProperty(localName = "id")
|
||||
@@ -198,7 +198,7 @@ public class Order {
|
||||
* @return complete
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
public Boolean getComplete() {
|
||||
public Boolean isComplete() {
|
||||
return complete;
|
||||
}
|
||||
|
||||
|
||||
@@ -20,16 +20,16 @@ import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.math.BigDecimal;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* OuterComposite
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "OuterComposite")
|
||||
|
||||
@XmlRootElement(name = "OuterComposite")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "OuterComposite")
|
||||
public class OuterComposite {
|
||||
@JsonProperty("my_number")
|
||||
@JacksonXmlProperty(localName = "my_number")
|
||||
|
||||
@@ -14,8 +14,7 @@
|
||||
package io.swagger.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
|
||||
@@ -23,16 +23,16 @@ import io.swagger.client.model.Category;
|
||||
import io.swagger.client.model.Tag;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* Pet
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "Pet")
|
||||
|
||||
@XmlRootElement(name = "Pet")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "Pet")
|
||||
public class Pet {
|
||||
@JsonProperty("id")
|
||||
@JacksonXmlProperty(localName = "id")
|
||||
@@ -50,13 +50,23 @@ public class Pet {
|
||||
private String name = null;
|
||||
|
||||
@JsonProperty("photoUrls")
|
||||
@JacksonXmlProperty(localName = "photoUrl")
|
||||
@XmlElement(name = "photoUrl")
|
||||
// items.xmlName=
|
||||
@JacksonXmlElementWrapper(useWrapping = true, localName = "photoUrls")
|
||||
// Is a container wrapped=true
|
||||
// items.name=photoUrls items.baseName=photoUrls items.xmlName= items.xmlNamespace=
|
||||
// items.example= items.type=String
|
||||
@XmlElement(name = "photoUrls")
|
||||
@XmlElementWrapper(name = "photoUrl")
|
||||
private List<String> photoUrls = new ArrayList<String>();
|
||||
|
||||
@JsonProperty("tags")
|
||||
@JacksonXmlProperty(localName = "tag")
|
||||
@XmlElement(name = "tag")
|
||||
// items.xmlName=
|
||||
@JacksonXmlElementWrapper(useWrapping = true, localName = "tags")
|
||||
// Is a container wrapped=true
|
||||
// items.name=tags items.baseName=tags items.xmlName= items.xmlNamespace=
|
||||
// items.example= items.type=Tag
|
||||
@XmlElement(name = "tags")
|
||||
@XmlElementWrapper(name = "tag")
|
||||
private List<Tag> tags = null;
|
||||
|
||||
/**
|
||||
|
||||
@@ -19,16 +19,16 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* ReadOnlyFirst
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "ReadOnlyFirst")
|
||||
|
||||
@XmlRootElement(name = "ReadOnlyFirst")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "ReadOnlyFirst")
|
||||
public class ReadOnlyFirst {
|
||||
@JsonProperty("bar")
|
||||
@JacksonXmlProperty(localName = "bar")
|
||||
|
||||
@@ -19,16 +19,16 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* SpecialModelName
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "$special[model.name]")
|
||||
|
||||
@XmlRootElement(name = "$special[model.name]")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "$special[model.name]")
|
||||
public class SpecialModelName {
|
||||
@JsonProperty("$special[property.name]")
|
||||
@JacksonXmlProperty(localName = "$special[property.name]")
|
||||
|
||||
@@ -19,16 +19,16 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* Tag
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "Tag")
|
||||
|
||||
@XmlRootElement(name = "Tag")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "Tag")
|
||||
public class Tag {
|
||||
@JsonProperty("id")
|
||||
@JacksonXmlProperty(localName = "id")
|
||||
|
||||
@@ -19,16 +19,16 @@ import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
|
||||
import com.fasterxml.jackson.dataformat.xml.annotation.*;
|
||||
import javax.xml.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* User
|
||||
*/
|
||||
@JacksonXmlRootElement(localName = "User")
|
||||
|
||||
@XmlRootElement(name = "User")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@JacksonXmlRootElement(localName = "User")
|
||||
public class User {
|
||||
@JsonProperty("id")
|
||||
@JacksonXmlProperty(localName = "id")
|
||||
|
||||
@@ -15,8 +15,8 @@ package io.swagger.client.api;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import io.swagger.client.model.Client;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.LocalDate;
|
||||
import org.threeten.bp.LocalDate;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import io.swagger.client.model.OuterComposite;
|
||||
import org.junit.Test;
|
||||
import org.junit.Ignore;
|
||||
@@ -136,7 +136,7 @@ public class FakeApiTest {
|
||||
String string = null;
|
||||
byte[] binary = null;
|
||||
LocalDate date = null;
|
||||
DateTime dateTime = null;
|
||||
OffsetDateTime dateTime = null;
|
||||
String password = null;
|
||||
String paramCallback = null;
|
||||
api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
|
||||
@@ -167,4 +167,21 @@ public class FakeApiTest {
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* test json serialization of form data
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws ApiException
|
||||
* if the Api call fails
|
||||
*/
|
||||
@Test
|
||||
public void testJsonFormDataTest() {
|
||||
String param = null;
|
||||
String param2 = null;
|
||||
api.testJsonFormData(param, param2);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,9 +16,19 @@ To test class name in snake case
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiClient;
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.Configuration;
|
||||
//import io.swagger.client.auth.*;
|
||||
//import io.swagger.client.api.FakeClassnameTags123Api;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: api_key_query
|
||||
ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
|
||||
api_key_query.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key_query.setApiKeyPrefix("Token");
|
||||
|
||||
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api();
|
||||
Client body = new Client(); // Client | client model
|
||||
@@ -43,7 +53,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
|
||||
@@ -111,6 +111,7 @@ public class ApiClient {
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
authentications = new HashMap<String, Authentication>();
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
|
||||
authentications.put("http_basic_test", new HttpBasicAuth());
|
||||
authentications.put("petstore_auth", new OAuth());
|
||||
// Prevent the authentications from being modified.
|
||||
|
||||
@@ -76,7 +76,7 @@ public class FakeClassnameTags123Api {
|
||||
};
|
||||
final MediaType contentType = apiClient.selectHeaderContentType(contentTypes);
|
||||
|
||||
String[] authNames = new String[] { };
|
||||
String[] authNames = new String[] { "api_key_query" };
|
||||
|
||||
ParameterizedTypeReference<Client> returnType = new ParameterizedTypeReference<Client>() {};
|
||||
return apiClient.invokeAPI(path, HttpMethod.PATCH, queryParams, postBody, headerParams, formParams, accept, contentType, authNames, returnType);
|
||||
|
||||
@@ -56,6 +56,8 @@ public class ApiClient {
|
||||
Interceptor auth;
|
||||
if ("api_key".equals(authName)) {
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else if ("api_key_query".equals(authName)) {
|
||||
auth = new ApiKeyAuth("query", "api_key_query");
|
||||
} else if ("http_basic_test".equals(authName)) {
|
||||
auth = new HttpBasicAuth();
|
||||
|
||||
|
||||
@@ -16,9 +16,19 @@ To test class name in snake case
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiClient;
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.Configuration;
|
||||
//import io.swagger.client.auth.*;
|
||||
//import io.swagger.client.api.FakeClassnameTags123Api;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: api_key_query
|
||||
ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
|
||||
api_key_query.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key_query.setApiKeyPrefix("Token");
|
||||
|
||||
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api();
|
||||
Client body = new Client(); // Client | client model
|
||||
@@ -43,7 +53,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ public class ApiClient {
|
||||
// Setup authentications (key: authentication name, value: authentication).
|
||||
authentications = new HashMap<>();
|
||||
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
|
||||
authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
|
||||
// authentications.put("http_basic_test", new HttpBasicAuth());
|
||||
// authentications.put("petstore_auth", new OAuth());
|
||||
// Prevent the authentications from being modified.
|
||||
|
||||
@@ -16,9 +16,19 @@ To test class name in snake case
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiClient;
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.Configuration;
|
||||
//import io.swagger.client.auth.*;
|
||||
//import io.swagger.client.api.FakeClassnameTags123Api;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: api_key_query
|
||||
ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
|
||||
api_key_query.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key_query.setApiKeyPrefix("Token");
|
||||
|
||||
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api();
|
||||
Client body = new Client(); // Client | client model
|
||||
@@ -43,7 +53,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@ public class ApiClient {
|
||||
Interceptor auth;
|
||||
if ("api_key".equals(authName)) {
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else if ("api_key_query".equals(authName)) {
|
||||
auth = new ApiKeyAuth("query", "api_key_query");
|
||||
} else if ("http_basic_test".equals(authName)) {
|
||||
auth = new HttpBasicAuth();
|
||||
} else if ("petstore_auth".equals(authName)) {
|
||||
|
||||
@@ -16,9 +16,19 @@ To test class name in snake case
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiClient;
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.Configuration;
|
||||
//import io.swagger.client.auth.*;
|
||||
//import io.swagger.client.api.FakeClassnameTags123Api;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: api_key_query
|
||||
ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
|
||||
api_key_query.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key_query.setApiKeyPrefix("Token");
|
||||
|
||||
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api();
|
||||
Client body = new Client(); // Client | client model
|
||||
@@ -43,7 +53,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@ public class ApiClient {
|
||||
Interceptor auth;
|
||||
if ("api_key".equals(authName)) {
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else if ("api_key_query".equals(authName)) {
|
||||
auth = new ApiKeyAuth("query", "api_key_query");
|
||||
} else if ("http_basic_test".equals(authName)) {
|
||||
auth = new HttpBasicAuth();
|
||||
} else if ("petstore_auth".equals(authName)) {
|
||||
|
||||
@@ -16,9 +16,19 @@ To test class name in snake case
|
||||
### Example
|
||||
```java
|
||||
// Import classes:
|
||||
//import io.swagger.client.ApiClient;
|
||||
//import io.swagger.client.ApiException;
|
||||
//import io.swagger.client.Configuration;
|
||||
//import io.swagger.client.auth.*;
|
||||
//import io.swagger.client.api.FakeClassnameTags123Api;
|
||||
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
|
||||
// Configure API key authorization: api_key_query
|
||||
ApiKeyAuth api_key_query = (ApiKeyAuth) defaultClient.getAuthentication("api_key_query");
|
||||
api_key_query.setApiKey("YOUR API KEY");
|
||||
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
|
||||
//api_key_query.setApiKeyPrefix("Token");
|
||||
|
||||
FakeClassnameTags123Api apiInstance = new FakeClassnameTags123Api();
|
||||
Client body = new Client(); // Client | client model
|
||||
@@ -43,7 +53,7 @@ Name | Type | Description | Notes
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
[api_key_query](../README.md#api_key_query)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
|
||||
@@ -45,6 +45,8 @@ public class ApiClient {
|
||||
Interceptor auth;
|
||||
if ("api_key".equals(authName)) {
|
||||
auth = new ApiKeyAuth("header", "api_key");
|
||||
} else if ("api_key_query".equals(authName)) {
|
||||
auth = new ApiKeyAuth("query", "api_key_query");
|
||||
} else if ("http_basic_test".equals(authName)) {
|
||||
auth = new HttpBasicAuth();
|
||||
} else if ("petstore_auth".equals(authName)) {
|
||||
|
||||
Reference in New Issue
Block a user