[Java][resttemplate] Add test for bearer auth (#17081)

* add bearer auth API to echo-api

* run generate-samples.sh

* add resttemplate echo-api sample

* add bearer auth test

* remove @Ignore
This commit is contained in:
Tomohiko Ozawa
2023-11-16 01:38:49 +09:00
committed by GitHub
parent e47e7041f7
commit 37451fa569
133 changed files with 12443 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
<manifest package="org.openapitools.client" xmlns:android="http://schemas.android.com/apk/res/android">
<application />
</manifest>

View File

@@ -0,0 +1,783 @@
package org.openapitools.client;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpRequest;
import org.springframework.http.HttpStatus;
import org.springframework.http.InvalidMediaTypeException;
import org.springframework.http.MediaType;
import org.springframework.http.RequestEntity;
import org.springframework.http.RequestEntity.BodyBuilder;
import org.springframework.http.ResponseEntity;
import org.springframework.http.client.BufferingClientHttpRequestFactory;
import org.springframework.http.client.ClientHttpRequestExecution;
import org.springframework.http.client.ClientHttpRequestInterceptor;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.stereotype.Component;
import org.springframework.util.CollectionUtils;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.util.StringUtils;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.util.UriComponentsBuilder;
import org.springframework.web.util.DefaultUriBuilderFactory;
import org.openapitools.jackson.nullable.JsonNullableModule;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.UnsupportedEncodingException;
import java.net.URI;
import java.net.URISyntaxException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.text.DateFormat;
import java.text.ParseException;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TimeZone;
import java.util.function.Supplier;
import java.time.OffsetDateTime;
import org.openapitools.client.auth.Authentication;
import org.openapitools.client.auth.HttpBasicAuth;
import org.openapitools.client.auth.HttpBearerAuth;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ApiClient extends JavaTimeFormatter {
public enum CollectionFormat {
CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null);
private final String separator;
private CollectionFormat(String separator) {
this.separator = separator;
}
private String collectionToString(Collection<?> collection) {
return StringUtils.collectionToDelimitedString(collection, separator);
}
}
private boolean debugging = false;
private HttpHeaders defaultHeaders = new HttpHeaders();
private MultiValueMap<String, String> defaultCookies = new LinkedMultiValueMap<String, String>();
private String basePath = "http://localhost:3000";
private RestTemplate restTemplate;
private Map<String, Authentication> authentications;
private DateFormat dateFormat;
public ApiClient() {
this.restTemplate = buildRestTemplate();
init();
}
public ApiClient(RestTemplate restTemplate) {
this.restTemplate = restTemplate;
init();
}
protected void init() {
// Use RFC3339 format for date and datetime.
// See http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14
this.dateFormat = new RFC3339DateFormat();
// Use UTC as the default time zone.
this.dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
// Set default User-Agent.
setUserAgent("Java-SDK");
// Setup authentications (key: authentication name, value: authentication).
authentications = new HashMap<String, Authentication>();
authentications.put("http_auth", new HttpBasicAuth());
authentications.put("http_bearer_auth", new HttpBearerAuth("bearer"));
// Prevent the authentications from being modified.
authentications = Collections.unmodifiableMap(authentications);
}
/**
* Get the current base path
*
* @return String the base path
*/
public String getBasePath() {
return basePath;
}
/**
* Set the base path, which should include the host
*
* @param basePath the base path
* @return ApiClient this client
*/
public ApiClient setBasePath(String basePath) {
this.basePath = basePath;
return this;
}
/**
* Get authentications (key: authentication name, value: authentication).
*
* @return Map the currently configured authentication types
*/
public Map<String, Authentication> getAuthentications() {
return authentications;
}
/**
* Get authentication for the given name.
*
* @param authName The authentication name
* @return The authentication, null if not found
*/
public Authentication getAuthentication(String authName) {
return authentications.get(authName);
}
/**
* Helper method to set token for HTTP bearer authentication.
*
* @param bearerToken the token
*/
public void setBearerToken(String bearerToken) {
setBearerToken(() -> bearerToken);
}
/**
* Helper method to set the token supplier for HTTP bearer authentication.
*
* @param tokenSupplier the token supplier function
*/
public void setBearerToken(Supplier<String> tokenSupplier) {
for (Authentication auth : authentications.values()) {
if (auth instanceof HttpBearerAuth) {
((HttpBearerAuth) auth).setBearerToken(tokenSupplier);
return;
}
}
throw new RuntimeException("No Bearer authentication configured!");
}
/**
* Helper method to set username for the first HTTP basic authentication.
*
* @param username Username
*/
public void setUsername(String username) {
for (Authentication auth : authentications.values()) {
if (auth instanceof HttpBasicAuth) {
((HttpBasicAuth) auth).setUsername(username);
return;
}
}
throw new RuntimeException("No HTTP basic authentication configured!");
}
/**
* Helper method to set password for the first HTTP basic authentication.
* @param password Password
*/
public void setPassword(String password) {
for (Authentication auth : authentications.values()) {
if (auth instanceof HttpBasicAuth) {
((HttpBasicAuth) auth).setPassword(password);
return;
}
}
throw new RuntimeException("No HTTP basic authentication configured!");
}
/**
* Set the User-Agent header's value (by adding to the default header map).
*
* @param userAgent the user agent string
* @return ApiClient this client
*/
public ApiClient setUserAgent(String userAgent) {
addDefaultHeader("User-Agent", userAgent);
return this;
}
/**
* Add a default header.
*
* @param name The header's name
* @param value The header's value
* @return ApiClient this client
*/
public ApiClient addDefaultHeader(String name, String value) {
if (defaultHeaders.containsKey(name)) {
defaultHeaders.remove(name);
}
defaultHeaders.add(name, value);
return this;
}
/**
* Add a default cookie.
*
* @param name The cookie's name
* @param value The cookie's value
* @return ApiClient this client
*/
public ApiClient addDefaultCookie(String name, String value) {
if (defaultCookies.containsKey(name)) {
defaultCookies.remove(name);
}
defaultCookies.add(name, value);
return this;
}
public void setDebugging(boolean debugging) {
List<ClientHttpRequestInterceptor> currentInterceptors = this.restTemplate.getInterceptors();
if (debugging) {
if (currentInterceptors == null) {
currentInterceptors = new ArrayList<ClientHttpRequestInterceptor>();
}
ClientHttpRequestInterceptor interceptor = new ApiClientHttpRequestInterceptor();
currentInterceptors.add(interceptor);
this.restTemplate.setInterceptors(currentInterceptors);
} else {
if (currentInterceptors != null && !currentInterceptors.isEmpty()) {
Iterator<ClientHttpRequestInterceptor> iter = currentInterceptors.iterator();
while (iter.hasNext()) {
ClientHttpRequestInterceptor interceptor = iter.next();
if (interceptor instanceof ApiClientHttpRequestInterceptor) {
iter.remove();
}
}
this.restTemplate.setInterceptors(currentInterceptors);
}
}
this.debugging = debugging;
}
/**
* Check that whether debugging is enabled for this API client.
* @return boolean true if this client is enabled for debugging, false otherwise
*/
public boolean isDebugging() {
return debugging;
}
/**
* Get the date format used to parse/format date parameters.
* @return DateFormat format
*/
public DateFormat getDateFormat() {
return dateFormat;
}
/**
* Set the date format used to parse/format date parameters.
* @param dateFormat Date format
* @return API client
*/
public ApiClient setDateFormat(DateFormat dateFormat) {
this.dateFormat = dateFormat;
return this;
}
/**
* Parse the given string into Date object.
*
* @param str the string to parse
* @return the Date parsed from the string
*/
public Date parseDate(String str) {
try {
return dateFormat.parse(str);
} catch (ParseException e) {
throw new RuntimeException(e);
}
}
/**
* Format the given Date object into string.
*
* @param date the date to format
* @return the formatted date as string
*/
public String formatDate(Date date) {
return dateFormat.format(date);
}
/**
* Format the given parameter object into string.
*
* @param param the object to convert
* @return String the parameter represented as a String
*/
public String parameterToString(Object param) {
if (param == null) {
return "";
} else if (param instanceof Date) {
return formatDate( (Date) param);
} else if (param instanceof OffsetDateTime) {
return formatOffsetDateTime((OffsetDateTime) param);
} else if (param instanceof Collection) {
StringBuilder b = new StringBuilder();
for (Object o : (Collection<?>) param) {
if (b.length() > 0) {
b.append(",");
}
b.append(String.valueOf(o));
}
return b.toString();
} else {
return String.valueOf(param);
}
}
/**
* Formats the specified collection path parameter to a string value.
*
* @param collectionFormat The collection format of the parameter.
* @param values The values of the parameter.
* @return String representation of the parameter
*/
public String collectionPathParameterToString(CollectionFormat collectionFormat, Collection<?> values) {
// create the value based on the collection format
if (CollectionFormat.MULTI.equals(collectionFormat)) {
// not valid for path params
return parameterToString(values);
}
// collectionFormat is assumed to be "csv" by default
if (collectionFormat == null) {
collectionFormat = CollectionFormat.CSV;
}
return collectionFormat.collectionToString(values);
}
/**
* Converts a parameter to a {@link MultiValueMap} for use in REST requests
*
* @param collectionFormat The format to convert to
* @param name The name of the parameter
* @param value The parameter's value
* @return a Map containing the String value(s) of the input parameter
*/
public MultiValueMap<String, String> parameterToMultiValueMap(CollectionFormat collectionFormat, String name, Object value) {
final MultiValueMap<String, String> params = new LinkedMultiValueMap<String, String>();
if (name == null || name.isEmpty() || value == null) {
return params;
}
if (collectionFormat == null) {
collectionFormat = CollectionFormat.CSV;
}
if (value instanceof Map) {
@SuppressWarnings("unchecked")
final Map<String, Object> valuesMap = (Map<String, Object>) value;
for (final Entry<String, Object> entry : valuesMap.entrySet()) {
params.add(entry.getKey(), parameterToString(entry.getValue()));
}
return params;
}
Collection<?> valueCollection = null;
if (value instanceof Collection) {
valueCollection = (Collection<?>) value;
} else {
params.add(name, parameterToString(value));
return params;
}
if (valueCollection.isEmpty()) {
return params;
}
if (collectionFormat.equals(CollectionFormat.MULTI)) {
for (Object item : valueCollection) {
params.add(name, parameterToString(item));
}
return params;
}
List<String> values = new ArrayList<String>();
for (Object o : valueCollection) {
values.add(parameterToString(o));
}
params.add(name, collectionFormat.collectionToString(values));
return params;
}
/**
* Check if the given {@code String} is a JSON MIME.
*
* @param mediaType the input MediaType
* @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) {
}
return false;
}
/**
* Check if the given MIME is a JSON MIME.
* JSON MIME examples:
* application/json
* application/json; charset=UTF8
* APPLICATION/JSON
*
* @param mediaType the input MediaType
* @return boolean true if the MediaType represents JSON, false otherwise
*/
public boolean isJsonMime(MediaType mediaType) {
return mediaType != null && (MediaType.APPLICATION_JSON.isCompatibleWith(mediaType) || mediaType.getSubtype().matches("^.*\\+json[;]?\\s*$"));
}
/**
* Check if the given {@code String} is a Problem JSON MIME (RFC-7807).
*
* @param mediaType the input MediaType
* @return boolean true if the MediaType represents Problem JSON, false otherwise
*/
public boolean isProblemJsonMime(String mediaType) {
return "application/problem+json".equalsIgnoreCase(mediaType);
}
/**
* Select the Accept header's value from the given accepts array:
* if JSON exists in the given array, use it;
* otherwise use all of them (joining into a string)
*
* @param accepts The accepts array to select from
* @return List The list of MediaTypes to use for the Accept header
*/
public List<MediaType> selectHeaderAccept(String[] accepts) {
if (accepts.length == 0) {
return null;
}
for (String accept : accepts) {
MediaType mediaType = MediaType.parseMediaType(accept);
if (isJsonMime(mediaType) && !isProblemJsonMime(accept)) {
return Collections.singletonList(mediaType);
}
}
return MediaType.parseMediaTypes(StringUtils.arrayToCommaDelimitedString(accepts));
}
/**
* Select the Content-Type header's value from the given array:
* if JSON exists in the given array, use it;
* otherwise use the first one of the array.
*
* @param contentTypes The Content-Type array to select from
* @return MediaType The Content-Type header to use. If the given array is empty, JSON will be used.
*/
public MediaType selectHeaderContentType(String[] contentTypes) {
if (contentTypes.length == 0) {
return MediaType.APPLICATION_JSON;
}
for (String contentType : contentTypes) {
MediaType mediaType = MediaType.parseMediaType(contentType);
if (isJsonMime(mediaType)) {
return mediaType;
}
}
return MediaType.parseMediaType(contentTypes[0]);
}
/**
* Select the body to use for the request
*
* @param obj the body object
* @param formParams the form parameters
* @param contentType the content type of the request
* @return Object the selected body
*/
protected Object selectBody(Object obj, MultiValueMap<String, Object> formParams, MediaType contentType) {
boolean isForm = MediaType.MULTIPART_FORM_DATA.isCompatibleWith(contentType) || MediaType.APPLICATION_FORM_URLENCODED.isCompatibleWith(contentType);
return isForm ? formParams : obj;
}
/**
* Expand path template with variables
*
* @param pathTemplate path template with placeholders
* @param variables variables to replace
* @return path with placeholders replaced by variables
*/
public String expandPath(String pathTemplate, Map<String, Object> variables) {
return restTemplate.getUriTemplateHandler().expand(pathTemplate, variables).toString();
}
/**
* Include queryParams in uriParams taking into account the paramName
*
* @param queryParams The query parameters
* @param uriParams The path parameters
* return templatized query string
*/
public String generateQueryUri(MultiValueMap<String, String> queryParams, Map<String, Object> uriParams) {
StringBuilder queryBuilder = new StringBuilder();
queryParams.forEach((name, values) -> {
try {
final String encodedName = URLEncoder.encode(name.toString(), "UTF-8");
if (CollectionUtils.isEmpty(values)) {
if (queryBuilder.length() != 0) {
queryBuilder.append('&');
}
queryBuilder.append(encodedName);
} else {
int valueItemCounter = 0;
for (Object value : values) {
if (queryBuilder.length() != 0) {
queryBuilder.append('&');
}
queryBuilder.append(encodedName);
if (value != null) {
String templatizedKey = encodedName + valueItemCounter++;
uriParams.put(templatizedKey, value.toString());
queryBuilder.append('=').append("{").append(templatizedKey).append("}");
}
}
}
} catch (UnsupportedEncodingException e) {
}
});
return queryBuilder.toString();
}
/**
* Invoke API by sending HTTP request with the given options.
*
* @param <T> the return type to use
* @param path The sub-path of the HTTP URL
* @param method The request method
* @param pathParams The path parameters
* @param queryParams The query parameters
* @param body The request body object
* @param headerParams The header parameters
* @param cookieParams The cookie parameters
* @param formParams The form parameters
* @param accept The request's Accept header
* @param contentType The request's Content-Type header
* @param authNames The authentications to apply
* @param returnType The return type into which to deserialize the response
* @return ResponseEntity&lt;T&gt; The response of the chosen type
*/
public <T> ResponseEntity<T> invokeAPI(String path, HttpMethod method, Map<String, Object> pathParams, MultiValueMap<String, String> queryParams, Object body, HttpHeaders headerParams, MultiValueMap<String, String> cookieParams, MultiValueMap<String, Object> formParams, List<MediaType> accept, MediaType contentType, String[] authNames, ParameterizedTypeReference<T> returnType) throws RestClientException {
updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
Map<String,Object> uriParams = new HashMap<>();
uriParams.putAll(pathParams);
String finalUri = path;
if (queryParams != null && !queryParams.isEmpty()) {
//Include queryParams in uriParams taking into account the paramName
String queryUri = generateQueryUri(queryParams, uriParams);
//Append to finalUri the templatized query string like "?param1={param1Value}&.......
finalUri += "?" + queryUri;
}
String expandedPath = this.expandPath(finalUri, uriParams);
final UriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(basePath).path(expandedPath);
URI uri;
try {
uri = new URI(builder.build().toUriString());
} catch (URISyntaxException ex) {
throw new RestClientException("Could not build URL: " + builder.toUriString(), ex);
}
final BodyBuilder requestBuilder = RequestEntity.method(method, UriComponentsBuilder.fromHttpUrl(basePath).toUriString() + finalUri, uriParams);
if (accept != null) {
requestBuilder.accept(accept.toArray(new MediaType[accept.size()]));
}
if (contentType != null) {
requestBuilder.contentType(contentType);
}
addHeadersToRequest(headerParams, requestBuilder);
addHeadersToRequest(defaultHeaders, requestBuilder);
addCookiesToRequest(cookieParams, requestBuilder);
addCookiesToRequest(defaultCookies, requestBuilder);
RequestEntity<Object> requestEntity = requestBuilder.body(selectBody(body, formParams, contentType));
ResponseEntity<T> responseEntity = restTemplate.exchange(requestEntity, returnType);
if (responseEntity.getStatusCode().is2xxSuccessful()) {
return responseEntity;
} else {
// The error handler built into the RestTemplate should handle 400 and 500 series errors.
throw new RestClientException("API returned " + responseEntity.getStatusCode() + " and it wasn't handled by the RestTemplate error handler");
}
}
/**
* Add headers to the request that is being built
* @param headers The headers to add
* @param requestBuilder The current request
*/
protected void addHeadersToRequest(HttpHeaders headers, BodyBuilder requestBuilder) {
for (Entry<String, List<String>> entry : headers.entrySet()) {
List<String> values = entry.getValue();
for (String value : values) {
if (value != null) {
requestBuilder.header(entry.getKey(), value);
}
}
}
}
/**
* Add cookies to the request that is being built
*
* @param cookies The cookies to add
* @param requestBuilder The current request
*/
protected void addCookiesToRequest(MultiValueMap<String, String> cookies, BodyBuilder requestBuilder) {
if (!cookies.isEmpty()) {
requestBuilder.header("Cookie", buildCookieHeader(cookies));
}
}
/**
* Build cookie header. Keeps a single value per cookie (as per <a href="https://tools.ietf.org/html/rfc6265#section-5.3">
* RFC6265 section 5.3</a>).
*
* @param cookies map all cookies
* @return header string for cookies.
*/
private String buildCookieHeader(MultiValueMap<String, String> cookies) {
final StringBuilder cookieValue = new StringBuilder();
String delimiter = "";
for (final Map.Entry<String, List<String>> entry : cookies.entrySet()) {
final String value = entry.getValue().get(entry.getValue().size() - 1);
cookieValue.append(String.format("%s%s=%s", delimiter, entry.getKey(), value));
delimiter = "; ";
}
return cookieValue.toString();
}
/**
* Build the RestTemplate used to make HTTP requests.
* @return RestTemplate
*/
protected RestTemplate buildRestTemplate() {
RestTemplate restTemplate = new RestTemplate();
// This allows us to read the response more than once - Necessary for debugging.
restTemplate.setRequestFactory(new BufferingClientHttpRequestFactory(restTemplate.getRequestFactory()));
// disable default URL encoding
DefaultUriBuilderFactory uriBuilderFactory = new DefaultUriBuilderFactory();
uriBuilderFactory.setEncodingMode(DefaultUriBuilderFactory.EncodingMode.VALUES_ONLY);
restTemplate.setUriTemplateHandler(uriBuilderFactory);
return restTemplate;
}
/**
* Update query and header parameters based on authentication settings.
*
* @param authNames The authentications to apply
* @param queryParams The query parameters
* @param headerParams The header parameters
*/
protected void updateParamsForAuth(String[] authNames, MultiValueMap<String, String> queryParams, HttpHeaders headerParams, MultiValueMap<String, String> cookieParams) {
for (String authName : authNames) {
Authentication auth = authentications.get(authName);
if (auth == null) {
throw new RestClientException("Authentication undefined: " + authName);
}
auth.applyToParams(queryParams, headerParams, cookieParams);
}
}
private class ApiClientHttpRequestInterceptor implements ClientHttpRequestInterceptor {
private final Log log = LogFactory.getLog(ApiClientHttpRequestInterceptor.class);
@Override
public ClientHttpResponse intercept(HttpRequest request, byte[] body, ClientHttpRequestExecution execution) throws IOException {
logRequest(request, body);
ClientHttpResponse response = execution.execute(request, body);
logResponse(response);
return response;
}
private void logRequest(HttpRequest request, byte[] body) throws UnsupportedEncodingException {
log.info("URI: " + request.getURI());
log.info("HTTP Method: " + request.getMethod());
log.info("HTTP Headers: " + headersToString(request.getHeaders()));
log.info("Request Body: " + new String(body, StandardCharsets.UTF_8));
}
private void logResponse(ClientHttpResponse response) throws IOException {
log.info("HTTP Status Code: " + response.getRawStatusCode());
log.info("Status Text: " + response.getStatusText());
log.info("HTTP Headers: " + headersToString(response.getHeaders()));
log.info("Response Body: " + bodyToString(response.getBody()));
}
private String headersToString(HttpHeaders headers) {
if(headers == null || headers.isEmpty()) {
return "";
}
StringBuilder builder = new StringBuilder();
for (Entry<String, List<String>> entry : headers.entrySet()) {
builder.append(entry.getKey()).append("=[");
for (String value : entry.getValue()) {
builder.append(value).append(",");
}
builder.setLength(builder.length() - 1); // Get rid of trailing comma
builder.append("],");
}
builder.setLength(builder.length() - 1); // Get rid of trailing comma
return builder.toString();
}
private String bodyToString(InputStream body) throws IOException {
StringBuilder builder = new StringBuilder();
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(body, StandardCharsets.UTF_8));
String line = bufferedReader.readLine();
while (line != null) {
builder.append(line).append(System.lineSeparator());
line = bufferedReader.readLine();
}
bufferedReader.close();
return builder.toString();
}
}
}

