forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/master' into 3.4.x
This commit is contained in:
@@ -249,16 +249,21 @@ public interface FakeApi extends ApiClient.Api {
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
* @param requiredStringGroup Required String in group parameters (required)
|
||||
* @param requiredBooleanGroup Required Boolean in group parameters (required)
|
||||
* @param requiredInt64Group Required Integer in group parameters (required)
|
||||
* @param stringGroup String in group parameters (optional)
|
||||
* @param booleanGroup Boolean in group parameters (optional)
|
||||
* @param int64Group Integer in group parameters (optional)
|
||||
*/
|
||||
@RequestLine("DELETE /fake?string_group={stringGroup}&int64_group={int64Group}")
|
||||
@RequestLine("DELETE /fake?required_string_group={requiredStringGroup}&required_int64_group={requiredInt64Group}&string_group={stringGroup}&int64_group={int64Group}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
"required_boolean_group: {requiredBooleanGroup}",
|
||||
|
||||
"boolean_group: {booleanGroup}"
|
||||
})
|
||||
void testGroupParameters(@Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group);
|
||||
void testGroupParameters(@Param("requiredStringGroup") Integer requiredStringGroup, @Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("requiredInt64Group") Long requiredInt64Group, @Param("stringGroup") Integer stringGroup, @Param("booleanGroup") Boolean booleanGroup, @Param("int64Group") Long int64Group);
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
@@ -268,26 +273,39 @@ public interface FakeApi extends ApiClient.Api {
|
||||
* is convenient for services with optional query parameters, especially when
|
||||
* used with the {@link TestGroupParametersQueryParams} class that allows for
|
||||
* building up this map in a fluent style.
|
||||
* @param requiredBooleanGroup Required Boolean in group parameters (required)
|
||||
* @param booleanGroup Boolean in group parameters (optional)
|
||||
* @param queryParams Map of query parameters as name-value pairs
|
||||
* <p>The following elements may be specified in the query map:</p>
|
||||
* <ul>
|
||||
* <li>requiredStringGroup - Required String in group parameters (required)</li>
|
||||
* <li>requiredInt64Group - Required Integer in group parameters (required)</li>
|
||||
* <li>stringGroup - String in group parameters (optional)</li>
|
||||
* <li>int64Group - Integer in group parameters (optional)</li>
|
||||
* </ul>
|
||||
*/
|
||||
@RequestLine("DELETE /fake?string_group={stringGroup}&int64_group={int64Group}")
|
||||
@RequestLine("DELETE /fake?required_string_group={requiredStringGroup}&required_int64_group={requiredInt64Group}&string_group={stringGroup}&int64_group={int64Group}")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
"required_boolean_group: {requiredBooleanGroup}",
|
||||
|
||||
"boolean_group: {booleanGroup}"
|
||||
})
|
||||
void testGroupParameters(@Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
void testGroupParameters(@Param("requiredBooleanGroup") Boolean requiredBooleanGroup, @Param("booleanGroup") Boolean booleanGroup, @QueryMap(encoded=true) Map<String, Object> queryParams);
|
||||
|
||||
/**
|
||||
* A convenience class for generating query parameters for the
|
||||
* <code>testGroupParameters</code> method in a fluent style.
|
||||
*/
|
||||
public static class TestGroupParametersQueryParams extends HashMap<String, Object> {
|
||||
public TestGroupParametersQueryParams requiredStringGroup(final Integer value) {
|
||||
put("required_string_group", EncodingUtils.encode(value));
|
||||
return this;
|
||||
}
|
||||
public TestGroupParametersQueryParams requiredInt64Group(final Long value) {
|
||||
put("required_int64_group", EncodingUtils.encode(value));
|
||||
return this;
|
||||
}
|
||||
public TestGroupParametersQueryParams stringGroup(final Integer value) {
|
||||
put("string_group", EncodingUtils.encode(value));
|
||||
return this;
|
||||
|
||||
@@ -4,6 +4,7 @@ import org.openapitools.client.ApiClient;
|
||||
import java.math.BigDecimal;
|
||||
import org.openapitools.client.model.Client;
|
||||
import java.io.File;
|
||||
import org.openapitools.client.model.FileSchemaTestClass;
|
||||
import org.threeten.bp.LocalDate;
|
||||
import org.threeten.bp.OffsetDateTime;
|
||||
import org.openapitools.client.model.OuterComposite;
|
||||
@@ -85,6 +86,20 @@ public class FakeApiTest {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
*/
|
||||
@Test
|
||||
public void testBodyWithFileSchemaTest() {
|
||||
FileSchemaTestClass fileSchemaTestClass = null;
|
||||
// api.testBodyWithFileSchema(fileSchemaTestClass);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
@@ -202,6 +217,46 @@ public class FakeApiTest {
|
||||
// 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
|
||||
}
|
||||
|
||||
/**
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
*
|
||||
* Fake endpoint to test group parameters (optional)
|
||||
*
|
||||
* This tests the overload of the method that uses a Map for query parameters instead of
|
||||
* listing them out individually.
|
||||
*/
|
||||
@Test
|
||||
public void testGroupParametersTestQueryMap() {
|
||||
Boolean requiredBooleanGroup = null;
|
||||
Boolean booleanGroup = null;
|
||||
FakeApi.TestGroupParametersQueryParams queryParams = new FakeApi.TestGroupParametersQueryParams()
|
||||
.requiredStringGroup(null)
|
||||
.requiredInt64Group(null)
|
||||
.stringGroup(null)
|
||||
.int64Group(null);
|
||||
// api.testGroupParameters(requiredBooleanGroup, booleanGroup, queryParams);
|
||||
|
||||
// TODO: test validations
|
||||
}
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user