mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 05:56:16 +00:00
[python-nextgen] Fix enum query parameter (#15278)
* fix enum query parameter in python-nextgen * update samples
This commit is contained in:
@@ -39,6 +39,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
public boolean isArray, isMap;
|
public boolean isArray, isMap;
|
||||||
public boolean isFile;
|
public boolean isFile;
|
||||||
public boolean isEnum;
|
public boolean isEnum;
|
||||||
|
public boolean isEnumRef; // true if the enum is a ref (model) but not defined inline
|
||||||
private boolean additionalPropertiesIsAnyType;
|
private boolean additionalPropertiesIsAnyType;
|
||||||
private boolean hasVars;
|
private boolean hasVars;
|
||||||
public List<String> _enum;
|
public List<String> _enum;
|
||||||
@@ -159,6 +160,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
output.enumDefaultValue = this.enumDefaultValue;
|
output.enumDefaultValue = this.enumDefaultValue;
|
||||||
output.example = this.example;
|
output.example = this.example;
|
||||||
output.isEnum = this.isEnum;
|
output.isEnum = this.isEnum;
|
||||||
|
output.isEnumRef = this.isEnumRef;
|
||||||
output.maxProperties = this.maxProperties;
|
output.maxProperties = this.maxProperties;
|
||||||
output.minProperties = this.minProperties;
|
output.minProperties = this.minProperties;
|
||||||
output.maximum = this.maximum;
|
output.maximum = this.maximum;
|
||||||
@@ -247,7 +249,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
return Objects.hash(isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, isContainer, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, baseName, paramName, dataType, datatypeWithEnum, dataFormat, collectionFormat, description, unescapedDescription, baseType, defaultValue, enumDefaultValue, enumName, style, isDeepObject, isAllowEmptyValue, example, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isPassword, isFreeFormObject, isAnyType, isArray, isMap, isFile, isEnum, _enum, allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, vendorExtensions, hasValidation, getMaxProperties(), getMinProperties(), isNullable, isDeprecated, required, getMaximum(), getExclusiveMaximum(), getMinimum(), getExclusiveMinimum(), getMaxLength(), getMinLength(), getPattern(), getMaxItems(), getMinItems(), getUniqueItems(), contentType, multipleOf, isNull, isVoid, additionalPropertiesIsAnyType, hasVars, hasRequired, isShort, isUnboundedInteger, hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes, schema, content, requiredVarsMap, ref, uniqueItemsBoolean, schemaIsFromAdditionalProperties);
|
return Objects.hash(isFormParam, isQueryParam, isPathParam, isHeaderParam, isCookieParam, isBodyParam, isContainer, isCollectionFormatMulti, isPrimitiveType, isModel, isExplode, baseName, paramName, dataType, datatypeWithEnum, dataFormat, collectionFormat, description, unescapedDescription, baseType, defaultValue, enumDefaultValue, enumName, style, isDeepObject, isAllowEmptyValue, example, jsonSchema, isString, isNumeric, isInteger, isLong, isNumber, isFloat, isDouble, isDecimal, isByteArray, isBinary, isBoolean, isDate, isDateTime, isUuid, isUri, isEmail, isPassword, isFreeFormObject, isAnyType, isArray, isMap, isFile, isEnum, isEnumRef, _enum, allowableValues, items, mostInnerItems, additionalProperties, vars, requiredVars, vendorExtensions, hasValidation, getMaxProperties(), getMinProperties(), isNullable, isDeprecated, required, getMaximum(), getExclusiveMaximum(), getMinimum(), getExclusiveMinimum(), getMaxLength(), getMinLength(), getPattern(), getMaxItems(), getMinItems(), getUniqueItems(), contentType, multipleOf, isNull, isVoid, additionalPropertiesIsAnyType, hasVars, hasRequired, isShort, isUnboundedInteger, hasDiscriminatorWithNonEmptyMapping, composedSchemas, hasMultipleTypes, schema, content, requiredVarsMap, ref, uniqueItemsBoolean, schemaIsFromAdditionalProperties);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -291,6 +293,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
isMap == that.isMap &&
|
isMap == that.isMap &&
|
||||||
isFile == that.isFile &&
|
isFile == that.isFile &&
|
||||||
isEnum == that.isEnum &&
|
isEnum == that.isEnum &&
|
||||||
|
isEnumRef == that.isEnumRef &&
|
||||||
hasValidation == that.hasValidation &&
|
hasValidation == that.hasValidation &&
|
||||||
isNullable == that.isNullable &&
|
isNullable == that.isNullable &&
|
||||||
isDeprecated == that.isDeprecated &&
|
isDeprecated == that.isDeprecated &&
|
||||||
@@ -350,6 +353,15 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
Objects.equals(multipleOf, that.multipleOf);
|
Objects.equals(multipleOf, that.multipleOf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return true if it's an enum (inline or ref)
|
||||||
|
*
|
||||||
|
* @return true if it's an enum (inline or ref)
|
||||||
|
*/
|
||||||
|
public boolean getIsEnumOrRef() {
|
||||||
|
return isEnum || isEnumRef;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
final StringBuilder sb = new StringBuilder("CodegenParameter{");
|
final StringBuilder sb = new StringBuilder("CodegenParameter{");
|
||||||
@@ -406,6 +418,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
sb.append(", isMap=").append(isMap);
|
sb.append(", isMap=").append(isMap);
|
||||||
sb.append(", isFile=").append(isFile);
|
sb.append(", isFile=").append(isFile);
|
||||||
sb.append(", isEnum=").append(isEnum);
|
sb.append(", isEnum=").append(isEnum);
|
||||||
|
sb.append(", isEnumRef=").append(isEnumRef);
|
||||||
sb.append(", _enum=").append(_enum);
|
sb.append(", _enum=").append(_enum);
|
||||||
sb.append(", allowableValues=").append(allowableValues);
|
sb.append(", allowableValues=").append(allowableValues);
|
||||||
sb.append(", items=").append(items);
|
sb.append(", items=").append(items);
|
||||||
@@ -458,7 +471,8 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
|
|
||||||
// use schema.setContains or content.mediaType.schema.setContains instead of this
|
// use schema.setContains or content.mediaType.schema.setContains instead of this
|
||||||
@Override
|
@Override
|
||||||
public void setContains(CodegenProperty contains) {}
|
public void setContains(CodegenProperty contains) {
|
||||||
|
}
|
||||||
|
|
||||||
// use schema.getDependentRequired or content.mediaType.schema.getDependentRequired instead of this
|
// use schema.getDependentRequired or content.mediaType.schema.getDependentRequired instead of this
|
||||||
@Override
|
@Override
|
||||||
@@ -468,7 +482,8 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
|
|
||||||
// use schema.setDependentRequired or content.mediaType.schema.setDependentRequired instead of this
|
// use schema.setDependentRequired or content.mediaType.schema.setDependentRequired instead of this
|
||||||
@Override
|
@Override
|
||||||
public void setDependentRequired(LinkedHashMap<String, List<String>> dependentRequired) {}
|
public void setDependentRequired(LinkedHashMap<String, List<String>> dependentRequired) {
|
||||||
|
}
|
||||||
|
|
||||||
// use schema.getIsBooleanSchemaTrue or content.mediaType.schema.getIsBooleanSchemaTrue instead of this
|
// use schema.getIsBooleanSchemaTrue or content.mediaType.schema.getIsBooleanSchemaTrue instead of this
|
||||||
@Override
|
@Override
|
||||||
@@ -478,7 +493,8 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
|
|
||||||
// use schema.setIsBooleanSchemaTrue or content.mediaType.schema.setIsBooleanSchemaTrue instead of this
|
// use schema.setIsBooleanSchemaTrue or content.mediaType.schema.setIsBooleanSchemaTrue instead of this
|
||||||
@Override
|
@Override
|
||||||
public void setIsBooleanSchemaTrue(boolean isBooleanSchemaTrue) {}
|
public void setIsBooleanSchemaTrue(boolean isBooleanSchemaTrue) {
|
||||||
|
}
|
||||||
|
|
||||||
// use schema.getIsBooleanSchemaFalse or content.mediaType.schema.getIsBooleanSchemaFalse instead of this
|
// use schema.getIsBooleanSchemaFalse or content.mediaType.schema.getIsBooleanSchemaFalse instead of this
|
||||||
@Override
|
@Override
|
||||||
@@ -488,7 +504,8 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
|
|
||||||
// use schema.setIsBooleanSchemaFalse or content.mediaType.schema.setIsBooleanSchemaFalse instead of this
|
// use schema.setIsBooleanSchemaFalse or content.mediaType.schema.setIsBooleanSchemaFalse instead of this
|
||||||
@Override
|
@Override
|
||||||
public void setIsBooleanSchemaFalse(boolean isBooleanSchemaFalse) {}
|
public void setIsBooleanSchemaFalse(boolean isBooleanSchemaFalse) {
|
||||||
|
}
|
||||||
|
|
||||||
// use schema.getFormat or content.mediaType.schema.getFormat instead of this
|
// use schema.getFormat or content.mediaType.schema.getFormat instead of this
|
||||||
@Override
|
@Override
|
||||||
@@ -498,7 +515,8 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
|
|
||||||
// use schema.setFormat or content.mediaType.schema.setFormat instead of this
|
// use schema.setFormat or content.mediaType.schema.setFormat instead of this
|
||||||
@Override
|
@Override
|
||||||
public void setFormat(String format) {}
|
public void setFormat(String format) {
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getPattern() {
|
public String getPattern() {
|
||||||
@@ -770,7 +788,7 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
this.requiredVars = requiredVars;
|
this.requiredVars = requiredVars;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean requiredAndNotNullable(){
|
public boolean requiredAndNotNullable() {
|
||||||
return required && !isNullable;
|
return required && !isNullable;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -922,16 +940,24 @@ public class CodegenParameter implements IJsonSchemaValidationProperties {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, CodegenProperty> getRequiredVarsMap() { return requiredVarsMap; }
|
public Map<String, CodegenProperty> getRequiredVarsMap() {
|
||||||
|
return requiredVarsMap;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setRequiredVarsMap(Map<String, CodegenProperty> requiredVarsMap) { this.requiredVarsMap=requiredVarsMap; }
|
public void setRequiredVarsMap(Map<String, CodegenProperty> requiredVarsMap) {
|
||||||
|
this.requiredVarsMap = requiredVarsMap;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getRef() { return ref; }
|
public String getRef() {
|
||||||
|
return ref;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setRef(String ref) { this.ref=ref; }
|
public void setRef(String ref) {
|
||||||
|
this.ref = ref;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean getSchemaIsFromAdditionalProperties() {
|
public boolean getSchemaIsFromAdditionalProperties() {
|
||||||
|
|||||||
@@ -5167,6 +5167,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
// enum
|
// enum
|
||||||
updateCodegenPropertyEnum(codegenProperty);
|
updateCodegenPropertyEnum(codegenProperty);
|
||||||
codegenParameter.isEnum = codegenProperty.isEnum;
|
codegenParameter.isEnum = codegenProperty.isEnum;
|
||||||
|
codegenParameter.isEnumRef = codegenProperty.isEnumRef;
|
||||||
codegenParameter._enum = codegenProperty._enum;
|
codegenParameter._enum = codegenProperty._enum;
|
||||||
codegenParameter.allowableValues = codegenProperty.allowableValues;
|
codegenParameter.allowableValues = codegenProperty.allowableValues;
|
||||||
|
|
||||||
@@ -6824,6 +6825,7 @@ public class DefaultCodegen implements CodegenConfig {
|
|||||||
// non-array/map
|
// non-array/map
|
||||||
updateCodegenPropertyEnum(codegenProperty);
|
updateCodegenPropertyEnum(codegenProperty);
|
||||||
codegenParameter.isEnum = codegenProperty.isEnum;
|
codegenParameter.isEnum = codegenProperty.isEnum;
|
||||||
|
codegenParameter.isEnumRef = codegenProperty.isEnumRef;
|
||||||
codegenParameter._enum = codegenProperty._enum;
|
codegenParameter._enum = codegenProperty._enum;
|
||||||
codegenParameter.allowableValues = codegenProperty.allowableValues;
|
codegenParameter.allowableValues = codegenProperty.allowableValues;
|
||||||
|
|
||||||
|
|||||||
@@ -199,12 +199,7 @@ class {{classname}}(object):
|
|||||||
_query_params.append(('{{baseName}}', _params['{{paramName}}']))
|
_query_params.append(('{{baseName}}', _params['{{paramName}}']))
|
||||||
{{/isDate}}
|
{{/isDate}}
|
||||||
{{^isDate}}
|
{{^isDate}}
|
||||||
{{#isEnum}}
|
_query_params.append(('{{baseName}}', _params['{{paramName}}']{{#isEnumRef}}.value{{/isEnumRef}}))
|
||||||
_query_params.append(('{{baseName}}', _params['{{paramName}}'].value))
|
|
||||||
{{/isEnum}}
|
|
||||||
{{^isEnum}}
|
|
||||||
_query_params.append(('{{baseName}}', _params['{{paramName}}']))
|
|
||||||
{{/isEnum}}
|
|
||||||
{{/isDate}}
|
{{/isDate}}
|
||||||
{{/isDateTime}}
|
{{/isDateTime}}
|
||||||
{{#isArray}}
|
{{#isArray}}
|
||||||
|
|||||||
@@ -118,6 +118,27 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
# query parameter tests
|
# query parameter tests
|
||||||
|
/query/enum_ref_string:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- query
|
||||||
|
summary: Test query parameter(s)
|
||||||
|
description: Test query parameter(s)
|
||||||
|
operationId: test/enum_ref_string
|
||||||
|
parameters:
|
||||||
|
- in: query
|
||||||
|
name: enum_ref_string_query
|
||||||
|
style: form #default
|
||||||
|
explode: true #default
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/StringEnumRef'
|
||||||
|
responses:
|
||||||
|
'200':
|
||||||
|
description: Successful operation
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
/query/datetime/date/string:
|
/query/datetime/date/string:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
|
|||||||
@@ -1248,6 +1248,21 @@ paths:
|
|||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: OK
|
description: OK
|
||||||
|
/fake/enum_ref_query_parameter:
|
||||||
|
get:
|
||||||
|
tags:
|
||||||
|
- fake
|
||||||
|
summary: test enum reference query parameter
|
||||||
|
operationId: fakeEnumRefQueryParameter
|
||||||
|
parameters:
|
||||||
|
- name: enum_ref
|
||||||
|
in: query
|
||||||
|
description: enum reference
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/EnumClass'
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description: OK
|
||||||
servers:
|
servers:
|
||||||
- url: 'http://{server}.swagger.io:{port}/v2'
|
- url: 'http://{server}.swagger.io:{port}/v2'
|
||||||
description: petstore server
|
description: petstore server
|
||||||
|
|||||||
@@ -111,6 +111,7 @@ Class | Method | HTTP request | Description
|
|||||||
*FormApi* | [**testFormIntegerBooleanString**](docs/FormApi.md#testFormIntegerBooleanString) | **POST** /form/integer/boolean/string | Test form parameter(s)
|
*FormApi* | [**testFormIntegerBooleanString**](docs/FormApi.md#testFormIntegerBooleanString) | **POST** /form/integer/boolean/string | Test form parameter(s)
|
||||||
*HeaderApi* | [**testHeaderIntegerBooleanString**](docs/HeaderApi.md#testHeaderIntegerBooleanString) | **GET** /header/integer/boolean/string | Test header parameter(s)
|
*HeaderApi* | [**testHeaderIntegerBooleanString**](docs/HeaderApi.md#testHeaderIntegerBooleanString) | **GET** /header/integer/boolean/string | Test header parameter(s)
|
||||||
*PathApi* | [**testsPathStringPathStringIntegerPathInteger**](docs/PathApi.md#testsPathStringPathStringIntegerPathInteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s)
|
*PathApi* | [**testsPathStringPathStringIntegerPathInteger**](docs/PathApi.md#testsPathStringPathStringIntegerPathInteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s)
|
||||||
|
*QueryApi* | [**testEnumRefString**](docs/QueryApi.md#testEnumRefString) | **GET** /query/enum_ref_string | Test query parameter(s)
|
||||||
*QueryApi* | [**testQueryDatetimeDateString**](docs/QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s)
|
*QueryApi* | [**testQueryDatetimeDateString**](docs/QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s)
|
||||||
*QueryApi* | [**testQueryIntegerBooleanString**](docs/QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s)
|
*QueryApi* | [**testQueryIntegerBooleanString**](docs/QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s)
|
||||||
*QueryApi* | [**testQueryStyleDeepObjectExplodeTrueObject**](docs/QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s)
|
*QueryApi* | [**testQueryStyleDeepObjectExplodeTrueObject**](docs/QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s)
|
||||||
|
|||||||
@@ -99,6 +99,29 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- header
|
- header
|
||||||
x-accepts: text/plain
|
x-accepts: text/plain
|
||||||
|
/query/enum_ref_string:
|
||||||
|
get:
|
||||||
|
description: Test query parameter(s)
|
||||||
|
operationId: test/enum_ref_string
|
||||||
|
parameters:
|
||||||
|
- explode: true
|
||||||
|
in: query
|
||||||
|
name: enum_ref_string_query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/StringEnumRef'
|
||||||
|
style: form
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: Successful operation
|
||||||
|
summary: Test query parameter(s)
|
||||||
|
tags:
|
||||||
|
- query
|
||||||
|
x-accepts: text/plain
|
||||||
/query/datetime/date/string:
|
/query/datetime/date/string:
|
||||||
get:
|
get:
|
||||||
description: Test query parameter(s)
|
description: Test query parameter(s)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ All URIs are relative to *http://localhost:3000*
|
|||||||
|
|
||||||
| Method | HTTP request | Description |
|
| Method | HTTP request | Description |
|
||||||
|------------- | ------------- | -------------|
|
|------------- | ------------- | -------------|
|
||||||
|
| [**testEnumRefString**](QueryApi.md#testEnumRefString) | **GET** /query/enum_ref_string | Test query parameter(s) |
|
||||||
| [**testQueryDatetimeDateString**](QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s) |
|
| [**testQueryDatetimeDateString**](QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s) |
|
||||||
| [**testQueryIntegerBooleanString**](QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) |
|
| [**testQueryIntegerBooleanString**](QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) |
|
||||||
| [**testQueryStyleDeepObjectExplodeTrueObject**](QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s) |
|
| [**testQueryStyleDeepObjectExplodeTrueObject**](QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s) |
|
||||||
@@ -14,6 +15,72 @@ All URIs are relative to *http://localhost:3000*
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## testEnumRefString
|
||||||
|
|
||||||
|
> String testEnumRefString(enumRefStringQuery)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
import org.openapitools.client.ApiClient;
|
||||||
|
import org.openapitools.client.ApiException;
|
||||||
|
import org.openapitools.client.Configuration;
|
||||||
|
import org.openapitools.client.models.*;
|
||||||
|
import org.openapitools.client.api.QueryApi;
|
||||||
|
|
||||||
|
public class Example {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
defaultClient.setBasePath("http://localhost:3000");
|
||||||
|
|
||||||
|
QueryApi apiInstance = new QueryApi(defaultClient);
|
||||||
|
StringEnumRef enumRefStringQuery = StringEnumRef.fromValue("success"); // StringEnumRef |
|
||||||
|
try {
|
||||||
|
String result = apiInstance.testEnumRefString(enumRefStringQuery);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling QueryApi#testEnumRefString");
|
||||||
|
System.err.println("Status code: " + e.getCode());
|
||||||
|
System.err.println("Reason: " + e.getResponseBody());
|
||||||
|
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------- | ------------- | ------------- | -------------|
|
||||||
|
| **enumRefStringQuery** | [**StringEnumRef**](.md)| | [optional] [enum: success, failure, unclassified] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
| **200** | Successful operation | - |
|
||||||
|
|
||||||
|
|
||||||
## testQueryDatetimeDateString
|
## testQueryDatetimeDateString
|
||||||
|
|
||||||
> String testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery)
|
> String testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery)
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ import org.openapitools.client.model.DataQuery;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import org.openapitools.client.model.Pet;
|
import org.openapitools.client.model.Pet;
|
||||||
|
import org.openapitools.client.model.StringEnumRef;
|
||||||
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
|
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
|
||||||
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
|
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
|
||||||
|
|
||||||
@@ -57,6 +58,76 @@ public class QueryApi {
|
|||||||
this.apiClient = apiClient;
|
this.apiClient = apiClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test query parameter(s)
|
||||||
|
* Test query parameter(s)
|
||||||
|
* @param enumRefStringQuery (optional)
|
||||||
|
* @return String
|
||||||
|
* @throws ApiException if fails to make API call
|
||||||
|
*/
|
||||||
|
public String testEnumRefString(StringEnumRef enumRefStringQuery) throws ApiException {
|
||||||
|
return this.testEnumRefString(enumRefStringQuery, Collections.emptyMap());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test query parameter(s)
|
||||||
|
* Test query parameter(s)
|
||||||
|
* @param enumRefStringQuery (optional)
|
||||||
|
* @param additionalHeaders additionalHeaders for this call
|
||||||
|
* @return String
|
||||||
|
* @throws ApiException if fails to make API call
|
||||||
|
*/
|
||||||
|
public String testEnumRefString(StringEnumRef enumRefStringQuery, Map<String, String> additionalHeaders) throws ApiException {
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
String localVarPath = "/query/enum_ref_string";
|
||||||
|
|
||||||
|
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
|
||||||
|
String localVarQueryParameterBaseName;
|
||||||
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
||||||
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
localVarQueryParams.addAll(apiClient.parameterToPair("enum_ref_string_query", enumRefStringQuery));
|
||||||
|
|
||||||
|
localVarHeaderParams.putAll(additionalHeaders);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
final String[] localVarAccepts = {
|
||||||
|
"text/plain"
|
||||||
|
};
|
||||||
|
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
|
||||||
|
final String[] localVarContentTypes = {
|
||||||
|
|
||||||
|
};
|
||||||
|
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
|
||||||
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
|
||||||
|
TypeReference<String> localVarReturnType = new TypeReference<String>() {};
|
||||||
|
return apiClient.invokeAPI(
|
||||||
|
localVarPath,
|
||||||
|
"GET",
|
||||||
|
localVarQueryParams,
|
||||||
|
localVarCollectionQueryParams,
|
||||||
|
localVarQueryStringJoiner.toString(),
|
||||||
|
localVarPostBody,
|
||||||
|
localVarHeaderParams,
|
||||||
|
localVarCookieParams,
|
||||||
|
localVarFormParams,
|
||||||
|
localVarAccept,
|
||||||
|
localVarContentType,
|
||||||
|
localVarAuthNames,
|
||||||
|
localVarReturnType
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test query parameter(s)
|
* Test query parameter(s)
|
||||||
* Test query parameter(s)
|
* Test query parameter(s)
|
||||||
|
|||||||
@@ -99,6 +99,29 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- header
|
- header
|
||||||
x-accepts: text/plain
|
x-accepts: text/plain
|
||||||
|
/query/enum_ref_string:
|
||||||
|
get:
|
||||||
|
description: Test query parameter(s)
|
||||||
|
operationId: test/enum_ref_string
|
||||||
|
parameters:
|
||||||
|
- explode: true
|
||||||
|
in: query
|
||||||
|
name: enum_ref_string_query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/StringEnumRef'
|
||||||
|
style: form
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: Successful operation
|
||||||
|
summary: Test query parameter(s)
|
||||||
|
tags:
|
||||||
|
- query
|
||||||
|
x-accepts: text/plain
|
||||||
/query/datetime/date/string:
|
/query/datetime/date/string:
|
||||||
get:
|
get:
|
||||||
description: Test query parameter(s)
|
description: Test query parameter(s)
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import org.openapitools.client.model.DataQuery;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import org.openapitools.client.model.Pet;
|
import org.openapitools.client.model.Pet;
|
||||||
|
import org.openapitools.client.model.StringEnumRef;
|
||||||
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
|
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
|
||||||
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
|
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
|
||||||
|
|
||||||
@@ -21,6 +22,83 @@ import feign.*;
|
|||||||
public interface QueryApi extends ApiClient.Api {
|
public interface QueryApi extends ApiClient.Api {
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test query parameter(s)
|
||||||
|
* Test query parameter(s)
|
||||||
|
* @param enumRefStringQuery (optional)
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
@RequestLine("GET /query/enum_ref_string?enum_ref_string_query={enumRefStringQuery}")
|
||||||
|
@Headers({
|
||||||
|
"Accept: text/plain",
|
||||||
|
})
|
||||||
|
String testEnumRefString(@Param("enumRefStringQuery") StringEnumRef enumRefStringQuery);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test query parameter(s)
|
||||||
|
* Similar to <code>testEnumRefString</code> but it also returns the http response headers .
|
||||||
|
* Test query parameter(s)
|
||||||
|
* @param enumRefStringQuery (optional)
|
||||||
|
* @return A ApiResponse that wraps the response boyd and the http headers.
|
||||||
|
*/
|
||||||
|
@RequestLine("GET /query/enum_ref_string?enum_ref_string_query={enumRefStringQuery}")
|
||||||
|
@Headers({
|
||||||
|
"Accept: text/plain",
|
||||||
|
})
|
||||||
|
ApiResponse<String> testEnumRefStringWithHttpInfo(@Param("enumRefStringQuery") StringEnumRef enumRefStringQuery);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test query parameter(s)
|
||||||
|
* Test query parameter(s)
|
||||||
|
* Note, this is equivalent to the other <code>testEnumRefString</code> method,
|
||||||
|
* but with the query parameters collected into a single Map parameter. This
|
||||||
|
* is convenient for services with optional query parameters, especially when
|
||||||
|
* used with the {@link TestEnumRefStringQueryParams} class that allows for
|
||||||
|
* building up this map in a fluent style.
|
||||||
|
* @param queryParams Map of query parameters as name-value pairs
|
||||||
|
* <p>The following elements may be specified in the query map:</p>
|
||||||
|
* <ul>
|
||||||
|
* <li>enumRefStringQuery - (optional)</li>
|
||||||
|
* </ul>
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
@RequestLine("GET /query/enum_ref_string?enum_ref_string_query={enumRefStringQuery}")
|
||||||
|
@Headers({
|
||||||
|
"Accept: text/plain",
|
||||||
|
})
|
||||||
|
String testEnumRefString(@QueryMap(encoded=true) TestEnumRefStringQueryParams queryParams);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test query parameter(s)
|
||||||
|
* Test query parameter(s)
|
||||||
|
* Note, this is equivalent to the other <code>testEnumRefString</code> that receives the query parameters as a map,
|
||||||
|
* but this one also exposes the Http response headers
|
||||||
|
* @param queryParams Map of query parameters as name-value pairs
|
||||||
|
* <p>The following elements may be specified in the query map:</p>
|
||||||
|
* <ul>
|
||||||
|
* <li>enumRefStringQuery - (optional)</li>
|
||||||
|
* </ul>
|
||||||
|
* @return String
|
||||||
|
*/
|
||||||
|
@RequestLine("GET /query/enum_ref_string?enum_ref_string_query={enumRefStringQuery}")
|
||||||
|
@Headers({
|
||||||
|
"Accept: text/plain",
|
||||||
|
})
|
||||||
|
ApiResponse<String> testEnumRefStringWithHttpInfo(@QueryMap(encoded=true) TestEnumRefStringQueryParams queryParams);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A convenience class for generating query parameters for the
|
||||||
|
* <code>testEnumRefString</code> method in a fluent style.
|
||||||
|
*/
|
||||||
|
public static class TestEnumRefStringQueryParams extends HashMap<String, Object> {
|
||||||
|
public TestEnumRefStringQueryParams enumRefStringQuery(final StringEnumRef value) {
|
||||||
|
put("enum_ref_string_query", EncodingUtils.encode(value));
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Test query parameter(s)
|
* Test query parameter(s)
|
||||||
* Test query parameter(s)
|
* Test query parameter(s)
|
||||||
|
|||||||
@@ -116,6 +116,8 @@ Class | Method | HTTP request | Description
|
|||||||
*HeaderApi* | [**testHeaderIntegerBooleanStringWithHttpInfo**](docs/HeaderApi.md#testHeaderIntegerBooleanStringWithHttpInfo) | **GET** /header/integer/boolean/string | Test header parameter(s)
|
*HeaderApi* | [**testHeaderIntegerBooleanStringWithHttpInfo**](docs/HeaderApi.md#testHeaderIntegerBooleanStringWithHttpInfo) | **GET** /header/integer/boolean/string | Test header parameter(s)
|
||||||
*PathApi* | [**testsPathStringPathStringIntegerPathInteger**](docs/PathApi.md#testsPathStringPathStringIntegerPathInteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s)
|
*PathApi* | [**testsPathStringPathStringIntegerPathInteger**](docs/PathApi.md#testsPathStringPathStringIntegerPathInteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s)
|
||||||
*PathApi* | [**testsPathStringPathStringIntegerPathIntegerWithHttpInfo**](docs/PathApi.md#testsPathStringPathStringIntegerPathIntegerWithHttpInfo) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s)
|
*PathApi* | [**testsPathStringPathStringIntegerPathIntegerWithHttpInfo**](docs/PathApi.md#testsPathStringPathStringIntegerPathIntegerWithHttpInfo) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s)
|
||||||
|
*QueryApi* | [**testEnumRefString**](docs/QueryApi.md#testEnumRefString) | **GET** /query/enum_ref_string | Test query parameter(s)
|
||||||
|
*QueryApi* | [**testEnumRefStringWithHttpInfo**](docs/QueryApi.md#testEnumRefStringWithHttpInfo) | **GET** /query/enum_ref_string | Test query parameter(s)
|
||||||
*QueryApi* | [**testQueryDatetimeDateString**](docs/QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s)
|
*QueryApi* | [**testQueryDatetimeDateString**](docs/QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s)
|
||||||
*QueryApi* | [**testQueryDatetimeDateStringWithHttpInfo**](docs/QueryApi.md#testQueryDatetimeDateStringWithHttpInfo) | **GET** /query/datetime/date/string | Test query parameter(s)
|
*QueryApi* | [**testQueryDatetimeDateStringWithHttpInfo**](docs/QueryApi.md#testQueryDatetimeDateStringWithHttpInfo) | **GET** /query/datetime/date/string | Test query parameter(s)
|
||||||
*QueryApi* | [**testQueryIntegerBooleanString**](docs/QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s)
|
*QueryApi* | [**testQueryIntegerBooleanString**](docs/QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s)
|
||||||
|
|||||||
@@ -99,6 +99,29 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- header
|
- header
|
||||||
x-accepts: text/plain
|
x-accepts: text/plain
|
||||||
|
/query/enum_ref_string:
|
||||||
|
get:
|
||||||
|
description: Test query parameter(s)
|
||||||
|
operationId: test/enum_ref_string
|
||||||
|
parameters:
|
||||||
|
- explode: true
|
||||||
|
in: query
|
||||||
|
name: enum_ref_string_query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/StringEnumRef'
|
||||||
|
style: form
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: Successful operation
|
||||||
|
summary: Test query parameter(s)
|
||||||
|
tags:
|
||||||
|
- query
|
||||||
|
x-accepts: text/plain
|
||||||
/query/datetime/date/string:
|
/query/datetime/date/string:
|
||||||
get:
|
get:
|
||||||
description: Test query parameter(s)
|
description: Test query parameter(s)
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ All URIs are relative to *http://localhost:3000*
|
|||||||
|
|
||||||
| Method | HTTP request | Description |
|
| Method | HTTP request | Description |
|
||||||
|------------- | ------------- | -------------|
|
|------------- | ------------- | -------------|
|
||||||
|
| [**testEnumRefString**](QueryApi.md#testEnumRefString) | **GET** /query/enum_ref_string | Test query parameter(s) |
|
||||||
|
| [**testEnumRefStringWithHttpInfo**](QueryApi.md#testEnumRefStringWithHttpInfo) | **GET** /query/enum_ref_string | Test query parameter(s) |
|
||||||
| [**testQueryDatetimeDateString**](QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s) |
|
| [**testQueryDatetimeDateString**](QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s) |
|
||||||
| [**testQueryDatetimeDateStringWithHttpInfo**](QueryApi.md#testQueryDatetimeDateStringWithHttpInfo) | **GET** /query/datetime/date/string | Test query parameter(s) |
|
| [**testQueryDatetimeDateStringWithHttpInfo**](QueryApi.md#testQueryDatetimeDateStringWithHttpInfo) | **GET** /query/datetime/date/string | Test query parameter(s) |
|
||||||
| [**testQueryIntegerBooleanString**](QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) |
|
| [**testQueryIntegerBooleanString**](QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) |
|
||||||
@@ -21,6 +23,140 @@ All URIs are relative to *http://localhost:3000*
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## testEnumRefString
|
||||||
|
|
||||||
|
> String testEnumRefString(enumRefStringQuery)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
import org.openapitools.client.ApiClient;
|
||||||
|
import org.openapitools.client.ApiException;
|
||||||
|
import org.openapitools.client.Configuration;
|
||||||
|
import org.openapitools.client.models.*;
|
||||||
|
import org.openapitools.client.api.QueryApi;
|
||||||
|
|
||||||
|
public class Example {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
defaultClient.setBasePath("http://localhost:3000");
|
||||||
|
|
||||||
|
QueryApi apiInstance = new QueryApi(defaultClient);
|
||||||
|
StringEnumRef enumRefStringQuery = StringEnumRef.fromValue("success"); // StringEnumRef |
|
||||||
|
try {
|
||||||
|
String result = apiInstance.testEnumRefString(enumRefStringQuery);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling QueryApi#testEnumRefString");
|
||||||
|
System.err.println("Status code: " + e.getCode());
|
||||||
|
System.err.println("Reason: " + e.getResponseBody());
|
||||||
|
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------- | ------------- | ------------- | -------------|
|
||||||
|
| **enumRefStringQuery** | [**StringEnumRef**](.md)| | [optional] [enum: success, failure, unclassified] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**String**
|
||||||
|
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
| **200** | Successful operation | - |
|
||||||
|
|
||||||
|
## testEnumRefStringWithHttpInfo
|
||||||
|
|
||||||
|
> ApiResponse<String> testEnumRefString testEnumRefStringWithHttpInfo(enumRefStringQuery)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
import org.openapitools.client.ApiClient;
|
||||||
|
import org.openapitools.client.ApiException;
|
||||||
|
import org.openapitools.client.ApiResponse;
|
||||||
|
import org.openapitools.client.Configuration;
|
||||||
|
import org.openapitools.client.models.*;
|
||||||
|
import org.openapitools.client.api.QueryApi;
|
||||||
|
|
||||||
|
public class Example {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
defaultClient.setBasePath("http://localhost:3000");
|
||||||
|
|
||||||
|
QueryApi apiInstance = new QueryApi(defaultClient);
|
||||||
|
StringEnumRef enumRefStringQuery = StringEnumRef.fromValue("success"); // StringEnumRef |
|
||||||
|
try {
|
||||||
|
ApiResponse<String> response = apiInstance.testEnumRefStringWithHttpInfo(enumRefStringQuery);
|
||||||
|
System.out.println("Status code: " + response.getStatusCode());
|
||||||
|
System.out.println("Response headers: " + response.getHeaders());
|
||||||
|
System.out.println("Response body: " + response.getData());
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling QueryApi#testEnumRefString");
|
||||||
|
System.err.println("Status code: " + e.getCode());
|
||||||
|
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||||
|
System.err.println("Reason: " + e.getResponseBody());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------- | ------------- | ------------- | -------------|
|
||||||
|
| **enumRefStringQuery** | [**StringEnumRef**](.md)| | [optional] [enum: success, failure, unclassified] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
ApiResponse<**String**>
|
||||||
|
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
| **200** | Successful operation | - |
|
||||||
|
|
||||||
|
|
||||||
## testQueryDatetimeDateString
|
## testQueryDatetimeDateString
|
||||||
|
|
||||||
> String testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery)
|
> String testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery)
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ import org.openapitools.client.model.DataQuery;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import org.openapitools.client.model.Pet;
|
import org.openapitools.client.model.Pet;
|
||||||
|
import org.openapitools.client.model.StringEnumRef;
|
||||||
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
|
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
|
||||||
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
|
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
|
||||||
|
|
||||||
@@ -92,6 +93,96 @@ public class QueryApi {
|
|||||||
return operationId + " call failed with: " + statusCode + " - " + body;
|
return operationId + " call failed with: " + statusCode + " - " + body;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test query parameter(s)
|
||||||
|
* Test query parameter(s)
|
||||||
|
* @param enumRefStringQuery (optional)
|
||||||
|
* @return String
|
||||||
|
* @throws ApiException if fails to make API call
|
||||||
|
*/
|
||||||
|
public String testEnumRefString(StringEnumRef enumRefStringQuery) throws ApiException {
|
||||||
|
ApiResponse<String> localVarResponse = testEnumRefStringWithHttpInfo(enumRefStringQuery);
|
||||||
|
return localVarResponse.getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test query parameter(s)
|
||||||
|
* Test query parameter(s)
|
||||||
|
* @param enumRefStringQuery (optional)
|
||||||
|
* @return ApiResponse<String>
|
||||||
|
* @throws ApiException if fails to make API call
|
||||||
|
*/
|
||||||
|
public ApiResponse<String> testEnumRefStringWithHttpInfo(StringEnumRef enumRefStringQuery) throws ApiException {
|
||||||
|
HttpRequest.Builder localVarRequestBuilder = testEnumRefStringRequestBuilder(enumRefStringQuery);
|
||||||
|
try {
|
||||||
|
HttpResponse<InputStream> localVarResponse = memberVarHttpClient.send(
|
||||||
|
localVarRequestBuilder.build(),
|
||||||
|
HttpResponse.BodyHandlers.ofInputStream());
|
||||||
|
if (memberVarResponseInterceptor != null) {
|
||||||
|
memberVarResponseInterceptor.accept(localVarResponse);
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||||
|
throw getApiException("testEnumRefString", localVarResponse);
|
||||||
|
}
|
||||||
|
// for plain text response
|
||||||
|
if (localVarResponse.headers().map().containsKey("Content-Type") &&
|
||||||
|
"text/plain".equalsIgnoreCase(localVarResponse.headers().map().get("Content-Type").get(0))) {
|
||||||
|
java.util.Scanner s = new java.util.Scanner(localVarResponse.body()).useDelimiter("\\A");
|
||||||
|
String responseBodyText = s.hasNext() ? s.next() : "";
|
||||||
|
return new ApiResponse<String>(
|
||||||
|
localVarResponse.statusCode(),
|
||||||
|
localVarResponse.headers().map(),
|
||||||
|
responseBodyText
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
throw new RuntimeException("Error! The response Content-Type is supposed to be `text/plain` but it's not: " + localVarResponse);
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
throw new ApiException(e);
|
||||||
|
}
|
||||||
|
catch (InterruptedException e) {
|
||||||
|
Thread.currentThread().interrupt();
|
||||||
|
throw new ApiException(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private HttpRequest.Builder testEnumRefStringRequestBuilder(StringEnumRef enumRefStringQuery) throws ApiException {
|
||||||
|
|
||||||
|
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||||
|
|
||||||
|
String localVarPath = "/query/enum_ref_string";
|
||||||
|
|
||||||
|
List<Pair> localVarQueryParams = new ArrayList<>();
|
||||||
|
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
|
||||||
|
String localVarQueryParameterBaseName;
|
||||||
|
localVarQueryParameterBaseName = "enum_ref_string_query";
|
||||||
|
localVarQueryParams.addAll(ApiClient.parameterToPairs("enum_ref_string_query", enumRefStringQuery));
|
||||||
|
|
||||||
|
if (!localVarQueryParams.isEmpty() || localVarQueryStringJoiner.length() != 0) {
|
||||||
|
StringJoiner queryJoiner = new StringJoiner("&");
|
||||||
|
localVarQueryParams.forEach(p -> queryJoiner.add(p.getName() + '=' + p.getValue()));
|
||||||
|
if (localVarQueryStringJoiner.length() != 0) {
|
||||||
|
queryJoiner.add(localVarQueryStringJoiner.toString());
|
||||||
|
}
|
||||||
|
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath + '?' + queryJoiner.toString()));
|
||||||
|
} else {
|
||||||
|
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
|
||||||
|
}
|
||||||
|
|
||||||
|
localVarRequestBuilder.header("Accept", "text/plain");
|
||||||
|
|
||||||
|
localVarRequestBuilder.method("GET", HttpRequest.BodyPublishers.noBody());
|
||||||
|
if (memberVarReadTimeout != null) {
|
||||||
|
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||||
|
}
|
||||||
|
if (memberVarInterceptor != null) {
|
||||||
|
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||||
|
}
|
||||||
|
return localVarRequestBuilder;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Test query parameter(s)
|
* Test query parameter(s)
|
||||||
* Test query parameter(s)
|
* Test query parameter(s)
|
||||||
|
|||||||
@@ -118,6 +118,7 @@ Class | Method | HTTP request | Description
|
|||||||
*FormApi* | [**testFormIntegerBooleanString**](docs/FormApi.md#testFormIntegerBooleanString) | **POST** /form/integer/boolean/string | Test form parameter(s)
|
*FormApi* | [**testFormIntegerBooleanString**](docs/FormApi.md#testFormIntegerBooleanString) | **POST** /form/integer/boolean/string | Test form parameter(s)
|
||||||
*HeaderApi* | [**testHeaderIntegerBooleanString**](docs/HeaderApi.md#testHeaderIntegerBooleanString) | **GET** /header/integer/boolean/string | Test header parameter(s)
|
*HeaderApi* | [**testHeaderIntegerBooleanString**](docs/HeaderApi.md#testHeaderIntegerBooleanString) | **GET** /header/integer/boolean/string | Test header parameter(s)
|
||||||
*PathApi* | [**testsPathStringPathStringIntegerPathInteger**](docs/PathApi.md#testsPathStringPathStringIntegerPathInteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s)
|
*PathApi* | [**testsPathStringPathStringIntegerPathInteger**](docs/PathApi.md#testsPathStringPathStringIntegerPathInteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s)
|
||||||
|
*QueryApi* | [**testEnumRefString**](docs/QueryApi.md#testEnumRefString) | **GET** /query/enum_ref_string | Test query parameter(s)
|
||||||
*QueryApi* | [**testQueryDatetimeDateString**](docs/QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s)
|
*QueryApi* | [**testQueryDatetimeDateString**](docs/QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s)
|
||||||
*QueryApi* | [**testQueryIntegerBooleanString**](docs/QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s)
|
*QueryApi* | [**testQueryIntegerBooleanString**](docs/QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s)
|
||||||
*QueryApi* | [**testQueryStyleDeepObjectExplodeTrueObject**](docs/QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s)
|
*QueryApi* | [**testQueryStyleDeepObjectExplodeTrueObject**](docs/QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s)
|
||||||
|
|||||||
@@ -99,6 +99,29 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- header
|
- header
|
||||||
x-accepts: text/plain
|
x-accepts: text/plain
|
||||||
|
/query/enum_ref_string:
|
||||||
|
get:
|
||||||
|
description: Test query parameter(s)
|
||||||
|
operationId: test/enum_ref_string
|
||||||
|
parameters:
|
||||||
|
- explode: true
|
||||||
|
in: query
|
||||||
|
name: enum_ref_string_query
|
||||||
|
required: false
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/StringEnumRef'
|
||||||
|
style: form
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
content:
|
||||||
|
text/plain:
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
description: Successful operation
|
||||||
|
summary: Test query parameter(s)
|
||||||
|
tags:
|
||||||
|
- query
|
||||||
|
x-accepts: text/plain
|
||||||
/query/datetime/date/string:
|
/query/datetime/date/string:
|
||||||
get:
|
get:
|
||||||
description: Test query parameter(s)
|
description: Test query parameter(s)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ All URIs are relative to *http://localhost:3000*
|
|||||||
|
|
||||||
| Method | HTTP request | Description |
|
| Method | HTTP request | Description |
|
||||||
|------------- | ------------- | -------------|
|
|------------- | ------------- | -------------|
|
||||||
|
| [**testEnumRefString**](QueryApi.md#testEnumRefString) | **GET** /query/enum_ref_string | Test query parameter(s) |
|
||||||
| [**testQueryDatetimeDateString**](QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s) |
|
| [**testQueryDatetimeDateString**](QueryApi.md#testQueryDatetimeDateString) | **GET** /query/datetime/date/string | Test query parameter(s) |
|
||||||
| [**testQueryIntegerBooleanString**](QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) |
|
| [**testQueryIntegerBooleanString**](QueryApi.md#testQueryIntegerBooleanString) | **GET** /query/integer/boolean/string | Test query parameter(s) |
|
||||||
| [**testQueryStyleDeepObjectExplodeTrueObject**](QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s) |
|
| [**testQueryStyleDeepObjectExplodeTrueObject**](QueryApi.md#testQueryStyleDeepObjectExplodeTrueObject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s) |
|
||||||
@@ -13,6 +14,68 @@ All URIs are relative to *http://localhost:3000*
|
|||||||
| [**testQueryStyleFormExplodeTrueObjectAllOf**](QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s) |
|
| [**testQueryStyleFormExplodeTrueObjectAllOf**](QueryApi.md#testQueryStyleFormExplodeTrueObjectAllOf) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s) |
|
||||||
|
|
||||||
|
|
||||||
|
<a name="testEnumRefString"></a>
|
||||||
|
# **testEnumRefString**
|
||||||
|
> String testEnumRefString(enumRefStringQuery)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
```java
|
||||||
|
// Import classes:
|
||||||
|
import org.openapitools.client.ApiClient;
|
||||||
|
import org.openapitools.client.ApiException;
|
||||||
|
import org.openapitools.client.Configuration;
|
||||||
|
import org.openapitools.client.models.*;
|
||||||
|
import org.openapitools.client.api.QueryApi;
|
||||||
|
|
||||||
|
public class Example {
|
||||||
|
public static void main(String[] args) {
|
||||||
|
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||||
|
defaultClient.setBasePath("http://localhost:3000");
|
||||||
|
|
||||||
|
QueryApi apiInstance = new QueryApi(defaultClient);
|
||||||
|
StringEnumRef enumRefStringQuery = StringEnumRef.fromValue("success"); // StringEnumRef |
|
||||||
|
try {
|
||||||
|
String result = apiInstance.testEnumRefString(enumRefStringQuery);
|
||||||
|
System.out.println(result);
|
||||||
|
} catch (ApiException e) {
|
||||||
|
System.err.println("Exception when calling QueryApi#testEnumRefString");
|
||||||
|
System.err.println("Status code: " + e.getCode());
|
||||||
|
System.err.println("Reason: " + e.getResponseBody());
|
||||||
|
System.err.println("Response headers: " + e.getResponseHeaders());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
| Name | Type | Description | Notes |
|
||||||
|
|------------- | ------------- | ------------- | -------------|
|
||||||
|
| **enumRefStringQuery** | [**StringEnumRef**](.md)| | [optional] [enum: success, failure, unclassified] |
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**String**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
| **200** | Successful operation | - |
|
||||||
|
|
||||||
<a name="testQueryDatetimeDateString"></a>
|
<a name="testQueryDatetimeDateString"></a>
|
||||||
# **testQueryDatetimeDateString**
|
# **testQueryDatetimeDateString**
|
||||||
> String testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery)
|
> String testQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery)
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import org.openapitools.client.model.DataQuery;
|
|||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import org.openapitools.client.model.Pet;
|
import org.openapitools.client.model.Pet;
|
||||||
|
import org.openapitools.client.model.StringEnumRef;
|
||||||
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
|
import org.openapitools.client.model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter;
|
||||||
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
|
import org.openapitools.client.model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter;
|
||||||
|
|
||||||
@@ -78,6 +79,127 @@ public class QueryApi {
|
|||||||
this.localCustomBaseUrl = customBaseUrl;
|
this.localCustomBaseUrl = customBaseUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Build call for testEnumRefString
|
||||||
|
* @param enumRefStringQuery (optional)
|
||||||
|
* @param _callback Callback for upload/download progress
|
||||||
|
* @return Call to execute
|
||||||
|
* @throws ApiException If fail to serialize the request body object
|
||||||
|
* @http.response.details
|
||||||
|
<table summary="Response Details" border="1">
|
||||||
|
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||||
|
<tr><td> 200 </td><td> Successful operation </td><td> - </td></tr>
|
||||||
|
</table>
|
||||||
|
*/
|
||||||
|
public okhttp3.Call testEnumRefStringCall(StringEnumRef enumRefStringQuery, final ApiCallback _callback) throws ApiException {
|
||||||
|
String basePath = null;
|
||||||
|
// Operation Servers
|
||||||
|
String[] localBasePaths = new String[] { };
|
||||||
|
|
||||||
|
// Determine Base Path to Use
|
||||||
|
if (localCustomBaseUrl != null){
|
||||||
|
basePath = localCustomBaseUrl;
|
||||||
|
} else if ( localBasePaths.length > 0 ) {
|
||||||
|
basePath = localBasePaths[localHostIndex];
|
||||||
|
} else {
|
||||||
|
basePath = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Object localVarPostBody = null;
|
||||||
|
|
||||||
|
// create path and map variables
|
||||||
|
String localVarPath = "/query/enum_ref_string";
|
||||||
|
|
||||||
|
List<Pair> localVarQueryParams = new ArrayList<Pair>();
|
||||||
|
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
|
||||||
|
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
|
||||||
|
Map<String, String> localVarCookieParams = new HashMap<String, String>();
|
||||||
|
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
|
||||||
|
|
||||||
|
if (enumRefStringQuery != null) {
|
||||||
|
localVarQueryParams.addAll(localVarApiClient.parameterToPair("enum_ref_string_query", enumRefStringQuery));
|
||||||
|
}
|
||||||
|
|
||||||
|
final String[] localVarAccepts = {
|
||||||
|
"text/plain"
|
||||||
|
};
|
||||||
|
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||||
|
if (localVarAccept != null) {
|
||||||
|
localVarHeaderParams.put("Accept", localVarAccept);
|
||||||
|
}
|
||||||
|
|
||||||
|
final String[] localVarContentTypes = {
|
||||||
|
};
|
||||||
|
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||||
|
if (localVarContentType != null) {
|
||||||
|
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||||
|
}
|
||||||
|
|
||||||
|
String[] localVarAuthNames = new String[] { };
|
||||||
|
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("rawtypes")
|
||||||
|
private okhttp3.Call testEnumRefStringValidateBeforeCall(StringEnumRef enumRefStringQuery, final ApiCallback _callback) throws ApiException {
|
||||||
|
return testEnumRefStringCall(enumRefStringQuery, _callback);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test query parameter(s)
|
||||||
|
* Test query parameter(s)
|
||||||
|
* @param enumRefStringQuery (optional)
|
||||||
|
* @return String
|
||||||
|
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||||
|
* @http.response.details
|
||||||
|
<table summary="Response Details" border="1">
|
||||||
|
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||||
|
<tr><td> 200 </td><td> Successful operation </td><td> - </td></tr>
|
||||||
|
</table>
|
||||||
|
*/
|
||||||
|
public String testEnumRefString(StringEnumRef enumRefStringQuery) throws ApiException {
|
||||||
|
ApiResponse<String> localVarResp = testEnumRefStringWithHttpInfo(enumRefStringQuery);
|
||||||
|
return localVarResp.getData();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test query parameter(s)
|
||||||
|
* Test query parameter(s)
|
||||||
|
* @param enumRefStringQuery (optional)
|
||||||
|
* @return ApiResponse<String>
|
||||||
|
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
|
||||||
|
* @http.response.details
|
||||||
|
<table summary="Response Details" border="1">
|
||||||
|
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||||
|
<tr><td> 200 </td><td> Successful operation </td><td> - </td></tr>
|
||||||
|
</table>
|
||||||
|
*/
|
||||||
|
public ApiResponse<String> testEnumRefStringWithHttpInfo(StringEnumRef enumRefStringQuery) throws ApiException {
|
||||||
|
okhttp3.Call localVarCall = testEnumRefStringValidateBeforeCall(enumRefStringQuery, null);
|
||||||
|
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||||
|
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Test query parameter(s) (asynchronously)
|
||||||
|
* Test query parameter(s)
|
||||||
|
* @param enumRefStringQuery (optional)
|
||||||
|
* @param _callback The callback to be executed when the API call finishes
|
||||||
|
* @return The request call
|
||||||
|
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
|
||||||
|
* @http.response.details
|
||||||
|
<table summary="Response Details" border="1">
|
||||||
|
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
|
||||||
|
<tr><td> 200 </td><td> Successful operation </td><td> - </td></tr>
|
||||||
|
</table>
|
||||||
|
*/
|
||||||
|
public okhttp3.Call testEnumRefStringAsync(StringEnumRef enumRefStringQuery, final ApiCallback<String> _callback) throws ApiException {
|
||||||
|
|
||||||
|
okhttp3.Call localVarCall = testEnumRefStringValidateBeforeCall(enumRefStringQuery, _callback);
|
||||||
|
Type localVarReturnType = new TypeToken<String>(){}.getType();
|
||||||
|
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||||
|
return localVarCall;
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* Build call for testQueryDatetimeDateString
|
* Build call for testQueryDatetimeDateString
|
||||||
* @param datetimeQuery (optional)
|
* @param datetimeQuery (optional)
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ Class | Method | HTTP request | Description
|
|||||||
*FormApi* | [**test_form_integer_boolean_string**](docs/FormApi.md#test_form_integer_boolean_string) | **POST** /form/integer/boolean/string | Test form parameter(s)
|
*FormApi* | [**test_form_integer_boolean_string**](docs/FormApi.md#test_form_integer_boolean_string) | **POST** /form/integer/boolean/string | Test form parameter(s)
|
||||||
*HeaderApi* | [**test_header_integer_boolean_string**](docs/HeaderApi.md#test_header_integer_boolean_string) | **GET** /header/integer/boolean/string | Test header parameter(s)
|
*HeaderApi* | [**test_header_integer_boolean_string**](docs/HeaderApi.md#test_header_integer_boolean_string) | **GET** /header/integer/boolean/string | Test header parameter(s)
|
||||||
*PathApi* | [**tests_path_string_path_string_integer_path_integer**](docs/PathApi.md#tests_path_string_path_string_integer_path_integer) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s)
|
*PathApi* | [**tests_path_string_path_string_integer_path_integer**](docs/PathApi.md#tests_path_string_path_string_integer_path_integer) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s)
|
||||||
|
*QueryApi* | [**test_enum_ref_string**](docs/QueryApi.md#test_enum_ref_string) | **GET** /query/enum_ref_string | Test query parameter(s)
|
||||||
*QueryApi* | [**test_query_datetime_date_string**](docs/QueryApi.md#test_query_datetime_date_string) | **GET** /query/datetime/date/string | Test query parameter(s)
|
*QueryApi* | [**test_query_datetime_date_string**](docs/QueryApi.md#test_query_datetime_date_string) | **GET** /query/datetime/date/string | Test query parameter(s)
|
||||||
*QueryApi* | [**test_query_integer_boolean_string**](docs/QueryApi.md#test_query_integer_boolean_string) | **GET** /query/integer/boolean/string | Test query parameter(s)
|
*QueryApi* | [**test_query_integer_boolean_string**](docs/QueryApi.md#test_query_integer_boolean_string) | **GET** /query/integer/boolean/string | Test query parameter(s)
|
||||||
*QueryApi* | [**test_query_style_deep_object_explode_true_object**](docs/QueryApi.md#test_query_style_deep_object_explode_true_object) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s)
|
*QueryApi* | [**test_query_style_deep_object_explode_true_object**](docs/QueryApi.md#test_query_style_deep_object_explode_true_object) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s)
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ All URIs are relative to *http://localhost:3000*
|
|||||||
|
|
||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
|
[**test_enum_ref_string**](QueryApi.md#test_enum_ref_string) | **GET** /query/enum_ref_string | Test query parameter(s)
|
||||||
[**test_query_datetime_date_string**](QueryApi.md#test_query_datetime_date_string) | **GET** /query/datetime/date/string | Test query parameter(s)
|
[**test_query_datetime_date_string**](QueryApi.md#test_query_datetime_date_string) | **GET** /query/datetime/date/string | Test query parameter(s)
|
||||||
[**test_query_integer_boolean_string**](QueryApi.md#test_query_integer_boolean_string) | **GET** /query/integer/boolean/string | Test query parameter(s)
|
[**test_query_integer_boolean_string**](QueryApi.md#test_query_integer_boolean_string) | **GET** /query/integer/boolean/string | Test query parameter(s)
|
||||||
[**test_query_style_deep_object_explode_true_object**](QueryApi.md#test_query_style_deep_object_explode_true_object) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s)
|
[**test_query_style_deep_object_explode_true_object**](QueryApi.md#test_query_style_deep_object_explode_true_object) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s)
|
||||||
@@ -13,6 +14,72 @@ Method | HTTP request | Description
|
|||||||
[**test_query_style_form_explode_true_object_all_of**](QueryApi.md#test_query_style_form_explode_true_object_all_of) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s)
|
[**test_query_style_form_explode_true_object_all_of**](QueryApi.md#test_query_style_form_explode_true_object_all_of) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s)
|
||||||
|
|
||||||
|
|
||||||
|
# **test_enum_ref_string**
|
||||||
|
> str test_enum_ref_string(enum_ref_string_query=enum_ref_string_query)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
Test query parameter(s)
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
import time
|
||||||
|
import os
|
||||||
|
import openapi_client
|
||||||
|
from openapi_client.models.string_enum_ref import StringEnumRef
|
||||||
|
from openapi_client.rest import ApiException
|
||||||
|
from pprint import pprint
|
||||||
|
|
||||||
|
# Defining the host is optional and defaults to http://localhost:3000
|
||||||
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
|
configuration = openapi_client.Configuration(
|
||||||
|
host = "http://localhost:3000"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Enter a context with an instance of the API client
|
||||||
|
with openapi_client.ApiClient(configuration) as api_client:
|
||||||
|
# Create an instance of the API class
|
||||||
|
api_instance = openapi_client.QueryApi(api_client)
|
||||||
|
enum_ref_string_query = openapi_client.StringEnumRef() # StringEnumRef | (optional)
|
||||||
|
|
||||||
|
try:
|
||||||
|
# Test query parameter(s)
|
||||||
|
api_response = api_instance.test_enum_ref_string(enum_ref_string_query=enum_ref_string_query)
|
||||||
|
print("The response of QueryApi->test_enum_ref_string:\n")
|
||||||
|
pprint(api_response)
|
||||||
|
except Exception as e:
|
||||||
|
print("Exception when calling QueryApi->test_enum_ref_string: %s\n" % e)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**enum_ref_string_query** | [**StringEnumRef**](.md)| | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
**str**
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: text/plain
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
**200** | Successful operation | - |
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **test_query_datetime_date_string**
|
# **test_query_datetime_date_string**
|
||||||
> str test_query_datetime_date_string(datetime_query=datetime_query, date_query=date_query, string_query=string_query)
|
> str test_query_datetime_date_string(datetime_query=datetime_query, date_query=date_query, string_query=string_query)
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ from pydantic import StrictBool, StrictInt, StrictStr
|
|||||||
|
|
||||||
from typing import Any, Dict, Optional
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
|
from openapi_client.models.string_enum_ref import StringEnumRef
|
||||||
|
|
||||||
from openapi_client.api_client import ApiClient
|
from openapi_client.api_client import ApiClient
|
||||||
from openapi_client.exceptions import ( # noqa: F401
|
from openapi_client.exceptions import ( # noqa: F401
|
||||||
@@ -44,6 +45,146 @@ class QueryApi(object):
|
|||||||
api_client = ApiClient.get_default()
|
api_client = ApiClient.get_default()
|
||||||
self.api_client = api_client
|
self.api_client = api_client
|
||||||
|
|
||||||
|
@validate_arguments
|
||||||
|
def test_enum_ref_string(self, enum_ref_string_query : Optional[StringEnumRef] = None, **kwargs) -> str: # noqa: E501
|
||||||
|
"""Test query parameter(s) # noqa: E501
|
||||||
|
|
||||||
|
Test query parameter(s) # noqa: E501
|
||||||
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
|
>>> thread = api.test_enum_ref_string(enum_ref_string_query, async_req=True)
|
||||||
|
>>> result = thread.get()
|
||||||
|
|
||||||
|
:param enum_ref_string_query:
|
||||||
|
:type enum_ref_string_query: StringEnumRef
|
||||||
|
:param async_req: Whether to execute the request asynchronously.
|
||||||
|
:type async_req: bool, optional
|
||||||
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
||||||
|
be returned without reading/decoding response
|
||||||
|
data. Default is True.
|
||||||
|
:type _preload_content: bool, optional
|
||||||
|
:param _request_timeout: timeout setting for this request. If one
|
||||||
|
number provided, it will be total request
|
||||||
|
timeout. It can also be a pair (tuple) of
|
||||||
|
(connection, read) timeouts.
|
||||||
|
:return: Returns the result object.
|
||||||
|
If the method is called asynchronously,
|
||||||
|
returns the request thread.
|
||||||
|
:rtype: str
|
||||||
|
"""
|
||||||
|
kwargs['_return_http_data_only'] = True
|
||||||
|
return self.test_enum_ref_string_with_http_info(enum_ref_string_query, **kwargs) # noqa: E501
|
||||||
|
|
||||||
|
@validate_arguments
|
||||||
|
def test_enum_ref_string_with_http_info(self, enum_ref_string_query : Optional[StringEnumRef] = None, **kwargs): # noqa: E501
|
||||||
|
"""Test query parameter(s) # noqa: E501
|
||||||
|
|
||||||
|
Test query parameter(s) # noqa: E501
|
||||||
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
|
>>> thread = api.test_enum_ref_string_with_http_info(enum_ref_string_query, async_req=True)
|
||||||
|
>>> result = thread.get()
|
||||||
|
|
||||||
|
:param enum_ref_string_query:
|
||||||
|
:type enum_ref_string_query: StringEnumRef
|
||||||
|
:param async_req: Whether to execute the request asynchronously.
|
||||||
|
:type async_req: bool, optional
|
||||||
|
:param _return_http_data_only: response data without head status code
|
||||||
|
and headers
|
||||||
|
:type _return_http_data_only: bool, optional
|
||||||
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
||||||
|
be returned without reading/decoding response
|
||||||
|
data. Default is True.
|
||||||
|
:type _preload_content: bool, optional
|
||||||
|
:param _request_timeout: timeout setting for this request. If one
|
||||||
|
number provided, it will be total request
|
||||||
|
timeout. It can also be a pair (tuple) of
|
||||||
|
(connection, read) timeouts.
|
||||||
|
:param _request_auth: set to override the auth_settings for an a single
|
||||||
|
request; this effectively ignores the authentication
|
||||||
|
in the spec for a single request.
|
||||||
|
:type _request_auth: dict, optional
|
||||||
|
:type _content_type: string, optional: force content-type for the request
|
||||||
|
:return: Returns the result object.
|
||||||
|
If the method is called asynchronously,
|
||||||
|
returns the request thread.
|
||||||
|
:rtype: tuple(str, status_code(int), headers(HTTPHeaderDict))
|
||||||
|
"""
|
||||||
|
|
||||||
|
_params = locals()
|
||||||
|
|
||||||
|
_all_params = [
|
||||||
|
'enum_ref_string_query'
|
||||||
|
]
|
||||||
|
_all_params.extend(
|
||||||
|
[
|
||||||
|
'async_req',
|
||||||
|
'_return_http_data_only',
|
||||||
|
'_preload_content',
|
||||||
|
'_request_timeout',
|
||||||
|
'_request_auth',
|
||||||
|
'_content_type',
|
||||||
|
'_headers'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# validate the arguments
|
||||||
|
for _key, _val in _params['kwargs'].items():
|
||||||
|
if _key not in _all_params:
|
||||||
|
raise ApiTypeError(
|
||||||
|
"Got an unexpected keyword argument '%s'"
|
||||||
|
" to method test_enum_ref_string" % _key
|
||||||
|
)
|
||||||
|
_params[_key] = _val
|
||||||
|
del _params['kwargs']
|
||||||
|
|
||||||
|
_collection_formats = {}
|
||||||
|
|
||||||
|
# process the path parameters
|
||||||
|
_path_params = {}
|
||||||
|
|
||||||
|
# process the query parameters
|
||||||
|
_query_params = []
|
||||||
|
if _params.get('enum_ref_string_query') is not None: # noqa: E501
|
||||||
|
_query_params.append(('enum_ref_string_query', _params['enum_ref_string_query'].value))
|
||||||
|
|
||||||
|
# process the header parameters
|
||||||
|
_header_params = dict(_params.get('_headers', {}))
|
||||||
|
# process the form parameters
|
||||||
|
_form_params = []
|
||||||
|
_files = {}
|
||||||
|
# process the body parameter
|
||||||
|
_body_params = None
|
||||||
|
# set the HTTP header `Accept`
|
||||||
|
_header_params['Accept'] = self.api_client.select_header_accept(
|
||||||
|
['text/plain']) # noqa: E501
|
||||||
|
|
||||||
|
# authentication setting
|
||||||
|
_auth_settings = [] # noqa: E501
|
||||||
|
|
||||||
|
_response_types_map = {
|
||||||
|
'200': "str",
|
||||||
|
}
|
||||||
|
|
||||||
|
return self.api_client.call_api(
|
||||||
|
'/query/enum_ref_string', 'GET',
|
||||||
|
_path_params,
|
||||||
|
_query_params,
|
||||||
|
_header_params,
|
||||||
|
body=_body_params,
|
||||||
|
post_params=_form_params,
|
||||||
|
files=_files,
|
||||||
|
response_types_map=_response_types_map,
|
||||||
|
auth_settings=_auth_settings,
|
||||||
|
async_req=_params.get('async_req'),
|
||||||
|
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
||||||
|
_preload_content=_params.get('_preload_content', True),
|
||||||
|
_request_timeout=_params.get('_request_timeout'),
|
||||||
|
collection_formats=_collection_formats,
|
||||||
|
_request_auth=_params.get('_request_auth'))
|
||||||
|
|
||||||
@validate_arguments
|
@validate_arguments
|
||||||
def test_query_datetime_date_string(self, datetime_query : Optional[datetime] = None, date_query : Optional[date] = None, string_query : Optional[StrictStr] = None, **kwargs) -> str: # noqa: E501
|
def test_query_datetime_date_string(self, datetime_query : Optional[datetime] = None, date_query : Optional[date] = None, string_query : Optional[StrictStr] = None, **kwargs) -> str: # noqa: E501
|
||||||
"""Test query parameter(s) # noqa: E501
|
"""Test query parameter(s) # noqa: E501
|
||||||
|
|||||||
@@ -29,6 +29,16 @@ class TestManual(unittest.TestCase):
|
|||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
def testEnumRefString(self):
|
||||||
|
api_instance = openapi_client.QueryApi()
|
||||||
|
q = openapi_client.StringEnumRef("unclassified")
|
||||||
|
|
||||||
|
# Test query parameter(s)
|
||||||
|
api_response = api_instance.test_enum_ref_string(enum_ref_string_query=q)
|
||||||
|
e = EchoServerResponseParser(api_response)
|
||||||
|
self.assertEqual(e.path, "/query/enum_ref_string?enum_ref_string_query=unclassified")
|
||||||
|
|
||||||
|
|
||||||
def testDateTimeQueryWithDateTimeFormat(self):
|
def testDateTimeQueryWithDateTimeFormat(self):
|
||||||
api_instance = openapi_client.QueryApi()
|
api_instance = openapi_client.QueryApi()
|
||||||
datetime_format_backup = api_instance.api_client.configuration.datetime_format # backup dateime_format
|
datetime_format_backup = api_instance.api_client.configuration.datetime_format # backup dateime_format
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ Class | Method | HTTP request | Description
|
|||||||
*AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
|
*AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
|
||||||
*DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo |
|
*DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo |
|
||||||
*FakeApi* | [**fake_any_type_request_body**](docs/FakeApi.md#fake_any_type_request_body) | **POST** /fake/any_type_body | test any type request body
|
*FakeApi* | [**fake_any_type_request_body**](docs/FakeApi.md#fake_any_type_request_body) | **POST** /fake/any_type_body | test any type request body
|
||||||
|
*FakeApi* | [**fake_enum_ref_query_parameter**](docs/FakeApi.md#fake_enum_ref_query_parameter) | **GET** /fake/enum_ref_query_parameter | test enum reference query parameter
|
||||||
*FakeApi* | [**fake_health_get**](docs/FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
*FakeApi* | [**fake_health_get**](docs/FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
||||||
*FakeApi* | [**fake_http_signature_test**](docs/FakeApi.md#fake_http_signature_test) | **GET** /fake/http-signature-test | test http signature authentication
|
*FakeApi* | [**fake_http_signature_test**](docs/FakeApi.md#fake_http_signature_test) | **GET** /fake/http-signature-test | test http signature authentication
|
||||||
*FakeApi* | [**fake_outer_boolean_serialize**](docs/FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
*FakeApi* | [**fake_outer_boolean_serialize**](docs/FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**fake_any_type_request_body**](FakeApi.md#fake_any_type_request_body) | **POST** /fake/any_type_body | test any type request body
|
[**fake_any_type_request_body**](FakeApi.md#fake_any_type_request_body) | **POST** /fake/any_type_body | test any type request body
|
||||||
|
[**fake_enum_ref_query_parameter**](FakeApi.md#fake_enum_ref_query_parameter) | **GET** /fake/enum_ref_query_parameter | test enum reference query parameter
|
||||||
[**fake_health_get**](FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
[**fake_health_get**](FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
||||||
[**fake_http_signature_test**](FakeApi.md#fake_http_signature_test) | **GET** /fake/http-signature-test | test http signature authentication
|
[**fake_http_signature_test**](FakeApi.md#fake_http_signature_test) | **GET** /fake/http-signature-test | test http signature authentication
|
||||||
[**fake_outer_boolean_serialize**](FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
[**fake_outer_boolean_serialize**](FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
||||||
@@ -85,6 +86,68 @@ No authorization required
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **fake_enum_ref_query_parameter**
|
||||||
|
> fake_enum_ref_query_parameter(enum_ref=enum_ref)
|
||||||
|
|
||||||
|
test enum reference query parameter
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
import time
|
||||||
|
import os
|
||||||
|
import petstore_api
|
||||||
|
from petstore_api.models.enum_class import EnumClass
|
||||||
|
from petstore_api.rest import ApiException
|
||||||
|
from pprint import pprint
|
||||||
|
|
||||||
|
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||||
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
|
configuration = petstore_api.Configuration(
|
||||||
|
host = "http://petstore.swagger.io:80/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Enter a context with an instance of the API client
|
||||||
|
async with petstore_api.ApiClient(configuration) as api_client:
|
||||||
|
# Create an instance of the API class
|
||||||
|
api_instance = petstore_api.FakeApi(api_client)
|
||||||
|
enum_ref = petstore_api.EnumClass() # EnumClass | enum reference (optional)
|
||||||
|
|
||||||
|
try:
|
||||||
|
# test enum reference query parameter
|
||||||
|
await api_instance.fake_enum_ref_query_parameter(enum_ref=enum_ref)
|
||||||
|
except Exception as e:
|
||||||
|
print("Exception when calling FakeApi->fake_enum_ref_query_parameter: %s\n" % e)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**enum_ref** | [**EnumClass**](.md)| enum reference | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
void (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
**200** | OK | - |
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **fake_health_get**
|
# **fake_health_get**
|
||||||
> HealthCheckResult fake_health_get()
|
> HealthCheckResult fake_health_get()
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ from pydantic import Field, StrictBool, StrictInt, StrictStr, confloat, conint,
|
|||||||
from typing import Any, Dict, Optional
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
from petstore_api.models.client import Client
|
from petstore_api.models.client import Client
|
||||||
|
from petstore_api.models.enum_class import EnumClass
|
||||||
from petstore_api.models.file_schema_test_class import FileSchemaTestClass
|
from petstore_api.models.file_schema_test_class import FileSchemaTestClass
|
||||||
from petstore_api.models.health_check_result import HealthCheckResult
|
from petstore_api.models.health_check_result import HealthCheckResult
|
||||||
from petstore_api.models.outer_composite import OuterComposite
|
from petstore_api.models.outer_composite import OuterComposite
|
||||||
@@ -200,6 +201,148 @@ class FakeApi(object):
|
|||||||
collection_formats=_collection_formats,
|
collection_formats=_collection_formats,
|
||||||
_request_auth=_params.get('_request_auth'))
|
_request_auth=_params.get('_request_auth'))
|
||||||
|
|
||||||
|
@overload
|
||||||
|
async def fake_enum_ref_query_parameter(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, **kwargs) -> None: # noqa: E501
|
||||||
|
...
|
||||||
|
|
||||||
|
@overload
|
||||||
|
def fake_enum_ref_query_parameter(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, async_req: Optional[bool]=True, **kwargs) -> None: # noqa: E501
|
||||||
|
...
|
||||||
|
|
||||||
|
@validate_arguments
|
||||||
|
def fake_enum_ref_query_parameter(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[None, Awaitable[None]]: # noqa: E501
|
||||||
|
"""test enum reference query parameter # noqa: E501
|
||||||
|
|
||||||
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
|
>>> thread = api.fake_enum_ref_query_parameter(enum_ref, async_req=True)
|
||||||
|
>>> result = thread.get()
|
||||||
|
|
||||||
|
:param enum_ref: enum reference
|
||||||
|
:type enum_ref: EnumClass
|
||||||
|
:param async_req: Whether to execute the request asynchronously.
|
||||||
|
:type async_req: bool, optional
|
||||||
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
||||||
|
be returned without reading/decoding response
|
||||||
|
data. Default is True.
|
||||||
|
:type _preload_content: bool, optional
|
||||||
|
:param _request_timeout: timeout setting for this request. If one
|
||||||
|
number provided, it will be total request
|
||||||
|
timeout. It can also be a pair (tuple) of
|
||||||
|
(connection, read) timeouts.
|
||||||
|
:return: Returns the result object.
|
||||||
|
If the method is called asynchronously,
|
||||||
|
returns the request thread.
|
||||||
|
:rtype: None
|
||||||
|
"""
|
||||||
|
kwargs['_return_http_data_only'] = True
|
||||||
|
if async_req is not None:
|
||||||
|
kwargs['async_req'] = async_req
|
||||||
|
return self.fake_enum_ref_query_parameter_with_http_info(enum_ref, **kwargs) # noqa: E501
|
||||||
|
|
||||||
|
@validate_arguments
|
||||||
|
def fake_enum_ref_query_parameter_with_http_info(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, **kwargs): # noqa: E501
|
||||||
|
"""test enum reference query parameter # noqa: E501
|
||||||
|
|
||||||
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
|
>>> thread = api.fake_enum_ref_query_parameter_with_http_info(enum_ref, async_req=True)
|
||||||
|
>>> result = thread.get()
|
||||||
|
|
||||||
|
:param enum_ref: enum reference
|
||||||
|
:type enum_ref: EnumClass
|
||||||
|
:param async_req: Whether to execute the request asynchronously.
|
||||||
|
:type async_req: bool, optional
|
||||||
|
:param _return_http_data_only: response data without head status code
|
||||||
|
and headers
|
||||||
|
:type _return_http_data_only: bool, optional
|
||||||
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
||||||
|
be returned without reading/decoding response
|
||||||
|
data. Default is True.
|
||||||
|
:type _preload_content: bool, optional
|
||||||
|
:param _request_timeout: timeout setting for this request. If one
|
||||||
|
number provided, it will be total request
|
||||||
|
timeout. It can also be a pair (tuple) of
|
||||||
|
(connection, read) timeouts.
|
||||||
|
:param _request_auth: set to override the auth_settings for an a single
|
||||||
|
request; this effectively ignores the authentication
|
||||||
|
in the spec for a single request.
|
||||||
|
:type _request_auth: dict, optional
|
||||||
|
:type _content_type: string, optional: force content-type for the request
|
||||||
|
:return: Returns the result object.
|
||||||
|
If the method is called asynchronously,
|
||||||
|
returns the request thread.
|
||||||
|
:rtype: None
|
||||||
|
"""
|
||||||
|
|
||||||
|
_params = locals()
|
||||||
|
|
||||||
|
_all_params = [
|
||||||
|
'enum_ref'
|
||||||
|
]
|
||||||
|
_all_params.extend(
|
||||||
|
[
|
||||||
|
'async_req',
|
||||||
|
'_return_http_data_only',
|
||||||
|
'_preload_content',
|
||||||
|
'_request_timeout',
|
||||||
|
'_request_auth',
|
||||||
|
'_content_type',
|
||||||
|
'_headers'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# validate the arguments
|
||||||
|
for _key, _val in _params['kwargs'].items():
|
||||||
|
if _key not in _all_params:
|
||||||
|
raise ApiTypeError(
|
||||||
|
"Got an unexpected keyword argument '%s'"
|
||||||
|
" to method fake_enum_ref_query_parameter" % _key
|
||||||
|
)
|
||||||
|
_params[_key] = _val
|
||||||
|
del _params['kwargs']
|
||||||
|
|
||||||
|
_collection_formats = {}
|
||||||
|
|
||||||
|
# process the path parameters
|
||||||
|
_path_params = {}
|
||||||
|
|
||||||
|
# process the query parameters
|
||||||
|
_query_params = []
|
||||||
|
if _params.get('enum_ref') is not None: # noqa: E501
|
||||||
|
_query_params.append(('enum_ref', _params['enum_ref'].value))
|
||||||
|
|
||||||
|
# process the header parameters
|
||||||
|
_header_params = dict(_params.get('_headers', {}))
|
||||||
|
# process the form parameters
|
||||||
|
_form_params = []
|
||||||
|
_files = {}
|
||||||
|
# process the body parameter
|
||||||
|
_body_params = None
|
||||||
|
# authentication setting
|
||||||
|
_auth_settings = [] # noqa: E501
|
||||||
|
|
||||||
|
_response_types_map = {}
|
||||||
|
|
||||||
|
return self.api_client.call_api(
|
||||||
|
'/fake/enum_ref_query_parameter', 'GET',
|
||||||
|
_path_params,
|
||||||
|
_query_params,
|
||||||
|
_header_params,
|
||||||
|
body=_body_params,
|
||||||
|
post_params=_form_params,
|
||||||
|
files=_files,
|
||||||
|
response_types_map=_response_types_map,
|
||||||
|
auth_settings=_auth_settings,
|
||||||
|
async_req=_params.get('async_req'),
|
||||||
|
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
||||||
|
_preload_content=_params.get('_preload_content', True),
|
||||||
|
_request_timeout=_params.get('_request_timeout'),
|
||||||
|
collection_formats=_collection_formats,
|
||||||
|
_request_auth=_params.get('_request_auth'))
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
async def fake_health_get(self, **kwargs) -> HealthCheckResult: # noqa: E501
|
async def fake_health_get(self, **kwargs) -> HealthCheckResult: # noqa: E501
|
||||||
...
|
...
|
||||||
|
|||||||
@@ -460,7 +460,7 @@ class PetApi(object):
|
|||||||
# process the query parameters
|
# process the query parameters
|
||||||
_query_params = []
|
_query_params = []
|
||||||
if _params.get('status') is not None: # noqa: E501
|
if _params.get('status') is not None: # noqa: E501
|
||||||
_query_params.append(('status', _params['status'].value))
|
_query_params.append(('status', _params['status']))
|
||||||
_collection_formats['status'] = 'csv'
|
_collection_formats['status'] = 'csv'
|
||||||
|
|
||||||
# process the header parameters
|
# process the header parameters
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ Class | Method | HTTP request | Description
|
|||||||
*AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
|
*AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
|
||||||
*DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo |
|
*DefaultApi* | [**foo_get**](docs/DefaultApi.md#foo_get) | **GET** /foo |
|
||||||
*FakeApi* | [**fake_any_type_request_body**](docs/FakeApi.md#fake_any_type_request_body) | **POST** /fake/any_type_body | test any type request body
|
*FakeApi* | [**fake_any_type_request_body**](docs/FakeApi.md#fake_any_type_request_body) | **POST** /fake/any_type_body | test any type request body
|
||||||
|
*FakeApi* | [**fake_enum_ref_query_parameter**](docs/FakeApi.md#fake_enum_ref_query_parameter) | **GET** /fake/enum_ref_query_parameter | test enum reference query parameter
|
||||||
*FakeApi* | [**fake_health_get**](docs/FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
*FakeApi* | [**fake_health_get**](docs/FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
||||||
*FakeApi* | [**fake_http_signature_test**](docs/FakeApi.md#fake_http_signature_test) | **GET** /fake/http-signature-test | test http signature authentication
|
*FakeApi* | [**fake_http_signature_test**](docs/FakeApi.md#fake_http_signature_test) | **GET** /fake/http-signature-test | test http signature authentication
|
||||||
*FakeApi* | [**fake_outer_boolean_serialize**](docs/FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
*FakeApi* | [**fake_outer_boolean_serialize**](docs/FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
|||||||
Method | HTTP request | Description
|
Method | HTTP request | Description
|
||||||
------------- | ------------- | -------------
|
------------- | ------------- | -------------
|
||||||
[**fake_any_type_request_body**](FakeApi.md#fake_any_type_request_body) | **POST** /fake/any_type_body | test any type request body
|
[**fake_any_type_request_body**](FakeApi.md#fake_any_type_request_body) | **POST** /fake/any_type_body | test any type request body
|
||||||
|
[**fake_enum_ref_query_parameter**](FakeApi.md#fake_enum_ref_query_parameter) | **GET** /fake/enum_ref_query_parameter | test enum reference query parameter
|
||||||
[**fake_health_get**](FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
[**fake_health_get**](FakeApi.md#fake_health_get) | **GET** /fake/health | Health check endpoint
|
||||||
[**fake_http_signature_test**](FakeApi.md#fake_http_signature_test) | **GET** /fake/http-signature-test | test http signature authentication
|
[**fake_http_signature_test**](FakeApi.md#fake_http_signature_test) | **GET** /fake/http-signature-test | test http signature authentication
|
||||||
[**fake_outer_boolean_serialize**](FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
[**fake_outer_boolean_serialize**](FakeApi.md#fake_outer_boolean_serialize) | **POST** /fake/outer/boolean |
|
||||||
@@ -85,6 +86,68 @@ No authorization required
|
|||||||
|
|
||||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
|
# **fake_enum_ref_query_parameter**
|
||||||
|
> fake_enum_ref_query_parameter(enum_ref=enum_ref)
|
||||||
|
|
||||||
|
test enum reference query parameter
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
```python
|
||||||
|
import time
|
||||||
|
import os
|
||||||
|
import petstore_api
|
||||||
|
from petstore_api.models.enum_class import EnumClass
|
||||||
|
from petstore_api.rest import ApiException
|
||||||
|
from pprint import pprint
|
||||||
|
|
||||||
|
# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
|
||||||
|
# See configuration.py for a list of all supported configuration parameters.
|
||||||
|
configuration = petstore_api.Configuration(
|
||||||
|
host = "http://petstore.swagger.io:80/v2"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Enter a context with an instance of the API client
|
||||||
|
with petstore_api.ApiClient(configuration) as api_client:
|
||||||
|
# Create an instance of the API class
|
||||||
|
api_instance = petstore_api.FakeApi(api_client)
|
||||||
|
enum_ref = petstore_api.EnumClass() # EnumClass | enum reference (optional)
|
||||||
|
|
||||||
|
try:
|
||||||
|
# test enum reference query parameter
|
||||||
|
api_instance.fake_enum_ref_query_parameter(enum_ref=enum_ref)
|
||||||
|
except Exception as e:
|
||||||
|
print("Exception when calling FakeApi->fake_enum_ref_query_parameter: %s\n" % e)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
Name | Type | Description | Notes
|
||||||
|
------------- | ------------- | ------------- | -------------
|
||||||
|
**enum_ref** | [**EnumClass**](.md)| enum reference | [optional]
|
||||||
|
|
||||||
|
### Return type
|
||||||
|
|
||||||
|
void (empty response body)
|
||||||
|
|
||||||
|
### Authorization
|
||||||
|
|
||||||
|
No authorization required
|
||||||
|
|
||||||
|
### HTTP request headers
|
||||||
|
|
||||||
|
- **Content-Type**: Not defined
|
||||||
|
- **Accept**: Not defined
|
||||||
|
|
||||||
|
### HTTP response details
|
||||||
|
| Status code | Description | Response headers |
|
||||||
|
|-------------|-------------|------------------|
|
||||||
|
**200** | OK | - |
|
||||||
|
|
||||||
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||||
|
|
||||||
# **fake_health_get**
|
# **fake_health_get**
|
||||||
> HealthCheckResult fake_health_get()
|
> HealthCheckResult fake_health_get()
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, confl
|
|||||||
from typing import Any, Dict, Optional
|
from typing import Any, Dict, Optional
|
||||||
|
|
||||||
from petstore_api.models.client import Client
|
from petstore_api.models.client import Client
|
||||||
|
from petstore_api.models.enum_class import EnumClass
|
||||||
from petstore_api.models.file_schema_test_class import FileSchemaTestClass
|
from petstore_api.models.file_schema_test_class import FileSchemaTestClass
|
||||||
from petstore_api.models.health_check_result import HealthCheckResult
|
from petstore_api.models.health_check_result import HealthCheckResult
|
||||||
from petstore_api.models.outer_composite import OuterComposite
|
from petstore_api.models.outer_composite import OuterComposite
|
||||||
@@ -189,6 +190,138 @@ class FakeApi(object):
|
|||||||
collection_formats=_collection_formats,
|
collection_formats=_collection_formats,
|
||||||
_request_auth=_params.get('_request_auth'))
|
_request_auth=_params.get('_request_auth'))
|
||||||
|
|
||||||
|
@validate_arguments
|
||||||
|
def fake_enum_ref_query_parameter(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, **kwargs) -> None: # noqa: E501
|
||||||
|
"""test enum reference query parameter # noqa: E501
|
||||||
|
|
||||||
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
|
>>> thread = api.fake_enum_ref_query_parameter(enum_ref, async_req=True)
|
||||||
|
>>> result = thread.get()
|
||||||
|
|
||||||
|
:param enum_ref: enum reference
|
||||||
|
:type enum_ref: EnumClass
|
||||||
|
:param async_req: Whether to execute the request asynchronously.
|
||||||
|
:type async_req: bool, optional
|
||||||
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
||||||
|
be returned without reading/decoding response
|
||||||
|
data. Default is True.
|
||||||
|
:type _preload_content: bool, optional
|
||||||
|
:param _request_timeout: timeout setting for this request. If one
|
||||||
|
number provided, it will be total request
|
||||||
|
timeout. It can also be a pair (tuple) of
|
||||||
|
(connection, read) timeouts.
|
||||||
|
:return: Returns the result object.
|
||||||
|
If the method is called asynchronously,
|
||||||
|
returns the request thread.
|
||||||
|
:rtype: None
|
||||||
|
"""
|
||||||
|
kwargs['_return_http_data_only'] = True
|
||||||
|
return self.fake_enum_ref_query_parameter_with_http_info(enum_ref, **kwargs) # noqa: E501
|
||||||
|
|
||||||
|
@validate_arguments
|
||||||
|
def fake_enum_ref_query_parameter_with_http_info(self, enum_ref : Annotated[Optional[EnumClass], Field(description="enum reference")] = None, **kwargs): # noqa: E501
|
||||||
|
"""test enum reference query parameter # noqa: E501
|
||||||
|
|
||||||
|
This method makes a synchronous HTTP request by default. To make an
|
||||||
|
asynchronous HTTP request, please pass async_req=True
|
||||||
|
|
||||||
|
>>> thread = api.fake_enum_ref_query_parameter_with_http_info(enum_ref, async_req=True)
|
||||||
|
>>> result = thread.get()
|
||||||
|
|
||||||
|
:param enum_ref: enum reference
|
||||||
|
:type enum_ref: EnumClass
|
||||||
|
:param async_req: Whether to execute the request asynchronously.
|
||||||
|
:type async_req: bool, optional
|
||||||
|
:param _return_http_data_only: response data without head status code
|
||||||
|
and headers
|
||||||
|
:type _return_http_data_only: bool, optional
|
||||||
|
:param _preload_content: if False, the urllib3.HTTPResponse object will
|
||||||
|
be returned without reading/decoding response
|
||||||
|
data. Default is True.
|
||||||
|
:type _preload_content: bool, optional
|
||||||
|
:param _request_timeout: timeout setting for this request. If one
|
||||||
|
number provided, it will be total request
|
||||||
|
timeout. It can also be a pair (tuple) of
|
||||||
|
(connection, read) timeouts.
|
||||||
|
:param _request_auth: set to override the auth_settings for an a single
|
||||||
|
request; this effectively ignores the authentication
|
||||||
|
in the spec for a single request.
|
||||||
|
:type _request_auth: dict, optional
|
||||||
|
:type _content_type: string, optional: force content-type for the request
|
||||||
|
:return: Returns the result object.
|
||||||
|
If the method is called asynchronously,
|
||||||
|
returns the request thread.
|
||||||
|
:rtype: None
|
||||||
|
"""
|
||||||
|
|
||||||
|
_params = locals()
|
||||||
|
|
||||||
|
_all_params = [
|
||||||
|
'enum_ref'
|
||||||
|
]
|
||||||
|
_all_params.extend(
|
||||||
|
[
|
||||||
|
'async_req',
|
||||||
|
'_return_http_data_only',
|
||||||
|
'_preload_content',
|
||||||
|
'_request_timeout',
|
||||||
|
'_request_auth',
|
||||||
|
'_content_type',
|
||||||
|
'_headers'
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
# validate the arguments
|
||||||
|
for _key, _val in _params['kwargs'].items():
|
||||||
|
if _key not in _all_params:
|
||||||
|
raise ApiTypeError(
|
||||||
|
"Got an unexpected keyword argument '%s'"
|
||||||
|
" to method fake_enum_ref_query_parameter" % _key
|
||||||
|
)
|
||||||
|
_params[_key] = _val
|
||||||
|
del _params['kwargs']
|
||||||
|
|
||||||
|
_collection_formats = {}
|
||||||
|
|
||||||
|
# process the path parameters
|
||||||
|
_path_params = {}
|
||||||
|
|
||||||
|
# process the query parameters
|
||||||
|
_query_params = []
|
||||||
|
if _params.get('enum_ref') is not None: # noqa: E501
|
||||||
|
_query_params.append(('enum_ref', _params['enum_ref'].value))
|
||||||
|
|
||||||
|
# process the header parameters
|
||||||
|
_header_params = dict(_params.get('_headers', {}))
|
||||||
|
# process the form parameters
|
||||||
|
_form_params = []
|
||||||
|
_files = {}
|
||||||
|
# process the body parameter
|
||||||
|
_body_params = None
|
||||||
|
# authentication setting
|
||||||
|
_auth_settings = [] # noqa: E501
|
||||||
|
|
||||||
|
_response_types_map = {}
|
||||||
|
|
||||||
|
return self.api_client.call_api(
|
||||||
|
'/fake/enum_ref_query_parameter', 'GET',
|
||||||
|
_path_params,
|
||||||
|
_query_params,
|
||||||
|
_header_params,
|
||||||
|
body=_body_params,
|
||||||
|
post_params=_form_params,
|
||||||
|
files=_files,
|
||||||
|
response_types_map=_response_types_map,
|
||||||
|
auth_settings=_auth_settings,
|
||||||
|
async_req=_params.get('async_req'),
|
||||||
|
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
||||||
|
_preload_content=_params.get('_preload_content', True),
|
||||||
|
_request_timeout=_params.get('_request_timeout'),
|
||||||
|
collection_formats=_collection_formats,
|
||||||
|
_request_auth=_params.get('_request_auth'))
|
||||||
|
|
||||||
@validate_arguments
|
@validate_arguments
|
||||||
def fake_health_get(self, **kwargs) -> HealthCheckResult: # noqa: E501
|
def fake_health_get(self, **kwargs) -> HealthCheckResult: # noqa: E501
|
||||||
"""Health check endpoint # noqa: E501
|
"""Health check endpoint # noqa: E501
|
||||||
|
|||||||
@@ -429,7 +429,7 @@ class PetApi(object):
|
|||||||
# process the query parameters
|
# process the query parameters
|
||||||
_query_params = []
|
_query_params = []
|
||||||
if _params.get('status') is not None: # noqa: E501
|
if _params.get('status') is not None: # noqa: E501
|
||||||
_query_params.append(('status', _params['status'].value))
|
_query_params.append(('status', _params['status']))
|
||||||
_collection_formats['status'] = 'csv'
|
_collection_formats['status'] = 'csv'
|
||||||
|
|
||||||
# process the header parameters
|
# process the header parameters
|
||||||
|
|||||||
@@ -413,3 +413,9 @@ class ModelTests(unittest.TestCase):
|
|||||||
d = {"optionalDict": {"a": {"b": {"aProperty": "value"}}}}
|
d = {"optionalDict": {"a": {"b": {"aProperty": "value"}}}}
|
||||||
a = petstore_api.Parent.from_dict(d)
|
a = petstore_api.Parent.from_dict(d)
|
||||||
self.assertEqual(a.to_dict(), d)
|
self.assertEqual(a.to_dict(), d)
|
||||||
|
|
||||||
|
def test_eum_class(self):
|
||||||
|
a = petstore_api.EnumClass("-efg")
|
||||||
|
self.assertEqual(a.value, "-efg")
|
||||||
|
self.assertEqual(a.name, "MINUS_EFG")
|
||||||
|
self.assertEqual(a, "-efg")
|
||||||
|
|||||||
Reference in New Issue
Block a user