View File

@@ -0,0 +1,64 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
import java.time.format.DateTimeParseException;
/**
* Class that add parsing/formatting support for Java 8+ {@code OffsetDateTime} class.
* It's generated for java clients when {@code AbstractJavaCodegen#dateLibrary} specified as {@code java8}.
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class JavaTimeFormatter {
private DateTimeFormatter offsetDateTimeFormatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
/**
* Get the date format used to parse/format {@code OffsetDateTime} parameters.
* @return DateTimeFormatter
*/
public DateTimeFormatter getOffsetDateTimeFormatter() {
return offsetDateTimeFormatter;
}
/**
* Set the date format used to parse/format {@code OffsetDateTime} parameters.
* @param offsetDateTimeFormatter {@code DateTimeFormatter}
*/
public void setOffsetDateTimeFormatter(DateTimeFormatter offsetDateTimeFormatter) {
this.offsetDateTimeFormatter = offsetDateTimeFormatter;
}
/**
* Parse the given string into {@code OffsetDateTime} object.
* @param str String
* @return {@code OffsetDateTime}
*/
public OffsetDateTime parseOffsetDateTime(String str) {
try {
return OffsetDateTime.parse(str, offsetDateTimeFormatter);
} catch (DateTimeParseException e) {
throw new RuntimeException(e);
}
}
/**
* Format the given {@code OffsetDateTime} object into string.
* @param offsetDateTime {@code OffsetDateTime}
* @return {@code OffsetDateTime} in string format
*/
public String formatOffsetDateTime(OffsetDateTime offsetDateTime) {
return offsetDateTimeFormatter.format(offsetDateTime);
}
}

