Single request parameter equals and hashcode (#20833)

* Align indentation

* Add equals and hashcode to singleRequestParameter static class

* Add missing sample updates that were affected by new imports

* add restclient sample

* update FILES, chmod=+x

* Update samples with jakarta annotations

* Updates samples

---------

Co-authored-by: martin-mfg <2026226+martin-mfg@users.noreply.github.com>
This commit is contained in:
Mattias Sehlstedt
2025-04-27 10:46:01 +02:00
committed by GitHub
parent 858d5fd8b7
commit 10fc9d07c7
267 changed files with 28335 additions and 466 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,753 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
import java.util.function.Consumer;
import org.openapitools.jackson.nullable.JsonNullableModule;
import org.springframework.core.ParameterizedTypeReference;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.InvalidMediaTypeException;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
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.util.UriComponentsBuilder;
import org.springframework.web.client.RestClient;
import org.springframework.web.client.RestClient.ResponseSpec;
import java.util.Optional;
import java.text.DateFormat;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.TimeZone;
import java.util.function.Supplier;
import jakarta.annotation.Nullable;
import java.time.OffsetDateTime;
import org.openapitools.client.auth.Authentication;
import org.openapitools.client.auth.HttpBasicAuth;
import org.openapitools.client.auth.HttpBearerAuth;
import org.openapitools.client.auth.ApiKeyAuth;
import org.openapitools.client.auth.OAuth;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class ApiClient extends JavaTimeFormatter {
public enum CollectionFormat {
CSV(","), TSV("\t"), SSV(" "), PIPES("|"), MULTI(null);
private final String separator;
CollectionFormat(String separator) {
this.separator = separator;
}
private String collectionToString(Collection<?> collection) {
return StringUtils.collectionToDelimitedString(collection, separator);
}
}
private final HttpHeaders defaultHeaders = new HttpHeaders();
private final MultiValueMap<String, String> defaultCookies = new LinkedMultiValueMap<>();
private String basePath = "http://petstore.swagger.io:80/v2";
private final RestClient restClient;
private final DateFormat dateFormat;
private final ObjectMapper objectMapper;
private Map<String, Authentication> authentications;
public ApiClient() {
this(null);
}
public ApiClient(RestClient restClient) {
this(restClient, createDefaultDateFormat());
}
public ApiClient(ObjectMapper mapper, DateFormat format) {
this(null, mapper, format);
}
public ApiClient(RestClient restClient, ObjectMapper mapper, DateFormat format) {
this.objectMapper = mapper.copy();
this.restClient = Optional.ofNullable(restClient).orElseGet(() -> buildRestClient(this.objectMapper));
this.dateFormat = format;
this.init();
}
private ApiClient(RestClient restClient, DateFormat format) {
this(restClient, createDefaultObjectMapper(format), format);
}
public static DateFormat createDefaultDateFormat() {
DateFormat dateFormat = new RFC3339DateFormat();
dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
return dateFormat;
}
public static ObjectMapper createDefaultObjectMapper(@Nullable DateFormat dateFormat) {
if (null == dateFormat) {
dateFormat = createDefaultDateFormat();
}
ObjectMapper mapper = new ObjectMapper();
mapper.setDateFormat(dateFormat);
mapper.registerModule(new JavaTimeModule());
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
JsonNullableModule jnm = new JsonNullableModule();
mapper.registerModule(jnm);
return mapper;
}
protected void init() {
// Setup authentications (key: authentication name, value: authentication).
authentications = new HashMap<>();
authentications.put("petstore_auth", new OAuth());
authentications.put("api_key", new ApiKeyAuth("header", "api_key"));
authentications.put("api_key_query", new ApiKeyAuth("query", "api_key_query"));
authentications.put("http_basic_test", new HttpBasicAuth());
authentications.put("bearer_test", new HttpBearerAuth("bearer"));
// Prevent the authentications from being modified.
authentications = Collections.unmodifiableMap(authentications);
}
/**
* Build the RestClientBuilder used to make RestClient.
* @param mapper ObjectMapper used for serialize/deserialize
* @return RestClient
*/
public static RestClient.Builder buildRestClientBuilder(ObjectMapper mapper) {
Consumer<List<HttpMessageConverter<?>>> messageConverters = converters -> {
converters.add(0, new MappingJackson2HttpMessageConverter(mapper));
};
return RestClient.builder().messageConverters(messageConverters);
}
/**
* Build the RestClientBuilder used to make RestClient.
* @return RestClient
*/
public static RestClient.Builder buildRestClientBuilder() {
return buildRestClientBuilder(createDefaultObjectMapper(null));
}
/**
* Build the RestClient used to make HTTP requests.
* @param mapper ObjectMapper used for serialize/deserialize
* @return RestClient
*/
public static RestClient buildRestClient(ObjectMapper mapper) {
return buildRestClientBuilder(mapper).build();
}
/**
* Build the RestClient used to make HTTP requests.
* @return RestClient
*/
public static RestClient buildRestClient() {
return buildRestClientBuilder(createDefaultObjectMapper(null)).build();
}
/**
* 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 access token for the first Bearer authentication.
* @param bearerToken Bearer token
*/
public void setBearerToken(String bearerToken) {
for (Authentication auth : authentications.values()) {
if (auth instanceof HttpBearerAuth) {
((HttpBearerAuth) auth).setBearerToken(bearerToken);
return;
}
}
throw new RuntimeException("No Bearer authentication configured!");
}
/**
* Helper method to set the supplier of access tokens for 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 the 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 the 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!");
}
/**
* Helper method to set API key value for the first API key authentication.
* @param apiKey the API key
*/
public void setApiKey(String apiKey) {
for (Authentication auth : authentications.values()) {
if (auth instanceof ApiKeyAuth) {
((ApiKeyAuth) auth).setApiKey(apiKey);
return;
}
}
throw new RuntimeException("No API key authentication configured!");
}
/**
* Helper method to set API key prefix for the first API key authentication.
* @param apiKeyPrefix the API key prefix
*/
public void setApiKeyPrefix(String apiKeyPrefix) {
for (Authentication auth : authentications.values()) {
if (auth instanceof ApiKeyAuth) {
((ApiKeyAuth) auth).setApiKeyPrefix(apiKeyPrefix);
return;
}
}
throw new RuntimeException("No API key authentication configured!");
}
/**
* Helper method to set access token for the first OAuth2 authentication.
* @param accessToken the access token
*/
public void setAccessToken(String accessToken) {
for (Authentication auth : authentications.values()) {
if (auth instanceof OAuth) {
((OAuth) auth).setAccessToken(accessToken);
return;
}
}
throw new RuntimeException("No OAuth2 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;
}
/**
* Get the date format used to parse/format date parameters.
* @return DateFormat format
*/
public DateFormat getDateFormat() {
return dateFormat;
}
/**
* Parse the given string into Date object.
*/
public Date parseDate(String str) {
try {
return dateFormat.parse(str);
} catch (ParseException e) {
throw new RuntimeException(e);
}
}
/**
* Format the given Date object into string.
*/
public String formatDate(Date date) {
return dateFormat.format(date);
}
/**
* Get the ObjectMapper used to make HTTP requests.
* @return ObjectMapper objectMapper
*/
public ObjectMapper getObjectMapper() {
return objectMapper;
}
/**
* Get the RestClient used to make HTTP requests.
* @return RestClient restClient
*/
public RestClient getRestClient() {
return restClient;
}
/**
* 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);
}
}
/**
* 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<>();
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<>();
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|ndjson)[;]?\\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, null will be returned.
*/
public MediaType selectHeaderContentType(String[] contentTypes) {
if (contentTypes.length == 0) {
return null;
}
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;
}
/**
* 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 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 The response body in chosen type
*/
public <T> ResponseSpec 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 {
final RestClient.RequestBodySpec requestBuilder = prepareRequest(path, method, pathParams, queryParams, body, headerParams, cookieParams, formParams, accept, contentType, authNames);
return requestBuilder.retrieve();
}
/**
* Include queryParams in uriParams taking into account the paramName
* @param queryParams The query parameters
* @param uriParams The path parameters
* return templatized query string
*/
private String generateQueryUri(MultiValueMap<String, String> queryParams, Map<String, Object> uriParams) {
StringBuilder queryBuilder = new StringBuilder();
queryParams.forEach((name, values) -> {
if (CollectionUtils.isEmpty(values)) {
if (queryBuilder.length() != 0) {
queryBuilder.append('&');
}
queryBuilder.append(name);
} else {
int valueItemCounter = 0;
for (Object value : values) {
if (queryBuilder.length() != 0) {
queryBuilder.append('&');
}
queryBuilder.append(name);
if (value != null) {
String templatizedKey = name + valueItemCounter++;
uriParams.put(templatizedKey, value.toString());
queryBuilder.append('=').append("{").append(templatizedKey).append("}");
}
}
}
});
return queryBuilder.toString();
}
private RestClient.RequestBodySpec prepareRequest(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) {
updateParamsForAuth(authNames, queryParams, headerParams, cookieParams);
final UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(basePath).path(path);
String finalUri = builder.build(false).toUriString();
Map<String, Object> uriParams = new HashMap<>();
uriParams.putAll(pathParams);
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;
}
final RestClient.RequestBodySpec requestBuilder = restClient.method(method).uri(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);
var selectedBody = selectBody(body, formParams, contentType);
if (selectedBody != null) {
requestBuilder.body(selectedBody);
}
return requestBuilder;
}
/**
* 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, RestClient.RequestBodySpec 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, RestClient.RequestBodySpec 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();
}
/**
* 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
* @param cookieParams the cookie 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);
}
}
/**
* 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);
}
}

View File

@@ -0,0 +1,64 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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}.
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
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,58 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
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,100 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.io.IOException;
import java.time.Instant;
import java.time.OffsetDateTime;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.Temporal;
import java.time.temporal.TemporalAccessor;
import java.util.function.BiFunction;
import java.util.function.Function;
import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.databind.DeserializationContext;
import com.fasterxml.jackson.datatype.jsr310.JavaTimeFeature;
import com.fasterxml.jackson.datatype.jsr310.deser.InstantDeserializer;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class RFC3339InstantDeserializer<T extends Temporal> extends InstantDeserializer<T> {
private final static boolean DEFAULT_NORMALIZE_ZONE_ID = JavaTimeFeature.NORMALIZE_DESERIALIZED_ZONE_ID.enabledByDefault();
private final static boolean DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS
= JavaTimeFeature.ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS.enabledByDefault();
public static final RFC3339InstantDeserializer<Instant> INSTANT = new RFC3339InstantDeserializer<>(
Instant.class, DateTimeFormatter.ISO_INSTANT,
Instant::from,
a -> Instant.ofEpochMilli( a.value ),
a -> Instant.ofEpochSecond( a.integer, a.fraction ),
null,
true, // yes, replace zero offset with Z
DEFAULT_NORMALIZE_ZONE_ID,
DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS
);
public static final RFC3339InstantDeserializer<OffsetDateTime> OFFSET_DATE_TIME = new RFC3339InstantDeserializer<>(
OffsetDateTime.class, DateTimeFormatter.ISO_OFFSET_DATE_TIME,
OffsetDateTime::from,
a -> OffsetDateTime.ofInstant( Instant.ofEpochMilli( a.value ), a.zoneId ),
a -> OffsetDateTime.ofInstant( Instant.ofEpochSecond( a.integer, a.fraction ), a.zoneId ),
(d, z) -> ( d.isEqual( OffsetDateTime.MIN ) || d.isEqual( OffsetDateTime.MAX ) ?
d :
d.withOffsetSameInstant( z.getRules().getOffset( d.toLocalDateTime() ) ) ),
true, // yes, replace zero offset with Z
DEFAULT_NORMALIZE_ZONE_ID,
DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS
);
public static final RFC3339InstantDeserializer<ZonedDateTime> ZONED_DATE_TIME = new RFC3339InstantDeserializer<>(
ZonedDateTime.class, DateTimeFormatter.ISO_ZONED_DATE_TIME,
ZonedDateTime::from,
a -> ZonedDateTime.ofInstant( Instant.ofEpochMilli( a.value ), a.zoneId ),
a -> ZonedDateTime.ofInstant( Instant.ofEpochSecond( a.integer, a.fraction ), a.zoneId ),
ZonedDateTime::withZoneSameInstant,
false, // keep zero offset and Z separate since zones explicitly supported
DEFAULT_NORMALIZE_ZONE_ID,
DEFAULT_ALWAYS_ALLOW_STRINGIFIED_DATE_TIMESTAMPS
);
protected RFC3339InstantDeserializer(
Class<T> supportedType,
DateTimeFormatter formatter,
Function<TemporalAccessor, T> parsedToValue,
Function<FromIntegerArguments, T> fromMilliseconds,
Function<FromDecimalArguments, T> fromNanoseconds,
BiFunction<T, ZoneId, T> adjust,
boolean replaceZeroOffsetAsZ,
boolean normalizeZoneId,
boolean readNumericStringsAsTimestamp) {
super(
supportedType,
formatter,
parsedToValue,
fromMilliseconds,
fromNanoseconds,
adjust,
replaceZeroOffsetAsZ,
normalizeZoneId,
readNumericStringsAsTimestamp
);
}
@Override
protected T _fromString(JsonParser p, DeserializationContext ctxt, String string0) throws IOException {
return super._fromString(p, ctxt, string0.replace( ' ', 'T' ));
}
}

View File

@@ -0,0 +1,31 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.Instant;
import java.time.OffsetDateTime;
import java.time.ZonedDateTime;
import com.fasterxml.jackson.databind.module.SimpleModule;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class RFC3339JavaTimeModule extends SimpleModule {
public RFC3339JavaTimeModule() {
super("RFC3339JavaTimeModule");
addDeserializer(Instant.class, RFC3339InstantDeserializer.INSTANT);
addDeserializer(OffsetDateTime.class, RFC3339InstantDeserializer.OFFSET_DATE_TIME);
addDeserializer(ZonedDateTime.class, RFC3339InstantDeserializer.ZONED_DATE_TIME);
}
}

View File

@@ -0,0 +1,72 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.util.Map;
/**
* Representing a Server configuration.
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
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,37 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.util.HashSet;
/**
* Representing a Server Variable for server URL template substitution.
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
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,83 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.util.Collection;
import java.util.Iterator;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
*
* @param array The array
* @param value The value to search
* @return true if the array contains the value
*/
public static boolean containsIgnoreCase(String[] array, String value) {
for (String str : array) {
if (value == null && str == null) {
return true;
}
if (value != null && value.equalsIgnoreCase(str)) {
return true;
}
}
return false;
}
/**
* Join an array of strings with the given separator.
* <p>
* Note: This might be replaced by utility method from commons-lang or guava someday
* if one of those libraries is added as dependency.
* </p>
*
* @param array The array of strings
* @param separator The separator
* @return the resulting string
*/
public static String join(String[] array, String separator) {
int len = array.length;
if (len == 0) {
return "";
}
StringBuilder out = new StringBuilder();
out.append(array[0]);
for (int i = 1; i < len; i++) {
out.append(separator).append(array[i]);
}
return out.toString();
}
/**
* Join a list of strings with the given separator.
*
* @param list The list of strings
* @param separator The separator
* @return the resulting string
*/
public static String join(Collection<String> list, String separator) {
Iterator<String> iterator = list.iterator();
StringBuilder out = new StringBuilder();
if (iterator.hasNext()) {
out.append(iterator.next());
}
while (iterator.hasNext()) {
out.append(separator).append(iterator.next());
}
return out.toString();
}
}

View File

@@ -0,0 +1,123 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.Client;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Arrays;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.ParameterizedTypeReference;
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;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClient.ResponseSpec;
import org.springframework.web.client.RestClientResponseException;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class AnotherFakeApi {
private ApiClient apiClient;
public AnotherFakeApi() {
this(new ApiClient());
}
@Autowired
public AnotherFakeApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* To test special tags
* To test special tags and operation ID starting with number
* <p><b>200</b> - successful operation
* @param client client model
* @return Client
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec call123testSpecialTagsRequestCreation(@jakarta.annotation.Nonnull Client client) throws RestClientResponseException {
Object postBody = client;
// verify the required parameter 'client' is set
if (client == null) {
throw new RestClientResponseException("Missing the required parameter 'client' when calling call123testSpecialTags", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<>();
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
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<Client> localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/another-fake/dummy", HttpMethod.PATCH, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* To test special tags
* To test special tags and operation ID starting with number
* <p><b>200</b> - successful operation
* @param client client model
* @return Client
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public Client call123testSpecialTags(@jakarta.annotation.Nonnull Client client) throws RestClientResponseException {
ParameterizedTypeReference<Client> localVarReturnType = new ParameterizedTypeReference<>() {};
return call123testSpecialTagsRequestCreation(client).body(localVarReturnType);
}
/**
* To test special tags
* To test special tags and operation ID starting with number
* <p><b>200</b> - successful operation
* @param client client model
* @return ResponseEntity&lt;Client&gt;
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Client> call123testSpecialTagsWithHttpInfo(@jakarta.annotation.Nonnull Client client) throws RestClientResponseException {
ParameterizedTypeReference<Client> localVarReturnType = new ParameterizedTypeReference<>() {};
return call123testSpecialTagsRequestCreation(client).toEntity(localVarReturnType);
}
/**
* To test special tags
* To test special tags and operation ID starting with number
* <p><b>200</b> - successful operation
* @param client client model
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec call123testSpecialTagsWithResponseSpec(@jakarta.annotation.Nonnull Client client) throws RestClientResponseException {
return call123testSpecialTagsRequestCreation(client);
}
}

View File

@@ -0,0 +1,113 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.FooGetDefaultResponse;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Arrays;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.ParameterizedTypeReference;
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;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClient.ResponseSpec;
import org.springframework.web.client.RestClientResponseException;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class DefaultApi {
private ApiClient apiClient;
public DefaultApi() {
this(new ApiClient());
}
@Autowired
public DefaultApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
*
*
* <p><b>0</b> - response
* @return FooGetDefaultResponse
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec fooGetRequestCreation() throws RestClientResponseException {
Object postBody = null;
// create path and map variables
final Map<String, Object> pathParams = new HashMap<>();
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
final String[] localVarAccepts = {
"application/json"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<FooGetDefaultResponse> localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/foo", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
*
*
* <p><b>0</b> - response
* @return FooGetDefaultResponse
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public FooGetDefaultResponse fooGet() throws RestClientResponseException {
ParameterizedTypeReference<FooGetDefaultResponse> localVarReturnType = new ParameterizedTypeReference<>() {};
return fooGetRequestCreation().body(localVarReturnType);
}
/**
*
*
* <p><b>0</b> - response
* @return ResponseEntity&lt;FooGetDefaultResponse&gt;
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<FooGetDefaultResponse> fooGetWithHttpInfo() throws RestClientResponseException {
ParameterizedTypeReference<FooGetDefaultResponse> localVarReturnType = new ParameterizedTypeReference<>() {};
return fooGetRequestCreation().toEntity(localVarReturnType);
}
/**
*
*
* <p><b>0</b> - response
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec fooGetWithResponseSpec() throws RestClientResponseException {
return fooGetRequestCreation();
}
}

View File

@@ -0,0 +1,123 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.Client;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Arrays;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.ParameterizedTypeReference;
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;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClient.ResponseSpec;
import org.springframework.web.client.RestClientResponseException;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class FakeClassnameTags123Api {
private ApiClient apiClient;
public FakeClassnameTags123Api() {
this(new ApiClient());
}
@Autowired
public FakeClassnameTags123Api(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* To test class name in snake case
* To test class name in snake case
* <p><b>200</b> - successful operation
* @param client client model
* @return Client
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec testClassnameRequestCreation(@jakarta.annotation.Nonnull Client client) throws RestClientResponseException {
Object postBody = client;
// verify the required parameter 'client' is set
if (client == null) {
throw new RestClientResponseException("Missing the required parameter 'client' when calling testClassname", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<>();
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
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[] { "api_key_query" };
ParameterizedTypeReference<Client> localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/fake_classname_test", HttpMethod.PATCH, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* To test class name in snake case
* To test class name in snake case
* <p><b>200</b> - successful operation
* @param client client model
* @return Client
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public Client testClassname(@jakarta.annotation.Nonnull Client client) throws RestClientResponseException {
ParameterizedTypeReference<Client> localVarReturnType = new ParameterizedTypeReference<>() {};
return testClassnameRequestCreation(client).body(localVarReturnType);
}
/**
* To test class name in snake case
* To test class name in snake case
* <p><b>200</b> - successful operation
* @param client client model
* @return ResponseEntity&lt;Client&gt;
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Client> testClassnameWithHttpInfo(@jakarta.annotation.Nonnull Client client) throws RestClientResponseException {
ParameterizedTypeReference<Client> localVarReturnType = new ParameterizedTypeReference<>() {};
return testClassnameRequestCreation(client).toEntity(localVarReturnType);
}
/**
* To test class name in snake case
* To test class name in snake case
* <p><b>200</b> - successful operation
* @param client client model
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec testClassnameWithResponseSpec(@jakarta.annotation.Nonnull Client client) throws RestClientResponseException {
return testClassnameRequestCreation(client);
}
}

View File

@@ -0,0 +1,346 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import org.openapitools.client.model.Order;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Arrays;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.ParameterizedTypeReference;
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;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClient.ResponseSpec;
import org.springframework.web.client.RestClientResponseException;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class StoreApi {
private ApiClient apiClient;
public StoreApi() {
this(new ApiClient());
}
@Autowired
public StoreApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* <p><b>400</b> - Invalid ID supplied
* <p><b>404</b> - Order not found
* @param orderId ID of the order that needs to be deleted
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec deleteOrderRequestCreation(@jakarta.annotation.Nonnull String orderId) throws RestClientResponseException {
Object postBody = null;
// verify the required parameter 'orderId' is set
if (orderId == null) {
throw new RestClientResponseException("Missing the required parameter 'orderId' when calling deleteOrder", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<>();
pathParams.put("order_id", orderId);
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
final String[] localVarAccepts = { };
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/store/order/{order_id}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* <p><b>400</b> - Invalid ID supplied
* <p><b>404</b> - Order not found
* @param orderId ID of the order that needs to be deleted
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public void deleteOrder(@jakarta.annotation.Nonnull String orderId) throws RestClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
deleteOrderRequestCreation(orderId).body(localVarReturnType);
}
/**
* Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* <p><b>400</b> - Invalid ID supplied
* <p><b>404</b> - Order not found
* @param orderId ID of the order that needs to be deleted
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Void> deleteOrderWithHttpInfo(@jakarta.annotation.Nonnull String orderId) throws RestClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
return deleteOrderRequestCreation(orderId).toEntity(localVarReturnType);
}
/**
* Delete purchase order by ID
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
* <p><b>400</b> - Invalid ID supplied
* <p><b>404</b> - Order not found
* @param orderId ID of the order that needs to be deleted
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec deleteOrderWithResponseSpec(@jakarta.annotation.Nonnull String orderId) throws RestClientResponseException {
return deleteOrderRequestCreation(orderId);
}
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
* <p><b>200</b> - successful operation
* @return Map&lt;String, Integer&gt;
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec getInventoryRequestCreation() throws RestClientResponseException {
Object postBody = null;
// create path and map variables
final Map<String, Object> pathParams = new HashMap<>();
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
final String[] localVarAccepts = {
"application/json"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
ParameterizedTypeReference<Map<String, Integer>> localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/store/inventory", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
* <p><b>200</b> - successful operation
* @return Map&lt;String, Integer&gt;
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public Map<String, Integer> getInventory() throws RestClientResponseException {
ParameterizedTypeReference<Map<String, Integer>> localVarReturnType = new ParameterizedTypeReference<>() {};
return getInventoryRequestCreation().body(localVarReturnType);
}
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
* <p><b>200</b> - successful operation
* @return ResponseEntity&lt;Map&lt;String, Integer&gt;&gt;
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Map<String, Integer>> getInventoryWithHttpInfo() throws RestClientResponseException {
ParameterizedTypeReference<Map<String, Integer>> localVarReturnType = new ParameterizedTypeReference<>() {};
return getInventoryRequestCreation().toEntity(localVarReturnType);
}
/**
* Returns pet inventories by status
* Returns a map of status codes to quantities
* <p><b>200</b> - successful operation
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec getInventoryWithResponseSpec() throws RestClientResponseException {
return getInventoryRequestCreation();
}
/**
* Find purchase order by ID
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generate exceptions
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid ID supplied
* <p><b>404</b> - Order not found
* @param orderId ID of pet that needs to be fetched
* @return Order
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec getOrderByIdRequestCreation(@jakarta.annotation.Nonnull Long orderId) throws RestClientResponseException {
Object postBody = null;
// verify the required parameter 'orderId' is set
if (orderId == null) {
throw new RestClientResponseException("Missing the required parameter 'orderId' when calling getOrderById", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<>();
pathParams.put("order_id", orderId);
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<Order> localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/store/order/{order_id}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Find purchase order by ID
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generate exceptions
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid ID supplied
* <p><b>404</b> - Order not found
* @param orderId ID of pet that needs to be fetched
* @return Order
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public Order getOrderById(@jakarta.annotation.Nonnull Long orderId) throws RestClientResponseException {
ParameterizedTypeReference<Order> localVarReturnType = new ParameterizedTypeReference<>() {};
return getOrderByIdRequestCreation(orderId).body(localVarReturnType);
}
/**
* Find purchase order by ID
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generate exceptions
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid ID supplied
* <p><b>404</b> - Order not found
* @param orderId ID of pet that needs to be fetched
* @return ResponseEntity&lt;Order&gt;
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Order> getOrderByIdWithHttpInfo(@jakarta.annotation.Nonnull Long orderId) throws RestClientResponseException {
ParameterizedTypeReference<Order> localVarReturnType = new ParameterizedTypeReference<>() {};
return getOrderByIdRequestCreation(orderId).toEntity(localVarReturnType);
}
/**
* Find purchase order by ID
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generate exceptions
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid ID supplied
* <p><b>404</b> - Order not found
* @param orderId ID of pet that needs to be fetched
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec getOrderByIdWithResponseSpec(@jakarta.annotation.Nonnull Long orderId) throws RestClientResponseException {
return getOrderByIdRequestCreation(orderId);
}
/**
* Place an order for a pet
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid Order
* @param order order placed for purchasing the pet
* @return Order
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec placeOrderRequestCreation(@jakarta.annotation.Nonnull Order order) throws RestClientResponseException {
Object postBody = order;
// verify the required parameter 'order' is set
if (order == null) {
throw new RestClientResponseException("Missing the required parameter 'order' when calling placeOrder", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<>();
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
final String[] localVarAccepts = {
"application/xml", "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<Order> localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/store/order", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Place an order for a pet
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid Order
* @param order order placed for purchasing the pet
* @return Order
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public Order placeOrder(@jakarta.annotation.Nonnull Order order) throws RestClientResponseException {
ParameterizedTypeReference<Order> localVarReturnType = new ParameterizedTypeReference<>() {};
return placeOrderRequestCreation(order).body(localVarReturnType);
}
/**
* Place an order for a pet
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid Order
* @param order order placed for purchasing the pet
* @return ResponseEntity&lt;Order&gt;
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Order> placeOrderWithHttpInfo(@jakarta.annotation.Nonnull Order order) throws RestClientResponseException {
ParameterizedTypeReference<Order> localVarReturnType = new ParameterizedTypeReference<>() {};
return placeOrderRequestCreation(order).toEntity(localVarReturnType);
}
/**
* Place an order for a pet
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid Order
* @param order order placed for purchasing the pet
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec placeOrderWithResponseSpec(@jakarta.annotation.Nonnull Order order) throws RestClientResponseException {
return placeOrderRequestCreation(order);
}
}

View File

@@ -0,0 +1,811 @@
package org.openapitools.client.api;
import org.openapitools.client.ApiClient;
import java.time.OffsetDateTime;
import org.openapitools.client.model.User;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Objects;
import java.util.Arrays;
import java.util.stream.Collectors;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.FileSystemResource;
import org.springframework.core.ParameterizedTypeReference;
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;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestClient.ResponseSpec;
import org.springframework.web.client.RestClientResponseException;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class UserApi {
private ApiClient apiClient;
public UserApi() {
this(new ApiClient());
}
@Autowired
public UserApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Create user
* This can only be done by the logged in user.
* <p><b>0</b> - successful operation
* @param user Created user object
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createUserRequestCreation(@jakarta.annotation.Nonnull User user) throws RestClientResponseException {
Object postBody = user;
// verify the required parameter 'user' is set
if (user == null) {
throw new RestClientResponseException("Missing the required parameter 'user' when calling createUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<>();
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
final String[] localVarAccepts = { };
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/user", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Create user
* This can only be done by the logged in user.
* <p><b>0</b> - successful operation
* @param user Created user object
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public void createUser(@jakarta.annotation.Nonnull User user) throws RestClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
createUserRequestCreation(user).body(localVarReturnType);
}
/**
* Create user
* This can only be done by the logged in user.
* <p><b>0</b> - successful operation
* @param user Created user object
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Void> createUserWithHttpInfo(@jakarta.annotation.Nonnull User user) throws RestClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
return createUserRequestCreation(user).toEntity(localVarReturnType);
}
/**
* Create user
* This can only be done by the logged in user.
* <p><b>0</b> - successful operation
* @param user Created user object
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createUserWithResponseSpec(@jakarta.annotation.Nonnull User user) throws RestClientResponseException {
return createUserRequestCreation(user);
}
/**
* Creates list of users with given input array
*
* <p><b>0</b> - successful operation
* @param user List of user object
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createUsersWithArrayInputRequestCreation(@jakarta.annotation.Nonnull List<User> user) throws RestClientResponseException {
Object postBody = user;
// verify the required parameter 'user' is set
if (user == null) {
throw new RestClientResponseException("Missing the required parameter 'user' when calling createUsersWithArrayInput", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<>();
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
final String[] localVarAccepts = { };
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/user/createWithArray", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Creates list of users with given input array
*
* <p><b>0</b> - successful operation
* @param user List of user object
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public void createUsersWithArrayInput(@jakarta.annotation.Nonnull List<User> user) throws RestClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
createUsersWithArrayInputRequestCreation(user).body(localVarReturnType);
}
/**
* Creates list of users with given input array
*
* <p><b>0</b> - successful operation
* @param user List of user object
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Void> createUsersWithArrayInputWithHttpInfo(@jakarta.annotation.Nonnull List<User> user) throws RestClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
return createUsersWithArrayInputRequestCreation(user).toEntity(localVarReturnType);
}
/**
* Creates list of users with given input array
*
* <p><b>0</b> - successful operation
* @param user List of user object
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createUsersWithArrayInputWithResponseSpec(@jakarta.annotation.Nonnull List<User> user) throws RestClientResponseException {
return createUsersWithArrayInputRequestCreation(user);
}
/**
* Creates list of users with given input array
*
* <p><b>0</b> - successful operation
* @param user List of user object
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec createUsersWithListInputRequestCreation(@jakarta.annotation.Nonnull List<User> user) throws RestClientResponseException {
Object postBody = user;
// verify the required parameter 'user' is set
if (user == null) {
throw new RestClientResponseException("Missing the required parameter 'user' when calling createUsersWithListInput", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<>();
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
final String[] localVarAccepts = { };
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/user/createWithList", HttpMethod.POST, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Creates list of users with given input array
*
* <p><b>0</b> - successful operation
* @param user List of user object
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public void createUsersWithListInput(@jakarta.annotation.Nonnull List<User> user) throws RestClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
createUsersWithListInputRequestCreation(user).body(localVarReturnType);
}
/**
* Creates list of users with given input array
*
* <p><b>0</b> - successful operation
* @param user List of user object
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Void> createUsersWithListInputWithHttpInfo(@jakarta.annotation.Nonnull List<User> user) throws RestClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
return createUsersWithListInputRequestCreation(user).toEntity(localVarReturnType);
}
/**
* Creates list of users with given input array
*
* <p><b>0</b> - successful operation
* @param user List of user object
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec createUsersWithListInputWithResponseSpec(@jakarta.annotation.Nonnull List<User> user) throws RestClientResponseException {
return createUsersWithListInputRequestCreation(user);
}
/**
* Delete user
* This can only be done by the logged in user.
* <p><b>400</b> - Invalid username supplied
* <p><b>404</b> - User not found
* @param username The name that needs to be deleted
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec deleteUserRequestCreation(@jakarta.annotation.Nonnull String username) throws RestClientResponseException {
Object postBody = null;
// verify the required parameter 'username' is set
if (username == null) {
throw new RestClientResponseException("Missing the required parameter 'username' when calling deleteUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<>();
pathParams.put("username", username);
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
final String[] localVarAccepts = { };
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/user/{username}", HttpMethod.DELETE, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Delete user
* This can only be done by the logged in user.
* <p><b>400</b> - Invalid username supplied
* <p><b>404</b> - User not found
* @param username The name that needs to be deleted
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public void deleteUser(@jakarta.annotation.Nonnull String username) throws RestClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
deleteUserRequestCreation(username).body(localVarReturnType);
}
/**
* Delete user
* This can only be done by the logged in user.
* <p><b>400</b> - Invalid username supplied
* <p><b>404</b> - User not found
* @param username The name that needs to be deleted
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Void> deleteUserWithHttpInfo(@jakarta.annotation.Nonnull String username) throws RestClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
return deleteUserRequestCreation(username).toEntity(localVarReturnType);
}
/**
* Delete user
* This can only be done by the logged in user.
* <p><b>400</b> - Invalid username supplied
* <p><b>404</b> - User not found
* @param username The name that needs to be deleted
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec deleteUserWithResponseSpec(@jakarta.annotation.Nonnull String username) throws RestClientResponseException {
return deleteUserRequestCreation(username);
}
/**
* Get user by user name
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid username supplied
* <p><b>404</b> - User not found
* @param username The name that needs to be fetched. Use user1 for testing.
* @return User
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec getUserByNameRequestCreation(@jakarta.annotation.Nonnull String username) throws RestClientResponseException {
Object postBody = null;
// verify the required parameter 'username' is set
if (username == null) {
throw new RestClientResponseException("Missing the required parameter 'username' when calling getUserByName", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<>();
pathParams.put("username", username);
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<User> localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/user/{username}", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Get user by user name
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid username supplied
* <p><b>404</b> - User not found
* @param username The name that needs to be fetched. Use user1 for testing.
* @return User
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public User getUserByName(@jakarta.annotation.Nonnull String username) throws RestClientResponseException {
ParameterizedTypeReference<User> localVarReturnType = new ParameterizedTypeReference<>() {};
return getUserByNameRequestCreation(username).body(localVarReturnType);
}
/**
* Get user by user name
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid username supplied
* <p><b>404</b> - User not found
* @param username The name that needs to be fetched. Use user1 for testing.
* @return ResponseEntity&lt;User&gt;
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<User> getUserByNameWithHttpInfo(@jakarta.annotation.Nonnull String username) throws RestClientResponseException {
ParameterizedTypeReference<User> localVarReturnType = new ParameterizedTypeReference<>() {};
return getUserByNameRequestCreation(username).toEntity(localVarReturnType);
}
/**
* Get user by user name
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid username supplied
* <p><b>404</b> - User not found
* @param username The name that needs to be fetched. Use user1 for testing.
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec getUserByNameWithResponseSpec(@jakarta.annotation.Nonnull String username) throws RestClientResponseException {
return getUserByNameRequestCreation(username);
}
public static class LoginUserRequest {
private @jakarta.annotation.Nonnull String username;
private @jakarta.annotation.Nonnull String password;
public LoginUserRequest() {}
public LoginUserRequest(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull String password) {
this.username = username;
this.password = password;
}
public @jakarta.annotation.Nonnull String username() {
return this.username;
}
public LoginUserRequest username(@jakarta.annotation.Nonnull String username) {
this.username = username;
return this;
}
public @jakarta.annotation.Nonnull String password() {
return this.password;
}
public LoginUserRequest password(@jakarta.annotation.Nonnull String password) {
this.password = password;
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
LoginUserRequest request = (LoginUserRequest) o;
return Objects.equals(this.username, request.username()) &&
Objects.equals(this.password, request.password());
}
@Override
public int hashCode() {
return Objects.hash(username, password);
}
}
/**
* Logs user into the system
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid username/password supplied
* @param requestParameters The loginUser request parameters as object
* @return String
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public String loginUser(LoginUserRequest requestParameters) throws RestClientResponseException {
return this.loginUser(requestParameters.username(), requestParameters.password());
}
/**
* Logs user into the system
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid username/password supplied
* @param requestParameters The loginUser request parameters as object
* @return ResponseEntity&lt;String&gt;
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> loginUserWithHttpInfo(LoginUserRequest requestParameters) throws RestClientResponseException {
return this.loginUserWithHttpInfo(requestParameters.username(), requestParameters.password());
}
/**
* Logs user into the system
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid username/password supplied
* @param requestParameters The loginUser request parameters as object
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec loginUserWithResponseSpec(LoginUserRequest requestParameters) throws RestClientResponseException {
return this.loginUserWithResponseSpec(requestParameters.username(), requestParameters.password());
}
/**
* Logs user into the system
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid username/password supplied
* @param username The user name for login
* @param password The password for login in clear text
* @return String
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec loginUserRequestCreation(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull String password) throws RestClientResponseException {
Object postBody = null;
// verify the required parameter 'username' is set
if (username == null) {
throw new RestClientResponseException("Missing the required parameter 'username' when calling loginUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'password' is set
if (password == null) {
throw new RestClientResponseException("Missing the required parameter 'password' when calling loginUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<>();
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "username", username));
queryParams.putAll(apiClient.parameterToMultiValueMap(null, "password", password));
final String[] localVarAccepts = {
"application/xml", "application/json"
};
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<String> localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/user/login", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Logs user into the system
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid username/password supplied
* @param username The user name for login
* @param password The password for login in clear text
* @return String
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public String loginUser(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull String password) throws RestClientResponseException {
ParameterizedTypeReference<String> localVarReturnType = new ParameterizedTypeReference<>() {};
return loginUserRequestCreation(username, password).body(localVarReturnType);
}
/**
* Logs user into the system
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid username/password supplied
* @param username The user name for login
* @param password The password for login in clear text
* @return ResponseEntity&lt;String&gt;
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<String> loginUserWithHttpInfo(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull String password) throws RestClientResponseException {
ParameterizedTypeReference<String> localVarReturnType = new ParameterizedTypeReference<>() {};
return loginUserRequestCreation(username, password).toEntity(localVarReturnType);
}
/**
* Logs user into the system
*
* <p><b>200</b> - successful operation
* <p><b>400</b> - Invalid username/password supplied
* @param username The user name for login
* @param password The password for login in clear text
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec loginUserWithResponseSpec(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull String password) throws RestClientResponseException {
return loginUserRequestCreation(username, password);
}
/**
* Logs out current logged in user session
*
* <p><b>0</b> - successful operation
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec logoutUserRequestCreation() throws RestClientResponseException {
Object postBody = null;
// create path and map variables
final Map<String, Object> pathParams = new HashMap<>();
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
final String[] localVarAccepts = { };
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = { };
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/user/logout", HttpMethod.GET, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Logs out current logged in user session
*
* <p><b>0</b> - successful operation
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public void logoutUser() throws RestClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
logoutUserRequestCreation().body(localVarReturnType);
}
/**
* Logs out current logged in user session
*
* <p><b>0</b> - successful operation
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Void> logoutUserWithHttpInfo() throws RestClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
return logoutUserRequestCreation().toEntity(localVarReturnType);
}
/**
* Logs out current logged in user session
*
* <p><b>0</b> - successful operation
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec logoutUserWithResponseSpec() throws RestClientResponseException {
return logoutUserRequestCreation();
}
public static class UpdateUserRequest {
private @jakarta.annotation.Nonnull String username;
private @jakarta.annotation.Nonnull User user;
public UpdateUserRequest() {}
public UpdateUserRequest(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull User user) {
this.username = username;
this.user = user;
}
public @jakarta.annotation.Nonnull String username() {
return this.username;
}
public UpdateUserRequest username(@jakarta.annotation.Nonnull String username) {
this.username = username;
return this;
}
public @jakarta.annotation.Nonnull User user() {
return this.user;
}
public UpdateUserRequest user(@jakarta.annotation.Nonnull User user) {
this.user = user;
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
UpdateUserRequest request = (UpdateUserRequest) o;
return Objects.equals(this.username, request.username()) &&
Objects.equals(this.user, request.user());
}
@Override
public int hashCode() {
return Objects.hash(username, user);
}
}
/**
* Updated user
* This can only be done by the logged in user.
* <p><b>400</b> - Invalid user supplied
* <p><b>404</b> - User not found
* @param requestParameters The updateUser request parameters as object
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public void updateUser(UpdateUserRequest requestParameters) throws RestClientResponseException {
this.updateUser(requestParameters.username(), requestParameters.user());
}
/**
* Updated user
* This can only be done by the logged in user.
* <p><b>400</b> - Invalid user supplied
* <p><b>404</b> - User not found
* @param requestParameters The updateUser request parameters as object
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Void> updateUserWithHttpInfo(UpdateUserRequest requestParameters) throws RestClientResponseException {
return this.updateUserWithHttpInfo(requestParameters.username(), requestParameters.user());
}
/**
* Updated user
* This can only be done by the logged in user.
* <p><b>400</b> - Invalid user supplied
* <p><b>404</b> - User not found
* @param requestParameters The updateUser request parameters as object
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec updateUserWithResponseSpec(UpdateUserRequest requestParameters) throws RestClientResponseException {
return this.updateUserWithResponseSpec(requestParameters.username(), requestParameters.user());
}
/**
* Updated user
* This can only be done by the logged in user.
* <p><b>400</b> - Invalid user supplied
* <p><b>404</b> - User not found
* @param username name that need to be deleted
* @param user Updated user object
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
private ResponseSpec updateUserRequestCreation(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull User user) throws RestClientResponseException {
Object postBody = user;
// verify the required parameter 'username' is set
if (username == null) {
throw new RestClientResponseException("Missing the required parameter 'username' when calling updateUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// verify the required parameter 'user' is set
if (user == null) {
throw new RestClientResponseException("Missing the required parameter 'user' when calling updateUser", HttpStatus.BAD_REQUEST.value(), HttpStatus.BAD_REQUEST.getReasonPhrase(), null, null, null);
}
// create path and map variables
final Map<String, Object> pathParams = new HashMap<>();
pathParams.put("username", username);
final MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
final HttpHeaders headerParams = new HttpHeaders();
final MultiValueMap<String, String> cookieParams = new LinkedMultiValueMap<>();
final MultiValueMap<String, Object> formParams = new LinkedMultiValueMap<>();
final String[] localVarAccepts = { };
final List<MediaType> localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/json"
};
final MediaType localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
return apiClient.invokeAPI("/user/{username}", HttpMethod.PUT, pathParams, queryParams, postBody, headerParams, cookieParams, formParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
}
/**
* Updated user
* This can only be done by the logged in user.
* <p><b>400</b> - Invalid user supplied
* <p><b>404</b> - User not found
* @param username name that need to be deleted
* @param user Updated user object
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public void updateUser(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull User user) throws RestClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
updateUserRequestCreation(username, user).body(localVarReturnType);
}
/**
* Updated user
* This can only be done by the logged in user.
* <p><b>400</b> - Invalid user supplied
* <p><b>404</b> - User not found
* @param username name that need to be deleted
* @param user Updated user object
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseEntity<Void> updateUserWithHttpInfo(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull User user) throws RestClientResponseException {
ParameterizedTypeReference<Void> localVarReturnType = new ParameterizedTypeReference<>() {};
return updateUserRequestCreation(username, user).toEntity(localVarReturnType);
}
/**
* Updated user
* This can only be done by the logged in user.
* <p><b>400</b> - Invalid user supplied
* <p><b>404</b> - User not found
* @param username name that need to be deleted
* @param user Updated user object
* @return ResponseSpec
* @throws RestClientResponseException if an error occurs while attempting to invoke the API
*/
public ResponseSpec updateUserWithResponseSpec(@jakarta.annotation.Nonnull String username, @jakarta.annotation.Nonnull User user) throws RestClientResponseException {
return updateUserRequestCreation(username, user);
}
}

View File

@@ -0,0 +1,75 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.auth;
import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
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,29 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.auth;
import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
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
*/
void applyToParams(MultiValueMap<String, String> queryParams, HttpHeaders headerParams, MultiValueMap<String, String> cookieParams);
}

View File

@@ -0,0 +1,51 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.auth;
import java.nio.charset.StandardCharsets;
import java.util.Base64;
import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
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,69 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.auth;
import java.util.Optional;
import java.util.function.Supplier;
import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class HttpBearerAuth implements Authentication {
private final String scheme;
private Supplier<String> tokenSupplier;
public HttpBearerAuth(String scheme) {
this.scheme = scheme;
}
/**
* Gets the token, which together with the scheme, will be sent as the value of the Authorization header.
*
* @return The bearer token
*/
public String getBearerToken() {
return tokenSupplier.get();
}
/**
* Sets the token, which together with the scheme, will be sent as the value of the Authorization header.
*
* @param bearerToken The bearer token to send in the Authorization header
*/
public void setBearerToken(String bearerToken) {
this.tokenSupplier = () -> bearerToken;
}
/**
* Sets the supplier of tokens, which together with the scheme, will be sent as the value of the Authorization header.
*
* @param tokenSupplier The supplier of bearer tokens to send in the Authorization header
*/
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,61 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.auth;
import java.util.Optional;
import java.util.function.Supplier;
import org.springframework.http.HttpHeaders;
import org.springframework.util.MultiValueMap;
/**
* Provides support for RFC 6750 - Bearer Token usage for OAUTH 2.0 Authorization.
*/
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class OAuth implements Authentication {
private Supplier<String> tokenSupplier;
/**
* Returns the bearer token used for Authorization.
*
* @return The bearer token
*/
public String getAccessToken() {
return tokenSupplier.get();
}
/**
* Sets the bearer access token used for Authorization.
*
* @param accessToken The bearer token to send in the Authorization header
*/
public void setAccessToken(String accessToken) {
setAccessToken(() -> accessToken);
}
/**
* Sets the supplier of bearer tokens used for Authorization.
*
* @param tokenSupplier The supplier of bearer tokens to send in the Authorization header
*/
public void setAccessToken(Supplier<String> tokenSupplier) {
this.tokenSupplier = tokenSupplier;
}
@Override
public void applyToParams(MultiValueMap<String, String> queryParams, HttpHeaders headerParams, MultiValueMap<String, String> cookieParams) {
Optional.ofNullable(tokenSupplier).map(Supplier::get).ifPresent(accessToken ->
headerParams.add(HttpHeaders.AUTHORIZATION, "Bearer " + accessToken)
);
}
}

View File

@@ -0,0 +1,18 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.auth;
public enum OAuthFlow {
accessCode, implicit, password, application
}

View File

@@ -0,0 +1,155 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* AdditionalPropertiesClass
*/
@JsonPropertyOrder({
AdditionalPropertiesClass.JSON_PROPERTY_MAP_PROPERTY,
AdditionalPropertiesClass.JSON_PROPERTY_MAP_OF_MAP_PROPERTY
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class AdditionalPropertiesClass {
public static final String JSON_PROPERTY_MAP_PROPERTY = "map_property";
@jakarta.annotation.Nullable
private Map<String, String> mapProperty = new HashMap<>();
public static final String JSON_PROPERTY_MAP_OF_MAP_PROPERTY = "map_of_map_property";
@jakarta.annotation.Nullable
private Map<String, Map<String, String>> mapOfMapProperty = new HashMap<>();
public AdditionalPropertiesClass() {
}
public AdditionalPropertiesClass mapProperty(@jakarta.annotation.Nullable Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
return this;
}
public AdditionalPropertiesClass putMapPropertyItem(String key, String mapPropertyItem) {
if (this.mapProperty == null) {
this.mapProperty = new HashMap<>();
}
this.mapProperty.put(key, mapPropertyItem);
return this;
}
/**
* Get mapProperty
* @return mapProperty
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, String> getMapProperty() {
return mapProperty;
}
@JsonProperty(JSON_PROPERTY_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapProperty(@jakarta.annotation.Nullable Map<String, String> mapProperty) {
this.mapProperty = mapProperty;
}
public AdditionalPropertiesClass mapOfMapProperty(@jakarta.annotation.Nullable Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
return this;
}
public AdditionalPropertiesClass putMapOfMapPropertyItem(String key, Map<String, String> mapOfMapPropertyItem) {
if (this.mapOfMapProperty == null) {
this.mapOfMapProperty = new HashMap<>();
}
this.mapOfMapProperty.put(key, mapOfMapPropertyItem);
return this;
}
/**
* Get mapOfMapProperty
* @return mapOfMapProperty
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Map<String, String>> getMapOfMapProperty() {
return mapOfMapProperty;
}
@JsonProperty(JSON_PROPERTY_MAP_OF_MAP_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapOfMapProperty(@jakarta.annotation.Nullable Map<String, Map<String, String>> mapOfMapProperty) {
this.mapOfMapProperty = mapOfMapProperty;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AdditionalPropertiesClass additionalPropertiesClass = (AdditionalPropertiesClass) o;
return Objects.equals(this.mapProperty, additionalPropertiesClass.mapProperty) &&
Objects.equals(this.mapOfMapProperty, additionalPropertiesClass.mapOfMapProperty);
}
@Override
public int hashCode() {
return Objects.hash(mapProperty, mapOfMapProperty);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AdditionalPropertiesClass {\n");
sb.append(" mapProperty: ").append(toIndentedString(mapProperty)).append("\n");
sb.append(" mapOfMapProperty: ").append(toIndentedString(mapOfMapProperty)).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,138 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 org.openapitools.client.model.SingleRefType;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* AllOfWithSingleRef
*/
@JsonPropertyOrder({
AllOfWithSingleRef.JSON_PROPERTY_USERNAME,
AllOfWithSingleRef.JSON_PROPERTY_SINGLE_REF_TYPE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class AllOfWithSingleRef {
public static final String JSON_PROPERTY_USERNAME = "username";
@jakarta.annotation.Nullable
private String username;
public static final String JSON_PROPERTY_SINGLE_REF_TYPE = "SingleRefType";
@jakarta.annotation.Nullable
private SingleRefType singleRefType;
public AllOfWithSingleRef() {
}
public AllOfWithSingleRef username(@jakarta.annotation.Nullable String username) {
this.username = username;
return this;
}
/**
* Get username
* @return username
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_USERNAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getUsername() {
return username;
}
@JsonProperty(JSON_PROPERTY_USERNAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUsername(@jakarta.annotation.Nullable String username) {
this.username = username;
}
public AllOfWithSingleRef singleRefType(@jakarta.annotation.Nullable SingleRefType singleRefType) {
this.singleRefType = singleRefType;
return this;
}
/**
* Get singleRefType
* @return singleRefType
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public SingleRefType getSingleRefType() {
return singleRefType;
}
@JsonProperty(JSON_PROPERTY_SINGLE_REF_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSingleRefType(@jakarta.annotation.Nullable SingleRefType singleRefType) {
this.singleRefType = singleRefType;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
AllOfWithSingleRef allOfWithSingleRef = (AllOfWithSingleRef) o;
return Objects.equals(this.username, allOfWithSingleRef.username) &&
Objects.equals(this.singleRefType, allOfWithSingleRef.singleRefType);
}
@Override
public int hashCode() {
return Objects.hash(username, singleRefType);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class AllOfWithSingleRef {\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" singleRefType: ").append(toIndentedString(singleRefType)).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,150 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Animal
*/
@JsonPropertyOrder({
Animal.JSON_PROPERTY_CLASS_NAME,
Animal.JSON_PROPERTY_COLOR
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
@JsonIgnoreProperties(
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
allowSetters = true // allows the className to be set during deserialization
)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = Cat.class, name = "CAT"),
@JsonSubTypes.Type(value = Dog.class, name = "DOG"),
})
public class Animal {
public static final String JSON_PROPERTY_CLASS_NAME = "className";
@jakarta.annotation.Nonnull
protected String className;
public static final String JSON_PROPERTY_COLOR = "color";
@jakarta.annotation.Nullable
protected String color = "red";
public Animal() {
}
public Animal className(@jakarta.annotation.Nonnull String className) {
this.className = className;
return this;
}
/**
* Get className
* @return className
*/
@jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_CLASS_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getClassName() {
return className;
}
@JsonProperty(JSON_PROPERTY_CLASS_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setClassName(@jakarta.annotation.Nonnull String className) {
this.className = className;
}
public Animal color(@jakarta.annotation.Nullable String color) {
this.color = color;
return this;
}
/**
* Get color
* @return color
*/
@jakarta.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(@jakarta.annotation.Nullable String color) {
this.color = color;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Animal animal = (Animal) o;
return Objects.equals(this.className, animal.className) &&
Objects.equals(this.color, animal.color);
}
@Override
public int hashCode() {
return Objects.hash(className, color);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Animal {\n");
sb.append(" className: ").append(toIndentedString(className)).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,117 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* ArrayOfArrayOfNumberOnly
*/
@JsonPropertyOrder({
ArrayOfArrayOfNumberOnly.JSON_PROPERTY_ARRAY_ARRAY_NUMBER
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class ArrayOfArrayOfNumberOnly {
public static final String JSON_PROPERTY_ARRAY_ARRAY_NUMBER = "ArrayArrayNumber";
@jakarta.annotation.Nullable
private List<List<BigDecimal>> arrayArrayNumber = new ArrayList<>();
public ArrayOfArrayOfNumberOnly() {
}
public ArrayOfArrayOfNumberOnly arrayArrayNumber(@jakarta.annotation.Nullable List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
return this;
}
public ArrayOfArrayOfNumberOnly addArrayArrayNumberItem(List<BigDecimal> arrayArrayNumberItem) {
if (this.arrayArrayNumber == null) {
this.arrayArrayNumber = new ArrayList<>();
}
this.arrayArrayNumber.add(arrayArrayNumberItem);
return this;
}
/**
* Get arrayArrayNumber
* @return arrayArrayNumber
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<List<BigDecimal>> getArrayArrayNumber() {
return arrayArrayNumber;
}
@JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setArrayArrayNumber(@jakarta.annotation.Nullable List<List<BigDecimal>> arrayArrayNumber) {
this.arrayArrayNumber = arrayArrayNumber;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayOfArrayOfNumberOnly arrayOfArrayOfNumberOnly = (ArrayOfArrayOfNumberOnly) o;
return Objects.equals(this.arrayArrayNumber, arrayOfArrayOfNumberOnly.arrayArrayNumber);
}
@Override
public int hashCode() {
return Objects.hash(arrayArrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayOfArrayOfNumberOnly {\n");
sb.append(" arrayArrayNumber: ").append(toIndentedString(arrayArrayNumber)).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,117 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* ArrayOfNumberOnly
*/
@JsonPropertyOrder({
ArrayOfNumberOnly.JSON_PROPERTY_ARRAY_NUMBER
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class ArrayOfNumberOnly {
public static final String JSON_PROPERTY_ARRAY_NUMBER = "ArrayNumber";
@jakarta.annotation.Nullable
private List<BigDecimal> arrayNumber = new ArrayList<>();
public ArrayOfNumberOnly() {
}
public ArrayOfNumberOnly arrayNumber(@jakarta.annotation.Nullable List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
return this;
}
public ArrayOfNumberOnly addArrayNumberItem(BigDecimal arrayNumberItem) {
if (this.arrayNumber == null) {
this.arrayNumber = new ArrayList<>();
}
this.arrayNumber.add(arrayNumberItem);
return this;
}
/**
* Get arrayNumber
* @return arrayNumber
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<BigDecimal> getArrayNumber() {
return arrayNumber;
}
@JsonProperty(JSON_PROPERTY_ARRAY_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setArrayNumber(@jakarta.annotation.Nullable List<BigDecimal> arrayNumber) {
this.arrayNumber = arrayNumber;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayOfNumberOnly arrayOfNumberOnly = (ArrayOfNumberOnly) o;
return Objects.equals(this.arrayNumber, arrayOfNumberOnly.arrayNumber);
}
@Override
public int hashCode() {
return Objects.hash(arrayNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayOfNumberOnly {\n");
sb.append(" arrayNumber: ").append(toIndentedString(arrayNumber)).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,197 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.ReadOnlyFirst;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* ArrayTest
*/
@JsonPropertyOrder({
ArrayTest.JSON_PROPERTY_ARRAY_OF_STRING,
ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER,
ArrayTest.JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class ArrayTest {
public static final String JSON_PROPERTY_ARRAY_OF_STRING = "array_of_string";
@jakarta.annotation.Nullable
private List<String> arrayOfString = new ArrayList<>();
public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER = "array_array_of_integer";
@jakarta.annotation.Nullable
private List<List<Long>> arrayArrayOfInteger = new ArrayList<>();
public static final String JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL = "array_array_of_model";
@jakarta.annotation.Nullable
private List<List<ReadOnlyFirst>> arrayArrayOfModel = new ArrayList<>();
public ArrayTest() {
}
public ArrayTest arrayOfString(@jakarta.annotation.Nullable List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
return this;
}
public ArrayTest addArrayOfStringItem(String arrayOfStringItem) {
if (this.arrayOfString == null) {
this.arrayOfString = new ArrayList<>();
}
this.arrayOfString.add(arrayOfStringItem);
return this;
}
/**
* Get arrayOfString
* @return arrayOfString
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getArrayOfString() {
return arrayOfString;
}
@JsonProperty(JSON_PROPERTY_ARRAY_OF_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setArrayOfString(@jakarta.annotation.Nullable List<String> arrayOfString) {
this.arrayOfString = arrayOfString;
}
public ArrayTest arrayArrayOfInteger(@jakarta.annotation.Nullable List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
return this;
}
public ArrayTest addArrayArrayOfIntegerItem(List<Long> arrayArrayOfIntegerItem) {
if (this.arrayArrayOfInteger == null) {
this.arrayArrayOfInteger = new ArrayList<>();
}
this.arrayArrayOfInteger.add(arrayArrayOfIntegerItem);
return this;
}
/**
* Get arrayArrayOfInteger
* @return arrayArrayOfInteger
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<List<Long>> getArrayArrayOfInteger() {
return arrayArrayOfInteger;
}
@JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setArrayArrayOfInteger(@jakarta.annotation.Nullable List<List<Long>> arrayArrayOfInteger) {
this.arrayArrayOfInteger = arrayArrayOfInteger;
}
public ArrayTest arrayArrayOfModel(@jakarta.annotation.Nullable List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
return this;
}
public ArrayTest addArrayArrayOfModelItem(List<ReadOnlyFirst> arrayArrayOfModelItem) {
if (this.arrayArrayOfModel == null) {
this.arrayArrayOfModel = new ArrayList<>();
}
this.arrayArrayOfModel.add(arrayArrayOfModelItem);
return this;
}
/**
* Get arrayArrayOfModel
* @return arrayArrayOfModel
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<List<ReadOnlyFirst>> getArrayArrayOfModel() {
return arrayArrayOfModel;
}
@JsonProperty(JSON_PROPERTY_ARRAY_ARRAY_OF_MODEL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setArrayArrayOfModel(@jakarta.annotation.Nullable List<List<ReadOnlyFirst>> arrayArrayOfModel) {
this.arrayArrayOfModel = arrayArrayOfModel;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ArrayTest arrayTest = (ArrayTest) o;
return Objects.equals(this.arrayOfString, arrayTest.arrayOfString) &&
Objects.equals(this.arrayArrayOfInteger, arrayTest.arrayArrayOfInteger) &&
Objects.equals(this.arrayArrayOfModel, arrayTest.arrayArrayOfModel);
}
@Override
public int hashCode() {
return Objects.hash(arrayOfString, arrayArrayOfInteger, arrayArrayOfModel);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ArrayTest {\n");
sb.append(" arrayOfString: ").append(toIndentedString(arrayOfString)).append("\n");
sb.append(" arrayArrayOfInteger: ").append(toIndentedString(arrayArrayOfInteger)).append("\n");
sb.append(" arrayArrayOfModel: ").append(toIndentedString(arrayArrayOfModel)).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,265 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* Capitalization
*/
@JsonPropertyOrder({
Capitalization.JSON_PROPERTY_SMALL_CAMEL,
Capitalization.JSON_PROPERTY_CAPITAL_CAMEL,
Capitalization.JSON_PROPERTY_SMALL_SNAKE,
Capitalization.JSON_PROPERTY_CAPITAL_SNAKE,
Capitalization.JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS,
Capitalization.JSON_PROPERTY_A_T_T_N_A_M_E
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class Capitalization {
public static final String JSON_PROPERTY_SMALL_CAMEL = "smallCamel";
@jakarta.annotation.Nullable
private String smallCamel;
public static final String JSON_PROPERTY_CAPITAL_CAMEL = "CapitalCamel";
@jakarta.annotation.Nullable
private String capitalCamel;
public static final String JSON_PROPERTY_SMALL_SNAKE = "small_Snake";
@jakarta.annotation.Nullable
private String smallSnake;
public static final String JSON_PROPERTY_CAPITAL_SNAKE = "Capital_Snake";
@jakarta.annotation.Nullable
private String capitalSnake;
public static final String JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS = "SCA_ETH_Flow_Points";
@jakarta.annotation.Nullable
private String scAETHFlowPoints;
public static final String JSON_PROPERTY_A_T_T_N_A_M_E = "ATT_NAME";
@jakarta.annotation.Nullable
private String ATT_NAME;
public Capitalization() {
}
public Capitalization smallCamel(@jakarta.annotation.Nullable String smallCamel) {
this.smallCamel = smallCamel;
return this;
}
/**
* Get smallCamel
* @return smallCamel
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SMALL_CAMEL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSmallCamel() {
return smallCamel;
}
@JsonProperty(JSON_PROPERTY_SMALL_CAMEL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSmallCamel(@jakarta.annotation.Nullable String smallCamel) {
this.smallCamel = smallCamel;
}
public Capitalization capitalCamel(@jakarta.annotation.Nullable String capitalCamel) {
this.capitalCamel = capitalCamel;
return this;
}
/**
* Get capitalCamel
* @return capitalCamel
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCapitalCamel() {
return capitalCamel;
}
@JsonProperty(JSON_PROPERTY_CAPITAL_CAMEL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCapitalCamel(@jakarta.annotation.Nullable String capitalCamel) {
this.capitalCamel = capitalCamel;
}
public Capitalization smallSnake(@jakarta.annotation.Nullable String smallSnake) {
this.smallSnake = smallSnake;
return this;
}
/**
* Get smallSnake
* @return smallSnake
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SMALL_SNAKE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSmallSnake() {
return smallSnake;
}
@JsonProperty(JSON_PROPERTY_SMALL_SNAKE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSmallSnake(@jakarta.annotation.Nullable String smallSnake) {
this.smallSnake = smallSnake;
}
public Capitalization capitalSnake(@jakarta.annotation.Nullable String capitalSnake) {
this.capitalSnake = capitalSnake;
return this;
}
/**
* Get capitalSnake
* @return capitalSnake
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getCapitalSnake() {
return capitalSnake;
}
@JsonProperty(JSON_PROPERTY_CAPITAL_SNAKE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCapitalSnake(@jakarta.annotation.Nullable String capitalSnake) {
this.capitalSnake = capitalSnake;
}
public Capitalization scAETHFlowPoints(@jakarta.annotation.Nullable String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
return this;
}
/**
* Get scAETHFlowPoints
* @return scAETHFlowPoints
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getScAETHFlowPoints() {
return scAETHFlowPoints;
}
@JsonProperty(JSON_PROPERTY_SC_A_E_T_H_FLOW_POINTS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setScAETHFlowPoints(@jakarta.annotation.Nullable String scAETHFlowPoints) {
this.scAETHFlowPoints = scAETHFlowPoints;
}
public Capitalization ATT_NAME(@jakarta.annotation.Nullable String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
return this;
}
/**
* Name of the pet
* @return ATT_NAME
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getATTNAME() {
return ATT_NAME;
}
@JsonProperty(JSON_PROPERTY_A_T_T_N_A_M_E)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setATTNAME(@jakarta.annotation.Nullable String ATT_NAME) {
this.ATT_NAME = ATT_NAME;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Capitalization capitalization = (Capitalization) o;
return Objects.equals(this.smallCamel, capitalization.smallCamel) &&
Objects.equals(this.capitalCamel, capitalization.capitalCamel) &&
Objects.equals(this.smallSnake, capitalization.smallSnake) &&
Objects.equals(this.capitalSnake, capitalization.capitalSnake) &&
Objects.equals(this.scAETHFlowPoints, capitalization.scAETHFlowPoints) &&
Objects.equals(this.ATT_NAME, capitalization.ATT_NAME);
}
@Override
public int hashCode() {
return Objects.hash(smallCamel, capitalCamel, smallSnake, capitalSnake, scAETHFlowPoints, ATT_NAME);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Capitalization {\n");
sb.append(" smallCamel: ").append(toIndentedString(smallCamel)).append("\n");
sb.append(" capitalCamel: ").append(toIndentedString(capitalCamel)).append("\n");
sb.append(" smallSnake: ").append(toIndentedString(smallSnake)).append("\n");
sb.append(" capitalSnake: ").append(toIndentedString(capitalSnake)).append("\n");
sb.append(" scAETHFlowPoints: ").append(toIndentedString(scAETHFlowPoints)).append("\n");
sb.append(" ATT_NAME: ").append(toIndentedString(ATT_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,130 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.openapitools.client.model.Animal;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Cat
*/
@JsonPropertyOrder({
Cat.JSON_PROPERTY_DECLAWED
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
@JsonIgnoreProperties(
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
allowSetters = true // allows the className to be set during deserialization
)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
public class Cat extends Animal {
public static final String JSON_PROPERTY_DECLAWED = "declawed";
@jakarta.annotation.Nullable
private Boolean declawed;
public Cat() {
}
public Cat declawed(@jakarta.annotation.Nullable Boolean declawed) {
this.declawed = declawed;
return this;
}
/**
* Get declawed
* @return declawed
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DECLAWED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getDeclawed() {
return declawed;
}
@JsonProperty(JSON_PROPERTY_DECLAWED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDeclawed(@jakarta.annotation.Nullable Boolean declawed) {
this.declawed = declawed;
}
@Override
public Cat className(@jakarta.annotation.Nonnull String className) {
this.setClassName(className);
return this;
}
@Override
public Cat color(@jakarta.annotation.Nullable String color) {
this.setColor(color);
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Cat cat = (Cat) o;
return Objects.equals(this.declawed, cat.declawed) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(declawed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Cat {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" declawed: ").append(toIndentedString(declawed)).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,137 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class Category {
public static final String JSON_PROPERTY_ID = "id";
@jakarta.annotation.Nullable
private Long id;
public static final String JSON_PROPERTY_NAME = "name";
@jakarta.annotation.Nonnull
private String name = "default-name";
public Category() {
}
public Category id(@jakarta.annotation.Nullable Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
*/
@jakarta.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(@jakarta.annotation.Nullable Long id) {
this.id = id;
}
public Category name(@jakarta.annotation.Nonnull String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
*/
@jakarta.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(@jakarta.annotation.Nonnull 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,142 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.openapitools.client.model.ParentWithNullable;
import org.openapitools.jackson.nullable.JsonNullable;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* ChildWithNullable
*/
@JsonPropertyOrder({
ChildWithNullable.JSON_PROPERTY_OTHER_PROPERTY
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
@JsonIgnoreProperties(
value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization
allowSetters = true // allows the type to be set during deserialization
)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true)
public class ChildWithNullable extends ParentWithNullable {
public static final String JSON_PROPERTY_OTHER_PROPERTY = "otherProperty";
@jakarta.annotation.Nullable
private String otherProperty;
public ChildWithNullable() {
}
public ChildWithNullable otherProperty(@jakarta.annotation.Nullable String otherProperty) {
this.otherProperty = otherProperty;
return this;
}
/**
* Get otherProperty
* @return otherProperty
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_OTHER_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getOtherProperty() {
return otherProperty;
}
@JsonProperty(JSON_PROPERTY_OTHER_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOtherProperty(@jakarta.annotation.Nullable String otherProperty) {
this.otherProperty = otherProperty;
}
@Override
public ChildWithNullable type(@jakarta.annotation.Nullable TypeEnum type) {
this.setType(type);
return this;
}
@Override
public ChildWithNullable nullableProperty(@jakarta.annotation.Nullable String nullableProperty) {
this.setNullableProperty(nullableProperty);
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ChildWithNullable childWithNullable = (ChildWithNullable) o;
return Objects.equals(this.otherProperty, childWithNullable.otherProperty) &&
super.equals(o);
}
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(otherProperty, super.hashCode());
}
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 ChildWithNullable {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" otherProperty: ").append(toIndentedString(otherProperty)).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,105 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* Model for testing model with \&quot;_class\&quot; property
*/
@JsonPropertyOrder({
ClassModel.JSON_PROPERTY_PROPERTY_CLASS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class ClassModel {
public static final String JSON_PROPERTY_PROPERTY_CLASS = "_class";
@jakarta.annotation.Nullable
private String propertyClass;
public ClassModel() {
}
public ClassModel propertyClass(@jakarta.annotation.Nullable String propertyClass) {
this.propertyClass = propertyClass;
return this;
}
/**
* Get propertyClass
* @return propertyClass
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PROPERTY_CLASS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPropertyClass() {
return propertyClass;
}
@JsonProperty(JSON_PROPERTY_PROPERTY_CLASS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPropertyClass(@jakarta.annotation.Nullable String propertyClass) {
this.propertyClass = propertyClass;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ClassModel classModel = (ClassModel) o;
return Objects.equals(this.propertyClass, classModel.propertyClass);
}
@Override
public int hashCode() {
return Objects.hash(propertyClass);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ClassModel {\n");
sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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,105 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* Client
*/
@JsonPropertyOrder({
Client.JSON_PROPERTY_CLIENT
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class Client {
public static final String JSON_PROPERTY_CLIENT = "client";
@jakarta.annotation.Nullable
private String client;
public Client() {
}
public Client client(@jakarta.annotation.Nullable String client) {
this.client = client;
return this;
}
/**
* Get client
* @return client
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CLIENT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getClient() {
return client;
}
@JsonProperty(JSON_PROPERTY_CLIENT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setClient(@jakarta.annotation.Nullable String client) {
this.client = client;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Client client = (Client) o;
return Objects.equals(this.client, client.client);
}
@Override
public int hashCode() {
return Objects.hash(client);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Client {\n");
sb.append(" client: ").append(toIndentedString(client)).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,107 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* DeprecatedObject
* @deprecated
*/
@Deprecated
@JsonPropertyOrder({
DeprecatedObject.JSON_PROPERTY_NAME
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class DeprecatedObject {
public static final String JSON_PROPERTY_NAME = "name";
@jakarta.annotation.Nullable
private String name;
public DeprecatedObject() {
}
public DeprecatedObject name(@jakarta.annotation.Nullable String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
*/
@jakarta.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(@jakarta.annotation.Nullable String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DeprecatedObject deprecatedObject = (DeprecatedObject) o;
return Objects.equals(this.name, deprecatedObject.name);
}
@Override
public int hashCode() {
return Objects.hash(name);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DeprecatedObject {\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,130 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.openapitools.client.model.Animal;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Dog
*/
@JsonPropertyOrder({
Dog.JSON_PROPERTY_BREED
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
@JsonIgnoreProperties(
value = "className", // ignore manually set className, it will be automatically generated by Jackson during serialization
allowSetters = true // allows the className to be set during deserialization
)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "className", visible = true)
public class Dog extends Animal {
public static final String JSON_PROPERTY_BREED = "breed";
@jakarta.annotation.Nullable
private String breed;
public Dog() {
}
public Dog breed(@jakarta.annotation.Nullable String breed) {
this.breed = breed;
return this;
}
/**
* Get breed
* @return breed
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_BREED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBreed() {
return breed;
}
@JsonProperty(JSON_PROPERTY_BREED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBreed(@jakarta.annotation.Nullable String breed) {
this.breed = breed;
}
@Override
public Dog className(@jakarta.annotation.Nonnull String className) {
this.setClassName(className);
return this;
}
@Override
public Dog color(@jakarta.annotation.Nullable String color) {
this.setColor(color);
return this;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Dog dog = (Dog) o;
return Objects.equals(this.breed, dog.breed) &&
super.equals(o);
}
@Override
public int hashCode() {
return Objects.hash(breed, super.hashCode());
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Dog {\n");
sb.append(" ").append(toIndentedString(super.toString())).append("\n");
sb.append(" breed: ").append(toIndentedString(breed)).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,218 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* EnumArrays
*/
@JsonPropertyOrder({
EnumArrays.JSON_PROPERTY_JUST_SYMBOL,
EnumArrays.JSON_PROPERTY_ARRAY_ENUM
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class EnumArrays {
/**
* Gets or Sets justSymbol
*/
public enum JustSymbolEnum {
GREATER_THAN_OR_EQUAL_TO(String.valueOf(">=")),
DOLLAR(String.valueOf("$"));
private String value;
JustSymbolEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static JustSymbolEnum fromValue(String value) {
for (JustSymbolEnum b : JustSymbolEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_JUST_SYMBOL = "just_symbol";
@jakarta.annotation.Nullable
private JustSymbolEnum justSymbol;
/**
* Gets or Sets arrayEnum
*/
public enum ArrayEnumEnum {
FISH(String.valueOf("fish")),
CRAB(String.valueOf("crab"));
private String value;
ArrayEnumEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static ArrayEnumEnum fromValue(String value) {
for (ArrayEnumEnum b : ArrayEnumEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ARRAY_ENUM = "array_enum";
@jakarta.annotation.Nullable
private List<ArrayEnumEnum> arrayEnum = new ArrayList<>();
public EnumArrays() {
}
public EnumArrays justSymbol(@jakarta.annotation.Nullable JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
return this;
}
/**
* Get justSymbol
* @return justSymbol
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_JUST_SYMBOL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JustSymbolEnum getJustSymbol() {
return justSymbol;
}
@JsonProperty(JSON_PROPERTY_JUST_SYMBOL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setJustSymbol(@jakarta.annotation.Nullable JustSymbolEnum justSymbol) {
this.justSymbol = justSymbol;
}
public EnumArrays arrayEnum(@jakarta.annotation.Nullable List<ArrayEnumEnum> arrayEnum) {
this.arrayEnum = arrayEnum;
return this;
}
public EnumArrays addArrayEnumItem(ArrayEnumEnum arrayEnumItem) {
if (this.arrayEnum == null) {
this.arrayEnum = new ArrayList<>();
}
this.arrayEnum.add(arrayEnumItem);
return this;
}
/**
* Get arrayEnum
* @return arrayEnum
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_ENUM)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<ArrayEnumEnum> getArrayEnum() {
return arrayEnum;
}
@JsonProperty(JSON_PROPERTY_ARRAY_ENUM)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setArrayEnum(@jakarta.annotation.Nullable List<ArrayEnumEnum> arrayEnum) {
this.arrayEnum = arrayEnum;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EnumArrays enumArrays = (EnumArrays) o;
return Objects.equals(this.justSymbol, enumArrays.justSymbol) &&
Objects.equals(this.arrayEnum, enumArrays.arrayEnum);
}
@Override
public int hashCode() {
return Objects.hash(justSymbol, arrayEnum);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class EnumArrays {\n");
sb.append(" justSymbol: ").append(toIndentedString(justSymbol)).append("\n");
sb.append(" arrayEnum: ").append(toIndentedString(arrayEnum)).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 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 EnumClass
*/
public enum EnumClass {
_ABC("_abc"),
_EFG("-efg"),
_XYZ_("(xyz)");
private String value;
EnumClass(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EnumClass fromValue(String value) {
for (EnumClass b : EnumClass.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@@ -0,0 +1,501 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 org.openapitools.client.model.OuterEnum;
import org.openapitools.client.model.OuterEnumDefaultValue;
import org.openapitools.client.model.OuterEnumInteger;
import org.openapitools.client.model.OuterEnumIntegerDefaultValue;
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;
/**
* EnumTest
*/
@JsonPropertyOrder({
EnumTest.JSON_PROPERTY_ENUM_STRING,
EnumTest.JSON_PROPERTY_ENUM_STRING_REQUIRED,
EnumTest.JSON_PROPERTY_ENUM_INTEGER,
EnumTest.JSON_PROPERTY_ENUM_NUMBER,
EnumTest.JSON_PROPERTY_OUTER_ENUM,
EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER,
EnumTest.JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE,
EnumTest.JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE
})
@JsonTypeName("Enum_Test")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class EnumTest {
/**
* Gets or Sets enumString
*/
public enum EnumStringEnum {
UPPER(String.valueOf("UPPER")),
LOWER(String.valueOf("lower")),
EMPTY(String.valueOf(""));
private String value;
EnumStringEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EnumStringEnum fromValue(String value) {
for (EnumStringEnum b : EnumStringEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ENUM_STRING = "enum_string";
@jakarta.annotation.Nullable
private EnumStringEnum enumString;
/**
* Gets or Sets enumStringRequired
*/
public enum EnumStringRequiredEnum {
UPPER(String.valueOf("UPPER")),
LOWER(String.valueOf("lower")),
EMPTY(String.valueOf(""));
private String value;
EnumStringRequiredEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EnumStringRequiredEnum fromValue(String value) {
for (EnumStringRequiredEnum b : EnumStringRequiredEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ENUM_STRING_REQUIRED = "enum_string_required";
@jakarta.annotation.Nonnull
private EnumStringRequiredEnum enumStringRequired;
/**
* Gets or Sets enumInteger
*/
public enum EnumIntegerEnum {
NUMBER_1(Integer.valueOf(1)),
NUMBER_MINUS_1(Integer.valueOf(-1));
private Integer value;
EnumIntegerEnum(Integer value) {
this.value = value;
}
@JsonValue
public Integer getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EnumIntegerEnum fromValue(Integer value) {
for (EnumIntegerEnum b : EnumIntegerEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ENUM_INTEGER = "enum_integer";
@jakarta.annotation.Nullable
private EnumIntegerEnum enumInteger;
/**
* Gets or Sets enumNumber
*/
public enum EnumNumberEnum {
NUMBER_1_DOT_1(Double.valueOf(1.1)),
NUMBER_MINUS_1_DOT_2(Double.valueOf(-1.2));
private Double value;
EnumNumberEnum(Double value) {
this.value = value;
}
@JsonValue
public Double getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EnumNumberEnum fromValue(Double value) {
for (EnumNumberEnum b : EnumNumberEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_ENUM_NUMBER = "enum_number";
@jakarta.annotation.Nullable
private EnumNumberEnum enumNumber;
public static final String JSON_PROPERTY_OUTER_ENUM = "outerEnum";
@jakarta.annotation.Nullable
private JsonNullable<OuterEnum> outerEnum = JsonNullable.<OuterEnum>undefined();
public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER = "outerEnumInteger";
@jakarta.annotation.Nullable
private OuterEnumInteger outerEnumInteger;
public static final String JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE = "outerEnumDefaultValue";
@jakarta.annotation.Nullable
private OuterEnumDefaultValue outerEnumDefaultValue = OuterEnumDefaultValue.PLACED;
public static final String JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE = "outerEnumIntegerDefaultValue";
@jakarta.annotation.Nullable
private OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue = OuterEnumIntegerDefaultValue.NUMBER_0;
public EnumTest() {
}
public EnumTest enumString(@jakarta.annotation.Nullable EnumStringEnum enumString) {
this.enumString = enumString;
return this;
}
/**
* Get enumString
* @return enumString
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ENUM_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public EnumStringEnum getEnumString() {
return enumString;
}
@JsonProperty(JSON_PROPERTY_ENUM_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnumString(@jakarta.annotation.Nullable EnumStringEnum enumString) {
this.enumString = enumString;
}
public EnumTest enumStringRequired(@jakarta.annotation.Nonnull EnumStringRequiredEnum enumStringRequired) {
this.enumStringRequired = enumStringRequired;
return this;
}
/**
* Get enumStringRequired
* @return enumStringRequired
*/
@jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public EnumStringRequiredEnum getEnumStringRequired() {
return enumStringRequired;
}
@JsonProperty(JSON_PROPERTY_ENUM_STRING_REQUIRED)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setEnumStringRequired(@jakarta.annotation.Nonnull EnumStringRequiredEnum enumStringRequired) {
this.enumStringRequired = enumStringRequired;
}
public EnumTest enumInteger(@jakarta.annotation.Nullable EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
return this;
}
/**
* Get enumInteger
* @return enumInteger
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ENUM_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public EnumIntegerEnum getEnumInteger() {
return enumInteger;
}
@JsonProperty(JSON_PROPERTY_ENUM_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnumInteger(@jakarta.annotation.Nullable EnumIntegerEnum enumInteger) {
this.enumInteger = enumInteger;
}
public EnumTest enumNumber(@jakarta.annotation.Nullable EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
return this;
}
/**
* Get enumNumber
* @return enumNumber
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ENUM_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public EnumNumberEnum getEnumNumber() {
return enumNumber;
}
@JsonProperty(JSON_PROPERTY_ENUM_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEnumNumber(@jakarta.annotation.Nullable EnumNumberEnum enumNumber) {
this.enumNumber = enumNumber;
}
public EnumTest outerEnum(@jakarta.annotation.Nullable OuterEnum outerEnum) {
this.outerEnum = JsonNullable.<OuterEnum>of(outerEnum);
return this;
}
/**
* Get outerEnum
* @return outerEnum
*/
@jakarta.annotation.Nullable
@JsonIgnore
public OuterEnum getOuterEnum() {
return outerEnum.orElse(null);
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<OuterEnum> getOuterEnum_JsonNullable() {
return outerEnum;
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM)
public void setOuterEnum_JsonNullable(JsonNullable<OuterEnum> outerEnum) {
this.outerEnum = outerEnum;
}
public void setOuterEnum(@jakarta.annotation.Nullable OuterEnum outerEnum) {
this.outerEnum = JsonNullable.<OuterEnum>of(outerEnum);
}
public EnumTest outerEnumInteger(@jakarta.annotation.Nullable OuterEnumInteger outerEnumInteger) {
this.outerEnumInteger = outerEnumInteger;
return this;
}
/**
* Get outerEnumInteger
* @return outerEnumInteger
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnumInteger getOuterEnumInteger() {
return outerEnumInteger;
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOuterEnumInteger(@jakarta.annotation.Nullable OuterEnumInteger outerEnumInteger) {
this.outerEnumInteger = outerEnumInteger;
}
public EnumTest outerEnumDefaultValue(@jakarta.annotation.Nullable OuterEnumDefaultValue outerEnumDefaultValue) {
this.outerEnumDefaultValue = outerEnumDefaultValue;
return this;
}
/**
* Get outerEnumDefaultValue
* @return outerEnumDefaultValue
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnumDefaultValue getOuterEnumDefaultValue() {
return outerEnumDefaultValue;
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOuterEnumDefaultValue(@jakarta.annotation.Nullable OuterEnumDefaultValue outerEnumDefaultValue) {
this.outerEnumDefaultValue = outerEnumDefaultValue;
}
public EnumTest outerEnumIntegerDefaultValue(@jakarta.annotation.Nullable OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) {
this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
return this;
}
/**
* Get outerEnumIntegerDefaultValue
* @return outerEnumIntegerDefaultValue
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OuterEnumIntegerDefaultValue getOuterEnumIntegerDefaultValue() {
return outerEnumIntegerDefaultValue;
}
@JsonProperty(JSON_PROPERTY_OUTER_ENUM_INTEGER_DEFAULT_VALUE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setOuterEnumIntegerDefaultValue(@jakarta.annotation.Nullable OuterEnumIntegerDefaultValue outerEnumIntegerDefaultValue) {
this.outerEnumIntegerDefaultValue = outerEnumIntegerDefaultValue;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
EnumTest enumTest = (EnumTest) o;
return Objects.equals(this.enumString, enumTest.enumString) &&
Objects.equals(this.enumStringRequired, enumTest.enumStringRequired) &&
Objects.equals(this.enumInteger, enumTest.enumInteger) &&
Objects.equals(this.enumNumber, enumTest.enumNumber) &&
equalsNullable(this.outerEnum, enumTest.outerEnum) &&
Objects.equals(this.outerEnumInteger, enumTest.outerEnumInteger) &&
Objects.equals(this.outerEnumDefaultValue, enumTest.outerEnumDefaultValue) &&
Objects.equals(this.outerEnumIntegerDefaultValue, enumTest.outerEnumIntegerDefaultValue);
}
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(enumString, enumStringRequired, enumInteger, enumNumber, hashCodeNullable(outerEnum), outerEnumInteger, outerEnumDefaultValue, outerEnumIntegerDefaultValue);
}
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 EnumTest {\n");
sb.append(" enumString: ").append(toIndentedString(enumString)).append("\n");
sb.append(" enumStringRequired: ").append(toIndentedString(enumStringRequired)).append("\n");
sb.append(" enumInteger: ").append(toIndentedString(enumInteger)).append("\n");
sb.append(" enumNumber: ").append(toIndentedString(enumNumber)).append("\n");
sb.append(" outerEnum: ").append(toIndentedString(outerEnum)).append("\n");
sb.append(" outerEnumInteger: ").append(toIndentedString(outerEnumInteger)).append("\n");
sb.append(" outerEnumDefaultValue: ").append(toIndentedString(outerEnumDefaultValue)).append("\n");
sb.append(" outerEnumIntegerDefaultValue: ").append(toIndentedString(outerEnumIntegerDefaultValue)).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,149 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* FakeBigDecimalMap200Response
*/
@JsonPropertyOrder({
FakeBigDecimalMap200Response.JSON_PROPERTY_SOME_ID,
FakeBigDecimalMap200Response.JSON_PROPERTY_SOME_MAP
})
@JsonTypeName("fakeBigDecimalMap_200_response")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class FakeBigDecimalMap200Response {
public static final String JSON_PROPERTY_SOME_ID = "someId";
@jakarta.annotation.Nullable
private BigDecimal someId;
public static final String JSON_PROPERTY_SOME_MAP = "someMap";
@jakarta.annotation.Nullable
private Map<String, BigDecimal> someMap = new HashMap<>();
public FakeBigDecimalMap200Response() {
}
public FakeBigDecimalMap200Response someId(@jakarta.annotation.Nullable BigDecimal someId) {
this.someId = someId;
return this;
}
/**
* Get someId
* @return someId
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SOME_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BigDecimal getSomeId() {
return someId;
}
@JsonProperty(JSON_PROPERTY_SOME_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSomeId(@jakarta.annotation.Nullable BigDecimal someId) {
this.someId = someId;
}
public FakeBigDecimalMap200Response someMap(@jakarta.annotation.Nullable Map<String, BigDecimal> someMap) {
this.someMap = someMap;
return this;
}
public FakeBigDecimalMap200Response putSomeMapItem(String key, BigDecimal someMapItem) {
if (this.someMap == null) {
this.someMap = new HashMap<>();
}
this.someMap.put(key, someMapItem);
return this;
}
/**
* Get someMap
* @return someMap
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SOME_MAP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, BigDecimal> getSomeMap() {
return someMap;
}
@JsonProperty(JSON_PROPERTY_SOME_MAP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSomeMap(@jakarta.annotation.Nullable Map<String, BigDecimal> someMap) {
this.someMap = someMap;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FakeBigDecimalMap200Response fakeBigDecimalMap200Response = (FakeBigDecimalMap200Response) o;
return Objects.equals(this.someId, fakeBigDecimalMap200Response.someId) &&
Objects.equals(this.someMap, fakeBigDecimalMap200Response.someMap);
}
@Override
public int hashCode() {
return Objects.hash(someId, someMap);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FakeBigDecimalMap200Response {\n");
sb.append(" someId: ").append(toIndentedString(someId)).append("\n");
sb.append(" someMap: ").append(toIndentedString(someMap)).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,149 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.ModelFile;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* FileSchemaTestClass
*/
@JsonPropertyOrder({
FileSchemaTestClass.JSON_PROPERTY_FILE,
FileSchemaTestClass.JSON_PROPERTY_FILES
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class FileSchemaTestClass {
public static final String JSON_PROPERTY_FILE = "file";
@jakarta.annotation.Nullable
private ModelFile _file;
public static final String JSON_PROPERTY_FILES = "files";
@jakarta.annotation.Nullable
private List<ModelFile> files = new ArrayList<>();
public FileSchemaTestClass() {
}
public FileSchemaTestClass _file(@jakarta.annotation.Nullable ModelFile _file) {
this._file = _file;
return this;
}
/**
* Get _file
* @return _file
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FILE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public ModelFile getFile() {
return _file;
}
@JsonProperty(JSON_PROPERTY_FILE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFile(@jakarta.annotation.Nullable ModelFile _file) {
this._file = _file;
}
public FileSchemaTestClass files(@jakarta.annotation.Nullable List<ModelFile> files) {
this.files = files;
return this;
}
public FileSchemaTestClass addFilesItem(ModelFile filesItem) {
if (this.files == null) {
this.files = new ArrayList<>();
}
this.files.add(filesItem);
return this;
}
/**
* Get files
* @return files
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FILES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<ModelFile> getFiles() {
return files;
}
@JsonProperty(JSON_PROPERTY_FILES)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFiles(@jakarta.annotation.Nullable List<ModelFile> files) {
this.files = files;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FileSchemaTestClass fileSchemaTestClass = (FileSchemaTestClass) o;
return Objects.equals(this._file, fileSchemaTestClass._file) &&
Objects.equals(this.files, fileSchemaTestClass.files);
}
@Override
public int hashCode() {
return Objects.hash(_file, files);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FileSchemaTestClass {\n");
sb.append(" _file: ").append(toIndentedString(_file)).append("\n");
sb.append(" files: ").append(toIndentedString(files)).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,105 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* Foo
*/
@JsonPropertyOrder({
Foo.JSON_PROPERTY_BAR
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class Foo {
public static final String JSON_PROPERTY_BAR = "bar";
@jakarta.annotation.Nullable
private String bar = "bar";
public Foo() {
}
public Foo bar(@jakarta.annotation.Nullable String bar) {
this.bar = bar;
return this;
}
/**
* Get bar
* @return bar
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_BAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBar() {
return bar;
}
@JsonProperty(JSON_PROPERTY_BAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBar(@jakarta.annotation.Nullable String bar) {
this.bar = bar;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Foo foo = (Foo) o;
return Objects.equals(this.bar, foo.bar);
}
@Override
public int hashCode() {
return Objects.hash(bar);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Foo {\n");
sb.append(" bar: ").append(toIndentedString(bar)).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,107 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 org.openapitools.client.model.Foo;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* FooGetDefaultResponse
*/
@JsonPropertyOrder({
FooGetDefaultResponse.JSON_PROPERTY_STRING
})
@JsonTypeName("_foo_get_default_response")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class FooGetDefaultResponse {
public static final String JSON_PROPERTY_STRING = "string";
@jakarta.annotation.Nullable
private Foo string;
public FooGetDefaultResponse() {
}
public FooGetDefaultResponse string(@jakarta.annotation.Nullable Foo string) {
this.string = string;
return this;
}
/**
* Get string
* @return string
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Foo getString() {
return string;
}
@JsonProperty(JSON_PROPERTY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setString(@jakarta.annotation.Nullable Foo string) {
this.string = string;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o;
return Objects.equals(this.string, fooGetDefaultResponse.string);
}
@Override
public int hashCode() {
return Objects.hash(string);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FooGetDefaultResponse {\n");
sb.append(" string: ").append(toIndentedString(string)).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,601 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.io.File;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.UUID;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* FormatTest
*/
@JsonPropertyOrder({
FormatTest.JSON_PROPERTY_INTEGER,
FormatTest.JSON_PROPERTY_INT32,
FormatTest.JSON_PROPERTY_INT64,
FormatTest.JSON_PROPERTY_NUMBER,
FormatTest.JSON_PROPERTY_FLOAT,
FormatTest.JSON_PROPERTY_DOUBLE,
FormatTest.JSON_PROPERTY_DECIMAL,
FormatTest.JSON_PROPERTY_STRING,
FormatTest.JSON_PROPERTY_BYTE,
FormatTest.JSON_PROPERTY_BINARY,
FormatTest.JSON_PROPERTY_DATE,
FormatTest.JSON_PROPERTY_DATE_TIME,
FormatTest.JSON_PROPERTY_UUID,
FormatTest.JSON_PROPERTY_PASSWORD,
FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS,
FormatTest.JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER
})
@JsonTypeName("format_test")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class FormatTest {
public static final String JSON_PROPERTY_INTEGER = "integer";
@jakarta.annotation.Nullable
private Integer integer;
public static final String JSON_PROPERTY_INT32 = "int32";
@jakarta.annotation.Nullable
private Integer int32;
public static final String JSON_PROPERTY_INT64 = "int64";
@jakarta.annotation.Nullable
private Long int64;
public static final String JSON_PROPERTY_NUMBER = "number";
@jakarta.annotation.Nonnull
private BigDecimal number;
public static final String JSON_PROPERTY_FLOAT = "float";
@jakarta.annotation.Nullable
private Float _float;
public static final String JSON_PROPERTY_DOUBLE = "double";
@jakarta.annotation.Nullable
private Double _double;
public static final String JSON_PROPERTY_DECIMAL = "decimal";
@jakarta.annotation.Nullable
private BigDecimal decimal;
public static final String JSON_PROPERTY_STRING = "string";
@jakarta.annotation.Nullable
private String string;
public static final String JSON_PROPERTY_BYTE = "byte";
@jakarta.annotation.Nonnull
private byte[] _byte;
public static final String JSON_PROPERTY_BINARY = "binary";
@jakarta.annotation.Nullable
private File binary;
public static final String JSON_PROPERTY_DATE = "date";
@jakarta.annotation.Nonnull
private LocalDate date;
public static final String JSON_PROPERTY_DATE_TIME = "dateTime";
@jakarta.annotation.Nullable
private OffsetDateTime dateTime;
public static final String JSON_PROPERTY_UUID = "uuid";
@jakarta.annotation.Nullable
private UUID uuid;
public static final String JSON_PROPERTY_PASSWORD = "password";
@jakarta.annotation.Nonnull
private String password;
public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS = "pattern_with_digits";
@jakarta.annotation.Nullable
private String patternWithDigits;
public static final String JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER = "pattern_with_digits_and_delimiter";
@jakarta.annotation.Nullable
private String patternWithDigitsAndDelimiter;
public FormatTest() {
}
public FormatTest integer(@jakarta.annotation.Nullable Integer integer) {
this.integer = integer;
return this;
}
/**
* Get integer
* minimum: 10
* maximum: 100
* @return integer
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getInteger() {
return integer;
}
@JsonProperty(JSON_PROPERTY_INTEGER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setInteger(@jakarta.annotation.Nullable Integer integer) {
this.integer = integer;
}
public FormatTest int32(@jakarta.annotation.Nullable Integer int32) {
this.int32 = int32;
return this;
}
/**
* Get int32
* minimum: 20
* maximum: 200
* @return int32
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_INT32)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getInt32() {
return int32;
}
@JsonProperty(JSON_PROPERTY_INT32)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setInt32(@jakarta.annotation.Nullable Integer int32) {
this.int32 = int32;
}
public FormatTest int64(@jakarta.annotation.Nullable Long int64) {
this.int64 = int64;
return this;
}
/**
* Get int64
* @return int64
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_INT64)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getInt64() {
return int64;
}
@JsonProperty(JSON_PROPERTY_INT64)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setInt64(@jakarta.annotation.Nullable Long int64) {
this.int64 = int64;
}
public FormatTest number(@jakarta.annotation.Nonnull BigDecimal number) {
this.number = number;
return this;
}
/**
* Get number
* minimum: 32.1
* maximum: 543.2
* @return number
*/
@jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_NUMBER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public BigDecimal getNumber() {
return number;
}
@JsonProperty(JSON_PROPERTY_NUMBER)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setNumber(@jakarta.annotation.Nonnull BigDecimal number) {
this.number = number;
}
public FormatTest _float(@jakarta.annotation.Nullable Float _float) {
this._float = _float;
return this;
}
/**
* Get _float
* minimum: 54.3
* maximum: 987.6
* @return _float
*/
@jakarta.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(@jakarta.annotation.Nullable Float _float) {
this._float = _float;
}
public FormatTest _double(@jakarta.annotation.Nullable Double _double) {
this._double = _double;
return this;
}
/**
* Get _double
* minimum: 67.8
* maximum: 123.4
* @return _double
*/
@jakarta.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(@jakarta.annotation.Nullable Double _double) {
this._double = _double;
}
public FormatTest decimal(@jakarta.annotation.Nullable BigDecimal decimal) {
this.decimal = decimal;
return this;
}
/**
* Get decimal
* @return decimal
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DECIMAL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BigDecimal getDecimal() {
return decimal;
}
@JsonProperty(JSON_PROPERTY_DECIMAL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDecimal(@jakarta.annotation.Nullable BigDecimal decimal) {
this.decimal = decimal;
}
public FormatTest string(@jakarta.annotation.Nullable String string) {
this.string = string;
return this;
}
/**
* Get string
* @return string
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getString() {
return string;
}
@JsonProperty(JSON_PROPERTY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setString(@jakarta.annotation.Nullable String string) {
this.string = string;
}
public FormatTest _byte(@jakarta.annotation.Nonnull byte[] _byte) {
this._byte = _byte;
return this;
}
/**
* Get _byte
* @return _byte
*/
@jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_BYTE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public byte[] getByte() {
return _byte;
}
@JsonProperty(JSON_PROPERTY_BYTE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setByte(@jakarta.annotation.Nonnull byte[] _byte) {
this._byte = _byte;
}
public FormatTest binary(@jakarta.annotation.Nullable File binary) {
this.binary = binary;
return this;
}
/**
* Get binary
* @return binary
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_BINARY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public File getBinary() {
return binary;
}
@JsonProperty(JSON_PROPERTY_BINARY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBinary(@jakarta.annotation.Nullable File binary) {
this.binary = binary;
}
public FormatTest date(@jakarta.annotation.Nonnull LocalDate date) {
this.date = date;
return this;
}
/**
* Get date
* @return date
*/
@jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_DATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public LocalDate getDate() {
return date;
}
@JsonProperty(JSON_PROPERTY_DATE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setDate(@jakarta.annotation.Nonnull LocalDate date) {
this.date = date;
}
public FormatTest dateTime(@jakarta.annotation.Nullable OffsetDateTime dateTime) {
this.dateTime = dateTime;
return this;
}
/**
* Get dateTime
* @return dateTime
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DATE_TIME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getDateTime() {
return dateTime;
}
@JsonProperty(JSON_PROPERTY_DATE_TIME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDateTime(@jakarta.annotation.Nullable OffsetDateTime dateTime) {
this.dateTime = dateTime;
}
public FormatTest uuid(@jakarta.annotation.Nullable UUID uuid) {
this.uuid = uuid;
return this;
}
/**
* Get uuid
* @return uuid
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public UUID getUuid() {
return uuid;
}
@JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUuid(@jakarta.annotation.Nullable UUID uuid) {
this.uuid = uuid;
}
public FormatTest password(@jakarta.annotation.Nonnull String password) {
this.password = password;
return this;
}
/**
* Get password
* @return password
*/
@jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_PASSWORD)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public String getPassword() {
return password;
}
@JsonProperty(JSON_PROPERTY_PASSWORD)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setPassword(@jakarta.annotation.Nonnull String password) {
this.password = password;
}
public FormatTest patternWithDigits(@jakarta.annotation.Nullable String patternWithDigits) {
this.patternWithDigits = patternWithDigits;
return this;
}
/**
* A string that is a 10 digit number. Can have leading zeros.
* @return patternWithDigits
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPatternWithDigits() {
return patternWithDigits;
}
@JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPatternWithDigits(@jakarta.annotation.Nullable String patternWithDigits) {
this.patternWithDigits = patternWithDigits;
}
public FormatTest patternWithDigitsAndDelimiter(@jakarta.annotation.Nullable String patternWithDigitsAndDelimiter) {
this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter;
return this;
}
/**
* A string starting with &#39;image_&#39; (case insensitive) and one to three digits following i.e. Image_01.
* @return patternWithDigitsAndDelimiter
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPatternWithDigitsAndDelimiter() {
return patternWithDigitsAndDelimiter;
}
@JsonProperty(JSON_PROPERTY_PATTERN_WITH_DIGITS_AND_DELIMITER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPatternWithDigitsAndDelimiter(@jakarta.annotation.Nullable String patternWithDigitsAndDelimiter) {
this.patternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
FormatTest formatTest = (FormatTest) o;
return Objects.equals(this.integer, formatTest.integer) &&
Objects.equals(this.int32, formatTest.int32) &&
Objects.equals(this.int64, formatTest.int64) &&
Objects.equals(this.number, formatTest.number) &&
Objects.equals(this._float, formatTest._float) &&
Objects.equals(this._double, formatTest._double) &&
Objects.equals(this.decimal, formatTest.decimal) &&
Objects.equals(this.string, formatTest.string) &&
Arrays.equals(this._byte, formatTest._byte) &&
Objects.equals(this.binary, formatTest.binary) &&
Objects.equals(this.date, formatTest.date) &&
Objects.equals(this.dateTime, formatTest.dateTime) &&
Objects.equals(this.uuid, formatTest.uuid) &&
Objects.equals(this.password, formatTest.password) &&
Objects.equals(this.patternWithDigits, formatTest.patternWithDigits) &&
Objects.equals(this.patternWithDigitsAndDelimiter, formatTest.patternWithDigitsAndDelimiter);
}
@Override
public int hashCode() {
return Objects.hash(integer, int32, int64, number, _float, _double, decimal, string, Arrays.hashCode(_byte), binary, date, dateTime, uuid, password, patternWithDigits, patternWithDigitsAndDelimiter);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class FormatTest {\n");
sb.append(" integer: ").append(toIndentedString(integer)).append("\n");
sb.append(" int32: ").append(toIndentedString(int32)).append("\n");
sb.append(" int64: ").append(toIndentedString(int64)).append("\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(" decimal: ").append(toIndentedString(decimal)).append("\n");
sb.append(" string: ").append(toIndentedString(string)).append("\n");
sb.append(" _byte: ").append(toIndentedString(_byte)).append("\n");
sb.append(" binary: ").append(toIndentedString(binary)).append("\n");
sb.append(" date: ").append(toIndentedString(date)).append("\n");
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" password: ").append("*").append("\n");
sb.append(" patternWithDigits: ").append(toIndentedString(patternWithDigits)).append("\n");
sb.append(" patternWithDigitsAndDelimiter: ").append(toIndentedString(patternWithDigitsAndDelimiter)).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,128 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* HasOnlyReadOnly
*/
@JsonPropertyOrder({
HasOnlyReadOnly.JSON_PROPERTY_BAR,
HasOnlyReadOnly.JSON_PROPERTY_FOO
})
@JsonTypeName("hasOnlyReadOnly")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class HasOnlyReadOnly {
public static final String JSON_PROPERTY_BAR = "bar";
@jakarta.annotation.Nullable
private String bar;
public static final String JSON_PROPERTY_FOO = "foo";
@jakarta.annotation.Nullable
private String foo;
public HasOnlyReadOnly() {
}
/**
* Constructor with only readonly parameters
*/
@JsonCreator
public HasOnlyReadOnly(
@JsonProperty(JSON_PROPERTY_BAR) String bar,
@JsonProperty(JSON_PROPERTY_FOO) String foo
) {
this();
this.bar = bar;
this.foo = foo;
}
/**
* Get bar
* @return bar
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_BAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBar() {
return bar;
}
/**
* Get foo
* @return foo
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FOO)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getFoo() {
return foo;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HasOnlyReadOnly hasOnlyReadOnly = (HasOnlyReadOnly) o;
return Objects.equals(this.bar, hasOnlyReadOnly.bar) &&
Objects.equals(this.foo, hasOnlyReadOnly.foo);
}
@Override
public int hashCode() {
return Objects.hash(bar, foo);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class HasOnlyReadOnly {\n");
sb.append(" bar: ").append(toIndentedString(bar)).append("\n");
sb.append(" foo: ").append(toIndentedString(foo)).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,128 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 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;
/**
* Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
*/
@JsonPropertyOrder({
HealthCheckResult.JSON_PROPERTY_NULLABLE_MESSAGE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class HealthCheckResult {
public static final String JSON_PROPERTY_NULLABLE_MESSAGE = "NullableMessage";
@jakarta.annotation.Nullable
private JsonNullable<String> nullableMessage = JsonNullable.<String>undefined();
public HealthCheckResult() {
}
public HealthCheckResult nullableMessage(@jakarta.annotation.Nullable String nullableMessage) {
this.nullableMessage = JsonNullable.<String>of(nullableMessage);
return this;
}
/**
* Get nullableMessage
* @return nullableMessage
*/
@jakarta.annotation.Nullable
@JsonIgnore
public String getNullableMessage() {
return nullableMessage.orElse(null);
}
@JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<String> getNullableMessage_JsonNullable() {
return nullableMessage;
}
@JsonProperty(JSON_PROPERTY_NULLABLE_MESSAGE)
public void setNullableMessage_JsonNullable(JsonNullable<String> nullableMessage) {
this.nullableMessage = nullableMessage;
}
public void setNullableMessage(@jakarta.annotation.Nullable String nullableMessage) {
this.nullableMessage = JsonNullable.<String>of(nullableMessage);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
HealthCheckResult healthCheckResult = (HealthCheckResult) o;
return equalsNullable(this.nullableMessage, healthCheckResult.nullableMessage);
}
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(hashCodeNullable(nullableMessage));
}
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 HealthCheckResult {\n");
sb.append(" nullableMessage: ").append(toIndentedString(nullableMessage)).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,270 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* MapTest
*/
@JsonPropertyOrder({
MapTest.JSON_PROPERTY_MAP_MAP_OF_STRING,
MapTest.JSON_PROPERTY_MAP_OF_ENUM_STRING,
MapTest.JSON_PROPERTY_DIRECT_MAP,
MapTest.JSON_PROPERTY_INDIRECT_MAP
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class MapTest {
public static final String JSON_PROPERTY_MAP_MAP_OF_STRING = "map_map_of_string";
@jakarta.annotation.Nullable
private Map<String, Map<String, String>> mapMapOfString = new HashMap<>();
/**
* Gets or Sets inner
*/
public enum InnerEnum {
UPPER(String.valueOf("UPPER")),
LOWER(String.valueOf("lower"));
private String value;
InnerEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static InnerEnum fromValue(String value) {
for (InnerEnum b : InnerEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_MAP_OF_ENUM_STRING = "map_of_enum_string";
@jakarta.annotation.Nullable
private Map<String, InnerEnum> mapOfEnumString = new HashMap<>();
public static final String JSON_PROPERTY_DIRECT_MAP = "direct_map";
@jakarta.annotation.Nullable
private Map<String, Boolean> directMap = new HashMap<>();
public static final String JSON_PROPERTY_INDIRECT_MAP = "indirect_map";
@jakarta.annotation.Nullable
private Map<String, Boolean> indirectMap = new HashMap<>();
public MapTest() {
}
public MapTest mapMapOfString(@jakarta.annotation.Nullable Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
return this;
}
public MapTest putMapMapOfStringItem(String key, Map<String, String> mapMapOfStringItem) {
if (this.mapMapOfString == null) {
this.mapMapOfString = new HashMap<>();
}
this.mapMapOfString.put(key, mapMapOfStringItem);
return this;
}
/**
* Get mapMapOfString
* @return mapMapOfString
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Map<String, String>> getMapMapOfString() {
return mapMapOfString;
}
@JsonProperty(JSON_PROPERTY_MAP_MAP_OF_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapMapOfString(@jakarta.annotation.Nullable Map<String, Map<String, String>> mapMapOfString) {
this.mapMapOfString = mapMapOfString;
}
public MapTest mapOfEnumString(@jakarta.annotation.Nullable Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
return this;
}
public MapTest putMapOfEnumStringItem(String key, InnerEnum mapOfEnumStringItem) {
if (this.mapOfEnumString == null) {
this.mapOfEnumString = new HashMap<>();
}
this.mapOfEnumString.put(key, mapOfEnumStringItem);
return this;
}
/**
* Get mapOfEnumString
* @return mapOfEnumString
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, InnerEnum> getMapOfEnumString() {
return mapOfEnumString;
}
@JsonProperty(JSON_PROPERTY_MAP_OF_ENUM_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMapOfEnumString(@jakarta.annotation.Nullable Map<String, InnerEnum> mapOfEnumString) {
this.mapOfEnumString = mapOfEnumString;
}
public MapTest directMap(@jakarta.annotation.Nullable Map<String, Boolean> directMap) {
this.directMap = directMap;
return this;
}
public MapTest putDirectMapItem(String key, Boolean directMapItem) {
if (this.directMap == null) {
this.directMap = new HashMap<>();
}
this.directMap.put(key, directMapItem);
return this;
}
/**
* Get directMap
* @return directMap
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DIRECT_MAP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Boolean> getDirectMap() {
return directMap;
}
@JsonProperty(JSON_PROPERTY_DIRECT_MAP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDirectMap(@jakarta.annotation.Nullable Map<String, Boolean> directMap) {
this.directMap = directMap;
}
public MapTest indirectMap(@jakarta.annotation.Nullable Map<String, Boolean> indirectMap) {
this.indirectMap = indirectMap;
return this;
}
public MapTest putIndirectMapItem(String key, Boolean indirectMapItem) {
if (this.indirectMap == null) {
this.indirectMap = new HashMap<>();
}
this.indirectMap.put(key, indirectMapItem);
return this;
}
/**
* Get indirectMap
* @return indirectMap
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_INDIRECT_MAP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Boolean> getIndirectMap() {
return indirectMap;
}
@JsonProperty(JSON_PROPERTY_INDIRECT_MAP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setIndirectMap(@jakarta.annotation.Nullable Map<String, Boolean> indirectMap) {
this.indirectMap = indirectMap;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MapTest mapTest = (MapTest) o;
return Objects.equals(this.mapMapOfString, mapTest.mapMapOfString) &&
Objects.equals(this.mapOfEnumString, mapTest.mapOfEnumString) &&
Objects.equals(this.directMap, mapTest.directMap) &&
Objects.equals(this.indirectMap, mapTest.indirectMap);
}
@Override
public int hashCode() {
return Objects.hash(mapMapOfString, mapOfEnumString, directMap, indirectMap);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MapTest {\n");
sb.append(" mapMapOfString: ").append(toIndentedString(mapMapOfString)).append("\n");
sb.append(" mapOfEnumString: ").append(toIndentedString(mapOfEnumString)).append("\n");
sb.append(" directMap: ").append(toIndentedString(directMap)).append("\n");
sb.append(" indirectMap: ").append(toIndentedString(indirectMap)).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,182 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.HashMap;
import java.util.Map;
import java.util.UUID;
import org.openapitools.client.model.Animal;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* MixedPropertiesAndAdditionalPropertiesClass
*/
@JsonPropertyOrder({
MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_UUID,
MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_DATE_TIME,
MixedPropertiesAndAdditionalPropertiesClass.JSON_PROPERTY_MAP
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class MixedPropertiesAndAdditionalPropertiesClass {
public static final String JSON_PROPERTY_UUID = "uuid";
@jakarta.annotation.Nullable
private UUID uuid;
public static final String JSON_PROPERTY_DATE_TIME = "dateTime";
@jakarta.annotation.Nullable
private OffsetDateTime dateTime;
public static final String JSON_PROPERTY_MAP = "map";
@jakarta.annotation.Nullable
private Map<String, Animal> map = new HashMap<>();
public MixedPropertiesAndAdditionalPropertiesClass() {
}
public MixedPropertiesAndAdditionalPropertiesClass uuid(@jakarta.annotation.Nullable UUID uuid) {
this.uuid = uuid;
return this;
}
/**
* Get uuid
* @return uuid
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public UUID getUuid() {
return uuid;
}
@JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUuid(@jakarta.annotation.Nullable UUID uuid) {
this.uuid = uuid;
}
public MixedPropertiesAndAdditionalPropertiesClass dateTime(@jakarta.annotation.Nullable OffsetDateTime dateTime) {
this.dateTime = dateTime;
return this;
}
/**
* Get dateTime
* @return dateTime
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DATE_TIME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getDateTime() {
return dateTime;
}
@JsonProperty(JSON_PROPERTY_DATE_TIME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDateTime(@jakarta.annotation.Nullable OffsetDateTime dateTime) {
this.dateTime = dateTime;
}
public MixedPropertiesAndAdditionalPropertiesClass map(@jakarta.annotation.Nullable Map<String, Animal> map) {
this.map = map;
return this;
}
public MixedPropertiesAndAdditionalPropertiesClass putMapItem(String key, Animal mapItem) {
if (this.map == null) {
this.map = new HashMap<>();
}
this.map.put(key, mapItem);
return this;
}
/**
* Get map
* @return map
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MAP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Animal> getMap() {
return map;
}
@JsonProperty(JSON_PROPERTY_MAP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMap(@jakarta.annotation.Nullable Map<String, Animal> map) {
this.map = map;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
MixedPropertiesAndAdditionalPropertiesClass mixedPropertiesAndAdditionalPropertiesClass = (MixedPropertiesAndAdditionalPropertiesClass) o;
return Objects.equals(this.uuid, mixedPropertiesAndAdditionalPropertiesClass.uuid) &&
Objects.equals(this.dateTime, mixedPropertiesAndAdditionalPropertiesClass.dateTime) &&
Objects.equals(this.map, mixedPropertiesAndAdditionalPropertiesClass.map);
}
@Override
public int hashCode() {
return Objects.hash(uuid, dateTime, map);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class MixedPropertiesAndAdditionalPropertiesClass {\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" dateTime: ").append(toIndentedString(dateTime)).append("\n");
sb.append(" map: ").append(toIndentedString(map)).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,138 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* Model for testing model name starting with number
*/
@JsonPropertyOrder({
Model200Response.JSON_PROPERTY_NAME,
Model200Response.JSON_PROPERTY_PROPERTY_CLASS
})
@JsonTypeName("200_response")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class Model200Response {
public static final String JSON_PROPERTY_NAME = "name";
@jakarta.annotation.Nullable
private Integer name;
public static final String JSON_PROPERTY_PROPERTY_CLASS = "class";
@jakarta.annotation.Nullable
private String propertyClass;
public Model200Response() {
}
public Model200Response name(@jakarta.annotation.Nullable Integer name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setName(@jakarta.annotation.Nullable Integer name) {
this.name = name;
}
public Model200Response propertyClass(@jakarta.annotation.Nullable String propertyClass) {
this.propertyClass = propertyClass;
return this;
}
/**
* Get propertyClass
* @return propertyClass
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PROPERTY_CLASS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPropertyClass() {
return propertyClass;
}
@JsonProperty(JSON_PROPERTY_PROPERTY_CLASS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPropertyClass(@jakarta.annotation.Nullable String propertyClass) {
this.propertyClass = propertyClass;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Model200Response _200response = (Model200Response) o;
return Objects.equals(this.name, _200response.name) &&
Objects.equals(this.propertyClass, _200response.propertyClass);
}
@Override
public int hashCode() {
return Objects.hash(name, propertyClass);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Model200Response {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" propertyClass: ").append(toIndentedString(propertyClass)).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 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* ModelApiResponse
*/
@JsonPropertyOrder({
ModelApiResponse.JSON_PROPERTY_CODE,
ModelApiResponse.JSON_PROPERTY_TYPE,
ModelApiResponse.JSON_PROPERTY_MESSAGE
})
@JsonTypeName("ApiResponse")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class ModelApiResponse {
public static final String JSON_PROPERTY_CODE = "code";
@jakarta.annotation.Nullable
private Integer code;
public static final String JSON_PROPERTY_TYPE = "type";
@jakarta.annotation.Nullable
private String type;
public static final String JSON_PROPERTY_MESSAGE = "message";
@jakarta.annotation.Nullable
private String message;
public ModelApiResponse() {
}
public ModelApiResponse code(@jakarta.annotation.Nullable Integer code) {
this.code = code;
return this;
}
/**
* Get code
* @return code
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getCode() {
return code;
}
@JsonProperty(JSON_PROPERTY_CODE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setCode(@jakarta.annotation.Nullable Integer code) {
this.code = code;
}
public ModelApiResponse type(@jakarta.annotation.Nullable String type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getType() {
return type;
}
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(@jakarta.annotation.Nullable String type) {
this.type = type;
}
public ModelApiResponse message(@jakarta.annotation.Nullable String message) {
this.message = message;
return this;
}
/**
* Get message
* @return message
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MESSAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getMessage() {
return message;
}
@JsonProperty(JSON_PROPERTY_MESSAGE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMessage(@jakarta.annotation.Nullable String message) {
this.message = message;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ModelApiResponse _apiResponse = (ModelApiResponse) o;
return Objects.equals(this.code, _apiResponse.code) &&
Objects.equals(this.type, _apiResponse.type) &&
Objects.equals(this.message, _apiResponse.message);
}
@Override
public int hashCode() {
return Objects.hash(code, type, message);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ModelApiResponse {\n");
sb.append(" code: ").append(toIndentedString(code)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" message: ").append(toIndentedString(message)).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,106 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* Must be named &#x60;File&#x60; for test.
*/
@JsonPropertyOrder({
ModelFile.JSON_PROPERTY_SOURCE_U_R_I
})
@JsonTypeName("File")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class ModelFile {
public static final String JSON_PROPERTY_SOURCE_U_R_I = "sourceURI";
@jakarta.annotation.Nullable
private String sourceURI;
public ModelFile() {
}
public ModelFile sourceURI(@jakarta.annotation.Nullable String sourceURI) {
this.sourceURI = sourceURI;
return this;
}
/**
* Test capitalization
* @return sourceURI
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SOURCE_U_R_I)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSourceURI() {
return sourceURI;
}
@JsonProperty(JSON_PROPERTY_SOURCE_U_R_I)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSourceURI(@jakarta.annotation.Nullable String sourceURI) {
this.sourceURI = sourceURI;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ModelFile _file = (ModelFile) o;
return Objects.equals(this.sourceURI, _file.sourceURI);
}
@Override
public int hashCode() {
return Objects.hash(sourceURI);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ModelFile {\n");
sb.append(" sourceURI: ").append(toIndentedString(sourceURI)).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,106 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* ModelList
*/
@JsonPropertyOrder({
ModelList.JSON_PROPERTY_123LIST
})
@JsonTypeName("List")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class ModelList {
public static final String JSON_PROPERTY_123LIST = "123-list";
@jakarta.annotation.Nullable
private String _123list;
public ModelList() {
}
public ModelList _123list(@jakarta.annotation.Nullable String _123list) {
this._123list = _123list;
return this;
}
/**
* Get _123list
* @return _123list
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_123LIST)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String get123list() {
return _123list;
}
@JsonProperty(JSON_PROPERTY_123LIST)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void set123list(@jakarta.annotation.Nullable String _123list) {
this._123list = _123list;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ModelList _list = (ModelList) o;
return Objects.equals(this._123list, _list._123list);
}
@Override
public int hashCode() {
return Objects.hash(_123list);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ModelList {\n");
sb.append(" _123list: ").append(toIndentedString(_123list)).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,106 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* Model for testing reserved words
*/
@JsonPropertyOrder({
ModelReturn.JSON_PROPERTY_RETURN
})
@JsonTypeName("Return")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class ModelReturn {
public static final String JSON_PROPERTY_RETURN = "return";
@jakarta.annotation.Nullable
private Integer _return;
public ModelReturn() {
}
public ModelReturn _return(@jakarta.annotation.Nullable Integer _return) {
this._return = _return;
return this;
}
/**
* Get _return
* @return _return
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_RETURN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getReturn() {
return _return;
}
@JsonProperty(JSON_PROPERTY_RETURN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setReturn(@jakarta.annotation.Nullable Integer _return) {
this._return = _return;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ModelReturn _return = (ModelReturn) o;
return Objects.equals(this._return, _return._return);
}
@Override
public int hashCode() {
return Objects.hash(_return);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ModelReturn {\n");
sb.append(" _return: ").append(toIndentedString(_return)).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,191 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* Model for testing model name same as property name
*/
@JsonPropertyOrder({
Name.JSON_PROPERTY_NAME,
Name.JSON_PROPERTY_SNAKE_CASE,
Name.JSON_PROPERTY_PROPERTY,
Name.JSON_PROPERTY_123NUMBER
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class Name {
public static final String JSON_PROPERTY_NAME = "name";
@jakarta.annotation.Nonnull
private Integer name;
public static final String JSON_PROPERTY_SNAKE_CASE = "snake_case";
@jakarta.annotation.Nullable
private Integer snakeCase;
public static final String JSON_PROPERTY_PROPERTY = "property";
@jakarta.annotation.Nullable
private String property;
public static final String JSON_PROPERTY_123NUMBER = "123Number";
@jakarta.annotation.Nullable
private Integer _123number;
public Name() {
}
/**
* Constructor with only readonly parameters
*/
@JsonCreator
public Name(
@JsonProperty(JSON_PROPERTY_SNAKE_CASE) Integer snakeCase,
@JsonProperty(JSON_PROPERTY_123NUMBER) Integer _123number
) {
this();
this.snakeCase = snakeCase;
this._123number = _123number;
}
public Name name(@jakarta.annotation.Nonnull Integer name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
*/
@jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Integer getName() {
return name;
}
@JsonProperty(JSON_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setName(@jakarta.annotation.Nonnull Integer name) {
this.name = name;
}
/**
* Get snakeCase
* @return snakeCase
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SNAKE_CASE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getSnakeCase() {
return snakeCase;
}
public Name property(@jakarta.annotation.Nullable String property) {
this.property = property;
return this;
}
/**
* Get property
* @return property
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getProperty() {
return property;
}
@JsonProperty(JSON_PROPERTY_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setProperty(@jakarta.annotation.Nullable String property) {
this.property = property;
}
/**
* Get _123number
* @return _123number
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_123NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer get123number() {
return _123number;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Name name = (Name) o;
return Objects.equals(this.name, name.name) &&
Objects.equals(this.snakeCase, name.snakeCase) &&
Objects.equals(this.property, name.property) &&
Objects.equals(this._123number, name._123number);
}
@Override
public int hashCode() {
return Objects.hash(name, snakeCase, property, _123number);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Name {\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" snakeCase: ").append(toIndentedString(snakeCase)).append("\n");
sb.append(" property: ").append(toIndentedString(property)).append("\n");
sb.append(" _123number: ").append(toIndentedString(_123number)).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,673 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
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 java.time.LocalDate;
import java.time.OffsetDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
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;
/**
* NullableClass
*/
@JsonPropertyOrder({
NullableClass.JSON_PROPERTY_INTEGER_PROP,
NullableClass.JSON_PROPERTY_NUMBER_PROP,
NullableClass.JSON_PROPERTY_BOOLEAN_PROP,
NullableClass.JSON_PROPERTY_STRING_PROP,
NullableClass.JSON_PROPERTY_DATE_PROP,
NullableClass.JSON_PROPERTY_DATETIME_PROP,
NullableClass.JSON_PROPERTY_ARRAY_NULLABLE_PROP,
NullableClass.JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP,
NullableClass.JSON_PROPERTY_ARRAY_ITEMS_NULLABLE,
NullableClass.JSON_PROPERTY_OBJECT_NULLABLE_PROP,
NullableClass.JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP,
NullableClass.JSON_PROPERTY_OBJECT_ITEMS_NULLABLE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class NullableClass {
public static final String JSON_PROPERTY_INTEGER_PROP = "integer_prop";
@jakarta.annotation.Nullable
private JsonNullable<Integer> integerProp = JsonNullable.<Integer>undefined();
public static final String JSON_PROPERTY_NUMBER_PROP = "number_prop";
@jakarta.annotation.Nullable
private JsonNullable<BigDecimal> numberProp = JsonNullable.<BigDecimal>undefined();
public static final String JSON_PROPERTY_BOOLEAN_PROP = "boolean_prop";
@jakarta.annotation.Nullable
private JsonNullable<Boolean> booleanProp = JsonNullable.<Boolean>undefined();
public static final String JSON_PROPERTY_STRING_PROP = "string_prop";
@jakarta.annotation.Nullable
private JsonNullable<String> stringProp = JsonNullable.<String>undefined();
public static final String JSON_PROPERTY_DATE_PROP = "date_prop";
@jakarta.annotation.Nullable
private JsonNullable<LocalDate> dateProp = JsonNullable.<LocalDate>undefined();
public static final String JSON_PROPERTY_DATETIME_PROP = "datetime_prop";
@jakarta.annotation.Nullable
private JsonNullable<OffsetDateTime> datetimeProp = JsonNullable.<OffsetDateTime>undefined();
public static final String JSON_PROPERTY_ARRAY_NULLABLE_PROP = "array_nullable_prop";
@jakarta.annotation.Nullable
private JsonNullable<List<Object>> arrayNullableProp = JsonNullable.<List<Object>>undefined();
public static final String JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP = "array_and_items_nullable_prop";
@jakarta.annotation.Nullable
private JsonNullable<List<Object>> arrayAndItemsNullableProp = JsonNullable.<List<Object>>undefined();
public static final String JSON_PROPERTY_ARRAY_ITEMS_NULLABLE = "array_items_nullable";
@jakarta.annotation.Nullable
private List<Object> arrayItemsNullable = new ArrayList<>();
public static final String JSON_PROPERTY_OBJECT_NULLABLE_PROP = "object_nullable_prop";
@jakarta.annotation.Nullable
private JsonNullable<Map<String, Object>> objectNullableProp = JsonNullable.<Map<String, Object>>undefined();
public static final String JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP = "object_and_items_nullable_prop";
@jakarta.annotation.Nullable
private JsonNullable<Map<String, Object>> objectAndItemsNullableProp = JsonNullable.<Map<String, Object>>undefined();
public static final String JSON_PROPERTY_OBJECT_ITEMS_NULLABLE = "object_items_nullable";
@jakarta.annotation.Nullable
private Map<String, Object> objectItemsNullable = new HashMap<>();
public NullableClass() {
}
public NullableClass integerProp(@jakarta.annotation.Nullable Integer integerProp) {
this.integerProp = JsonNullable.<Integer>of(integerProp);
return this;
}
/**
* Get integerProp
* @return integerProp
*/
@jakarta.annotation.Nullable
@JsonIgnore
public Integer getIntegerProp() {
return integerProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_INTEGER_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Integer> getIntegerProp_JsonNullable() {
return integerProp;
}
@JsonProperty(JSON_PROPERTY_INTEGER_PROP)
public void setIntegerProp_JsonNullable(JsonNullable<Integer> integerProp) {
this.integerProp = integerProp;
}
public void setIntegerProp(@jakarta.annotation.Nullable Integer integerProp) {
this.integerProp = JsonNullable.<Integer>of(integerProp);
}
public NullableClass numberProp(@jakarta.annotation.Nullable BigDecimal numberProp) {
this.numberProp = JsonNullable.<BigDecimal>of(numberProp);
return this;
}
/**
* Get numberProp
* @return numberProp
*/
@jakarta.annotation.Nullable
@JsonIgnore
public BigDecimal getNumberProp() {
return numberProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_NUMBER_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<BigDecimal> getNumberProp_JsonNullable() {
return numberProp;
}
@JsonProperty(JSON_PROPERTY_NUMBER_PROP)
public void setNumberProp_JsonNullable(JsonNullable<BigDecimal> numberProp) {
this.numberProp = numberProp;
}
public void setNumberProp(@jakarta.annotation.Nullable BigDecimal numberProp) {
this.numberProp = JsonNullable.<BigDecimal>of(numberProp);
}
public NullableClass booleanProp(@jakarta.annotation.Nullable Boolean booleanProp) {
this.booleanProp = JsonNullable.<Boolean>of(booleanProp);
return this;
}
/**
* Get booleanProp
* @return booleanProp
*/
@jakarta.annotation.Nullable
@JsonIgnore
public Boolean getBooleanProp() {
return booleanProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_BOOLEAN_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Boolean> getBooleanProp_JsonNullable() {
return booleanProp;
}
@JsonProperty(JSON_PROPERTY_BOOLEAN_PROP)
public void setBooleanProp_JsonNullable(JsonNullable<Boolean> booleanProp) {
this.booleanProp = booleanProp;
}
public void setBooleanProp(@jakarta.annotation.Nullable Boolean booleanProp) {
this.booleanProp = JsonNullable.<Boolean>of(booleanProp);
}
public NullableClass stringProp(@jakarta.annotation.Nullable String stringProp) {
this.stringProp = JsonNullable.<String>of(stringProp);
return this;
}
/**
* Get stringProp
* @return stringProp
*/
@jakarta.annotation.Nullable
@JsonIgnore
public String getStringProp() {
return stringProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_STRING_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<String> getStringProp_JsonNullable() {
return stringProp;
}
@JsonProperty(JSON_PROPERTY_STRING_PROP)
public void setStringProp_JsonNullable(JsonNullable<String> stringProp) {
this.stringProp = stringProp;
}
public void setStringProp(@jakarta.annotation.Nullable String stringProp) {
this.stringProp = JsonNullable.<String>of(stringProp);
}
public NullableClass dateProp(@jakarta.annotation.Nullable LocalDate dateProp) {
this.dateProp = JsonNullable.<LocalDate>of(dateProp);
return this;
}
/**
* Get dateProp
* @return dateProp
*/
@jakarta.annotation.Nullable
@JsonIgnore
public LocalDate getDateProp() {
return dateProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_DATE_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<LocalDate> getDateProp_JsonNullable() {
return dateProp;
}
@JsonProperty(JSON_PROPERTY_DATE_PROP)
public void setDateProp_JsonNullable(JsonNullable<LocalDate> dateProp) {
this.dateProp = dateProp;
}
public void setDateProp(@jakarta.annotation.Nullable LocalDate dateProp) {
this.dateProp = JsonNullable.<LocalDate>of(dateProp);
}
public NullableClass datetimeProp(@jakarta.annotation.Nullable OffsetDateTime datetimeProp) {
this.datetimeProp = JsonNullable.<OffsetDateTime>of(datetimeProp);
return this;
}
/**
* Get datetimeProp
* @return datetimeProp
*/
@jakarta.annotation.Nullable
@JsonIgnore
public OffsetDateTime getDatetimeProp() {
return datetimeProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_DATETIME_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<OffsetDateTime> getDatetimeProp_JsonNullable() {
return datetimeProp;
}
@JsonProperty(JSON_PROPERTY_DATETIME_PROP)
public void setDatetimeProp_JsonNullable(JsonNullable<OffsetDateTime> datetimeProp) {
this.datetimeProp = datetimeProp;
}
public void setDatetimeProp(@jakarta.annotation.Nullable OffsetDateTime datetimeProp) {
this.datetimeProp = JsonNullable.<OffsetDateTime>of(datetimeProp);
}
public NullableClass arrayNullableProp(@jakarta.annotation.Nullable List<Object> arrayNullableProp) {
this.arrayNullableProp = JsonNullable.<List<Object>>of(arrayNullableProp);
return this;
}
public NullableClass addArrayNullablePropItem(Object arrayNullablePropItem) {
if (this.arrayNullableProp == null || !this.arrayNullableProp.isPresent()) {
this.arrayNullableProp = JsonNullable.<List<Object>>of(new ArrayList<>());
}
try {
this.arrayNullableProp.get().add(arrayNullablePropItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get arrayNullableProp
* @return arrayNullableProp
*/
@jakarta.annotation.Nullable
@JsonIgnore
public List<Object> getArrayNullableProp() {
return arrayNullableProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<List<Object>> getArrayNullableProp_JsonNullable() {
return arrayNullableProp;
}
@JsonProperty(JSON_PROPERTY_ARRAY_NULLABLE_PROP)
public void setArrayNullableProp_JsonNullable(JsonNullable<List<Object>> arrayNullableProp) {
this.arrayNullableProp = arrayNullableProp;
}
public void setArrayNullableProp(@jakarta.annotation.Nullable List<Object> arrayNullableProp) {
this.arrayNullableProp = JsonNullable.<List<Object>>of(arrayNullableProp);
}
public NullableClass arrayAndItemsNullableProp(@jakarta.annotation.Nullable List<Object> arrayAndItemsNullableProp) {
this.arrayAndItemsNullableProp = JsonNullable.<List<Object>>of(arrayAndItemsNullableProp);
return this;
}
public NullableClass addArrayAndItemsNullablePropItem(Object arrayAndItemsNullablePropItem) {
if (this.arrayAndItemsNullableProp == null || !this.arrayAndItemsNullableProp.isPresent()) {
this.arrayAndItemsNullableProp = JsonNullable.<List<Object>>of(new ArrayList<>());
}
try {
this.arrayAndItemsNullableProp.get().add(arrayAndItemsNullablePropItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get arrayAndItemsNullableProp
* @return arrayAndItemsNullableProp
*/
@jakarta.annotation.Nullable
@JsonIgnore
public List<Object> getArrayAndItemsNullableProp() {
return arrayAndItemsNullableProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<List<Object>> getArrayAndItemsNullableProp_JsonNullable() {
return arrayAndItemsNullableProp;
}
@JsonProperty(JSON_PROPERTY_ARRAY_AND_ITEMS_NULLABLE_PROP)
public void setArrayAndItemsNullableProp_JsonNullable(JsonNullable<List<Object>> arrayAndItemsNullableProp) {
this.arrayAndItemsNullableProp = arrayAndItemsNullableProp;
}
public void setArrayAndItemsNullableProp(@jakarta.annotation.Nullable List<Object> arrayAndItemsNullableProp) {
this.arrayAndItemsNullableProp = JsonNullable.<List<Object>>of(arrayAndItemsNullableProp);
}
public NullableClass arrayItemsNullable(@jakarta.annotation.Nullable List<Object> arrayItemsNullable) {
this.arrayItemsNullable = arrayItemsNullable;
return this;
}
public NullableClass addArrayItemsNullableItem(Object arrayItemsNullableItem) {
if (this.arrayItemsNullable == null) {
this.arrayItemsNullable = new ArrayList<>();
}
this.arrayItemsNullable.add(arrayItemsNullableItem);
return this;
}
/**
* Get arrayItemsNullable
* @return arrayItemsNullable
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<Object> getArrayItemsNullable() {
return arrayItemsNullable;
}
@JsonProperty(JSON_PROPERTY_ARRAY_ITEMS_NULLABLE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setArrayItemsNullable(@jakarta.annotation.Nullable List<Object> arrayItemsNullable) {
this.arrayItemsNullable = arrayItemsNullable;
}
public NullableClass objectNullableProp(@jakarta.annotation.Nullable Map<String, Object> objectNullableProp) {
this.objectNullableProp = JsonNullable.<Map<String, Object>>of(objectNullableProp);
return this;
}
public NullableClass putObjectNullablePropItem(String key, Object objectNullablePropItem) {
if (this.objectNullableProp == null || !this.objectNullableProp.isPresent()) {
this.objectNullableProp = JsonNullable.<Map<String, Object>>of(new HashMap<>());
}
try {
this.objectNullableProp.get().put(key, objectNullablePropItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get objectNullableProp
* @return objectNullableProp
*/
@jakarta.annotation.Nullable
@JsonIgnore
public Map<String, Object> getObjectNullableProp() {
return objectNullableProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Map<String, Object>> getObjectNullableProp_JsonNullable() {
return objectNullableProp;
}
@JsonProperty(JSON_PROPERTY_OBJECT_NULLABLE_PROP)
public void setObjectNullableProp_JsonNullable(JsonNullable<Map<String, Object>> objectNullableProp) {
this.objectNullableProp = objectNullableProp;
}
public void setObjectNullableProp(@jakarta.annotation.Nullable Map<String, Object> objectNullableProp) {
this.objectNullableProp = JsonNullable.<Map<String, Object>>of(objectNullableProp);
}
public NullableClass objectAndItemsNullableProp(@jakarta.annotation.Nullable Map<String, Object> objectAndItemsNullableProp) {
this.objectAndItemsNullableProp = JsonNullable.<Map<String, Object>>of(objectAndItemsNullableProp);
return this;
}
public NullableClass putObjectAndItemsNullablePropItem(String key, Object objectAndItemsNullablePropItem) {
if (this.objectAndItemsNullableProp == null || !this.objectAndItemsNullableProp.isPresent()) {
this.objectAndItemsNullableProp = JsonNullable.<Map<String, Object>>of(new HashMap<>());
}
try {
this.objectAndItemsNullableProp.get().put(key, objectAndItemsNullablePropItem);
} catch (java.util.NoSuchElementException e) {
// this can never happen, as we make sure above that the value is present
}
return this;
}
/**
* Get objectAndItemsNullableProp
* @return objectAndItemsNullableProp
*/
@jakarta.annotation.Nullable
@JsonIgnore
public Map<String, Object> getObjectAndItemsNullableProp() {
return objectAndItemsNullableProp.orElse(null);
}
@JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<Map<String, Object>> getObjectAndItemsNullableProp_JsonNullable() {
return objectAndItemsNullableProp;
}
@JsonProperty(JSON_PROPERTY_OBJECT_AND_ITEMS_NULLABLE_PROP)
public void setObjectAndItemsNullableProp_JsonNullable(JsonNullable<Map<String, Object>> objectAndItemsNullableProp) {
this.objectAndItemsNullableProp = objectAndItemsNullableProp;
}
public void setObjectAndItemsNullableProp(@jakarta.annotation.Nullable Map<String, Object> objectAndItemsNullableProp) {
this.objectAndItemsNullableProp = JsonNullable.<Map<String, Object>>of(objectAndItemsNullableProp);
}
public NullableClass objectItemsNullable(@jakarta.annotation.Nullable Map<String, Object> objectItemsNullable) {
this.objectItemsNullable = objectItemsNullable;
return this;
}
public NullableClass putObjectItemsNullableItem(String key, Object objectItemsNullableItem) {
if (this.objectItemsNullable == null) {
this.objectItemsNullable = new HashMap<>();
}
this.objectItemsNullable.put(key, objectItemsNullableItem);
return this;
}
/**
* Get objectItemsNullable
* @return objectItemsNullable
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
public Map<String, Object> getObjectItemsNullable() {
return objectItemsNullable;
}
@JsonProperty(JSON_PROPERTY_OBJECT_ITEMS_NULLABLE)
@JsonInclude(content = JsonInclude.Include.ALWAYS, value = JsonInclude.Include.USE_DEFAULTS)
public void setObjectItemsNullable(@jakarta.annotation.Nullable Map<String, Object> objectItemsNullable) {
this.objectItemsNullable = objectItemsNullable;
}
/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
* the 'additionalProperties' keyword in the OAS document.
*/
private Map<String, Object> additionalProperties;
/**
* Set the additional (undeclared) property with the specified name and value.
* If the property does not already exist, create it otherwise replace it.
* @param key the name of the property
* @param value the value of the property
* @return self reference
*/
@JsonAnySetter
public NullableClass putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap<String, Object>();
}
this.additionalProperties.put(key, value);
return this;
}
/**
* Return the additional (undeclared) properties.
* @return the additional (undeclared) properties
*/
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return additionalProperties;
}
/**
* Return the additional (undeclared) property with the specified name.
* @param key the name of the property
* @return the additional (undeclared) property with the specified name
*/
public Object getAdditionalProperty(String key) {
if (this.additionalProperties == null) {
return null;
}
return this.additionalProperties.get(key);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NullableClass nullableClass = (NullableClass) o;
return equalsNullable(this.integerProp, nullableClass.integerProp) &&
equalsNullable(this.numberProp, nullableClass.numberProp) &&
equalsNullable(this.booleanProp, nullableClass.booleanProp) &&
equalsNullable(this.stringProp, nullableClass.stringProp) &&
equalsNullable(this.dateProp, nullableClass.dateProp) &&
equalsNullable(this.datetimeProp, nullableClass.datetimeProp) &&
equalsNullable(this.arrayNullableProp, nullableClass.arrayNullableProp) &&
equalsNullable(this.arrayAndItemsNullableProp, nullableClass.arrayAndItemsNullableProp) &&
Objects.equals(this.arrayItemsNullable, nullableClass.arrayItemsNullable) &&
equalsNullable(this.objectNullableProp, nullableClass.objectNullableProp) &&
equalsNullable(this.objectAndItemsNullableProp, nullableClass.objectAndItemsNullableProp) &&
Objects.equals(this.objectItemsNullable, nullableClass.objectItemsNullable) &&
Objects.equals(this.additionalProperties, nullableClass.additionalProperties);
}
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(hashCodeNullable(integerProp), hashCodeNullable(numberProp), hashCodeNullable(booleanProp), hashCodeNullable(stringProp), hashCodeNullable(dateProp), hashCodeNullable(datetimeProp), hashCodeNullable(arrayNullableProp), hashCodeNullable(arrayAndItemsNullableProp), arrayItemsNullable, hashCodeNullable(objectNullableProp), hashCodeNullable(objectAndItemsNullableProp), objectItemsNullable, additionalProperties);
}
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 NullableClass {\n");
sb.append(" integerProp: ").append(toIndentedString(integerProp)).append("\n");
sb.append(" numberProp: ").append(toIndentedString(numberProp)).append("\n");
sb.append(" booleanProp: ").append(toIndentedString(booleanProp)).append("\n");
sb.append(" stringProp: ").append(toIndentedString(stringProp)).append("\n");
sb.append(" dateProp: ").append(toIndentedString(dateProp)).append("\n");
sb.append(" datetimeProp: ").append(toIndentedString(datetimeProp)).append("\n");
sb.append(" arrayNullableProp: ").append(toIndentedString(arrayNullableProp)).append("\n");
sb.append(" arrayAndItemsNullableProp: ").append(toIndentedString(arrayAndItemsNullableProp)).append("\n");
sb.append(" arrayItemsNullable: ").append(toIndentedString(arrayItemsNullable)).append("\n");
sb.append(" objectNullableProp: ").append(toIndentedString(objectNullableProp)).append("\n");
sb.append(" objectAndItemsNullableProp: ").append(toIndentedString(objectAndItemsNullableProp)).append("\n");
sb.append(" objectItemsNullable: ").append(toIndentedString(objectItemsNullable)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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,106 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* NumberOnly
*/
@JsonPropertyOrder({
NumberOnly.JSON_PROPERTY_JUST_NUMBER
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class NumberOnly {
public static final String JSON_PROPERTY_JUST_NUMBER = "JustNumber";
@jakarta.annotation.Nullable
private BigDecimal justNumber;
public NumberOnly() {
}
public NumberOnly justNumber(@jakarta.annotation.Nullable BigDecimal justNumber) {
this.justNumber = justNumber;
return this;
}
/**
* Get justNumber
* @return justNumber
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_JUST_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BigDecimal getJustNumber() {
return justNumber;
}
@JsonProperty(JSON_PROPERTY_JUST_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setJustNumber(@jakarta.annotation.Nullable BigDecimal justNumber) {
this.justNumber = justNumber;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
NumberOnly numberOnly = (NumberOnly) o;
return Objects.equals(this.justNumber, numberOnly.justNumber);
}
@Override
public int hashCode() {
return Objects.hash(justNumber);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class NumberOnly {\n");
sb.append(" justNumber: ").append(toIndentedString(justNumber)).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,220 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.openapitools.client.model.DeprecatedObject;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* ObjectWithDeprecatedFields
*/
@JsonPropertyOrder({
ObjectWithDeprecatedFields.JSON_PROPERTY_UUID,
ObjectWithDeprecatedFields.JSON_PROPERTY_ID,
ObjectWithDeprecatedFields.JSON_PROPERTY_DEPRECATED_REF,
ObjectWithDeprecatedFields.JSON_PROPERTY_BARS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class ObjectWithDeprecatedFields {
public static final String JSON_PROPERTY_UUID = "uuid";
@jakarta.annotation.Nullable
private String uuid;
public static final String JSON_PROPERTY_ID = "id";
@jakarta.annotation.Nullable
private BigDecimal id;
public static final String JSON_PROPERTY_DEPRECATED_REF = "deprecatedRef";
@jakarta.annotation.Nullable
private DeprecatedObject deprecatedRef;
public static final String JSON_PROPERTY_BARS = "bars";
@jakarta.annotation.Nullable
private List<String> bars = new ArrayList<>();
public ObjectWithDeprecatedFields() {
}
public ObjectWithDeprecatedFields uuid(@jakarta.annotation.Nullable String uuid) {
this.uuid = uuid;
return this;
}
/**
* Get uuid
* @return uuid
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getUuid() {
return uuid;
}
@JsonProperty(JSON_PROPERTY_UUID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUuid(@jakarta.annotation.Nullable String uuid) {
this.uuid = uuid;
}
public ObjectWithDeprecatedFields id(@jakarta.annotation.Nullable BigDecimal id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
* @deprecated
*/
@Deprecated
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BigDecimal getId() {
return id;
}
@JsonProperty(JSON_PROPERTY_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setId(@jakarta.annotation.Nullable BigDecimal id) {
this.id = id;
}
public ObjectWithDeprecatedFields deprecatedRef(@jakarta.annotation.Nullable DeprecatedObject deprecatedRef) {
this.deprecatedRef = deprecatedRef;
return this;
}
/**
* Get deprecatedRef
* @return deprecatedRef
* @deprecated
*/
@Deprecated
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_DEPRECATED_REF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public DeprecatedObject getDeprecatedRef() {
return deprecatedRef;
}
@JsonProperty(JSON_PROPERTY_DEPRECATED_REF)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setDeprecatedRef(@jakarta.annotation.Nullable DeprecatedObject deprecatedRef) {
this.deprecatedRef = deprecatedRef;
}
public ObjectWithDeprecatedFields bars(@jakarta.annotation.Nullable List<String> bars) {
this.bars = bars;
return this;
}
public ObjectWithDeprecatedFields addBarsItem(String barsItem) {
if (this.bars == null) {
this.bars = new ArrayList<>();
}
this.bars.add(barsItem);
return this;
}
/**
* Get bars
* @return bars
* @deprecated
*/
@Deprecated
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_BARS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getBars() {
return bars;
}
@JsonProperty(JSON_PROPERTY_BARS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBars(@jakarta.annotation.Nullable List<String> bars) {
this.bars = bars;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ObjectWithDeprecatedFields objectWithDeprecatedFields = (ObjectWithDeprecatedFields) o;
return Objects.equals(this.uuid, objectWithDeprecatedFields.uuid) &&
Objects.equals(this.id, objectWithDeprecatedFields.id) &&
Objects.equals(this.deprecatedRef, objectWithDeprecatedFields.deprecatedRef) &&
Objects.equals(this.bars, objectWithDeprecatedFields.bars);
}
@Override
public int hashCode() {
return Objects.hash(uuid, id, deprecatedRef, bars);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ObjectWithDeprecatedFields {\n");
sb.append(" uuid: ").append(toIndentedString(uuid)).append("\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" deprecatedRef: ").append(toIndentedString(deprecatedRef)).append("\n");
sb.append(" bars: ").append(toIndentedString(bars)).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,303 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Order
*/
@JsonPropertyOrder({
Order.JSON_PROPERTY_ID,
Order.JSON_PROPERTY_PET_ID,
Order.JSON_PROPERTY_QUANTITY,
Order.JSON_PROPERTY_SHIP_DATE,
Order.JSON_PROPERTY_STATUS,
Order.JSON_PROPERTY_COMPLETE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class Order {
public static final String JSON_PROPERTY_ID = "id";
@jakarta.annotation.Nullable
private Long id;
public static final String JSON_PROPERTY_PET_ID = "petId";
@jakarta.annotation.Nullable
private Long petId;
public static final String JSON_PROPERTY_QUANTITY = "quantity";
@jakarta.annotation.Nullable
private Integer quantity;
public static final String JSON_PROPERTY_SHIP_DATE = "shipDate";
@jakarta.annotation.Nullable
private OffsetDateTime shipDate;
/**
* Order Status
*/
public enum StatusEnum {
PLACED(String.valueOf("placed")),
APPROVED(String.valueOf("approved")),
DELIVERED(String.valueOf("delivered"));
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";
@jakarta.annotation.Nullable
private StatusEnum status;
public static final String JSON_PROPERTY_COMPLETE = "complete";
@jakarta.annotation.Nullable
private Boolean complete = false;
public Order() {
}
public Order id(@jakarta.annotation.Nullable Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
*/
@jakarta.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(@jakarta.annotation.Nullable Long id) {
this.id = id;
}
public Order petId(@jakarta.annotation.Nullable Long petId) {
this.petId = petId;
return this;
}
/**
* Get petId
* @return petId
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PET_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long getPetId() {
return petId;
}
@JsonProperty(JSON_PROPERTY_PET_ID)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPetId(@jakarta.annotation.Nullable Long petId) {
this.petId = petId;
}
public Order quantity(@jakarta.annotation.Nullable Integer quantity) {
this.quantity = quantity;
return this;
}
/**
* Get quantity
* @return quantity
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_QUANTITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getQuantity() {
return quantity;
}
@JsonProperty(JSON_PROPERTY_QUANTITY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setQuantity(@jakarta.annotation.Nullable Integer quantity) {
this.quantity = quantity;
}
public Order shipDate(@jakarta.annotation.Nullable OffsetDateTime shipDate) {
this.shipDate = shipDate;
return this;
}
/**
* Get shipDate
* @return shipDate
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SHIP_DATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public OffsetDateTime getShipDate() {
return shipDate;
}
@JsonProperty(JSON_PROPERTY_SHIP_DATE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setShipDate(@jakarta.annotation.Nullable OffsetDateTime shipDate) {
this.shipDate = shipDate;
}
public Order status(@jakarta.annotation.Nullable StatusEnum status) {
this.status = status;
return this;
}
/**
* Order Status
* @return status
*/
@jakarta.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(@jakarta.annotation.Nullable StatusEnum status) {
this.status = status;
}
public Order complete(@jakarta.annotation.Nullable Boolean complete) {
this.complete = complete;
return this;
}
/**
* Get complete
* @return complete
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_COMPLETE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getComplete() {
return complete;
}
@JsonProperty(JSON_PROPERTY_COMPLETE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setComplete(@jakarta.annotation.Nullable Boolean complete) {
this.complete = complete;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Order order = (Order) o;
return Objects.equals(this.id, order.id) &&
Objects.equals(this.petId, order.petId) &&
Objects.equals(this.quantity, order.quantity) &&
Objects.equals(this.shipDate, order.shipDate) &&
Objects.equals(this.status, order.status) &&
Objects.equals(this.complete, order.complete);
}
@Override
public int hashCode() {
return Objects.hash(id, petId, quantity, shipDate, status, complete);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class Order {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" petId: ").append(toIndentedString(petId)).append("\n");
sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
sb.append(" shipDate: ").append(toIndentedString(shipDate)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" complete: ").append(toIndentedString(complete)).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 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* OuterComposite
*/
@JsonPropertyOrder({
OuterComposite.JSON_PROPERTY_MY_NUMBER,
OuterComposite.JSON_PROPERTY_MY_STRING,
OuterComposite.JSON_PROPERTY_MY_BOOLEAN
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class OuterComposite {
public static final String JSON_PROPERTY_MY_NUMBER = "my_number";
@jakarta.annotation.Nullable
private BigDecimal myNumber;
public static final String JSON_PROPERTY_MY_STRING = "my_string";
@jakarta.annotation.Nullable
private String myString;
public static final String JSON_PROPERTY_MY_BOOLEAN = "my_boolean";
@jakarta.annotation.Nullable
private Boolean myBoolean;
public OuterComposite() {
}
public OuterComposite myNumber(@jakarta.annotation.Nullable BigDecimal myNumber) {
this.myNumber = myNumber;
return this;
}
/**
* Get myNumber
* @return myNumber
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MY_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public BigDecimal getMyNumber() {
return myNumber;
}
@JsonProperty(JSON_PROPERTY_MY_NUMBER)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMyNumber(@jakarta.annotation.Nullable BigDecimal myNumber) {
this.myNumber = myNumber;
}
public OuterComposite myString(@jakarta.annotation.Nullable String myString) {
this.myString = myString;
return this;
}
/**
* Get myString
* @return myString
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getMyString() {
return myString;
}
@JsonProperty(JSON_PROPERTY_MY_STRING)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMyString(@jakarta.annotation.Nullable String myString) {
this.myString = myString;
}
public OuterComposite myBoolean(@jakarta.annotation.Nullable Boolean myBoolean) {
this.myBoolean = myBoolean;
return this;
}
/**
* Get myBoolean
* @return myBoolean
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_MY_BOOLEAN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Boolean getMyBoolean() {
return myBoolean;
}
@JsonProperty(JSON_PROPERTY_MY_BOOLEAN)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setMyBoolean(@jakarta.annotation.Nullable Boolean myBoolean) {
this.myBoolean = myBoolean;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OuterComposite outerComposite = (OuterComposite) o;
return Objects.equals(this.myNumber, outerComposite.myNumber) &&
Objects.equals(this.myString, outerComposite.myString) &&
Objects.equals(this.myBoolean, outerComposite.myBoolean);
}
@Override
public int hashCode() {
return Objects.hash(myNumber, myString, myBoolean);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OuterComposite {\n");
sb.append(" myNumber: ").append(toIndentedString(myNumber)).append("\n");
sb.append(" myString: ").append(toIndentedString(myString)).append("\n");
sb.append(" myBoolean: ").append(toIndentedString(myBoolean)).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 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 OuterEnum
*/
public enum OuterEnum {
PLACED("placed"),
APPROVED("approved"),
DELIVERED("delivered");
private String value;
OuterEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OuterEnum fromValue(String value) {
for (OuterEnum b : OuterEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
return null;
}
}

View File

@@ -0,0 +1,61 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 OuterEnumDefaultValue
*/
public enum OuterEnumDefaultValue {
PLACED("placed"),
APPROVED("approved"),
DELIVERED("delivered");
private String value;
OuterEnumDefaultValue(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OuterEnumDefaultValue fromValue(String value) {
for (OuterEnumDefaultValue b : OuterEnumDefaultValue.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@@ -0,0 +1,61 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 OuterEnumInteger
*/
public enum OuterEnumInteger {
NUMBER_0(0),
NUMBER_1(1),
NUMBER_2(2);
private Integer value;
OuterEnumInteger(Integer value) {
this.value = value;
}
@JsonValue
public Integer getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OuterEnumInteger fromValue(Integer value) {
for (OuterEnumInteger b : OuterEnumInteger.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@@ -0,0 +1,61 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 OuterEnumIntegerDefaultValue
*/
public enum OuterEnumIntegerDefaultValue {
NUMBER_0(0),
NUMBER_1(1),
NUMBER_2(2);
private Integer value;
OuterEnumIntegerDefaultValue(Integer value) {
this.value = value;
}
@JsonValue
public Integer getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static OuterEnumIntegerDefaultValue fromValue(Integer value) {
for (OuterEnumIntegerDefaultValue b : OuterEnumIntegerDefaultValue.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@@ -0,0 +1,106 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 org.openapitools.client.model.OuterEnumInteger;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* OuterObjectWithEnumProperty
*/
@JsonPropertyOrder({
OuterObjectWithEnumProperty.JSON_PROPERTY_VALUE
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class OuterObjectWithEnumProperty {
public static final String JSON_PROPERTY_VALUE = "value";
@jakarta.annotation.Nonnull
private OuterEnumInteger value;
public OuterObjectWithEnumProperty() {
}
public OuterObjectWithEnumProperty value(@jakarta.annotation.Nonnull OuterEnumInteger value) {
this.value = value;
return this;
}
/**
* Get value
* @return value
*/
@jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_VALUE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public OuterEnumInteger getValue() {
return value;
}
@JsonProperty(JSON_PROPERTY_VALUE)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setValue(@jakarta.annotation.Nonnull OuterEnumInteger value) {
this.value = value;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OuterObjectWithEnumProperty outerObjectWithEnumProperty = (OuterObjectWithEnumProperty) o;
return Objects.equals(this.value, outerObjectWithEnumProperty.value);
}
@Override
public int hashCode() {
return Objects.hash(value);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OuterObjectWithEnumProperty {\n");
sb.append(" value: ").append(toIndentedString(value)).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,205 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
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;
/**
* ParentWithNullable
*/
@JsonPropertyOrder({
ParentWithNullable.JSON_PROPERTY_TYPE,
ParentWithNullable.JSON_PROPERTY_NULLABLE_PROPERTY
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
@JsonIgnoreProperties(
value = "type", // ignore manually set type, it will be automatically generated by Jackson during serialization
allowSetters = true // allows the type to be set during deserialization
)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.PROPERTY, property = "type", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = ChildWithNullable.class, name = "ChildWithNullable"),
})
public class ParentWithNullable {
/**
* Gets or Sets type
*/
public enum TypeEnum {
CHILD_WITH_NULLABLE(String.valueOf("ChildWithNullable"));
private String value;
TypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static TypeEnum fromValue(String value) {
for (TypeEnum b : TypeEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}
public static final String JSON_PROPERTY_TYPE = "type";
@jakarta.annotation.Nullable
protected TypeEnum type;
public static final String JSON_PROPERTY_NULLABLE_PROPERTY = "nullableProperty";
@jakarta.annotation.Nullable
protected JsonNullable<String> nullableProperty = JsonNullable.<String>undefined();
public ParentWithNullable() {
}
public ParentWithNullable type(@jakarta.annotation.Nullable TypeEnum type) {
this.type = type;
return this;
}
/**
* Get type
* @return type
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public TypeEnum getType() {
return type;
}
@JsonProperty(JSON_PROPERTY_TYPE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setType(@jakarta.annotation.Nullable TypeEnum type) {
this.type = type;
}
public ParentWithNullable nullableProperty(@jakarta.annotation.Nullable String nullableProperty) {
this.nullableProperty = JsonNullable.<String>of(nullableProperty);
return this;
}
/**
* Get nullableProperty
* @return nullableProperty
*/
@jakarta.annotation.Nullable
@JsonIgnore
public String getNullableProperty() {
return nullableProperty.orElse(null);
}
@JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<String> getNullableProperty_JsonNullable() {
return nullableProperty;
}
@JsonProperty(JSON_PROPERTY_NULLABLE_PROPERTY)
public void setNullableProperty_JsonNullable(JsonNullable<String> nullableProperty) {
this.nullableProperty = nullableProperty;
}
public void setNullableProperty(@jakarta.annotation.Nullable String nullableProperty) {
this.nullableProperty = JsonNullable.<String>of(nullableProperty);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ParentWithNullable parentWithNullable = (ParentWithNullable) o;
return Objects.equals(this.type, parentWithNullable.type) &&
equalsNullable(this.nullableProperty, parentWithNullable.nullableProperty);
}
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(type, hashCodeNullable(nullableProperty));
}
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 ParentWithNullable {\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" nullableProperty: ").append(toIndentedString(nullableProperty)).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,327 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.databind.annotation.JsonDeserialize;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
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_CATEGORY,
Pet.JSON_PROPERTY_NAME,
Pet.JSON_PROPERTY_PHOTO_URLS,
Pet.JSON_PROPERTY_TAGS,
Pet.JSON_PROPERTY_STATUS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class Pet {
public static final String JSON_PROPERTY_ID = "id";
@jakarta.annotation.Nullable
private Long id;
public static final String JSON_PROPERTY_CATEGORY = "category";
@jakarta.annotation.Nullable
private Category category;
public static final String JSON_PROPERTY_NAME = "name";
@jakarta.annotation.Nonnull
private String name;
public static final String JSON_PROPERTY_PHOTO_URLS = "photoUrls";
@jakarta.annotation.Nonnull
private Set<String> photoUrls = new LinkedHashSet<>();
public static final String JSON_PROPERTY_TAGS = "tags";
@jakarta.annotation.Nullable
private List<Tag> tags = new ArrayList<>();
/**
* pet status in the store
*/
public enum StatusEnum {
AVAILABLE(String.valueOf("available")),
PENDING(String.valueOf("pending")),
SOLD(String.valueOf("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";
@jakarta.annotation.Nullable
private StatusEnum status;
public Pet() {
}
public Pet id(@jakarta.annotation.Nullable Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
*/
@jakarta.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(@jakarta.annotation.Nullable Long id) {
this.id = id;
}
public Pet category(@jakarta.annotation.Nullable Category category) {
this.category = category;
return this;
}
/**
* Get category
* @return category
*/
@jakarta.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(@jakarta.annotation.Nullable Category category) {
this.category = category;
}
public Pet name(@jakarta.annotation.Nonnull String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
*/
@jakarta.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(@jakarta.annotation.Nonnull String name) {
this.name = name;
}
public Pet photoUrls(@jakarta.annotation.Nonnull Set<String> photoUrls) {
this.photoUrls = photoUrls;
return this;
}
public Pet addPhotoUrlsItem(String photoUrlsItem) {
if (this.photoUrls == null) {
this.photoUrls = new LinkedHashSet<>();
}
this.photoUrls.add(photoUrlsItem);
return this;
}
/**
* Get photoUrls
* @return photoUrls
*/
@jakarta.annotation.Nonnull
@JsonProperty(JSON_PROPERTY_PHOTO_URLS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public Set<String> getPhotoUrls() {
return photoUrls;
}
@JsonDeserialize(as = LinkedHashSet.class)
@JsonProperty(JSON_PROPERTY_PHOTO_URLS)
@JsonInclude(value = JsonInclude.Include.ALWAYS)
public void setPhotoUrls(@jakarta.annotation.Nonnull Set<String> photoUrls) {
this.photoUrls = photoUrls;
}
public Pet tags(@jakarta.annotation.Nullable 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
*/
@jakarta.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(@jakarta.annotation.Nullable List<Tag> tags) {
this.tags = tags;
}
public Pet status(@jakarta.annotation.Nullable StatusEnum status) {
this.status = status;
return this;
}
/**
* pet status in the store
* @return status
*/
@jakarta.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(@jakarta.annotation.Nullable 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.category, pet.category) &&
Objects.equals(this.name, pet.name) &&
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, category, name, 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(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).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,136 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* ReadOnlyFirst
*/
@JsonPropertyOrder({
ReadOnlyFirst.JSON_PROPERTY_BAR,
ReadOnlyFirst.JSON_PROPERTY_BAZ
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class ReadOnlyFirst {
public static final String JSON_PROPERTY_BAR = "bar";
@jakarta.annotation.Nullable
private String bar;
public static final String JSON_PROPERTY_BAZ = "baz";
@jakarta.annotation.Nullable
private String baz;
public ReadOnlyFirst() {
}
/**
* Constructor with only readonly parameters
*/
@JsonCreator
public ReadOnlyFirst(
@JsonProperty(JSON_PROPERTY_BAR) String bar
) {
this();
this.bar = bar;
}
/**
* Get bar
* @return bar
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_BAR)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBar() {
return bar;
}
public ReadOnlyFirst baz(@jakarta.annotation.Nullable String baz) {
this.baz = baz;
return this;
}
/**
* Get baz
* @return baz
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_BAZ)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getBaz() {
return baz;
}
@JsonProperty(JSON_PROPERTY_BAZ)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setBaz(@jakarta.annotation.Nullable String baz) {
this.baz = baz;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ReadOnlyFirst readOnlyFirst = (ReadOnlyFirst) o;
return Objects.equals(this.bar, readOnlyFirst.bar) &&
Objects.equals(this.baz, readOnlyFirst.baz);
}
@Override
public int hashCode() {
return Objects.hash(bar, baz);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ReadOnlyFirst {\n");
sb.append(" bar: ").append(toIndentedString(bar)).append("\n");
sb.append(" baz: ").append(toIndentedString(baz)).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,59 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 SingleRefType
*/
public enum SingleRefType {
ADMIN("admin"),
USER("user");
private String value;
SingleRefType(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static SingleRefType fromValue(String value) {
for (SingleRefType b : SingleRefType.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

View File

@@ -0,0 +1,106 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* SpecialModelName
*/
@JsonPropertyOrder({
SpecialModelName.JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME
})
@JsonTypeName("_special_model.name_")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class SpecialModelName {
public static final String JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME = "$special[property.name]";
@jakarta.annotation.Nullable
private Long $specialPropertyName;
public SpecialModelName() {
}
public SpecialModelName $specialPropertyName(@jakarta.annotation.Nullable Long $specialPropertyName) {
this.$specialPropertyName = $specialPropertyName;
return this;
}
/**
* Get $specialPropertyName
* @return $specialPropertyName
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Long get$SpecialPropertyName() {
return $specialPropertyName;
}
@JsonProperty(JSON_PROPERTY_$_SPECIAL_PROPERTY_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void set$SpecialPropertyName(@jakarta.annotation.Nullable Long $specialPropertyName) {
this.$specialPropertyName = $specialPropertyName;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SpecialModelName specialModelName = (SpecialModelName) o;
return Objects.equals(this.$specialPropertyName, specialModelName.$specialPropertyName);
}
@Override
public int hashCode() {
return Objects.hash($specialPropertyName);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SpecialModelName {\n");
sb.append(" $specialPropertyName: ").append(toIndentedString($specialPropertyName)).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,137 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class Tag {
public static final String JSON_PROPERTY_ID = "id";
@jakarta.annotation.Nullable
private Long id;
public static final String JSON_PROPERTY_NAME = "name";
@jakarta.annotation.Nullable
private String name;
public Tag() {
}
public Tag id(@jakarta.annotation.Nullable Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
*/
@jakarta.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(@jakarta.annotation.Nullable Long id) {
this.id = id;
}
public Tag name(@jakarta.annotation.Nullable String name) {
this.name = name;
return this;
}
/**
* Get name
* @return name
*/
@jakarta.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(@jakarta.annotation.Nullable 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,155 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.Map;
import java.util.HashMap;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
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;
/**
* TestInlineFreeformAdditionalPropertiesRequest
*/
@JsonPropertyOrder({
TestInlineFreeformAdditionalPropertiesRequest.JSON_PROPERTY_SOME_PROPERTY
})
@JsonTypeName("testInlineFreeformAdditionalProperties_request")
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class TestInlineFreeformAdditionalPropertiesRequest {
public static final String JSON_PROPERTY_SOME_PROPERTY = "someProperty";
@jakarta.annotation.Nullable
private String someProperty;
public TestInlineFreeformAdditionalPropertiesRequest() {
}
public TestInlineFreeformAdditionalPropertiesRequest someProperty(@jakarta.annotation.Nullable String someProperty) {
this.someProperty = someProperty;
return this;
}
/**
* Get someProperty
* @return someProperty
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_SOME_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getSomeProperty() {
return someProperty;
}
@JsonProperty(JSON_PROPERTY_SOME_PROPERTY)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setSomeProperty(@jakarta.annotation.Nullable String someProperty) {
this.someProperty = someProperty;
}
/**
* A container for additional, undeclared properties.
* This is a holder for any undeclared properties as specified with
* the 'additionalProperties' keyword in the OAS document.
*/
private Map<String, Object> additionalProperties;
/**
* Set the additional (undeclared) property with the specified name and value.
* If the property does not already exist, create it otherwise replace it.
* @param key the name of the property
* @param value the value of the property
* @return self reference
*/
@JsonAnySetter
public TestInlineFreeformAdditionalPropertiesRequest putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap<String, Object>();
}
this.additionalProperties.put(key, value);
return this;
}
/**
* Return the additional (undeclared) properties.
* @return the additional (undeclared) properties
*/
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return additionalProperties;
}
/**
* Return the additional (undeclared) property with the specified name.
* @param key the name of the property
* @return the additional (undeclared) property with the specified name
*/
public Object getAdditionalProperty(String key) {
if (this.additionalProperties == null) {
return null;
}
return this.additionalProperties.get(key);
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = (TestInlineFreeformAdditionalPropertiesRequest) o;
return Objects.equals(this.someProperty, testInlineFreeformAdditionalPropertiesRequest.someProperty) &&
Objects.equals(this.additionalProperties, testInlineFreeformAdditionalPropertiesRequest.additionalProperties);
}
@Override
public int hashCode() {
return Objects.hash(someProperty, additionalProperties);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TestInlineFreeformAdditionalPropertiesRequest {\n");
sb.append(" someProperty: ").append(toIndentedString(someProperty)).append("\n");
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).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,329 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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;
/**
* User
*/
@JsonPropertyOrder({
User.JSON_PROPERTY_ID,
User.JSON_PROPERTY_USERNAME,
User.JSON_PROPERTY_FIRST_NAME,
User.JSON_PROPERTY_LAST_NAME,
User.JSON_PROPERTY_EMAIL,
User.JSON_PROPERTY_PASSWORD,
User.JSON_PROPERTY_PHONE,
User.JSON_PROPERTY_USER_STATUS
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.13.0-SNAPSHOT")
public class User {
public static final String JSON_PROPERTY_ID = "id";
@jakarta.annotation.Nullable
private Long id;
public static final String JSON_PROPERTY_USERNAME = "username";
@jakarta.annotation.Nullable
private String username;
public static final String JSON_PROPERTY_FIRST_NAME = "firstName";
@jakarta.annotation.Nullable
private String firstName;
public static final String JSON_PROPERTY_LAST_NAME = "lastName";
@jakarta.annotation.Nullable
private String lastName;
public static final String JSON_PROPERTY_EMAIL = "email";
@jakarta.annotation.Nullable
private String email;
public static final String JSON_PROPERTY_PASSWORD = "password";
@jakarta.annotation.Nullable
private String password;
public static final String JSON_PROPERTY_PHONE = "phone";
@jakarta.annotation.Nullable
private String phone;
public static final String JSON_PROPERTY_USER_STATUS = "userStatus";
@jakarta.annotation.Nullable
private Integer userStatus;
public User() {
}
public User id(@jakarta.annotation.Nullable Long id) {
this.id = id;
return this;
}
/**
* Get id
* @return id
*/
@jakarta.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(@jakarta.annotation.Nullable Long id) {
this.id = id;
}
public User username(@jakarta.annotation.Nullable String username) {
this.username = username;
return this;
}
/**
* Get username
* @return username
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_USERNAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getUsername() {
return username;
}
@JsonProperty(JSON_PROPERTY_USERNAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUsername(@jakarta.annotation.Nullable String username) {
this.username = username;
}
public User firstName(@jakarta.annotation.Nullable String firstName) {
this.firstName = firstName;
return this;
}
/**
* Get firstName
* @return firstName
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_FIRST_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getFirstName() {
return firstName;
}
@JsonProperty(JSON_PROPERTY_FIRST_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setFirstName(@jakarta.annotation.Nullable String firstName) {
this.firstName = firstName;
}
public User lastName(@jakarta.annotation.Nullable String lastName) {
this.lastName = lastName;
return this;
}
/**
* Get lastName
* @return lastName
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_LAST_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getLastName() {
return lastName;
}
@JsonProperty(JSON_PROPERTY_LAST_NAME)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setLastName(@jakarta.annotation.Nullable String lastName) {
this.lastName = lastName;
}
public User email(@jakarta.annotation.Nullable String email) {
this.email = email;
return this;
}
/**
* Get email
* @return email
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_EMAIL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getEmail() {
return email;
}
@JsonProperty(JSON_PROPERTY_EMAIL)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setEmail(@jakarta.annotation.Nullable String email) {
this.email = email;
}
public User password(@jakarta.annotation.Nullable String password) {
this.password = password;
return this;
}
/**
* Get password
* @return password
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PASSWORD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPassword() {
return password;
}
@JsonProperty(JSON_PROPERTY_PASSWORD)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPassword(@jakarta.annotation.Nullable String password) {
this.password = password;
}
public User phone(@jakarta.annotation.Nullable String phone) {
this.phone = phone;
return this;
}
/**
* Get phone
* @return phone
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_PHONE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public String getPhone() {
return phone;
}
@JsonProperty(JSON_PROPERTY_PHONE)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setPhone(@jakarta.annotation.Nullable String phone) {
this.phone = phone;
}
public User userStatus(@jakarta.annotation.Nullable Integer userStatus) {
this.userStatus = userStatus;
return this;
}
/**
* User Status
* @return userStatus
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_USER_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public Integer getUserStatus() {
return userStatus;
}
@JsonProperty(JSON_PROPERTY_USER_STATUS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public void setUserStatus(@jakarta.annotation.Nullable Integer userStatus) {
this.userStatus = userStatus;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
User user = (User) o;
return Objects.equals(this.id, user.id) &&
Objects.equals(this.username, user.username) &&
Objects.equals(this.firstName, user.firstName) &&
Objects.equals(this.lastName, user.lastName) &&
Objects.equals(this.email, user.email) &&
Objects.equals(this.password, user.password) &&
Objects.equals(this.phone, user.phone) &&
Objects.equals(this.userStatus, user.userStatus);
}
@Override
public int hashCode() {
return Objects.hash(id, username, firstName, lastName, email, password, phone, userStatus);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class User {\n");
sb.append(" id: ").append(toIndentedString(id)).append("\n");
sb.append(" username: ").append(toIndentedString(username)).append("\n");
sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n");
sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n");
sb.append(" email: ").append(toIndentedString(email)).append("\n");
sb.append(" password: ").append(toIndentedString(password)).append("\n");
sb.append(" phone: ").append(toIndentedString(phone)).append("\n");
sb.append(" userStatus: ").append(toIndentedString(userStatus)).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,48 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.Client;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* API tests for AnotherFakeApi
*/
@Disabled
public class AnotherFakeApiTest {
private final AnotherFakeApi api = new AnotherFakeApi();
/**
* To test special tags
*
* To test special tags and operation ID starting with number
*/
@Test
public void call123testSpecialTagsTest() {
Client client = null;
Client response = api.call123testSpecialTags(client);
// TODO: test validations
}
}

View File

@@ -0,0 +1,47 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.FooGetDefaultResponse;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* API tests for DefaultApi
*/
@Disabled
public class DefaultApiTest {
private final DefaultApi api = new DefaultApi();
/**
*
*
*
*/
@Test
public void fooGetTest() {
FooGetDefaultResponse response = api.fooGet();
// TODO: test validations
}
}

View File

@@ -0,0 +1,369 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.math.BigDecimal;
import org.openapitools.client.model.ChildWithNullable;
import org.openapitools.client.model.Client;
import org.openapitools.client.model.EnumClass;
import org.openapitools.client.model.FakeBigDecimalMap200Response;
import java.io.File;
import org.openapitools.client.model.FileSchemaTestClass;
import org.openapitools.client.model.HealthCheckResult;
import java.time.LocalDate;
import java.time.OffsetDateTime;
import org.openapitools.client.model.OuterComposite;
import org.openapitools.client.model.OuterObjectWithEnumProperty;
import org.openapitools.client.model.Pet;
import org.openapitools.client.model.TestInlineFreeformAdditionalPropertiesRequest;
import org.openapitools.client.model.User;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* API tests for FakeApi
*/
@Disabled
public class FakeApiTest {
private final FakeApi api = new FakeApi();
/**
*
*
* for Java apache and Java native, test toUrlQueryString for maps with BegDecimal keys
*/
@Test
public void fakeBigDecimalMapTest() {
FakeBigDecimalMap200Response response = api.fakeBigDecimalMap();
// TODO: test validations
}
/**
* Health check endpoint
*
*
*/
@Test
public void fakeHealthGetTest() {
HealthCheckResult response = api.fakeHealthGet();
// TODO: test validations
}
/**
* test http signature authentication
*
*
*/
@Test
public void fakeHttpSignatureTestTest() {
Pet pet = null;
String query1 = null;
String header1 = null;
api.fakeHttpSignatureTest(pet, query1, header1);
// TODO: test validations
}
/**
*
*
* Test serialization of outer boolean types
*/
@Test
public void fakeOuterBooleanSerializeTest() {
Boolean body = null;
Boolean response = api.fakeOuterBooleanSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of object with outer number type
*/
@Test
public void fakeOuterCompositeSerializeTest() {
OuterComposite outerComposite = null;
OuterComposite response = api.fakeOuterCompositeSerialize(outerComposite);
// TODO: test validations
}
/**
*
*
* Test serialization of outer number types
*/
@Test
public void fakeOuterNumberSerializeTest() {
BigDecimal body = null;
BigDecimal response = api.fakeOuterNumberSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of outer string types
*/
@Test
public void fakeOuterStringSerializeTest() {
String body = null;
String response = api.fakeOuterStringSerialize(body);
// TODO: test validations
}
/**
*
*
* Test serialization of enum (int) properties with examples
*/
@Test
public void fakePropertyEnumIntegerSerializeTest() {
OuterObjectWithEnumProperty outerObjectWithEnumProperty = null;
OuterObjectWithEnumProperty response = api.fakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty);
// TODO: test validations
}
/**
* test referenced additionalProperties
*
*
*/
@Test
public void testAdditionalPropertiesReferenceTest() {
Map<String, Object> requestBody = null;
api.testAdditionalPropertiesReference(requestBody);
// TODO: test validations
}
/**
*
*
* For this test, the body has to be a binary file.
*/
@Test
public void testBodyWithBinaryTest() {
File body = null;
api.testBodyWithBinary(body);
// TODO: test validations
}
/**
*
*
* For this test, the body for this request must reference a schema named &#x60;File&#x60;.
*/
@Test
public void testBodyWithFileSchemaTest() {
FileSchemaTestClass fileSchemaTestClass = null;
api.testBodyWithFileSchema(fileSchemaTestClass);
// TODO: test validations
}
/**
*
*
*
*/
@Test
public void testBodyWithQueryParamsTest() {
String query = null;
User user = null;
api.testBodyWithQueryParams(query, user);
// TODO: test validations
}
/**
* To test \&quot;client\&quot; model
*
* To test \&quot;client\&quot; model
*/
@Test
public void testClientModelTest() {
Client client = null;
Client response = api.testClientModel(client);
// TODO: test validations
}
/**
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
*/
@Test
public void testEndpointParametersTest() {
BigDecimal number = null;
Double _double = null;
String patternWithoutDelimiter = null;
byte[] _byte = null;
Integer integer = null;
Integer int32 = null;
Long int64 = null;
Float _float = null;
String string = null;
File binary = null;
LocalDate date = null;
OffsetDateTime dateTime = null;
String password = null;
String paramCallback = null;
api.testEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, string, binary, date, dateTime, password, paramCallback);
// TODO: test validations
}
/**
* To test enum parameters
*
* To test enum parameters
*/
@Test
public void testEnumParametersTest() {
List<String> enumHeaderStringArray = null;
String enumHeaderString = null;
List<String> enumQueryStringArray = null;
String enumQueryString = null;
Integer enumQueryInteger = null;
Double enumQueryDouble = null;
List<EnumClass> enumQueryModelArray = null;
List<String> enumFormStringArray = null;
String enumFormString = null;
api.testEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString);
// TODO: test validations
}
/**
* Fake endpoint to test group parameters (optional)
*
* Fake endpoint to test group parameters (optional)
*/
@Test
public void testGroupParametersTest() {
Integer requiredStringGroup = null;
Boolean requiredBooleanGroup = null;
Long requiredInt64Group = null;
Integer stringGroup = null;
Boolean booleanGroup = null;
Long int64Group = null;
api.testGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group);
// TODO: test validations
}
/**
* test inline additionalProperties
*
*
*/
@Test
public void testInlineAdditionalPropertiesTest() {
Map<String, String> requestBody = null;
api.testInlineAdditionalProperties(requestBody);
// TODO: test validations
}
/**
* test inline free-form additionalProperties
*
*
*/
@Test
public void testInlineFreeformAdditionalPropertiesTest() {
TestInlineFreeformAdditionalPropertiesRequest testInlineFreeformAdditionalPropertiesRequest = null;
api.testInlineFreeformAdditionalProperties(testInlineFreeformAdditionalPropertiesRequest);
// TODO: test validations
}
/**
* test json serialization of form data
*
*
*/
@Test
public void testJsonFormDataTest() {
String param = null;
String param2 = null;
api.testJsonFormData(param, param2);
// TODO: test validations
}
/**
* test nullable parent property
*
*
*/
@Test
public void testNullableTest() {
ChildWithNullable childWithNullable = null;
api.testNullable(childWithNullable);
// TODO: test validations
}
/**
*
*
* To test the collection format in query parameters
*/
@Test
public void testQueryParameterCollectionFormatTest() {
List<String> pipe = null;
List<String> ioutil = null;
List<String> http = null;
List<String> url = null;
List<String> context = null;
String allowEmpty = null;
Map<String, String> language = null;
api.testQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language);
// TODO: test validations
}
/**
* test referenced string map
*
*
*/
@Test
public void testStringMapReferenceTest() {
Map<String, String> requestBody = null;
api.testStringMapReference(requestBody);
// TODO: test validations
}
}

View File

@@ -0,0 +1,48 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.Client;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* API tests for FakeClassnameTags123Api
*/
@Disabled
public class FakeClassnameTags123ApiTest {
private final FakeClassnameTags123Api api = new FakeClassnameTags123Api();
/**
* To test class name in snake case
*
* To test class name in snake case
*/
@Test
public void testClassnameTest() {
Client client = null;
Client response = api.testClassname(client);
// TODO: test validations
}
}

View File

@@ -0,0 +1,162 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.ModelApiResponse;
import org.openapitools.client.model.Pet;
import java.util.Set;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* API tests for PetApi
*/
@Disabled
public class PetApiTest {
private final PetApi api = new PetApi();
/**
* Add a new pet to the store
*
*
*/
@Test
public void addPetTest() {
Pet pet = null;
api.addPet(pet);
// TODO: test validations
}
/**
* Deletes a pet
*
*
*/
@Test
public void deletePetTest() {
Long petId = null;
String apiKey = null;
api.deletePet(petId, apiKey);
// TODO: test validations
}
/**
* Finds Pets by status
*
* Multiple status values can be provided with comma separated strings
*/
@Test
public void findPetsByStatusTest() {
List<String> status = null;
List<Pet> response = api.findPetsByStatus(status);
// TODO: test validations
}
/**
* Finds Pets by tags
*
* Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
*/
@Test
public void findPetsByTagsTest() {
Set<String> tags = null;
Set<Pet> response = api.findPetsByTags(tags);
// TODO: test validations
}
/**
* Find pet by ID
*
* Returns a single pet
*/
@Test
public void getPetByIdTest() {
Long petId = null;
Pet response = api.getPetById(petId);
// TODO: test validations
}
/**
* Update an existing pet
*
*
*/
@Test
public void updatePetTest() {
Pet pet = null;
api.updatePet(pet);
// TODO: test validations
}
/**
* Updates a pet in the store with form data
*
*
*/
@Test
public void updatePetWithFormTest() {
Long petId = null;
String name = null;
String status = null;
api.updatePetWithForm(petId, name, status);
// TODO: test validations
}
/**
* uploads an image
*
*
*/
@Test
public void uploadFileTest() {
Long petId = null;
String additionalMetadata = null;
File _file = null;
ModelApiResponse response = api.uploadFile(petId, additionalMetadata, _file);
// TODO: test validations
}
/**
* uploads an image (required)
*
*
*/
@Test
public void uploadFileWithRequiredFileTest() {
Long petId = null;
File requiredFile = null;
String additionalMetadata = null;
ModelApiResponse response = api.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
// TODO: test validations
}
}

View File

@@ -0,0 +1,86 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.Order;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* API tests for StoreApi
*/
@Disabled
public class StoreApiTest {
private final StoreApi api = new StoreApi();
/**
* Delete purchase order by ID
*
* For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors
*/
@Test
public void deleteOrderTest() {
String orderId = null;
api.deleteOrder(orderId);
// TODO: test validations
}
/**
* Returns pet inventories by status
*
* Returns a map of status codes to quantities
*/
@Test
public void getInventoryTest() {
Map<String, Integer> response = api.getInventory();
// TODO: test validations
}
/**
* Find purchase order by ID
*
* For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generate exceptions
*/
@Test
public void getOrderByIdTest() {
Long orderId = null;
Order response = api.getOrderById(orderId);
// TODO: test validations
}
/**
* Place an order for a pet
*
*
*/
@Test
public void placeOrderTest() {
Order order = null;
Order response = api.placeOrder(order);
// TODO: test validations
}
}

View File

@@ -0,0 +1,141 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.time.OffsetDateTime;
import org.openapitools.client.model.User;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* API tests for UserApi
*/
@Disabled
public class UserApiTest {
private final UserApi api = new UserApi();
/**
* Create user
*
* This can only be done by the logged in user.
*/
@Test
public void createUserTest() {
User user = null;
api.createUser(user);
// TODO: test validations
}
/**
* Creates list of users with given input array
*
*
*/
@Test
public void createUsersWithArrayInputTest() {
List<User> user = null;
api.createUsersWithArrayInput(user);
// TODO: test validations
}
/**
* Creates list of users with given input array
*
*
*/
@Test
public void createUsersWithListInputTest() {
List<User> user = null;
api.createUsersWithListInput(user);
// TODO: test validations
}
/**
* Delete user
*
* This can only be done by the logged in user.
*/
@Test
public void deleteUserTest() {
String username = null;
api.deleteUser(username);
// TODO: test validations
}
/**
* Get user by user name
*
*
*/
@Test
public void getUserByNameTest() {
String username = null;
User response = api.getUserByName(username);
// TODO: test validations
}
/**
* Logs user into the system
*
*
*/
@Test
public void loginUserTest() {
String username = null;
String password = null;
String response = api.loginUser(username, password);
// TODO: test validations
}
/**
* Logs out current logged in user session
*
*
*/
@Test
public void logoutUserTest() {
api.logoutUser();
// TODO: test validations
}
/**
* Updated user
*
* This can only be done by the logged in user.
*/
@Test
public void updateUserTest() {
String username = null;
User user = null;
api.updateUser(username, user);
// TODO: test validations
}
}

View File

@@ -0,0 +1,57 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.HashMap;
import java.util.Map;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for AdditionalPropertiesClass
*/
class AdditionalPropertiesClassTest {
private final AdditionalPropertiesClass model = new AdditionalPropertiesClass();
/**
* Model tests for AdditionalPropertiesClass
*/
@Test
void testAdditionalPropertiesClass() {
// TODO: test AdditionalPropertiesClass
}
/**
* Test the property 'mapProperty'
*/
@Test
void mapPropertyTest() {
// TODO: test mapProperty
}
/**
* Test the property 'mapOfMapProperty'
*/
@Test
void mapOfMapPropertyTest() {
// TODO: test mapOfMapProperty
}
}

View File

@@ -0,0 +1,56 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.openapitools.client.model.SingleRefType;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for AllOfWithSingleRef
*/
class AllOfWithSingleRefTest {
private final AllOfWithSingleRef model = new AllOfWithSingleRef();
/**
* Model tests for AllOfWithSingleRef
*/
@Test
void testAllOfWithSingleRef() {
// TODO: test AllOfWithSingleRef
}
/**
* Test the property 'username'
*/
@Test
void usernameTest() {
// TODO: test username
}
/**
* Test the property 'singleRefType'
*/
@Test
void singleRefTypeTest() {
// TODO: test singleRefType
}
}

View File

@@ -0,0 +1,58 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for Animal
*/
class AnimalTest {
private final Animal model = new Animal();
/**
* Model tests for Animal
*/
@Test
void testAnimal() {
// TODO: test Animal
}
/**
* Test the property 'className'
*/
@Test
void classNameTest() {
// TODO: test className
}
/**
* Test the property 'color'
*/
@Test
void colorTest() {
// TODO: test color
}
}

View File

@@ -0,0 +1,51 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for ArrayOfArrayOfNumberOnly
*/
class ArrayOfArrayOfNumberOnlyTest {
private final ArrayOfArrayOfNumberOnly model = new ArrayOfArrayOfNumberOnly();
/**
* Model tests for ArrayOfArrayOfNumberOnly
*/
@Test
void testArrayOfArrayOfNumberOnly() {
// TODO: test ArrayOfArrayOfNumberOnly
}
/**
* Test the property 'arrayArrayNumber'
*/
@Test
void arrayArrayNumberTest() {
// TODO: test arrayArrayNumber
}
}

View File

@@ -0,0 +1,51 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for ArrayOfNumberOnly
*/
class ArrayOfNumberOnlyTest {
private final ArrayOfNumberOnly model = new ArrayOfNumberOnly();
/**
* Model tests for ArrayOfNumberOnly
*/
@Test
void testArrayOfNumberOnly() {
// TODO: test ArrayOfNumberOnly
}
/**
* Test the property 'arrayNumber'
*/
@Test
void arrayNumberTest() {
// TODO: test arrayNumber
}
}

View File

@@ -0,0 +1,67 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.ReadOnlyFirst;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for ArrayTest
*/
class ArrayTestTest {
private final ArrayTest model = new ArrayTest();
/**
* Model tests for ArrayTest
*/
@Test
void testArrayTest() {
// TODO: test ArrayTest
}
/**
* Test the property 'arrayOfString'
*/
@Test
void arrayOfStringTest() {
// TODO: test arrayOfString
}
/**
* Test the property 'arrayArrayOfInteger'
*/
@Test
void arrayArrayOfIntegerTest() {
// TODO: test arrayArrayOfInteger
}
/**
* Test the property 'arrayArrayOfModel'
*/
@Test
void arrayArrayOfModelTest() {
// TODO: test arrayArrayOfModel
}
}

View File

@@ -0,0 +1,87 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for Capitalization
*/
class CapitalizationTest {
private final Capitalization model = new Capitalization();
/**
* Model tests for Capitalization
*/
@Test
void testCapitalization() {
// TODO: test Capitalization
}
/**
* Test the property 'smallCamel'
*/
@Test
void smallCamelTest() {
// TODO: test smallCamel
}
/**
* Test the property 'capitalCamel'
*/
@Test
void capitalCamelTest() {
// TODO: test capitalCamel
}
/**
* Test the property 'smallSnake'
*/
@Test
void smallSnakeTest() {
// TODO: test smallSnake
}
/**
* Test the property 'capitalSnake'
*/
@Test
void capitalSnakeTest() {
// TODO: test capitalSnake
}
/**
* Test the property 'scAETHFlowPoints'
*/
@Test
void scAETHFlowPointsTest() {
// TODO: test scAETHFlowPoints
}
/**
* Test the property 'ATT_NAME'
*/
@Test
void ATT_NAMETest() {
// TODO: test ATT_NAME
}
}

View File

@@ -0,0 +1,67 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.openapitools.client.model.Animal;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for Cat
*/
class CatTest {
private final Cat model = new Cat();
/**
* Model tests for Cat
*/
@Test
void testCat() {
// TODO: test Cat
}
/**
* Test the property 'className'
*/
@Test
void classNameTest() {
// TODO: test className
}
/**
* Test the property 'color'
*/
@Test
void colorTest() {
// TODO: test color
}
/**
* Test the property 'declawed'
*/
@Test
void declawedTest() {
// TODO: test declawed
}
}

View File

@@ -0,0 +1,55 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for Category
*/
class CategoryTest {
private final Category model = new Category();
/**
* Model tests for Category
*/
@Test
void testCategory() {
// TODO: test Category
}
/**
* Test the property 'id'
*/
@Test
void idTest() {
// TODO: test id
}
/**
* Test the property 'name'
*/
@Test
void nameTest() {
// TODO: test name
}
}

View File

@@ -0,0 +1,68 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.openapitools.client.model.ParentWithNullable;
import org.openapitools.jackson.nullable.JsonNullable;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for ChildWithNullable
*/
class ChildWithNullableTest {
private final ChildWithNullable model = new ChildWithNullable();
/**
* Model tests for ChildWithNullable
*/
@Test
void testChildWithNullable() {
// TODO: test ChildWithNullable
}
/**
* Test the property 'type'
*/
@Test
void typeTest() {
// TODO: test type
}
/**
* Test the property 'nullableProperty'
*/
@Test
void nullablePropertyTest() {
// TODO: test nullableProperty
}
/**
* Test the property 'otherProperty'
*/
@Test
void otherPropertyTest() {
// TODO: test otherProperty
}
}

View File

@@ -0,0 +1,47 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for ClassModel
*/
class ClassModelTest {
private final ClassModel model = new ClassModel();
/**
* Model tests for ClassModel
*/
@Test
void testClassModel() {
// TODO: test ClassModel
}
/**
* Test the property 'propertyClass'
*/
@Test
void propertyClassTest() {
// TODO: test propertyClass
}
}

View File

@@ -0,0 +1,47 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for Client
*/
class ClientTest {
private final Client model = new Client();
/**
* Model tests for Client
*/
@Test
void testClient() {
// TODO: test Client
}
/**
* Test the property 'client'
*/
@Test
void clientTest() {
// TODO: test client
}
}

View File

@@ -0,0 +1,47 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for DeprecatedObject
*/
class DeprecatedObjectTest {
private final DeprecatedObject model = new DeprecatedObject();
/**
* Model tests for DeprecatedObject
*/
@Test
void testDeprecatedObject() {
// TODO: test DeprecatedObject
}
/**
* Test the property 'name'
*/
@Test
void nameTest() {
// TODO: test name
}
}

View File

@@ -0,0 +1,67 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import org.openapitools.client.model.Animal;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for Dog
*/
class DogTest {
private final Dog model = new Dog();
/**
* Model tests for Dog
*/
@Test
void testDog() {
// TODO: test Dog
}
/**
* Test the property 'className'
*/
@Test
void classNameTest() {
// TODO: test className
}
/**
* Test the property 'color'
*/
@Test
void colorTest() {
// TODO: test color
}
/**
* Test the property 'breed'
*/
@Test
void breedTest() {
// TODO: test breed
}
}

View File

@@ -0,0 +1,58 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for EnumArrays
*/
class EnumArraysTest {
private final EnumArrays model = new EnumArrays();
/**
* Model tests for EnumArrays
*/
@Test
void testEnumArrays() {
// TODO: test EnumArrays
}
/**
* Test the property 'justSymbol'
*/
@Test
void justSymbolTest() {
// TODO: test justSymbol
}
/**
* Test the property 'arrayEnum'
*/
@Test
void arrayEnumTest() {
// TODO: test arrayEnum
}
}

View File

@@ -0,0 +1,32 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for EnumClass
*/
class EnumClassTest {
/**
* Model tests for EnumClass
*/
@Test
void testEnumClass() {
// TODO: test EnumClass
}
}

View File

@@ -0,0 +1,111 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.openapitools.client.model.OuterEnum;
import org.openapitools.client.model.OuterEnumDefaultValue;
import org.openapitools.client.model.OuterEnumInteger;
import org.openapitools.client.model.OuterEnumIntegerDefaultValue;
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.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for EnumTest
*/
class EnumTestTest {
private final EnumTest model = new EnumTest();
/**
* Model tests for EnumTest
*/
@Test
void testEnumTest() {
// TODO: test EnumTest
}
/**
* Test the property 'enumString'
*/
@Test
void enumStringTest() {
// TODO: test enumString
}
/**
* Test the property 'enumStringRequired'
*/
@Test
void enumStringRequiredTest() {
// TODO: test enumStringRequired
}
/**
* Test the property 'enumInteger'
*/
@Test
void enumIntegerTest() {
// TODO: test enumInteger
}
/**
* Test the property 'enumNumber'
*/
@Test
void enumNumberTest() {
// TODO: test enumNumber
}
/**
* Test the property 'outerEnum'
*/
@Test
void outerEnumTest() {
// TODO: test outerEnum
}
/**
* Test the property 'outerEnumInteger'
*/
@Test
void outerEnumIntegerTest() {
// TODO: test outerEnumInteger
}
/**
* Test the property 'outerEnumDefaultValue'
*/
@Test
void outerEnumDefaultValueTest() {
// TODO: test outerEnumDefaultValue
}
/**
* Test the property 'outerEnumIntegerDefaultValue'
*/
@Test
void outerEnumIntegerDefaultValueTest() {
// TODO: test outerEnumIntegerDefaultValue
}
}

View File

@@ -0,0 +1,58 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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 java.util.HashMap;
import java.util.Map;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for FakeBigDecimalMap200Response
*/
class FakeBigDecimalMap200ResponseTest {
private final FakeBigDecimalMap200Response model = new FakeBigDecimalMap200Response();
/**
* Model tests for FakeBigDecimalMap200Response
*/
@Test
void testFakeBigDecimalMap200Response() {
// TODO: test FakeBigDecimalMap200Response
}
/**
* Test the property 'someId'
*/
@Test
void someIdTest() {
// TODO: test someId
}
/**
* Test the property 'someMap'
*/
@Test
void someMapTest() {
// TODO: test someMap
}
}

View File

@@ -0,0 +1,59 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.ModelFile;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for FileSchemaTestClass
*/
class FileSchemaTestClassTest {
private final FileSchemaTestClass model = new FileSchemaTestClass();
/**
* Model tests for FileSchemaTestClass
*/
@Test
void testFileSchemaTestClass() {
// TODO: test FileSchemaTestClass
}
/**
* Test the property '_file'
*/
@Test
void _fileTest() {
// TODO: test _file
}
/**
* Test the property 'files'
*/
@Test
void filesTest() {
// TODO: test files
}
}

View File

@@ -0,0 +1,48 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.openapitools.client.model.Foo;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for FooGetDefaultResponse
*/
class FooGetDefaultResponseTest {
private final FooGetDefaultResponse model = new FooGetDefaultResponse();
/**
* Model tests for FooGetDefaultResponse
*/
@Test
void testFooGetDefaultResponse() {
// TODO: test FooGetDefaultResponse
}
/**
* Test the property 'string'
*/
@Test
void stringTest() {
// TODO: test string
}
}

View File

@@ -0,0 +1,47 @@
/*
* OpenAPI Petstore
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
*
* The version of the OpenAPI document: 1.0.0
*
*
* 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.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
/**
* Model tests for Foo
*/
class FooTest {
private final Foo model = new Foo();
/**
* Model tests for Foo
*/
@Test
void testFoo() {
// TODO: test Foo
}
/**
* Test the property 'bar'
*/
@Test
void barTest() {
// TODO: test bar
}
}

Some files were not shown because too many files have changed in this diff Show More