forked from loafle/openapi-generator-original
Use inline allof instead of $ref in echo test (#14429)
* use inline allof instead of $ref in echo test * update samples * update samples * fix tests
This commit is contained in:
parent
ed2029f863
commit
cf4f2c76b2
@ -171,7 +171,9 @@ paths:
|
||||
style: deepObject
|
||||
explode: true #default
|
||||
schema:
|
||||
$ref: '#/components/schemas/BirdAndCategory'
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Bird'
|
||||
- $ref: '#/components/schemas/Category'
|
||||
responses:
|
||||
'200':
|
||||
description: Successful operation
|
||||
@ -272,7 +274,3 @@ components:
|
||||
type: string
|
||||
color:
|
||||
type: string
|
||||
BirdAndCategory:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Bird'
|
||||
- $ref: '#/components/schemas/Category'
|
||||
|
@ -6,13 +6,13 @@ api/openapi.yaml
|
||||
build.gradle
|
||||
build.sbt
|
||||
docs/Bird.md
|
||||
docs/BirdAndCategory.md
|
||||
docs/BodyApi.md
|
||||
docs/Category.md
|
||||
docs/PathApi.md
|
||||
docs/Pet.md
|
||||
docs/QueryApi.md
|
||||
docs/Tag.md
|
||||
docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md
|
||||
docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md
|
||||
git_push.sh
|
||||
gradle.properties
|
||||
@ -40,8 +40,8 @@ src/main/java/org/openapitools/client/auth/Authentication.java
|
||||
src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
|
||||
src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
|
||||
src/main/java/org/openapitools/client/model/Bird.java
|
||||
src/main/java/org/openapitools/client/model/BirdAndCategory.java
|
||||
src/main/java/org/openapitools/client/model/Category.java
|
||||
src/main/java/org/openapitools/client/model/Pet.java
|
||||
src/main/java/org/openapitools/client/model/Tag.java
|
||||
src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java
|
||||
src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java
|
||||
|
@ -118,10 +118,10 @@ Class | Method | HTTP request | Description
|
||||
## Documentation for Models
|
||||
|
||||
- [Bird](docs/Bird.md)
|
||||
- [BirdAndCategory](docs/BirdAndCategory.md)
|
||||
- [Category](docs/Category.md)
|
||||
- [Pet](docs/Pet.md)
|
||||
- [Tag](docs/Tag.md)
|
||||
- [TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter](docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md)
|
||||
- [TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter](docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md)
|
||||
|
||||
|
||||
|
@ -157,7 +157,7 @@ paths:
|
||||
name: query_object
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/components/schemas/BirdAndCategory'
|
||||
$ref: '#/components/schemas/test_query_style_deepObject_explode_true_object_allOf_query_object_parameter'
|
||||
style: deepObject
|
||||
responses:
|
||||
"200":
|
||||
@ -285,10 +285,6 @@ components:
|
||||
color:
|
||||
type: string
|
||||
type: object
|
||||
BirdAndCategory:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Bird'
|
||||
- $ref: '#/components/schemas/Category'
|
||||
test_query_style_form_explode_true_array_string_query_object_parameter:
|
||||
properties:
|
||||
values:
|
||||
@ -296,4 +292,8 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
test_query_style_deepObject_explode_true_object_allOf_query_object_parameter:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Bird'
|
||||
- $ref: '#/components/schemas/Category'
|
||||
|
||||
|
@ -172,7 +172,7 @@ public class Example {
|
||||
defaultClient.setBasePath("http://localhost:3000");
|
||||
|
||||
QueryApi apiInstance = new QueryApi(defaultClient);
|
||||
BirdAndCategory queryObject = new BirdAndCategory(); // BirdAndCategory |
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(); // TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter |
|
||||
try {
|
||||
String result = apiInstance.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject);
|
||||
System.out.println(result);
|
||||
@ -192,7 +192,7 @@ public class Example {
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **queryObject** | [**BirdAndCategory**](.md)| | [optional] |
|
||||
| **queryObject** | [**TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter**](.md)| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
# TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**size** | **String** | | [optional] |
|
||||
|**color** | **String** | | [optional] |
|
||||
|**id** | **Long** | | [optional] |
|
||||
|**name** | **String** | | [optional] |
|
||||
|
||||
|
||||
|
@ -20,8 +20,8 @@ import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.model.*;
|
||||
import org.openapitools.client.Pair;
|
||||
|
||||
import org.openapitools.client.model.BirdAndCategory;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
|
||||
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
|
||||
|
||||
|
||||
@ -171,7 +171,7 @@ public class QueryApi {
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(BirdAndCategory queryObject) throws ApiException {
|
||||
public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
|
@ -0,0 +1,254 @@
|
||||
/*
|
||||
* Echo Server API
|
||||
* Echo Server API
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
* Contact: team@openapitools.org
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.util.StringJoiner;
|
||||
|
||||
/**
|
||||
* TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_SIZE,
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_COLOR,
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_ID,
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_NAME
|
||||
})
|
||||
@JsonTypeName("test_query_style_deepObject_explode_true_object_allOf_query_object_parameter")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter {
|
||||
public static final String JSON_PROPERTY_SIZE = "size";
|
||||
private String size;
|
||||
|
||||
public static final String JSON_PROPERTY_COLOR = "color";
|
||||
private String color;
|
||||
|
||||
public static final String JSON_PROPERTY_ID = "id";
|
||||
private Long id;
|
||||
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() {
|
||||
}
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter size(String size) {
|
||||
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get size
|
||||
* @return size
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@JsonProperty(JSON_PROPERTY_SIZE)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public String getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_SIZE)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setSize(String size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter color(String color) {
|
||||
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@JsonProperty(JSON_PROPERTY_COLOR)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_COLOR)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(Long id) {
|
||||
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@JsonProperty(JSON_PROPERTY_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter = (TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) o;
|
||||
return Objects.equals(this.size, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.size) &&
|
||||
Objects.equals(this.color, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.color) &&
|
||||
Objects.equals(this.id, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.id) &&
|
||||
Objects.equals(this.name, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(size, color, id, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter {\n");
|
||||
sb.append(" size: ").append(toIndentedString(size)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the instance into URL query string.
|
||||
*
|
||||
* @param prefix prefix of the query string
|
||||
* @return URL query string
|
||||
*/
|
||||
public String toUrlQueryString(String prefix) {
|
||||
if (prefix == null) {
|
||||
prefix = "";
|
||||
}
|
||||
StringJoiner joiner = new StringJoiner("&");
|
||||
// add `size` to the URL query string
|
||||
if (getSize() != null) {
|
||||
try {
|
||||
joiner.add(String.format("%s[size]=%s", prefix, URLEncoder.encode(String.valueOf(getSize()), "UTF-8").replaceAll("\\+", "%20")));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// Should never happen, UTF-8 is always supported
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
// add `color` to the URL query string
|
||||
if (getColor() != null) {
|
||||
try {
|
||||
joiner.add(String.format("%s[color]=%s", prefix, URLEncoder.encode(String.valueOf(getColor()), "UTF-8").replaceAll("\\+", "%20")));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// Should never happen, UTF-8 is always supported
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
// add `id` to the URL query string
|
||||
if (getId() != null) {
|
||||
try {
|
||||
joiner.add(String.format("%s[id]=%s", prefix, URLEncoder.encode(String.valueOf(getId()), "UTF-8").replaceAll("\\+", "%20")));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// Should never happen, UTF-8 is always supported
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
// add `name` to the URL query string
|
||||
if (getName() != null) {
|
||||
try {
|
||||
joiner.add(String.format("%s[name]=%s", prefix, URLEncoder.encode(String.valueOf(getName()), "UTF-8").replaceAll("\\+", "%20")));
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
// Should never happen, UTF-8 is always supported
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
return joiner.toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Echo Server API
|
||||
* Echo Server API
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
* Contact: team@openapitools.org
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
*/
|
||||
public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest {
|
||||
private final TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter model = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter();
|
||||
|
||||
/**
|
||||
* Model tests for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
*/
|
||||
@Test
|
||||
public void testTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() {
|
||||
// TODO: test TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'size'
|
||||
*/
|
||||
@Test
|
||||
public void sizeTest() {
|
||||
// TODO: test size
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'color'
|
||||
*/
|
||||
@Test
|
||||
public void colorTest() {
|
||||
// TODO: test color
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'id'
|
||||
*/
|
||||
@Test
|
||||
public void idTest() {
|
||||
// TODO: test id
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'name'
|
||||
*/
|
||||
@Test
|
||||
public void nameTest() {
|
||||
// TODO: test name
|
||||
}
|
||||
|
||||
}
|
@ -27,8 +27,8 @@ src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
|
||||
src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
|
||||
src/main/java/org/openapitools/client/model/ApiResponse.java
|
||||
src/main/java/org/openapitools/client/model/Bird.java
|
||||
src/main/java/org/openapitools/client/model/BirdAndCategory.java
|
||||
src/main/java/org/openapitools/client/model/Category.java
|
||||
src/main/java/org/openapitools/client/model/Pet.java
|
||||
src/main/java/org/openapitools/client/model/Tag.java
|
||||
src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java
|
||||
src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java
|
||||
|
@ -157,7 +157,7 @@ paths:
|
||||
name: query_object
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/components/schemas/BirdAndCategory'
|
||||
$ref: '#/components/schemas/test_query_style_deepObject_explode_true_object_allOf_query_object_parameter'
|
||||
style: deepObject
|
||||
responses:
|
||||
"200":
|
||||
@ -285,10 +285,6 @@ components:
|
||||
color:
|
||||
type: string
|
||||
type: object
|
||||
BirdAndCategory:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Bird'
|
||||
- $ref: '#/components/schemas/Category'
|
||||
test_query_style_form_explode_true_array_string_query_object_parameter:
|
||||
properties:
|
||||
values:
|
||||
@ -296,4 +292,8 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
test_query_style_deepObject_explode_true_object_allOf_query_object_parameter:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Bird'
|
||||
- $ref: '#/components/schemas/Category'
|
||||
|
||||
|
@ -4,8 +4,8 @@ import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.EncodingUtils;
|
||||
import org.openapitools.client.model.ApiResponse;
|
||||
|
||||
import org.openapitools.client.model.BirdAndCategory;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
|
||||
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@ -198,7 +198,7 @@ public interface QueryApi extends ApiClient.Api {
|
||||
@Headers({
|
||||
"Accept: text/plain",
|
||||
})
|
||||
String testQueryStyleDeepObjectExplodeTrueObjectAllOf(@Param("queryObject") BirdAndCategory queryObject);
|
||||
String testQueryStyleDeepObjectExplodeTrueObjectAllOf(@Param("queryObject") TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject);
|
||||
|
||||
/**
|
||||
* Test query parameter(s)
|
||||
@ -211,7 +211,7 @@ public interface QueryApi extends ApiClient.Api {
|
||||
@Headers({
|
||||
"Accept: text/plain",
|
||||
})
|
||||
ApiResponse<String> testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(@Param("queryObject") BirdAndCategory queryObject);
|
||||
ApiResponse<String> testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(@Param("queryObject") TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject);
|
||||
|
||||
|
||||
/**
|
||||
@ -259,7 +259,7 @@ public interface QueryApi extends ApiClient.Api {
|
||||
* <code>testQueryStyleDeepObjectExplodeTrueObjectAllOf</code> method in a fluent style.
|
||||
*/
|
||||
public static class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryParams extends HashMap<String, Object> {
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryParams queryObject(final BirdAndCategory value) {
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryParams queryObject(final TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter value) {
|
||||
put("query_object", EncodingUtils.encode(value));
|
||||
return this;
|
||||
}
|
||||
|
@ -0,0 +1,181 @@
|
||||
/*
|
||||
* Echo Server API
|
||||
* Echo Server API
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
* Contact: team@openapitools.org
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
* TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
*/
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter {
|
||||
public static final String SERIALIZED_NAME_SIZE = "size";
|
||||
@SerializedName(SERIALIZED_NAME_SIZE)
|
||||
private String size;
|
||||
|
||||
public static final String SERIALIZED_NAME_COLOR = "color";
|
||||
@SerializedName(SERIALIZED_NAME_COLOR)
|
||||
private String color;
|
||||
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
private Long id;
|
||||
|
||||
public static final String SERIALIZED_NAME_NAME = "name";
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() {
|
||||
}
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter size(String size) {
|
||||
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get size
|
||||
* @return size
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
|
||||
public String getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
public void setSize(String size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter color(String color) {
|
||||
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(Long id) {
|
||||
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter = (TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) o;
|
||||
return Objects.equals(this.size, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.size) &&
|
||||
Objects.equals(this.color, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.color) &&
|
||||
Objects.equals(this.id, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.id) &&
|
||||
Objects.equals(this.name, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(size, color, id, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter {\n");
|
||||
sb.append(" size: ").append(toIndentedString(size)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,71 @@
|
||||
/*
|
||||
* Echo Server API
|
||||
* Echo Server API
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
* Contact: team@openapitools.org
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
*/
|
||||
class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest {
|
||||
private final TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter model = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter();
|
||||
|
||||
/**
|
||||
* Model tests for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
*/
|
||||
@Test
|
||||
void testTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() {
|
||||
// TODO: test TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'size'
|
||||
*/
|
||||
@Test
|
||||
void sizeTest() {
|
||||
// TODO: test size
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'color'
|
||||
*/
|
||||
@Test
|
||||
void colorTest() {
|
||||
// TODO: test color
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'id'
|
||||
*/
|
||||
@Test
|
||||
void idTest() {
|
||||
// TODO: test id
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'name'
|
||||
*/
|
||||
@Test
|
||||
void nameTest() {
|
||||
// TODO: test name
|
||||
}
|
||||
|
||||
}
|
@ -6,13 +6,13 @@ api/openapi.yaml
|
||||
build.gradle
|
||||
build.sbt
|
||||
docs/Bird.md
|
||||
docs/BirdAndCategory.md
|
||||
docs/BodyApi.md
|
||||
docs/Category.md
|
||||
docs/PathApi.md
|
||||
docs/Pet.md
|
||||
docs/QueryApi.md
|
||||
docs/Tag.md
|
||||
docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md
|
||||
docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md
|
||||
git_push.sh
|
||||
gradle.properties
|
||||
@ -37,8 +37,8 @@ src/main/java/org/openapitools/client/api/PathApi.java
|
||||
src/main/java/org/openapitools/client/api/QueryApi.java
|
||||
src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
|
||||
src/main/java/org/openapitools/client/model/Bird.java
|
||||
src/main/java/org/openapitools/client/model/BirdAndCategory.java
|
||||
src/main/java/org/openapitools/client/model/Category.java
|
||||
src/main/java/org/openapitools/client/model/Pet.java
|
||||
src/main/java/org/openapitools/client/model/Tag.java
|
||||
src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java
|
||||
src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java
|
||||
|
@ -124,10 +124,10 @@ Class | Method | HTTP request | Description
|
||||
## Documentation for Models
|
||||
|
||||
- [Bird](docs/Bird.md)
|
||||
- [BirdAndCategory](docs/BirdAndCategory.md)
|
||||
- [Category](docs/Category.md)
|
||||
- [Pet](docs/Pet.md)
|
||||
- [Tag](docs/Tag.md)
|
||||
- [TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter](docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md)
|
||||
- [TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter](docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md)
|
||||
|
||||
|
||||
|
@ -157,7 +157,7 @@ paths:
|
||||
name: query_object
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/components/schemas/BirdAndCategory'
|
||||
$ref: '#/components/schemas/test_query_style_deepObject_explode_true_object_allOf_query_object_parameter'
|
||||
style: deepObject
|
||||
responses:
|
||||
"200":
|
||||
@ -285,10 +285,6 @@ components:
|
||||
color:
|
||||
type: string
|
||||
type: object
|
||||
BirdAndCategory:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Bird'
|
||||
- $ref: '#/components/schemas/Category'
|
||||
test_query_style_form_explode_true_array_string_query_object_parameter:
|
||||
properties:
|
||||
values:
|
||||
@ -296,4 +292,8 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
test_query_style_deepObject_explode_true_object_allOf_query_object_parameter:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Bird'
|
||||
- $ref: '#/components/schemas/Category'
|
||||
|
||||
|
@ -317,7 +317,7 @@ public class Example {
|
||||
defaultClient.setBasePath("http://localhost:3000");
|
||||
|
||||
QueryApi apiInstance = new QueryApi(defaultClient);
|
||||
BirdAndCategory queryObject = new BirdAndCategory(); // BirdAndCategory |
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(); // TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter |
|
||||
try {
|
||||
String result = apiInstance.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject);
|
||||
System.out.println(result);
|
||||
@ -337,7 +337,7 @@ public class Example {
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **queryObject** | [**BirdAndCategory**](.md)| | [optional] |
|
||||
| **queryObject** | [**TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter**](.md)| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
@ -383,7 +383,7 @@ public class Example {
|
||||
defaultClient.setBasePath("http://localhost:3000");
|
||||
|
||||
QueryApi apiInstance = new QueryApi(defaultClient);
|
||||
BirdAndCategory queryObject = new BirdAndCategory(); // BirdAndCategory |
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(); // TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter |
|
||||
try {
|
||||
ApiResponse<String> response = apiInstance.testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(queryObject);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
@ -405,7 +405,7 @@ public class Example {
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **queryObject** | [**BirdAndCategory**](.md)| | [optional] |
|
||||
| **queryObject** | [**TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter**](.md)| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -7,10 +7,10 @@
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**id** | **Long** | | [optional] |
|
||||
|**name** | **String** | | [optional] |
|
||||
|**size** | **String** | | [optional] |
|
||||
|**color** | **String** | | [optional] |
|
||||
|**id** | **Long** | | [optional] |
|
||||
|**name** | **String** | | [optional] |
|
||||
|
||||
|
||||
|
||||
|
@ -17,8 +17,8 @@ import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.ApiResponse;
|
||||
import org.openapitools.client.Pair;
|
||||
|
||||
import org.openapitools.client.model.BirdAndCategory;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
|
||||
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
|
||||
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
@ -273,7 +273,7 @@ public class QueryApi {
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(BirdAndCategory queryObject) throws ApiException {
|
||||
public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws ApiException {
|
||||
ApiResponse<String> localVarResponse = testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(queryObject);
|
||||
return localVarResponse.getData();
|
||||
}
|
||||
@ -285,7 +285,7 @@ public class QueryApi {
|
||||
* @return ApiResponse<String>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(BirdAndCategory queryObject) throws ApiException {
|
||||
public ApiResponse<String> testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testQueryStyleDeepObjectExplodeTrueObjectAllOfRequestBuilder(queryObject);
|
||||
try {
|
||||
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||
@ -322,7 +322,7 @@ public class QueryApi {
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testQueryStyleDeepObjectExplodeTrueObjectAllOfRequestBuilder(BirdAndCategory queryObject) throws ApiException {
|
||||
private HttpRequest.Builder testQueryStyleDeepObjectExplodeTrueObjectAllOfRequestBuilder(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws ApiException {
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
|
@ -15,11 +15,11 @@ package org.openapitools.client.model;
|
||||
|
||||
import java.net.URLEncoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.StringJoiner;
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.StringJoiner;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
@ -32,78 +32,28 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
* TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_ID,
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_NAME,
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_SIZE,
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_COLOR
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_COLOR,
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_ID,
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.JSON_PROPERTY_NAME
|
||||
})
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter {
|
||||
public static final String JSON_PROPERTY_ID = "id";
|
||||
private Long id;
|
||||
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
public static final String JSON_PROPERTY_SIZE = "size";
|
||||
private String size;
|
||||
|
||||
public static final String JSON_PROPERTY_COLOR = "color";
|
||||
private String color;
|
||||
|
||||
public static final String JSON_PROPERTY_ID = "id";
|
||||
private Long id;
|
||||
|
||||
public static final String JSON_PROPERTY_NAME = "name";
|
||||
private String name;
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() {
|
||||
}
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@JsonProperty(JSON_PROPERTY_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter size(String size) {
|
||||
this.size = size;
|
||||
return this;
|
||||
@ -154,6 +104,56 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
}
|
||||
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(Long id) {
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_ID)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(String name) {
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@JsonProperty(JSON_PROPERTY_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_NAME)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return true if this test_query_style_deepObject_explode_true_object_allOf_query_object_parameter object is equal to o.
|
||||
*/
|
||||
@ -166,25 +166,25 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
return false;
|
||||
}
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter = (TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) o;
|
||||
return Objects.equals(this.id, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.id) &&
|
||||
Objects.equals(this.name, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.name) &&
|
||||
Objects.equals(this.size, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.size) &&
|
||||
Objects.equals(this.color, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.color);
|
||||
return Objects.equals(this.size, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.size) &&
|
||||
Objects.equals(this.color, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.color) &&
|
||||
Objects.equals(this.id, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.id) &&
|
||||
Objects.equals(this.name, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(id, name, size, color);
|
||||
return Objects.hash(size, color, id, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter {\n");
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append(" size: ").append(toIndentedString(size)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
@ -200,7 +200,6 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Convert the instance into URL query string.
|
||||
*
|
||||
@ -214,16 +213,6 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
|
||||
StringJoiner joiner = new StringJoiner("&");
|
||||
|
||||
// add `id` to the URL query string
|
||||
if (getId() != null) {
|
||||
joiner.add(String.format("%s[id]=%s", prefix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
||||
}
|
||||
|
||||
// add `name` to the URL query string
|
||||
if (getName() != null) {
|
||||
joiner.add(String.format("%s[name]=%s", prefix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
||||
}
|
||||
|
||||
// add `size` to the URL query string
|
||||
if (getSize() != null) {
|
||||
joiner.add(String.format("%s[size]=%s", prefix, URLEncoder.encode(String.valueOf(getSize()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
||||
@ -234,6 +223,16 @@ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
joiner.add(String.format("%s[color]=%s", prefix, URLEncoder.encode(String.valueOf(getColor()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
||||
}
|
||||
|
||||
// add `id` to the URL query string
|
||||
if (getId() != null) {
|
||||
joiner.add(String.format("%s[id]=%s", prefix, URLEncoder.encode(String.valueOf(getId()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
||||
}
|
||||
|
||||
// add `name` to the URL query string
|
||||
if (getName() != null) {
|
||||
joiner.add(String.format("%s[name]=%s", prefix, URLEncoder.encode(String.valueOf(getName()), StandardCharsets.UTF_8).replaceAll("\\+", "%20")));
|
||||
}
|
||||
|
||||
return joiner.toString();
|
||||
}
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ public class CustomTest {
|
||||
*/
|
||||
@Test
|
||||
public void testQueryStyleDeepObjectExplodeTrueObjectAllOf() throws ApiException {
|
||||
BirdAndCategory queryObject = new BirdAndCategory().id(12345L).name("Hello World").
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter().id(12345L).name("Hello World").
|
||||
color("red").size("small");
|
||||
|
||||
Assert.assertEquals("query_object[size]=small&query_object[color]=red&query_object[id]=12345&query_object[name]=Hello%20World", queryObject.toUrlQueryString("query_object"));
|
||||
|
@ -6,13 +6,13 @@ api/openapi.yaml
|
||||
build.gradle
|
||||
build.sbt
|
||||
docs/Bird.md
|
||||
docs/BirdAndCategory.md
|
||||
docs/BodyApi.md
|
||||
docs/Category.md
|
||||
docs/PathApi.md
|
||||
docs/Pet.md
|
||||
docs/QueryApi.md
|
||||
docs/Tag.md
|
||||
docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md
|
||||
docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md
|
||||
git_push.sh
|
||||
gradle.properties
|
||||
@ -45,8 +45,8 @@ src/main/java/org/openapitools/client/auth/HttpBasicAuth.java
|
||||
src/main/java/org/openapitools/client/auth/HttpBearerAuth.java
|
||||
src/main/java/org/openapitools/client/model/AbstractOpenApiSchema.java
|
||||
src/main/java/org/openapitools/client/model/Bird.java
|
||||
src/main/java/org/openapitools/client/model/BirdAndCategory.java
|
||||
src/main/java/org/openapitools/client/model/Category.java
|
||||
src/main/java/org/openapitools/client/model/Pet.java
|
||||
src/main/java/org/openapitools/client/model/Tag.java
|
||||
src/main/java/org/openapitools/client/model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.java
|
||||
src/main/java/org/openapitools/client/model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.java
|
||||
|
@ -125,10 +125,10 @@ Class | Method | HTTP request | Description
|
||||
## Documentation for Models
|
||||
|
||||
- [Bird](docs/Bird.md)
|
||||
- [BirdAndCategory](docs/BirdAndCategory.md)
|
||||
- [Category](docs/Category.md)
|
||||
- [Pet](docs/Pet.md)
|
||||
- [Tag](docs/Tag.md)
|
||||
- [TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter](docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md)
|
||||
- [TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter](docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md)
|
||||
|
||||
|
||||
|
@ -157,7 +157,7 @@ paths:
|
||||
name: query_object
|
||||
required: false
|
||||
schema:
|
||||
$ref: '#/components/schemas/BirdAndCategory'
|
||||
$ref: '#/components/schemas/test_query_style_deepObject_explode_true_object_allOf_query_object_parameter'
|
||||
style: deepObject
|
||||
responses:
|
||||
"200":
|
||||
@ -285,10 +285,6 @@ components:
|
||||
color:
|
||||
type: string
|
||||
type: object
|
||||
BirdAndCategory:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Bird'
|
||||
- $ref: '#/components/schemas/Category'
|
||||
test_query_style_form_explode_true_array_string_query_object_parameter:
|
||||
properties:
|
||||
values:
|
||||
@ -296,4 +292,8 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
test_query_style_deepObject_explode_true_object_allOf_query_object_parameter:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Bird'
|
||||
- $ref: '#/components/schemas/Category'
|
||||
|
||||
|
@ -162,7 +162,7 @@ public class Example {
|
||||
defaultClient.setBasePath("http://localhost:3000");
|
||||
|
||||
QueryApi apiInstance = new QueryApi(defaultClient);
|
||||
BirdAndCategory queryObject = new BirdAndCategory(); // BirdAndCategory |
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter(); // TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter |
|
||||
try {
|
||||
String result = apiInstance.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject);
|
||||
System.out.println(result);
|
||||
@ -181,7 +181,7 @@ public class Example {
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **queryObject** | [**BirdAndCategory**](.md)| | [optional] |
|
||||
| **queryObject** | [**TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter**](.md)| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
|
||||
|
||||
# TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**size** | **String** | | [optional] |
|
||||
|**color** | **String** | | [optional] |
|
||||
|**id** | **Long** | | [optional] |
|
||||
|**name** | **String** | | [optional] |
|
||||
|
||||
|
||||
|
@ -94,10 +94,10 @@ public class JSON {
|
||||
gsonBuilder.registerTypeAdapter(LocalDate.class, localDateTypeAdapter);
|
||||
gsonBuilder.registerTypeAdapter(byte[].class, byteArrayAdapter);
|
||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Bird.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.BirdAndCategory.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Category.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Pet.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.Tag.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.CustomTypeAdapterFactory());
|
||||
gsonBuilder.registerTypeAdapterFactory(new org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.CustomTypeAdapterFactory());
|
||||
gson = gsonBuilder.create();
|
||||
}
|
||||
|
@ -27,8 +27,8 @@ import com.google.gson.reflect.TypeToken;
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
import org.openapitools.client.model.BirdAndCategory;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
|
||||
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
@ -345,7 +345,7 @@ public class QueryApi {
|
||||
<tr><td> 200 </td><td> Successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public okhttp3.Call testQueryStyleDeepObjectExplodeTrueObjectAllOfCall(BirdAndCategory queryObject, final ApiCallback _callback) throws ApiException {
|
||||
public okhttp3.Call testQueryStyleDeepObjectExplodeTrueObjectAllOfCall(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject, final ApiCallback _callback) throws ApiException {
|
||||
String basePath = null;
|
||||
// Operation Servers
|
||||
String[] localBasePaths = new String[] { };
|
||||
@ -394,7 +394,7 @@ public class QueryApi {
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call testQueryStyleDeepObjectExplodeTrueObjectAllOfValidateBeforeCall(BirdAndCategory queryObject, final ApiCallback _callback) throws ApiException {
|
||||
private okhttp3.Call testQueryStyleDeepObjectExplodeTrueObjectAllOfValidateBeforeCall(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject, final ApiCallback _callback) throws ApiException {
|
||||
return testQueryStyleDeepObjectExplodeTrueObjectAllOfCall(queryObject, _callback);
|
||||
|
||||
}
|
||||
@ -411,7 +411,7 @@ public class QueryApi {
|
||||
<tr><td> 200 </td><td> Successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(BirdAndCategory queryObject) throws ApiException {
|
||||
public String testQueryStyleDeepObjectExplodeTrueObjectAllOf(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws ApiException {
|
||||
ApiResponse<String> localVarResp = testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(queryObject);
|
||||
return localVarResp.getData();
|
||||
}
|
||||
@ -428,7 +428,7 @@ public class QueryApi {
|
||||
<tr><td> 200 </td><td> Successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public ApiResponse<String> testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(BirdAndCategory queryObject) throws ApiException {
|
||||
public ApiResponse<String> testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject) throws ApiException {
|
||||
okhttp3.Call localVarCall = testQueryStyleDeepObjectExplodeTrueObjectAllOfValidateBeforeCall(queryObject, null);
|
||||
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
@ -447,7 +447,7 @@ public class QueryApi {
|
||||
<tr><td> 200 </td><td> Successful operation </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public okhttp3.Call testQueryStyleDeepObjectExplodeTrueObjectAllOfAsync(BirdAndCategory queryObject, final ApiCallback<String> _callback) throws ApiException {
|
||||
public okhttp3.Call testQueryStyleDeepObjectExplodeTrueObjectAllOfAsync(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject, final ApiCallback<String> _callback) throws ApiException {
|
||||
|
||||
okhttp3.Call localVarCall = testQueryStyleDeepObjectExplodeTrueObjectAllOfValidateBeforeCall(queryObject, _callback);
|
||||
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||
|
@ -0,0 +1,298 @@
|
||||
/*
|
||||
* Echo Server API
|
||||
* Echo Server API
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
* Contact: team@openapitools.org
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.TypeAdapterFactory;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
/**
|
||||
* TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
*/
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter {
|
||||
public static final String SERIALIZED_NAME_SIZE = "size";
|
||||
@SerializedName(SERIALIZED_NAME_SIZE)
|
||||
private String size;
|
||||
|
||||
public static final String SERIALIZED_NAME_COLOR = "color";
|
||||
@SerializedName(SERIALIZED_NAME_COLOR)
|
||||
private String color;
|
||||
|
||||
public static final String SERIALIZED_NAME_ID = "id";
|
||||
@SerializedName(SERIALIZED_NAME_ID)
|
||||
private Long id;
|
||||
|
||||
public static final String SERIALIZED_NAME_NAME = "name";
|
||||
@SerializedName(SERIALIZED_NAME_NAME)
|
||||
private String name;
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() {
|
||||
}
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter size(String size) {
|
||||
|
||||
this.size = size;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get size
|
||||
* @return size
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
|
||||
public String getSize() {
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
public void setSize(String size) {
|
||||
this.size = size;
|
||||
}
|
||||
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter color(String color) {
|
||||
|
||||
this.color = color;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get color
|
||||
* @return color
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
|
||||
public String getColor() {
|
||||
return color;
|
||||
}
|
||||
|
||||
|
||||
public void setColor(String color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter id(Long id) {
|
||||
|
||||
this.id = id;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get id
|
||||
* @return id
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter name(String name) {
|
||||
|
||||
this.name = name;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter = (TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter) o;
|
||||
return Objects.equals(this.size, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.size) &&
|
||||
Objects.equals(this.color, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.color) &&
|
||||
Objects.equals(this.id, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.id) &&
|
||||
Objects.equals(this.name, testQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(size, color, id, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter {\n");
|
||||
sb.append(" size: ").append(toIndentedString(size)).append("\n");
|
||||
sb.append(" color: ").append(toIndentedString(color)).append("\n");
|
||||
sb.append(" id: ").append(toIndentedString(id)).append("\n");
|
||||
sb.append(" name: ").append(toIndentedString(name)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
public static HashSet<String> openapiFields;
|
||||
public static HashSet<String> openapiRequiredFields;
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("size");
|
||||
openapiFields.add("color");
|
||||
openapiFields.add("id");
|
||||
openapiFields.add("name");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON Object and throws an exception if issues found
|
||||
*
|
||||
* @param jsonObj JSON Object
|
||||
* @throws IOException if the JSON Object is invalid with respect to TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
*/
|
||||
public static void validateJsonObject(JsonObject jsonObj) throws IOException {
|
||||
if (jsonObj == null) {
|
||||
if (!TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.openapiRequiredFields.isEmpty()) { // has required fields but JSON object is null
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter is not found in the empty JSON string", TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.openapiRequiredFields.toString()));
|
||||
}
|
||||
}
|
||||
|
||||
Set<Entry<String, JsonElement>> entries = jsonObj.entrySet();
|
||||
// check to see if the JSON string contains additional fields
|
||||
for (Entry<String, JsonElement> entry : entries) {
|
||||
if (!TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.openapiFields.contains(entry.getKey())) {
|
||||
throw new IllegalArgumentException(String.format("The field `%s` in the JSON string is not defined in the `TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter` properties. JSON: %s", entry.getKey(), jsonObj.toString()));
|
||||
}
|
||||
}
|
||||
if ((jsonObj.get("size") != null && !jsonObj.get("size").isJsonNull()) && !jsonObj.get("size").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `size` to be a primitive type in the JSON string but got `%s`", jsonObj.get("size").toString()));
|
||||
}
|
||||
if ((jsonObj.get("color") != null && !jsonObj.get("color").isJsonNull()) && !jsonObj.get("color").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `color` to be a primitive type in the JSON string but got `%s`", jsonObj.get("color").toString()));
|
||||
}
|
||||
if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
|
||||
throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter' and its subtypes
|
||||
}
|
||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||
final TypeAdapter<TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.class));
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter value) throws IOException {
|
||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||
elementAdapter.write(out, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter read(JsonReader in) throws IOException {
|
||||
JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
|
||||
validateJsonObject(jsonObj);
|
||||
return thisAdapter.fromJsonTree(jsonObj);
|
||||
}
|
||||
|
||||
}.nullSafe();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter given an JSON string
|
||||
*
|
||||
* @param jsonString JSON string
|
||||
* @return An instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
* @throws IOException if the JSON string is invalid with respect to TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
*/
|
||||
public static TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter to an JSON string
|
||||
*
|
||||
* @return JSON string
|
||||
*/
|
||||
public String toJson() {
|
||||
return JSON.getGson().toJson(this);
|
||||
}
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ public class CustomTest {
|
||||
@Disabled
|
||||
@Test
|
||||
public void testQueryStyleDeepObjectExplodeTrueObjectAllOf() throws ApiException {
|
||||
BirdAndCategory queryObject = new BirdAndCategory().id(12345L).name("Hello World").
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter().id(12345L).name("Hello World").
|
||||
color("red").size("small");
|
||||
|
||||
String response = api.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject);
|
||||
|
@ -14,8 +14,8 @@
|
||||
package org.openapitools.client.api;
|
||||
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.model.BirdAndCategory;
|
||||
import org.openapitools.client.model.Pet;
|
||||
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
|
||||
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@ -72,7 +72,7 @@ public class QueryApiTest {
|
||||
*/
|
||||
@Test
|
||||
public void testQueryStyleDeepObjectExplodeTrueObjectAllOfTest() throws ApiException {
|
||||
BirdAndCategory queryObject = null;
|
||||
TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter queryObject = null;
|
||||
String response = api.testQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject);
|
||||
// TODO: test validations
|
||||
}
|
||||
|
@ -0,0 +1,72 @@
|
||||
/*
|
||||
* Echo Server API
|
||||
* Echo Server API
|
||||
*
|
||||
* The version of the OpenAPI document: 0.1.0
|
||||
* Contact: team@openapitools.org
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import java.io.IOException;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
*/
|
||||
public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTest {
|
||||
private final TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter model = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter();
|
||||
|
||||
/**
|
||||
* Model tests for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
*/
|
||||
@Test
|
||||
public void testTestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter() {
|
||||
// TODO: test TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'size'
|
||||
*/
|
||||
@Test
|
||||
public void sizeTest() {
|
||||
// TODO: test size
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'color'
|
||||
*/
|
||||
@Test
|
||||
public void colorTest() {
|
||||
// TODO: test color
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'id'
|
||||
*/
|
||||
@Test
|
||||
public void idTest() {
|
||||
// TODO: test id
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'name'
|
||||
*/
|
||||
@Test
|
||||
public void nameTest() {
|
||||
// TODO: test name
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user