View File

@@ -0,0 +1,57 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client;
import com.fasterxml.jackson.databind.util.StdDateFormat;
import java.text.DateFormat;
import java.text.FieldPosition;
import java.text.ParsePosition;
import java.util.Date;
import java.text.DecimalFormat;
import java.util.GregorianCalendar;
import java.util.TimeZone;
public class RFC3339DateFormat extends DateFormat {
private static final long serialVersionUID = 1L;
private static final TimeZone TIMEZONE_Z = TimeZone.getTimeZone("UTC");
private final StdDateFormat fmt = new StdDateFormat()
.withTimeZone(TIMEZONE_Z)
.withColonInTimeZone(true);
public RFC3339DateFormat() {
this.calendar = new GregorianCalendar();
this.numberFormat = new DecimalFormat();
}
@Override
public Date parse(String source) {
return parse(source, new ParsePosition(0));
}
@Override
public Date parse(String source, ParsePosition pos) {
return fmt.parse(source, pos);
}
@Override
public StringBuffer format(Date date, StringBuffer toAppendTo, FieldPosition fieldPosition) {
return fmt.format(date, toAppendTo, fieldPosition);
}
@Override
public Object clone() {
return super.clone();
}
}

View File

@@ -0,0 +1,58 @@
package org.openapitools.client;
import java.util.Map;
/**
* Representing a Server configuration.
*/
public class ServerConfiguration {
public String URL;
public String description;
public Map<String, ServerVariable> variables;
/**
* @param URL A URL to the target host.
* @param description A description of the host designated by the URL.
* @param variables A map between a variable name and its value. The value is used for substitution in the server's URL template.
*/
public ServerConfiguration(String URL, String description, Map<String, ServerVariable> variables) {
this.URL = URL;
this.description = description;
this.variables = variables;
}
/**
* Format URL template using given variables.
*
* @param variables A map between a variable name and its value.
* @return Formatted URL.
*/
public String URL(Map<String, String> variables) {
String url = this.URL;
// go through variables and replace placeholders
for (Map.Entry<String, ServerVariable> variable: this.variables.entrySet()) {
String name = variable.getKey();
ServerVariable serverVariable = variable.getValue();
String value = serverVariable.defaultValue;
if (variables != null && variables.containsKey(name)) {
value = variables.get(name);
if (serverVariable.enumValues.size() > 0 && !serverVariable.enumValues.contains(value)) {
throw new IllegalArgumentException("The variable " + name + " in the server URL has invalid value " + value + ".");
}
}
url = url.replace("{" + name + "}", value);
}
return url;
}
/**
* Format URL template using default server variables.
*
* @return Formatted URL.
*/
public String URL() {
return URL(null);
}
}

View File

@@ -0,0 +1,23 @@
package org.openapitools.client;
import java.util.HashSet;
/**
* Representing a Server Variable for server URL template substitution.
*/
public class ServerVariable {
public String description;
public String defaultValue;
public HashSet<String> enumValues = null;
/**
* @param description A description for the server variable.
* @param defaultValue The default value to use for substitution.
* @param enumValues An enumeration of string values to be used if the substitution options are from a limited set.
*/
public ServerVariable(String description, String defaultValue, HashSet<String> enumValues) {
this.description = description;
this.defaultValue = defaultValue;
this.enumValues = enumValues;
}
}

View File

@@ -0,0 +1,125 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class AuthApi {
private ApiClient apiClient;
public AuthApi() {
this(new ApiClient());
}
public AuthApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* To test HTTP basic authentication
* To test HTTP basic authentication
* <p><b>200</b> - Successful operation
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testAuthHttpBasic() throws RestClientException {
return testAuthHttpBasicWithHttpInfo().getBody();
}
/**
* To test HTTP basic authentication
* To test HTTP basic authentication
* <p><b>200</b> - Successful operation
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testAuthHttpBasicWithHttpInfo() throws RestClientException {
Object localVarPostBody = null;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "http_auth" };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/auth/http/basic", HttpMethod.POST, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* To test HTTP bearer authentication
* To test HTTP bearer authentication
* <p><b>200</b> - Successful operation
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testAuthHttpBearer() throws RestClientException {
return testAuthHttpBearerWithHttpInfo().getBody();
}
/**
* To test HTTP bearer authentication
* To test HTTP bearer authentication
* <p><b>200</b> - Successful operation
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testAuthHttpBearerWithHttpInfo() throws RestClientException {
Object localVarPostBody = null;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "http_bearer_auth" };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/auth/http/bearer", HttpMethod.POST, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
}

View File

@@ -0,0 +1,398 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import java.io.File;
import org.openapitools.client.model.Pet;
import org.openapitools.client.model.Tag;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class BodyApi {
private ApiClient apiClient;
public BodyApi() {
this(new ApiClient());
}
public BodyApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Test binary (gif) response body
* Test binary (gif) response body
* <p><b>200</b> - Successful operation
* @return File
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public File testBinaryGif() throws RestClientException {
return testBinaryGifWithHttpInfo().getBody();
}
/**
* Test binary (gif) response body
* Test binary (gif) response body
* <p><b>200</b> - Successful operation
* @return ResponseEntity&lt;File&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<File> testBinaryGifWithHttpInfo() throws RestClientException {
Object localVarPostBody = null;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
final String[] localVarAccepts = {
"image/gif"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<File> localReturnType = new ParameterizedTypeReference<File>() {};
return apiClient.invokeAPI("/binary/gif", HttpMethod.POST, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* Test body parameter(s)
* Test body parameter(s)
* <p><b>200</b> - Successful operation
* @param body (optional)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testBodyApplicationOctetstreamBinary(File body) throws RestClientException {
return testBodyApplicationOctetstreamBinaryWithHttpInfo(body).getBody();
}
/**
* Test body parameter(s)
* Test body parameter(s)
* <p><b>200</b> - Successful operation
* @param body (optional)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testBodyApplicationOctetstreamBinaryWithHttpInfo(File body) throws RestClientException {
Object localVarPostBody = body;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/octet-stream"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/body/application/octetstream/binary", HttpMethod.POST, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* Test array of binary in multipart mime
* Test array of binary in multipart mime
* <p><b>200</b> - Successful operation
* @param files (required)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testBodyMultipartFormdataArrayOfBinary(List<File> files) throws RestClientException {
return testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files).getBody();
}
/**
* Test array of binary in multipart mime
* Test array of binary in multipart mime
* <p><b>200</b> - Successful operation
* @param files (required)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testBodyMultipartFormdataArrayOfBinaryWithHttpInfo(List<File> files) throws RestClientException {
Object localVarPostBody = null;
// verify the required parameter 'files' is set
if (files == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'files' when calling testBodyMultipartFormdataArrayOfBinary");
}
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
if (files != null)
localVarFormParams.addAll("files", files.stream().map(FileSystemResource::new).collect(Collectors.toList()));
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"multipart/form-data"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/body/application/octetstream/array_of_binary", HttpMethod.POST, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* Test body parameter(s)
* Test body parameter(s)
* <p><b>200</b> - Successful operation
* @param pet Pet object that needs to be added to the store (optional)
* @return Pet
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public Pet testEchoBodyAllOfPet(Pet pet) throws RestClientException {
return testEchoBodyAllOfPetWithHttpInfo(pet).getBody();
}
/**
* Test body parameter(s)
* Test body parameter(s)
* <p><b>200</b> - Successful operation
* @param pet Pet object that needs to be added to the store (optional)
* @return ResponseEntity&lt;Pet&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Pet> testEchoBodyAllOfPetWithHttpInfo(Pet pet) throws RestClientException {
Object localVarPostBody = pet;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<Pet> localReturnType = new ParameterizedTypeReference<Pet>() {};
return apiClient.invokeAPI("/echo/body/allOf/Pet", HttpMethod.POST, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* Test free form object
* Test free form object
* <p><b>200</b> - Successful operation
* @param body Free form object (optional)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testEchoBodyFreeFormObjectResponseString(Object body) throws RestClientException {
return testEchoBodyFreeFormObjectResponseStringWithHttpInfo(body).getBody();
}
/**
* Test free form object
* Test free form object
* <p><b>200</b> - Successful operation
* @param body Free form object (optional)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testEchoBodyFreeFormObjectResponseStringWithHttpInfo(Object body) throws RestClientException {
Object localVarPostBody = body;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/echo/body/FreeFormObject/response_string", HttpMethod.POST, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* Test body parameter(s)
* Test body parameter(s)
* <p><b>200</b> - Successful operation
* @param pet Pet object that needs to be added to the store (optional)
* @return Pet
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public Pet testEchoBodyPet(Pet pet) throws RestClientException {
return testEchoBodyPetWithHttpInfo(pet).getBody();
}
/**
* Test body parameter(s)
* Test body parameter(s)
* <p><b>200</b> - Successful operation
* @param pet Pet object that needs to be added to the store (optional)
* @return ResponseEntity&lt;Pet&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Pet> testEchoBodyPetWithHttpInfo(Pet pet) throws RestClientException {
Object localVarPostBody = pet;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<Pet> localReturnType = new ParameterizedTypeReference<Pet>() {};
return apiClient.invokeAPI("/echo/body/Pet", HttpMethod.POST, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* Test empty response body
* Test empty response body
* <p><b>200</b> - Successful operation
* @param pet Pet object that needs to be added to the store (optional)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testEchoBodyPetResponseString(Pet pet) throws RestClientException {
return testEchoBodyPetResponseStringWithHttpInfo(pet).getBody();
}
/**
* Test empty response body
* Test empty response body
* <p><b>200</b> - Successful operation
* @param pet Pet object that needs to be added to the store (optional)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testEchoBodyPetResponseStringWithHttpInfo(Pet pet) throws RestClientException {
Object localVarPostBody = pet;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/echo/body/Pet/response_string", HttpMethod.POST, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* Test empty json (request body)
* Test empty json (request body)
* <p><b>200</b> - Successful operation
* @param tag Tag object (optional)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testEchoBodyTagResponseString(Tag tag) throws RestClientException {
return testEchoBodyTagResponseStringWithHttpInfo(tag).getBody();
}
/**
* Test empty json (request body)
* Test empty json (request body)
* <p><b>200</b> - Successful operation
* @param tag Tag object (optional)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testEchoBodyTagResponseStringWithHttpInfo(Tag tag) throws RestClientException {
Object localVarPostBody = tag;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/echo/body/Tag/response_string", HttpMethod.POST, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
}

View File

@@ -0,0 +1,167 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class FormApi {
private ApiClient apiClient;
public FormApi() {
this(new ApiClient());
}
public FormApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Test form parameter(s)
* Test form parameter(s)
* <p><b>200</b> - Successful operation
* @param integerForm (optional)
* @param booleanForm (optional)
* @param stringForm (optional)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testFormIntegerBooleanString(Integer integerForm, Boolean booleanForm, String stringForm) throws RestClientException {
return testFormIntegerBooleanStringWithHttpInfo(integerForm, booleanForm, stringForm).getBody();
}
/**
* Test form parameter(s)
* Test form parameter(s)
* <p><b>200</b> - Successful operation
* @param integerForm (optional)
* @param booleanForm (optional)
* @param stringForm (optional)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testFormIntegerBooleanStringWithHttpInfo(Integer integerForm, Boolean booleanForm, String stringForm) throws RestClientException {
Object localVarPostBody = null;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
if (integerForm != null)
localVarFormParams.add("integer_form", integerForm);
if (booleanForm != null)
localVarFormParams.add("boolean_form", booleanForm);
if (stringForm != null)
localVarFormParams.add("string_form", stringForm);
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/x-www-form-urlencoded"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/form/integer/boolean/string", HttpMethod.POST, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* Test form parameter(s) for oneOf schema
* Test form parameter(s) for oneOf schema
* <p><b>200</b> - Successful operation
* @param form1 (optional)
* @param form2 (optional)
* @param form3 (optional)
* @param form4 (optional)
* @param id (optional)
* @param name (optional)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testFormOneof(String form1, Integer form2, String form3, Boolean form4, Long id, String name) throws RestClientException {
return testFormOneofWithHttpInfo(form1, form2, form3, form4, id, name).getBody();
}
/**
* Test form parameter(s) for oneOf schema
* Test form parameter(s) for oneOf schema
* <p><b>200</b> - Successful operation
* @param form1 (optional)
* @param form2 (optional)
* @param form3 (optional)
* @param form4 (optional)
* @param id (optional)
* @param name (optional)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testFormOneofWithHttpInfo(String form1, Integer form2, String form3, Boolean form4, Long id, String name) throws RestClientException {
Object localVarPostBody = null;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
if (form1 != null)
localVarFormParams.add("form1", form1);
if (form2 != null)
localVarFormParams.add("form2", form2);
if (form3 != null)
localVarFormParams.add("form3", form3);
if (form4 != null)
localVarFormParams.add("form4", form4);
if (id != null)
localVarFormParams.add("id", id);
if (name != null)
localVarFormParams.add("name", name);
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/x-www-form-urlencoded"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/form/oneof", HttpMethod.POST, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
}

View File

@@ -0,0 +1,108 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.StringEnumRef;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class HeaderApi {
private ApiClient apiClient;
public HeaderApi() {
this(new ApiClient());
}
public HeaderApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Test header parameter(s)
* Test header parameter(s)
* <p><b>200</b> - Successful operation
* @param integerHeader (optional)
* @param booleanHeader (optional)
* @param stringHeader (optional)
* @param enumNonrefStringHeader (optional)
* @param enumRefStringHeader (optional)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testHeaderIntegerBooleanStringEnums(Integer integerHeader, Boolean booleanHeader, String stringHeader, String enumNonrefStringHeader, StringEnumRef enumRefStringHeader) throws RestClientException {
return testHeaderIntegerBooleanStringEnumsWithHttpInfo(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader).getBody();
}
/**
* Test header parameter(s)
* Test header parameter(s)
* <p><b>200</b> - Successful operation
* @param integerHeader (optional)
* @param booleanHeader (optional)
* @param stringHeader (optional)
* @param enumNonrefStringHeader (optional)
* @param enumRefStringHeader (optional)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testHeaderIntegerBooleanStringEnumsWithHttpInfo(Integer integerHeader, Boolean booleanHeader, String stringHeader, String enumNonrefStringHeader, StringEnumRef enumRefStringHeader) throws RestClientException {
Object localVarPostBody = null;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
if (integerHeader != null)
localVarHeaderParams.add("integer_header", apiClient.parameterToString(integerHeader));
if (booleanHeader != null)
localVarHeaderParams.add("boolean_header", apiClient.parameterToString(booleanHeader));
if (stringHeader != null)
localVarHeaderParams.add("string_header", apiClient.parameterToString(stringHeader));
if (enumNonrefStringHeader != null)
localVarHeaderParams.add("enum_nonref_string_header", apiClient.parameterToString(enumNonrefStringHeader));
if (enumRefStringHeader != null)
localVarHeaderParams.add("enum_ref_string_header", apiClient.parameterToString(enumRefStringHeader));
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/header/integer/boolean/string/enums", HttpMethod.GET, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
}

View File

@@ -0,0 +1,121 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.StringEnumRef;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class PathApi {
private ApiClient apiClient;
public PathApi() {
this(new ApiClient());
}
public PathApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Test path parameter(s)
* Test path parameter(s)
* <p><b>200</b> - Successful operation
* @param pathString (required)
* @param pathInteger (required)
* @param enumNonrefStringPath (required)
* @param enumRefStringPath (required)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(String pathString, Integer pathInteger, String enumNonrefStringPath, StringEnumRef enumRefStringPath) throws RestClientException {
return testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath).getBody();
}
/**
* Test path parameter(s)
* Test path parameter(s)
* <p><b>200</b> - Successful operation
* @param pathString (required)
* @param pathInteger (required)
* @param enumNonrefStringPath (required)
* @param enumRefStringPath (required)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(String pathString, Integer pathInteger, String enumNonrefStringPath, StringEnumRef enumRefStringPath) throws RestClientException {
Object localVarPostBody = null;
// verify the required parameter 'pathString' is set
if (pathString == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'pathString' when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath");
}
// verify the required parameter 'pathInteger' is set
if (pathInteger == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'pathInteger' when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath");
}
// verify the required parameter 'enumNonrefStringPath' is set
if (enumNonrefStringPath == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'enumNonrefStringPath' when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath");
}
// verify the required parameter 'enumRefStringPath' is set
if (enumRefStringPath == null) {
throw new HttpClientErrorException(HttpStatus.BAD_REQUEST, "Missing the required parameter 'enumRefStringPath' when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath");
}
// create path and map variables
final Map<String, Object> uriVariables = new HashMap<String, Object>();
uriVariables.put("path_string", pathString);
uriVariables.put("path_integer", pathInteger);
uriVariables.put("enum_nonref_string_path", enumNonrefStringPath);
uriVariables.put("enum_ref_string_path", enumRefStringPath);
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}", HttpMethod.GET, uriVariables, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
}

View File

@@ -0,0 +1,431 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.DataQuery;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import org.openapitools.client.model.Pet;
import org.openapitools.client.model.StringEnumRef;
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClientException;
import org.springframework.web.client.HttpClientErrorException;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.core.io.FileSystemResource;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class QueryApi {
private ApiClient apiClient;
public QueryApi() {
this(new ApiClient());
}
public QueryApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param enumNonrefStringQuery (optional)
* @param enumRefStringQuery (optional)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testEnumRefString(String enumNonrefStringQuery, StringEnumRef enumRefStringQuery) throws RestClientException {
return testEnumRefStringWithHttpInfo(enumNonrefStringQuery, enumRefStringQuery).getBody();
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param enumNonrefStringQuery (optional)
* @param enumRefStringQuery (optional)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testEnumRefStringWithHttpInfo(String enumNonrefStringQuery, StringEnumRef enumRefStringQuery) throws RestClientException {
Object localVarPostBody = null;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_nonref_string_query", enumNonrefStringQuery));
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "enum_ref_string_query", enumRefStringQuery));
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/query/enum_ref_string", HttpMethod.GET, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param datetimeQuery (optional)
* @param dateQuery (optional)
* @param stringQuery (optional)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testQueryDatetimeDateString(OffsetDateTime datetimeQuery, LocalDate dateQuery, String stringQuery) throws RestClientException {
return testQueryDatetimeDateStringWithHttpInfo(datetimeQuery, dateQuery, stringQuery).getBody();
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param datetimeQuery (optional)
* @param dateQuery (optional)
* @param stringQuery (optional)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testQueryDatetimeDateStringWithHttpInfo(OffsetDateTime datetimeQuery, LocalDate dateQuery, String stringQuery) throws RestClientException {
Object localVarPostBody = null;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "datetime_query", datetimeQuery));
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "date_query", dateQuery));
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "string_query", stringQuery));
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/query/datetime/date/string", HttpMethod.GET, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param integerQuery (optional)
* @param booleanQuery (optional)
* @param stringQuery (optional)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testQueryIntegerBooleanString(Integer integerQuery, Boolean booleanQuery, String stringQuery) throws RestClientException {
return testQueryIntegerBooleanStringWithHttpInfo(integerQuery, booleanQuery, stringQuery).getBody();
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param integerQuery (optional)
* @param booleanQuery (optional)
* @param stringQuery (optional)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testQueryIntegerBooleanStringWithHttpInfo(Integer integerQuery, Boolean booleanQuery, String stringQuery) throws RestClientException {
Object localVarPostBody = null;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "integer_query", integerQuery));
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "boolean_query", booleanQuery));
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "string_query", stringQuery));
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/query/integer/boolean/string", HttpMethod.GET, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param queryObject (optional)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testQueryStyleDeepObjectExplodeTrueObject(Pet queryObject) throws RestClientException {
return testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(queryObject).getBody();
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param queryObject (optional)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(Pet queryObject) throws RestClientException {
Object localVarPostBody = null;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "id", queryObject.getId()));
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "name", queryObject.getName()));
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "category", queryObject.getCategory()));
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "photoUrls", queryObject.getPhotoUrls()));
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "tags", queryObject.getTags()));
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "status", queryObject.getStatus()));
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/query/style_deepObject/explode_true/object", HttpMethod.GET, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param queryObject (optional)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws RestClientException {
return testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(queryObject).getBody();
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param queryObject (optional)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws RestClientException {
Object localVarPostBody = null;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "query_object", queryObject));
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/query/style_deepObject/explode_true/object/allOf", HttpMethod.GET, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param queryObject (optional)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testQueryStyleFormExplodeTrueArrayString(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws RestClientException {
return testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject).getBody();
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param queryObject (optional)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testQueryStyleFormExplodeTrueArrayStringWithHttpInfo(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject) throws RestClientException {
Object localVarPostBody = null;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "values", queryObject.getValues()));
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/query/style_form/explode_true/array_string", HttpMethod.GET, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param queryObject (optional)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testQueryStyleFormExplodeTrueObject(Pet queryObject) throws RestClientException {
return testQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject).getBody();
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param queryObject (optional)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testQueryStyleFormExplodeTrueObjectWithHttpInfo(Pet queryObject) throws RestClientException {
Object localVarPostBody = null;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "id", queryObject.getId()));
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "name", queryObject.getName()));
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "category", queryObject.getCategory()));
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "photoUrls", queryObject.getPhotoUrls()));
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "tags", queryObject.getTags()));
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "status", queryObject.getStatus()));
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/query/style_form/explode_true/object", HttpMethod.GET, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param queryObject (optional)
* @return String
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public String testQueryStyleFormExplodeTrueObjectAllOf(DataQuery queryObject) throws RestClientException {
return testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(queryObject).getBody();
}
/**
* Test query parameter(s)
* Test query parameter(s)
* <p><b>200</b> - Successful operation
* @param queryObject (optional)
* @return ResponseEntity&lt;String&gt;
* @throws RestClientException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(DataQuery queryObject) throws RestClientException {
Object localVarPostBody = null;
final MultiValueMap<String, String> localVarQueryParams = new LinkedMultiValueMap<String, String>();
final HttpHeaders localVarHeaderParams = new HttpHeaders();
final MultiValueMap<String, String> localVarCookieParams = new LinkedMultiValueMap<String, String>();
final MultiValueMap<String, Object> localVarFormParams = new LinkedMultiValueMap<String, Object>();
localVarQueryParams.putAll(apiClient.parameterToMultiValueMap(null, "query_object", queryObject));
final String[] localVarAccepts = {
"text/plain"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localReturnType = new ParameterizedTypeReference<String>() {};
return apiClient.invokeAPI("/query/style_form/explode_true/object/allOf", HttpMethod.GET, Collections.<String, Object>emptyMap(), localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localReturnType);
}
}

View File

@@ -0,0 +1,62 @@
package org.openapitools.client.auth;
import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class ApiKeyAuth implements Authentication {
private final String location;
private final String paramName;
private String apiKey;
private String apiKeyPrefix;
public ApiKeyAuth(String location, String paramName) {
this.location = location;
this.paramName = paramName;
}
public String getLocation() {
return location;
}
public String getParamName() {
return paramName;
}
public String getApiKey() {
return apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public String getApiKeyPrefix() {
return apiKeyPrefix;
}
public void setApiKeyPrefix(String apiKeyPrefix) {
this.apiKeyPrefix = apiKeyPrefix;
}
@Override
public void applyToParams(MultiValueMap<String, String> queryParams, HttpHeaders headerParams, MultiValueMap<String, String> cookieParams) {
if (apiKey == null) {
return;
}
String value;
if (apiKeyPrefix != null) {
value = apiKeyPrefix + " " + apiKey;
} else {
value = apiKey;
}
if (location.equals("query")) {
queryParams.add(paramName, value);
} else if (location.equals("header")) {
headerParams.add(paramName, value);
} else if (location.equals("cookie")) {
cookieParams.add(paramName, value);
}
}
}

View File

@@ -0,0 +1,14 @@
package org.openapitools.client.auth;
import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;
public interface Authentication {
/**
* Apply authentication settings to header and / or query parameters.
* @param queryParams The query parameters for the request
* @param headerParams The header parameters for the request
* @param cookieParams The cookie parameters for the request
*/
public void applyToParams(MultiValueMap<String, String> queryParams, HttpHeaders headerParams, MultiValueMap<String, String> cookieParams);
}

View File

@@ -0,0 +1,38 @@
package org.openapitools.client.auth;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class HttpBasicAuth implements Authentication {
private String username;
private String password;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
@Override
public void applyToParams(MultiValueMap<String, String> queryParams, HttpHeaders headerParams, MultiValueMap<String, String> cookieParams) {
if (username == null && password == null) {
return;
}
String str = (username == null ? "" : username) + ":" + (password == null ? "" : password);
headerParams.add(HttpHeaders.AUTHORIZATION, "Basic " + Base64.getEncoder().encodeToString(str.getBytes(StandardCharsets.UTF_8)));
}
}

View File

@@ -0,0 +1,41 @@
package org.openapitools.client.auth;
import java.util.Optional;
import java.util.function.Supplier;
import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class HttpBearerAuth implements Authentication {
private final String scheme;
private Supplier<String> tokenSupplier;
public HttpBearerAuth(String scheme) {
this.scheme = scheme;
}
public String getBearerToken() {
return tokenSupplier.get();
}
public void setBearerToken(String bearerToken) {
this.tokenSupplier = () -> bearerToken;
}
public void setBearerToken(Supplier<String> tokenSupplier) {
this.tokenSupplier = tokenSupplier;
}
@Override
public void applyToParams(MultiValueMap<String, String> queryParams, HttpHeaders headerParams, MultiValueMap<String, String> cookieParams) {
String bearerToken = Optional.ofNullable(tokenSupplier).map(Supplier::get).orElse(null);
if (bearerToken == null) {
return;
}
headerParams.add(HttpHeaders.AUTHORIZATION, (scheme != null ? upperCaseBearer(scheme) + " " : "") + bearerToken);
}
private static String upperCaseBearer(String scheme) {
return ("bearer".equalsIgnoreCase(scheme)) ? "Bearer" : scheme;
}
}

View File

@@ -0,0 +1,135 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Bird
*/
@JsonPropertyOrder({
Bird.JSON_PROPERTY_SIZE,
Bird.JSON_PROPERTY_COLOR
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Bird {
public static final String JSON_PROPERTY_SIZE = "size";
private String size;
public static final String JSON_PROPERTY_COLOR = "color";
private String color;
public Bird() {
}
public Bird size(String size) {
this.size = size;
return this;
}
/**
* Get size
* @return size
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SIZE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSize() {
return size;
}
@JsonProperty(JSON_PROPERTY_SIZE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSize(String size) {
this.size = size;
}
public Bird color(String color) {
this.color = color;
return this;
}
/**
* Get color
* @return color
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_COLOR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getColor() {
return color;
}
@JsonProperty(JSON_PROPERTY_COLOR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setColor(String color) {
this.color = color;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Bird bird = (Bird) o;
return Objects.equals(this.size, bird.size) &&
Objects.equals(this.color, bird.color);
}
@Override
public int hashCode() {
return Objects.hash(size, color);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Bird {\n");
sb.append(" size: ").append(toIndentedString(size)).append("\n");
sb.append(" color: ").append(toIndentedString(color)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,135 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Category
*/
@JsonPropertyOrder({
Category.JSON_PROPERTY_ID,
Category.JSON_PROPERTY_NAME
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Category {
public static final String JSON_PROPERTY_ID = "id";
private Long id;
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public Category() {
}
public Category id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getId() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(Long id) {
this.id = id;
}
public Category name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Category category = (Category) o;
return Objects.equals(this.id, category.id) &&
Objects.equals(this.name, category.name);
}
@Override
public int hashCode() {
return Objects.hash(id, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Category {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,187 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openapitools.client.model.Query;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* DataQuery
*/
@JsonPropertyOrder({
DataQuery.JSON_PROPERTY_SUFFIX,
DataQuery.JSON_PROPERTY_TEXT,
DataQuery.JSON_PROPERTY_DATE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class DataQuery extends Query {
public static final String JSON_PROPERTY_SUFFIX = "suffix";
private String suffix;
public static final String JSON_PROPERTY_TEXT = "text";
private String text;
public static final String JSON_PROPERTY_DATE = "date";
private OffsetDateTime date;
public DataQuery() {
}
public DataQuery suffix(String suffix) {
this.suffix = suffix;
return this;
}
/**
* test suffix
* @return suffix
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SUFFIX)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSuffix() {
return suffix;
}
@JsonProperty(JSON_PROPERTY_SUFFIX)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSuffix(String suffix) {
this.suffix = suffix;
}
public DataQuery text(String text) {
this.text = text;
return this;
}
/**
* Some text containing white spaces
* @return text
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TEXT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getText() {
return text;
}
@JsonProperty(JSON_PROPERTY_TEXT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setText(String text) {
this.text = text;
}
public DataQuery date(OffsetDateTime date) {
this.date = date;
return this;
}
/**
* A date
* @return date
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getDate() {
return date;
}
@JsonProperty(JSON_PROPERTY_DATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDate(OffsetDateTime date) {
this.date = date;
}
@Override
public DataQuery id(Long id) {
this.setId(id);
return this;
}
@Override
public DataQuery outcomes(List<OutcomesEnum> outcomes) {
this.setOutcomes(outcomes);
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DataQuery dataQuery = (DataQuery) o;
return Objects.equals(this.suffix, dataQuery.suffix) &&
Objects.equals(this.text, dataQuery.text) &&
Objects.equals(this.date, dataQuery.date) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(suffix, text, date, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DataQuery {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" suffix: ").append(toIndentedString(suffix)).append("\n");
sb.append(" text: ").append(toIndentedString(text)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,471 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openapitools.client.model.StringEnumRef;
import org.openapitools.jackson.nullable.JsonNullable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* to test the default value of properties
*/
@JsonPropertyOrder({
DefaultValue.JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT,
DefaultValue.JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT,
DefaultValue.JSON_PROPERTY_ARRAY_STRING_DEFAULT,
DefaultValue.JSON_PROPERTY_ARRAY_INTEGER_DEFAULT,
DefaultValue.JSON_PROPERTY_ARRAY_STRING,
DefaultValue.JSON_PROPERTY_ARRAY_STRING_NULLABLE,
DefaultValue.JSON_PROPERTY_ARRAY_STRING_EXTENSION_NULLABLE,
DefaultValue.JSON_PROPERTY_STRING_NULLABLE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class DefaultValue {
public static final String JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT = "array_string_enum_ref_default";
private List<StringEnumRef> arrayStringEnumRefDefault = new ArrayList<>(Arrays.asList(StringEnumRef.SUCCESS, StringEnumRef.FAILURE));
/**
* Gets or Sets arrayStringEnumDefault
*/
public enum ArrayStringEnumDefaultEnum {
SUCCESS("success"),
FAILURE("failure"),
UNCLASSIFIED("unclassified");
private String value;
ArrayStringEnumDefaultEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ArrayStringEnumDefaultEnum fromValue(String value) {
for (ArrayStringEnumDefaultEnum b : ArrayStringEnumDefaultEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT = "array_string_enum_default";
private List<ArrayStringEnumDefaultEnum> arrayStringEnumDefault = new ArrayList<>(Arrays.asList(ArrayStringEnumDefaultEnum.SUCCESS, ArrayStringEnumDefaultEnum.FAILURE));
public static final String JSON_PROPERTY_ARRAY_STRING_DEFAULT = "array_string_default";
private List<String> arrayStringDefault = new ArrayList<>(Arrays.asList("failure", "skipped"));
public static final String JSON_PROPERTY_ARRAY_INTEGER_DEFAULT = "array_integer_default";
private List<Integer> arrayIntegerDefault = new ArrayList<>(Arrays.asList(1, 3));
public static final String JSON_PROPERTY_ARRAY_STRING = "array_string";
private List<String> arrayString;
public static final String JSON_PROPERTY_ARRAY_STRING_NULLABLE = "array_string_nullable";
private JsonNullable<List<String>> arrayStringNullable = JsonNullable.<List<String>>undefined();
public static final String JSON_PROPERTY_ARRAY_STRING_EXTENSION_NULLABLE = "array_string_extension_nullable";
private JsonNullable<List<String>> arrayStringExtensionNullable = JsonNullable.<List<String>>undefined();
public static final String JSON_PROPERTY_STRING_NULLABLE = "string_nullable";
private JsonNullable<String> stringNullable = JsonNullable.<String>undefined();
public DefaultValue() {
}
public DefaultValue arrayStringEnumRefDefault(List<StringEnumRef> arrayStringEnumRefDefault) {
this.arrayStringEnumRefDefault = arrayStringEnumRefDefault;
return this;
}
public DefaultValue addArrayStringEnumRefDefaultItem(StringEnumRef arrayStringEnumRefDefaultItem) {
if (this.arrayStringEnumRefDefault == null) {
this.arrayStringEnumRefDefault = new ArrayList<>(Arrays.asList(StringEnumRef.SUCCESS, StringEnumRef.FAILURE));
}
this.arrayStringEnumRefDefault.add(arrayStringEnumRefDefaultItem);
return this;
}
/**
* Get arrayStringEnumRefDefault
* @return arrayStringEnumRefDefault
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<StringEnumRef> getArrayStringEnumRefDefault() {
return arrayStringEnumRefDefault;
}
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_REF_DEFAULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setArrayStringEnumRefDefault(List<StringEnumRef> arrayStringEnumRefDefault) {
this.arrayStringEnumRefDefault = arrayStringEnumRefDefault;
}
public DefaultValue arrayStringEnumDefault(List<ArrayStringEnumDefaultEnum> arrayStringEnumDefault) {
this.arrayStringEnumDefault = arrayStringEnumDefault;
return this;
}
public DefaultValue addArrayStringEnumDefaultItem(ArrayStringEnumDefaultEnum arrayStringEnumDefaultItem) {
if (this.arrayStringEnumDefault == null) {
this.arrayStringEnumDefault = new ArrayList<>(Arrays.asList(ArrayStringEnumDefaultEnum.SUCCESS, ArrayStringEnumDefaultEnum.FAILURE));
}
this.arrayStringEnumDefault.add(arrayStringEnumDefaultItem);
return this;
}
/**
* Get arrayStringEnumDefault
* @return arrayStringEnumDefault
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<ArrayStringEnumDefaultEnum> getArrayStringEnumDefault() {
return arrayStringEnumDefault;
}
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_ENUM_DEFAULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setArrayStringEnumDefault(List<ArrayStringEnumDefaultEnum> arrayStringEnumDefault) {
this.arrayStringEnumDefault = arrayStringEnumDefault;
}
public DefaultValue arrayStringDefault(List<String> arrayStringDefault) {
this.arrayStringDefault = arrayStringDefault;
return this;
}
public DefaultValue addArrayStringDefaultItem(String arrayStringDefaultItem) {
if (this.arrayStringDefault == null) {
this.arrayStringDefault = new ArrayList<>(Arrays.asList("failure", "skipped"));
}
this.arrayStringDefault.add(arrayStringDefaultItem);
return this;
}
/**
* Get arrayStringDefault
* @return arrayStringDefault
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_DEFAULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getArrayStringDefault() {
return arrayStringDefault;
}
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_DEFAULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setArrayStringDefault(List<String> arrayStringDefault) {
this.arrayStringDefault = arrayStringDefault;
}
public DefaultValue arrayIntegerDefault(List<Integer> arrayIntegerDefault) {
this.arrayIntegerDefault = arrayIntegerDefault;
return this;
}
public DefaultValue addArrayIntegerDefaultItem(Integer arrayIntegerDefaultItem) {
if (this.arrayIntegerDefault == null) {
this.arrayIntegerDefault = new ArrayList<>(Arrays.asList(1, 3));
}
this.arrayIntegerDefault.add(arrayIntegerDefaultItem);
return this;
}
/**
* Get arrayIntegerDefault
* @return arrayIntegerDefault
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_INTEGER_DEFAULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<Integer> getArrayIntegerDefault() {
return arrayIntegerDefault;
}
@JsonProperty(JSON_PROPERTY_ARRAY_INTEGER_DEFAULT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setArrayIntegerDefault(List<Integer> arrayIntegerDefault) {
this.arrayIntegerDefault = arrayIntegerDefault;
}
public DefaultValue arrayString(List<String> arrayString) {
this.arrayString = arrayString;
return this;
}
public DefaultValue addArrayStringItem(String arrayStringItem) {
if (this.arrayString == null) {
this.arrayString = new ArrayList<>();
}
this.arrayString.add(arrayStringItem);
return this;
}
/**
* Get arrayString
* @return arrayString
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getArrayString() {
return arrayString;
}
@JsonProperty(JSON_PROPERTY_ARRAY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setArrayString(List<String> arrayString) {
this.arrayString = arrayString;
}
public DefaultValue arrayStringNullable(List<String> arrayStringNullable) {
this.arrayStringNullable = JsonNullable.<List<String>>of(arrayStringNullable);
return this;
}
public DefaultValue addArrayStringNullableItem(String arrayStringNullableItem) {
if (this.arrayStringNullable == null || !this.arrayStringNullable.isPresent()) {
this.arrayStringNullable = JsonNullable.<List<String>>of(new ArrayList<>());
}
try {
this.arrayStringNullable.get().add(arrayStringNullableItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get arrayStringNullable
* @return arrayStringNullable
**/
@javax.annotation.Nullable
@JsonIgnore
public List<String> getArrayStringNullable() {
return arrayStringNullable.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_NULLABLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<List<String>> getArrayStringNullable_JsonNullable() {
return arrayStringNullable;
}
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_NULLABLE)
public void setArrayStringNullable_JsonNullable(JsonNullable<List<String>> arrayStringNullable) {
this.arrayStringNullable = arrayStringNullable;
}
public void setArrayStringNullable(List<String> arrayStringNullable) {
this.arrayStringNullable = JsonNullable.<List<String>>of(arrayStringNullable);
}
public DefaultValue arrayStringExtensionNullable(List<String> arrayStringExtensionNullable) {
this.arrayStringExtensionNullable = JsonNullable.<List<String>>of(arrayStringExtensionNullable);
return this;
}
public DefaultValue addArrayStringExtensionNullableItem(String arrayStringExtensionNullableItem) {
if (this.arrayStringExtensionNullable == null || !this.arrayStringExtensionNullable.isPresent()) {
this.arrayStringExtensionNullable = JsonNullable.<List<String>>of(new ArrayList<>());
}
try {
this.arrayStringExtensionNullable.get().add(arrayStringExtensionNullableItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get arrayStringExtensionNullable
* @return arrayStringExtensionNullable
**/
@javax.annotation.Nullable
@JsonIgnore
public List<String> getArrayStringExtensionNullable() {
return arrayStringExtensionNullable.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_EXTENSION_NULLABLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<List<String>> getArrayStringExtensionNullable_JsonNullable() {
return arrayStringExtensionNullable;
}
@JsonProperty(JSON_PROPERTY_ARRAY_STRING_EXTENSION_NULLABLE)
public void setArrayStringExtensionNullable_JsonNullable(JsonNullable<List<String>> arrayStringExtensionNullable) {
this.arrayStringExtensionNullable = arrayStringExtensionNullable;
}
public void setArrayStringExtensionNullable(List<String> arrayStringExtensionNullable) {
this.arrayStringExtensionNullable = JsonNullable.<List<String>>of(arrayStringExtensionNullable);
}
public DefaultValue stringNullable(String stringNullable) {
this.stringNullable = JsonNullable.<String>of(stringNullable);
return this;
}
/**
* Get stringNullable
* @return stringNullable
**/
@javax.annotation.Nullable
@JsonIgnore
public String getStringNullable() {
return stringNullable.orElse(null);
}
@JsonProperty(JSON_PROPERTY_STRING_NULLABLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<String> getStringNullable_JsonNullable() {
return stringNullable;
}
@JsonProperty(JSON_PROPERTY_STRING_NULLABLE)
public void setStringNullable_JsonNullable(JsonNullable<String> stringNullable) {
this.stringNullable = stringNullable;
}
public void setStringNullable(String stringNullable) {
this.stringNullable = JsonNullable.<String>of(stringNullable);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DefaultValue defaultValue = (DefaultValue) o;
return Objects.equals(this.arrayStringEnumRefDefault, defaultValue.arrayStringEnumRefDefault) &&
Objects.equals(this.arrayStringEnumDefault, defaultValue.arrayStringEnumDefault) &&
Objects.equals(this.arrayStringDefault, defaultValue.arrayStringDefault) &&
Objects.equals(this.arrayIntegerDefault, defaultValue.arrayIntegerDefault) &&
Objects.equals(this.arrayString, defaultValue.arrayString) &&
equalsNullable(this.arrayStringNullable, defaultValue.arrayStringNullable) &&
equalsNullable(this.arrayStringExtensionNullable, defaultValue.arrayStringExtensionNullable) &&
equalsNullable(this.stringNullable, defaultValue.stringNullable);
}
private static <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> b) {
return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get()));
}
@Override
public int hashCode() {
return Objects.hash(arrayStringEnumRefDefault, arrayStringEnumDefault, arrayStringDefault, arrayIntegerDefault, arrayString, hashCodeNullable(arrayStringNullable), hashCodeNullable(arrayStringExtensionNullable), hashCodeNullable(stringNullable));
}
private static <T> int hashCodeNullable(JsonNullable<T> a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DefaultValue {\n");
sb.append(" arrayStringEnumRefDefault: ").append(toIndentedString(arrayStringEnumRefDefault)).append("\n");
sb.append(" arrayStringEnumDefault: ").append(toIndentedString(arrayStringEnumDefault)).append("\n");
sb.append(" arrayStringDefault: ").append(toIndentedString(arrayStringDefault)).append("\n");
sb.append(" arrayIntegerDefault: ").append(toIndentedString(arrayIntegerDefault)).append("\n");
sb.append(" arrayString: ").append(toIndentedString(arrayString)).append("\n");
sb.append(" arrayStringNullable: ").append(toIndentedString(arrayStringNullable)).append("\n");
sb.append(" arrayStringExtensionNullable: ").append(toIndentedString(arrayStringExtensionNullable)).append("\n");
sb.append(" stringNullable: ").append(toIndentedString(stringNullable)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,170 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.math.BigDecimal;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* NumberPropertiesOnly
*/
@JsonPropertyOrder({
NumberPropertiesOnly.JSON_PROPERTY_NUMBER,
NumberPropertiesOnly.JSON_PROPERTY_FLOAT,
NumberPropertiesOnly.JSON_PROPERTY_DOUBLE
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class NumberPropertiesOnly {
public static final String JSON_PROPERTY_NUMBER = "number";
private BigDecimal number;
public static final String JSON_PROPERTY_FLOAT = "float";
private Float _float;
public static final String JSON_PROPERTY_DOUBLE = "double";
private Double _double;
public NumberPropertiesOnly() {
}
public NumberPropertiesOnly number(BigDecimal number) {
this.number = number;
return this;
}
/**
* Get number
* @return number
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BigDecimal getNumber() {
return number;
}
@JsonProperty(JSON_PROPERTY_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setNumber(BigDecimal number) {
this.number = number;
}
public NumberPropertiesOnly _float(Float _float) {
this._float = _float;
return this;
}
/**
* Get _float
* @return _float
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FLOAT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Float getFloat() {
return _float;
}
@JsonProperty(JSON_PROPERTY_FLOAT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFloat(Float _float) {
this._float = _float;
}
public NumberPropertiesOnly _double(Double _double) {
this._double = _double;
return this;
}
/**
* Get _double
* minimum: 0.8
* maximum: 50.2
* @return _double
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DOUBLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Double getDouble() {
return _double;
}
@JsonProperty(JSON_PROPERTY_DOUBLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDouble(Double _double) {
this._double = _double;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NumberPropertiesOnly numberPropertiesOnly = (NumberPropertiesOnly) o;
return Objects.equals(this.number, numberPropertiesOnly.number) &&
Objects.equals(this._float, numberPropertiesOnly._float) &&
Objects.equals(this._double, numberPropertiesOnly._double);
}
@Override
public int hashCode() {
return Objects.hash(number, _float, _double);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class NumberPropertiesOnly {\n");
sb.append(" number: ").append(toIndentedString(number)).append("\n");
sb.append(" _float: ").append(toIndentedString(_float)).append("\n");
sb.append(" _double: ").append(toIndentedString(_double)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,321 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openapitools.client.model.Category;
import org.openapitools.client.model.Tag;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Pet
*/
@JsonPropertyOrder({
Pet.JSON_PROPERTY_ID,
Pet.JSON_PROPERTY_NAME,
Pet.JSON_PROPERTY_CATEGORY,
Pet.JSON_PROPERTY_PHOTO_URLS,
Pet.JSON_PROPERTY_TAGS,
Pet.JSON_PROPERTY_STATUS
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Pet {
public static final String JSON_PROPERTY_ID = "id";
private Long id;
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public static final String JSON_PROPERTY_CATEGORY = "category";
private Category category;
public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls";
private List<String> photoUrls;
public static final String JSON_PROPERTY_TAGS = "tags";
private List<Tag> tags;
/**
* pet status in the store
*/
public enum StatusEnum {
AVAILABLE("available"),
PENDING("pending"),
SOLD("sold");
private String value;
StatusEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static StatusEnum fromValue(String value) {
for (StatusEnum b : StatusEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_STATUS = "status";
private StatusEnum status;
public Pet() {
}
public Pet id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getId() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(Long id) {
this.id = id;
}
public Pet name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setName(String name) {
this.name = name;
}
public Pet category(Category category) {
this.category = category;
return this;
}
/**
* Get category
* @return category
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CATEGORY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Category getCategory() {
return category;
}
@JsonProperty(JSON_PROPERTY_CATEGORY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCategory(Category category) {
this.category = category;
}
public Pet photoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
return this;
}
public Pet addPhotoUrlsItem(String photoUrlsItem) {
if (this.photoUrls == null) {
this.photoUrls = new ArrayList<>();
}
this.photoUrls.add(photoUrlsItem);
return this;
}
/**
* Get photoUrls
* @return photoUrls
**/
@javax.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_PHOTO_URLS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public List<String> getPhotoUrls() {
return photoUrls;
}
@JsonProperty(JSON_PROPERTY_PHOTO_URLS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setPhotoUrls(List<String> photoUrls) {
this.photoUrls = photoUrls;
}
public Pet tags(List<Tag> tags) {
this.tags = tags;
return this;
}
public Pet addTagsItem(Tag tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<>();
}
this.tags.add(tagsItem);
return this;
}
/**
* Get tags
* @return tags
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TAGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<Tag> getTags() {
return tags;
}
@JsonProperty(JSON_PROPERTY_TAGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setTags(List<Tag> tags) {
this.tags = tags;
}
public Pet status(StatusEnum status) {
this.status = status;
return this;
}
/**
* pet status in the store
* @return status
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public StatusEnum getStatus() {
return status;
}
@JsonProperty(JSON_PROPERTY_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setStatus(StatusEnum status) {
this.status = status;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Pet pet = (Pet) o;
return Objects.equals(this.id, pet.id) &&
Objects.equals(this.name, pet.name) &&
Objects.equals(this.category, pet.category) &&
Objects.equals(this.photoUrls, pet.photoUrls) &&
Objects.equals(this.tags, pet.tags) &&
Objects.equals(this.status, pet.status);
}
@Override
public int hashCode() {
return Objects.hash(id, name, category, photoUrls, tags, status);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Pet {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" photoUrls: ").append(toIndentedString(photoUrls)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,183 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Query
*/
@JsonPropertyOrder({
Query.JSON_PROPERTY_ID,
Query.JSON_PROPERTY_OUTCOMES
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Query {
public static final String JSON_PROPERTY_ID = "id";
private Long id;
/**
* Gets or Sets outcomes
*/
public enum OutcomesEnum {
SUCCESS("SUCCESS"),
FAILURE("FAILURE"),
SKIPPED("SKIPPED");
private String value;
OutcomesEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OutcomesEnum fromValue(String value) {
for (OutcomesEnum b : OutcomesEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_OUTCOMES = "outcomes";
private List<OutcomesEnum> outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE));
public Query() {
}
public Query id(Long id) {
this.id = id;
return this;
}
/**
* Query
* @return id
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getId() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(Long id) {
this.id = id;
}
public Query outcomes(List<OutcomesEnum> outcomes) {
this.outcomes = outcomes;
return this;
}
public Query addOutcomesItem(OutcomesEnum outcomesItem) {
if (this.outcomes == null) {
this.outcomes = new ArrayList<>(Arrays.asList(OutcomesEnum.SUCCESS, OutcomesEnum.FAILURE));
}
this.outcomes.add(outcomesItem);
return this;
}
/**
* Get outcomes
* @return outcomes
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_OUTCOMES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<OutcomesEnum> getOutcomes() {
return outcomes;
}
@JsonProperty(JSON_PROPERTY_OUTCOMES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOutcomes(List<OutcomesEnum> outcomes) {
this.outcomes = outcomes;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Query query = (Query) o;
return Objects.equals(this.id, query.id) &&
Objects.equals(this.outcomes, query.outcomes);
}
@Override
public int hashCode() {
return Objects.hash(id, outcomes);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Query {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" outcomes: ").append(toIndentedString(outcomes)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,61 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Gets or Sets StringEnumRef
*/
public enum StringEnumRef {
SUCCESS("success"),
FAILURE("failure"),
UNCLASSIFIED("unclassified");
private String value;
StringEnumRef(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static StringEnumRef fromValue(String value) {
for (StringEnumRef b : StringEnumRef.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@@ -0,0 +1,135 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Tag
*/
@JsonPropertyOrder({
Tag.JSON_PROPERTY_ID,
Tag.JSON_PROPERTY_NAME
})
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Tag {
public static final String JSON_PROPERTY_ID = "id";
private Long id;
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public Tag() {
}
public Tag id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getId() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(Long id) {
this.id = id;
}
public Tag name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Tag tag = (Tag) o;
return Objects.equals(this.id, tag.id) &&
Objects.equals(this.name, tag.name);
}
@Override
public int hashCode() {
return Objects.hash(id, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Tag {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,200 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
*/
@JsonPropertyOrder({
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_SIZE,
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_COLOR,
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_ID,
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_NAME
})
@JsonTypeName("test_query_style_deepObject_explode_true_object_allOf_query_object_parameter")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter {
public static final String JSON_PROPERTY_SIZE = "size";
private String size;
public static final String JSON_PROPERTY_COLOR = "color";
private String color;
public static final String JSON_PROPERTY_ID = "id";
private Long id;
public static final String JSON_PROPERTY_NAME = "name";
private String name;
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() {
}
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter size(String size) {
this.size = size;
return this;
}
/**
* Get size
* @return size
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SIZE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSize() {
return size;
}
@JsonProperty(JSON_PROPERTY_SIZE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSize(String size) {
this.size = size;
}
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter color(String color) {
this.color = color;
return this;
}
/**
* Get color
* @return color
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_COLOR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getColor() {
return color;
}
@JsonProperty(JSON_PROPERTY_COLOR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setColor(String color) {
this.color = color;
}
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getId() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(Long id) {
this.id = id;
}
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter = (TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) o;
return Objects.equals(this.size, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.size) &&
Objects.equals(this.color, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.color) &&
Objects.equals(this.id, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.id) &&
Objects.equals(this.name, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.name);
}
@Override
public int hashCode() {
return Objects.hash(size, color, id, name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter {\n");
sb.append(" size: ").append(toIndentedString(size)).append("\n");
sb.append(" color: ").append(toIndentedString(color)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,115 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
*/
@JsonPropertyOrder({
TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.JSON_PROPERTY_VALUES
})
@JsonTypeName("test_query_style_form_explode_true_array_string_query_object_parameter")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter {
public static final String JSON_PROPERTY_VALUES = "values";
private List<String> values;
public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() {
}
public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter values(List<String> values) {
this.values = values;
return this;
}
public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter addValuesItem(String valuesItem) {
if (this.values == null) {
this.values = new ArrayList<>();
}
this.values.add(valuesItem);
return this;
}
/**
* Get values
* @return values
**/
@javax.annotation.Nullable
@JsonProperty(JSON_PROPERTY_VALUES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getValues() {
return values;
}
@JsonProperty(JSON_PROPERTY_VALUES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setValues(List<String> values) {
this.values = values;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter testQueryStyleFormExplodeTrueArrayStringQueryObjectParameter = (TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter) o;
return Objects.equals(this.values, testQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.values);
}
@Override
public int hashCode() {
return Objects.hash(values);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter {\n");
sb.append(" values: ").append(toIndentedString(values)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}

View File

@@ -0,0 +1,71 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.api;
import org.junit.Assert;
import org.junit.Test;
import org.junit.Ignore;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for AuthApi
*/
public class AuthApiTest {
private final AuthApi api = new AuthApi();
/**
* To test HTTP basic authentication
*
* To test HTTP basic authentication
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testAuthHttpBasicTest() {
String response = api.testAuthHttpBasic();
// TODO: test validations
}
/**
* To test HTTP bearer authentication
*
* To test HTTP bearer authentication
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testAuthHttpBearerTest() {
String response;
api.getApiClient().setBearerToken("fixed token");
response = api.testAuthHttpBearer();
Assert.assertTrue(response.contains("Authorization: Bearer fixed token"));
api.getApiClient().setBearerToken(() -> "dynamic token");
response = api.testAuthHttpBearer();
Assert.assertTrue(response.contains("Authorization: Bearer dynamic token"));
}
}

View File

@@ -0,0 +1,173 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.api;
import java.io.File;
import org.openapitools.client.model.Pet;
import org.openapitools.client.model.Tag;
import org.junit.Test;
import org.junit.Ignore;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for BodyApi
*/
@Ignore
public class BodyApiTest {
private final BodyApi api = new BodyApi();
/**
* Test binary (gif) response body
*
* Test binary (gif) response body
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testBinaryGifTest() {
File response = api.testBinaryGif();
// TODO: test validations
}
/**
* Test body parameter(s)
*
* Test body parameter(s)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testBodyApplicationOctetstreamBinaryTest() {
File body = null;
String response = api.testBodyApplicationOctetstreamBinary(body);
// TODO: test validations
}
/**
* Test array of binary in multipart mime
*
* Test array of binary in multipart mime
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testBodyMultipartFormdataArrayOfBinaryTest() {
List<File> files = null;
String response = api.testBodyMultipartFormdataArrayOfBinary(files);
// TODO: test validations
}
/**
* Test body parameter(s)
*
* Test body parameter(s)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testEchoBodyAllOfPetTest() {
Pet pet = null;
Pet response = api.testEchoBodyAllOfPet(pet);
// TODO: test validations
}
/**
* Test free form object
*
* Test free form object
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testEchoBodyFreeFormObjectResponseStringTest() {
Object body = null;
String response = api.testEchoBodyFreeFormObjectResponseString(body);
// TODO: test validations
}
/**
* Test body parameter(s)
*
* Test body parameter(s)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testEchoBodyPetTest() {
Pet pet = null;
Pet response = api.testEchoBodyPet(pet);
// TODO: test validations
}
/**
* Test empty response body
*
* Test empty response body
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testEchoBodyPetResponseStringTest() {
Pet pet = null;
String response = api.testEchoBodyPetResponseString(pet);
// TODO: test validations
}
/**
* Test empty json (request body)
*
* Test empty json (request body)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testEchoBodyTagResponseStringTest() {
Tag tag = null;
String response = api.testEchoBodyTagResponseString(tag);
// TODO: test validations
}
}

View File

@@ -0,0 +1,76 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.api;
import org.junit.Test;
import org.junit.Ignore;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for FormApi
*/
@Ignore
public class FormApiTest {
private final FormApi api = new FormApi();
/**
* Test form parameter(s)
*
* Test form parameter(s)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testFormIntegerBooleanStringTest() {
Integer integerForm = null;
Boolean booleanForm = null;
String stringForm = null;
String response = api.testFormIntegerBooleanString(integerForm, booleanForm, stringForm);
// TODO: test validations
}
/**
* Test form parameter(s) for oneOf schema
*
* Test form parameter(s) for oneOf schema
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testFormOneofTest() {
String form1 = null;
Integer form2 = null;
String form3 = null;
Boolean form4 = null;
Long id = null;
String name = null;
String response = api.testFormOneof(form1, form2, form3, form4, id, name);
// TODO: test validations
}
}

View File

@@ -0,0 +1,57 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.api;
import org.openapitools.client.model.StringEnumRef;
import org.junit.Test;
import org.junit.Ignore;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for HeaderApi
*/
@Ignore
public class HeaderApiTest {
private final HeaderApi api = new HeaderApi();
/**
* Test header parameter(s)
*
* Test header parameter(s)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testHeaderIntegerBooleanStringEnumsTest() {
Integer integerHeader = null;
Boolean booleanHeader = null;
String stringHeader = null;
String enumNonrefStringHeader = null;
StringEnumRef enumRefStringHeader = null;
String response = api.testHeaderIntegerBooleanStringEnums(integerHeader, booleanHeader, stringHeader, enumNonrefStringHeader, enumRefStringHeader);
// TODO: test validations
}
}

View File

@@ -0,0 +1,56 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.api;
import org.openapitools.client.model.StringEnumRef;
import org.junit.Test;
import org.junit.Ignore;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for PathApi
*/
@Ignore
public class PathApiTest {
private final PathApi api = new PathApi();
/**
* Test path parameter(s)
*
* Test path parameter(s)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathTest() {
String pathString = null;
Integer pathInteger = null;
String enumNonrefStringPath = null;
StringEnumRef enumRefStringPath = null;
String response = api.testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(pathString, pathInteger, enumNonrefStringPath, enumRefStringPath);
// TODO: test validations
}
}

View File

@@ -0,0 +1,183 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.api;
import org.openapitools.client.model.DataQuery;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import org.openapitools.client.model.Pet;
import org.openapitools.client.model.StringEnumRef;
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
import org.junit.Test;
import org.junit.Ignore;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* API tests for QueryApi
*/
@Ignore
public class QueryApiTest {
private final QueryApi api = new QueryApi();
/**
* Test query parameter(s)
*
* Test query parameter(s)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testEnumRefStringTest() {
String enumNonrefStringQuery = null;
StringEnumRef enumRefStringQuery = null;
String response = api.testEnumRefString(enumNonrefStringQuery, enumRefStringQuery);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testQueryDatetimeDateStringTest() {
OffsetDateTime datetimeQuery = null;
LocalDate dateQuery = null;
String stringQuery = null;
String response = api.testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testQueryIntegerBooleanStringTest() {
Integer integerQuery = null;
Boolean booleanQuery = null;
String stringQuery = null;
String response = api.testQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testQueryStyleDeepObjectExplodeTrueObjectTest() {
Pet queryObject = null;
String response = api.testQueryStyleDeepObjectExplodeTrueObject(queryObject);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testQueryStyleDeepObjectExplodeTrueObjectAllOfTest() {
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = null;
String response = api.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testQueryStyleFormExplodeTrueArrayStringTest() {
TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter queryObject = null;
String response = api.testQueryStyleFormExplodeTrueArrayString(queryObject);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testQueryStyleFormExplodeTrueObjectTest() {
Pet queryObject = null;
String response = api.testQueryStyleFormExplodeTrueObject(queryObject);
// TODO: test validations
}
/**
* Test query parameter(s)
*
* Test query parameter(s)
*
* @throws ApiException
* if the Api call fails
*/
@Test
public void testQueryStyleFormExplodeTrueObjectAllOfTest() {
DataQuery queryObject = null;
String response = api.testQueryStyleFormExplodeTrueObjectAllOf(queryObject);
// TODO: test validations
}
}

View File

@@ -0,0 +1,55 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for Bird
*/
public class BirdTest {
private final Bird model = new Bird();
/**
* Model tests for Bird
*/
@Test
public void testBird() {
// TODO: test Bird
}
/**
* Test the property 'size'
*/
@Test
public void sizeTest() {
// TODO: test size
}
/**
* Test the property 'color'
*/
@Test
public void colorTest() {
// TODO: test color
}
}

View File

@@ -0,0 +1,55 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for Category
*/
public class CategoryTest {
private final Category model = new Category();
/**
* Model tests for Category
*/
@Test
public void testCategory() {
// TODO: test Category
}
/**
* Test the property 'id'
*/
@Test
public void idTest() {
// TODO: test id
}
/**
* Test the property 'name'
*/
@Test
public void nameTest() {
// TODO: test name
}
}

View File

@@ -0,0 +1,84 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openapitools.client.model.Query;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for DataQuery
*/
public class DataQueryTest {
private final DataQuery model = new DataQuery();
/**
* Model tests for DataQuery
*/
@Test
public void testDataQuery() {
// TODO: test DataQuery
}
/**
* Test the property 'id'
*/
@Test
public void idTest() {
// TODO: test id
}
/**
* Test the property 'outcomes'
*/
@Test
public void outcomesTest() {
// TODO: test outcomes
}
/**
* Test the property 'suffix'
*/
@Test
public void suffixTest() {
// TODO: test suffix
}
/**
* Test the property 'text'
*/
@Test
public void textTest() {
// TODO: test text
}
/**
* Test the property 'date'
*/
@Test
public void dateTest() {
// TODO: test date
}
}

View File

@@ -0,0 +1,111 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openapitools.client.model.StringEnumRef;
import org.openapitools.jackson.nullable.JsonNullable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.openapitools.jackson.nullable.JsonNullable;
import java.util.NoSuchElementException;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for DefaultValue
*/
public class DefaultValueTest {
private final DefaultValue model = new DefaultValue();
/**
* Model tests for DefaultValue
*/
@Test
public void testDefaultValue() {
// TODO: test DefaultValue
}
/**
* Test the property 'arrayStringEnumRefDefault'
*/
@Test
public void arrayStringEnumRefDefaultTest() {
// TODO: test arrayStringEnumRefDefault
}
/**
* Test the property 'arrayStringEnumDefault'
*/
@Test
public void arrayStringEnumDefaultTest() {
// TODO: test arrayStringEnumDefault
}
/**
* Test the property 'arrayStringDefault'
*/
@Test
public void arrayStringDefaultTest() {
// TODO: test arrayStringDefault
}
/**
* Test the property 'arrayIntegerDefault'
*/
@Test
public void arrayIntegerDefaultTest() {
// TODO: test arrayIntegerDefault
}
/**
* Test the property 'arrayString'
*/
@Test
public void arrayStringTest() {
// TODO: test arrayString
}
/**
* Test the property 'arrayStringNullable'
*/
@Test
public void arrayStringNullableTest() {
// TODO: test arrayStringNullable
}
/**
* Test the property 'arrayStringExtensionNullable'
*/
@Test
public void arrayStringExtensionNullableTest() {
// TODO: test arrayStringExtensionNullable
}
/**
* Test the property 'stringNullable'
*/
@Test
public void stringNullableTest() {
// TODO: test stringNullable
}
}

View File

@@ -0,0 +1,64 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.math.BigDecimal;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for NumberPropertiesOnly
*/
public class NumberPropertiesOnlyTest {
private final NumberPropertiesOnly model = new NumberPropertiesOnly();
/**
* Model tests for NumberPropertiesOnly
*/
@Test
public void testNumberPropertiesOnly() {
// TODO: test NumberPropertiesOnly
}
/**
* Test the property 'number'
*/
@Test
public void numberTest() {
// TODO: test number
}
/**
* Test the property '_float'
*/
@Test
public void _floatTest() {
// TODO: test _float
}
/**
* Test the property '_double'
*/
@Test
public void _doubleTest() {
// TODO: test _double
}
}

View File

@@ -0,0 +1,92 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openapitools.client.model.Category;
import org.openapitools.client.model.Tag;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for Pet
*/
public class PetTest {
private final Pet model = new Pet();
/**
* Model tests for Pet
*/
@Test
public void testPet() {
// TODO: test Pet
}
/**
* Test the property 'id'
*/
@Test
public void idTest() {
// TODO: test id
}
/**
* Test the property 'name'
*/
@Test
public void nameTest() {
// TODO: test name
}
/**
* Test the property 'category'
*/
@Test
public void categoryTest() {
// TODO: test category
}
/**
* Test the property 'photoUrls'
*/
@Test
public void photoUrlsTest() {
// TODO: test photoUrls
}
/**
* Test the property 'tags'
*/
@Test
public void tagsTest() {
// TODO: test tags
}
/**
* Test the property 'status'
*/
@Test
public void statusTest() {
// TODO: test status
}
}

View File

@@ -0,0 +1,58 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for Query
*/
public class QueryTest {
private final Query model = new Query();
/**
* Model tests for Query
*/
@Test
public void testQuery() {
// TODO: test Query
}
/**
* Test the property 'id'
*/
@Test
public void idTest() {
// TODO: test id
}
/**
* Test the property 'outcomes'
*/
@Test
public void outcomesTest() {
// TODO: test outcomes
}
}

View File

@@ -0,0 +1,32 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for StringEnumRef
*/
public class StringEnumRefTest {
/**
* Model tests for StringEnumRef
*/
@Test
public void testStringEnumRef() {
// TODO: test StringEnumRef
}
}

View File

@@ -0,0 +1,55 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for Tag
*/
public class TagTest {
private final Tag model = new Tag();
/**
* Model tests for Tag
*/
@Test
public void testTag() {
// TODO: test Tag
}
/**
* Test the property 'id'
*/
@Test
public void idTest() {
// TODO: test id
}
/**
* Test the property 'name'
*/
@Test
public void nameTest() {
// TODO: test name
}
}

View File

@@ -0,0 +1,71 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
*/
public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest {
private final TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter model = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter();
/**
* Model tests for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
*/
@Test
public void testTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() {
// TODO: test TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
}
/**
* Test the property 'size'
*/
@Test
public void sizeTest() {
// TODO: test size
}
/**
* Test the property 'color'
*/
@Test
public void colorTest() {
// TODO: test color
}
/**
* Test the property 'id'
*/
@Test
public void idTest() {
// TODO: test id
}
/**
* Test the property 'name'
*/
@Test
public void nameTest() {
// TODO: test name
}
}

View File

@@ -0,0 +1,50 @@
/*
* Echo Server API
* Echo Server API
*
* The version of the OpenAPI document: 0.1.0
* Contact: team@openapitools.org
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package org.openapitools.client.model;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;
/**
* Model tests for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
*/
public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTest {
private final TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter model = new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter();
/**
* Model tests for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
*/
@Test
public void testTestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter() {
// TODO: test TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
}
/**
* Test the property 'values'
*/
@Test
public void valuesTest() {
// TODO: test values
}
}