mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-02 21:50:55 +00:00
* fix #16797 and #15796 spring child constructor missing parent params * root cause and update the DefaultCodegen.java to add missing property when with multi inheritance * rollback SpringCodegen.java * update samples * rollback with master cause #16992 fixed this issue too * still using orignal design * catchup master * catchup master * catchup master * fix * add tests --------- Co-authored-by: dabdirb <dabdirb@gmail.com>
This commit is contained in:
parent
6317796cba
commit
64f2cad9e8
@ -3724,6 +3724,10 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
return;
|
||||
}
|
||||
if (ModelUtils.isComposedSchema(schema)) {
|
||||
// fix issue #16797 and #15796, constructor fail by missing parent required params
|
||||
if (schema.getProperties() != null && !schema.getProperties().isEmpty()) {
|
||||
properties.putAll(schema.getProperties());
|
||||
}
|
||||
|
||||
if (schema.getAllOf() != null) {
|
||||
for (Object component : schema.getAllOf()) {
|
||||
@ -3747,6 +3751,11 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
}
|
||||
|
||||
for (String r : required) {
|
||||
if (!properties.containsKey(r)) {
|
||||
LOGGER.error("Required var %s not in properties", r);
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -7324,7 +7333,7 @@ public class DefaultCodegen implements CodegenConfig {
|
||||
}
|
||||
|
||||
protected void updateRequestBodyForMap(CodegenParameter codegenParameter, Schema schema, String name, Set<String> imports, String bodyParameterName) {
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
if (StringUtils.isNotBlank(name) && !(ModelUtils.isFreeFormObject(schema) && !ModelUtils.shouldGenerateFreeFormObjectModel(name, this))) {
|
||||
this.addBodyModelSchema(codegenParameter, name, schema, imports, bodyParameterName, true);
|
||||
} else {
|
||||
Schema inner = ModelUtils.getAdditionalProperties(schema);
|
||||
|
@ -509,16 +509,7 @@ public class DefaultGenerator implements Generator {
|
||||
Schema schema = schemas.get(name);
|
||||
|
||||
if (ModelUtils.isFreeFormObject(schema)) { // check to see if it's a free-form object
|
||||
// there are 3 free form use cases
|
||||
// 1. free form with no validation that is not allOf included in any composed schemas
|
||||
// 2. free form with validation
|
||||
// 3. free form that is allOf included in any composed schemas
|
||||
// this use case arises when using interface schemas
|
||||
// generators may choose to make models for use case 2 + 3
|
||||
Schema refSchema = new Schema();
|
||||
refSchema.set$ref("#/components/schemas/" + name);
|
||||
Schema unaliasedSchema = config.unaliasSchema(refSchema);
|
||||
if (unaliasedSchema.get$ref() == null) {
|
||||
if (!ModelUtils.shouldGenerateFreeFormObjectModel(name, config)) {
|
||||
LOGGER.info("Model {} not generated since it's a free-form object", name);
|
||||
continue;
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ import io.swagger.v3.parser.util.RemoteUrl;
|
||||
import io.swagger.v3.parser.util.SchemaTypeUtil;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.openapitools.codegen.CodegenConfig;
|
||||
import org.openapitools.codegen.CodegenModel;
|
||||
import org.openapitools.codegen.IJsonSchemaValidationProperties;
|
||||
import org.openapitools.codegen.config.GlobalSettings;
|
||||
@ -831,6 +832,19 @@ public class ModelUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean shouldGenerateFreeFormObjectModel(String name, CodegenConfig config) {
|
||||
// there are 3 free form use cases
|
||||
// 1. free form with no validation that is not allOf included in any composed schemas
|
||||
// 2. free form with validation
|
||||
// 3. free form that is allOf included in any composed schemas
|
||||
// this use case arises when using interface schemas
|
||||
// generators may choose to make models for use case 2 + 3
|
||||
Schema refSchema = new Schema();
|
||||
refSchema.set$ref("#/components/schemas/" + name);
|
||||
Schema unaliasedSchema = config.unaliasSchema(refSchema);
|
||||
return unaliasedSchema.get$ref() != null;
|
||||
}
|
||||
|
||||
/**
|
||||
* If a Schema contains a reference to another Schema with '$ref', returns the referenced Schema if it is found or the actual Schema in the other cases.
|
||||
*
|
||||
|
@ -4388,4 +4388,34 @@ public class SpringCodegenTest {
|
||||
assertFileContains(Paths.get(outputPath + "/src/main/java/org/openapitools/api/PetApi.java"),
|
||||
"@Valid @RequestParam(value = \"additionalMetadata\", required = false) String additionalMetadata");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMultiInheritanceParentRequiredParams_issue16797() throws IOException {
|
||||
final Map<String, File> output = generateFromContract("src/test/resources/3_0/spring/issue_16797.yaml", SPRING_BOOT);
|
||||
// constructor should as
|
||||
// public Object4(Type1 pageInfo, String responseType, String requestId, Boolean success) {
|
||||
// super(responseType, requestId, success, pageInfo);
|
||||
// }
|
||||
JavaFileAssert.assertThat(output.get("Object4.java"))
|
||||
.assertConstructor("Type1", "String", "String", "Boolean")
|
||||
.hasParameter("responseType").toConstructor()
|
||||
.hasParameter("requestId").toConstructor()
|
||||
.hasParameter("success").toConstructor()
|
||||
.hasParameter("pageInfo").toConstructor()
|
||||
;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMultiInheritanceParentRequiredParams_issue15796() throws IOException {
|
||||
final Map<String, File> output = generateFromContract("src/test/resources/3_0/spring/issue_15796.yaml", SPRING_BOOT);
|
||||
// constructor should as this
|
||||
//public Poodle(String race, String type) {
|
||||
// super(race, type);
|
||||
//}
|
||||
JavaFileAssert.assertThat(output.get("Poodle.java"))
|
||||
.assertConstructor("String", "String")
|
||||
.hasParameter("type").toConstructor()
|
||||
.hasParameter("race").toConstructor()
|
||||
;
|
||||
}
|
||||
}
|
||||
|
@ -961,6 +961,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -1790,6 +1807,10 @@ components:
|
||||
enum:
|
||||
- fish
|
||||
- crab
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
OuterEnum:
|
||||
nullable: true
|
||||
type: string
|
||||
|
@ -974,6 +974,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -1921,6 +1938,10 @@ components:
|
||||
enum:
|
||||
- fish
|
||||
- crab
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
OuterEnum:
|
||||
nullable: true
|
||||
type: string
|
||||
|
@ -946,6 +946,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -1802,6 +1819,10 @@ components:
|
||||
enum:
|
||||
- fish
|
||||
- crab
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
OuterEnum:
|
||||
nullable: true
|
||||
type: string
|
||||
|
@ -944,6 +944,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -1773,6 +1790,10 @@ components:
|
||||
enum:
|
||||
- fish
|
||||
- crab
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
OuterEnum:
|
||||
nullable: true
|
||||
type: string
|
||||
|
@ -920,6 +920,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -1875,6 +1892,10 @@ components:
|
||||
enum:
|
||||
- fish
|
||||
- crab
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
OuterEnum:
|
||||
nullable: true
|
||||
type: string
|
||||
|
@ -924,6 +924,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -1753,6 +1770,10 @@ components:
|
||||
enum:
|
||||
- fish
|
||||
- crab
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
OuterEnum:
|
||||
nullable: true
|
||||
type: string
|
||||
|
@ -959,6 +959,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -1764,6 +1781,10 @@ components:
|
||||
enum:
|
||||
- fish
|
||||
- crab
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
OuterEnum:
|
||||
nullable: true
|
||||
type: string
|
||||
|
@ -972,6 +972,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -1772,6 +1789,10 @@ components:
|
||||
enum:
|
||||
- fish
|
||||
- crab
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
OuterEnum:
|
||||
nullable: true
|
||||
type: string
|
||||
|
@ -940,6 +940,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -1738,6 +1755,10 @@ components:
|
||||
enum:
|
||||
- fish
|
||||
- crab
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
OuterEnum:
|
||||
nullable: true
|
||||
type: string
|
||||
|
@ -995,6 +995,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -1820,6 +1837,10 @@ components:
|
||||
enum:
|
||||
- fish
|
||||
- crab
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
OuterEnum:
|
||||
nullable: true
|
||||
type: string
|
||||
|
@ -995,6 +995,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -1820,6 +1837,10 @@ components:
|
||||
enum:
|
||||
- fish
|
||||
- crab
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
OuterEnum:
|
||||
nullable: true
|
||||
type: string
|
||||
|
@ -995,6 +995,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -1844,6 +1861,10 @@ components:
|
||||
enum:
|
||||
- fish
|
||||
- crab
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
OuterEnum:
|
||||
nullable: true
|
||||
type: string
|
||||
|
@ -925,6 +925,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -1754,6 +1771,10 @@ components:
|
||||
enum:
|
||||
- fish
|
||||
- crab
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
OuterEnum:
|
||||
nullable: true
|
||||
type: string
|
||||
|
@ -1047,6 +1047,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -2077,6 +2094,10 @@ components:
|
||||
type: integer
|
||||
enum:
|
||||
- 0
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
ObjectModelWithRefProps:
|
||||
description: a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations
|
||||
type: object
|
||||
|
@ -983,6 +983,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -1955,6 +1972,10 @@ components:
|
||||
enum:
|
||||
- fish
|
||||
- crab
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
OuterEnum:
|
||||
nullable: true
|
||||
type: string
|
||||
|
@ -1031,6 +1031,23 @@ paths:
|
||||
required:
|
||||
- param
|
||||
- param2
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
tags:
|
||||
- fake
|
||||
summary: test referenced additionalProperties
|
||||
description: ''
|
||||
operationId: testAdditionalPropertiesReference
|
||||
responses:
|
||||
'200':
|
||||
description: successful operation
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
tags:
|
||||
@ -1883,6 +1900,10 @@ components:
|
||||
enum:
|
||||
- fish
|
||||
- crab
|
||||
FreeFormObject:
|
||||
type: object
|
||||
description: A schema consisting only of additional properties
|
||||
additionalProperties: true
|
||||
OuterEnum:
|
||||
nullable: true
|
||||
type: string
|
||||
|
@ -0,0 +1,98 @@
|
||||
openapi: 3.0.0
|
||||
info:
|
||||
title: My service
|
||||
description: My service
|
||||
version: 1.0.0
|
||||
servers:
|
||||
- url: 'https://localhost'
|
||||
paths:
|
||||
/generator/test:
|
||||
get:
|
||||
summary: Get test generator models
|
||||
responses:
|
||||
200:
|
||||
description: Everything is fine
|
||||
components:
|
||||
schemas:
|
||||
Pet:
|
||||
type: object
|
||||
required:
|
||||
- type
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
type:
|
||||
type: string
|
||||
discriminator:
|
||||
propertyName: type
|
||||
mapping:
|
||||
CAT: '#/components/schemas/Cat'
|
||||
DOG: '#/components/schemas/Dog'
|
||||
Cat:
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Pet'
|
||||
required:
|
||||
- race
|
||||
properties:
|
||||
paws:
|
||||
type: integer
|
||||
race:
|
||||
type: string
|
||||
discriminator:
|
||||
propertyName: race
|
||||
mapping:
|
||||
PERSIAN: '#/components/schemas/Persian'
|
||||
MAINE_COON: '#/components/schemas/MaineCoon'
|
||||
Dog:
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Pet'
|
||||
required:
|
||||
- race
|
||||
properties:
|
||||
tails:
|
||||
type: integer
|
||||
race:
|
||||
type: string
|
||||
discriminator:
|
||||
propertyName: race
|
||||
mapping:
|
||||
POODLE: '#/components/schemas/Poodle'
|
||||
LABRADOR: '#/components/schemas/Labrador'
|
||||
Poodle:
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Dog'
|
||||
properties:
|
||||
hairType:
|
||||
type: string
|
||||
required:
|
||||
- race
|
||||
Labrador:
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Dog'
|
||||
properties:
|
||||
hairColor:
|
||||
type: string
|
||||
required:
|
||||
- race
|
||||
Persian:
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Cat'
|
||||
properties:
|
||||
hairType:
|
||||
type: string
|
||||
required:
|
||||
- race
|
||||
MaineCoon:
|
||||
type: object
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Cat'
|
||||
properties:
|
||||
hairColor:
|
||||
type: string
|
||||
required:
|
||||
- race
|
@ -0,0 +1,88 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: OpenAPI definition
|
||||
version: v0
|
||||
servers:
|
||||
- url: /
|
||||
- url: '{protocolAndBaseURL}'
|
||||
variables:
|
||||
protocolAndBaseURL:
|
||||
default: 'https://localhost'
|
||||
paths:
|
||||
/user:
|
||||
get:
|
||||
tags:
|
||||
- user
|
||||
summary: Get User By Id
|
||||
operationId: getUserById
|
||||
parameters:
|
||||
- in: query
|
||||
name: id
|
||||
description: Unique Id of an User
|
||||
schema:
|
||||
type: integer
|
||||
default: 10
|
||||
responses:
|
||||
default:
|
||||
description: successful operation
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Object4"
|
||||
|
||||
components:
|
||||
schemas:
|
||||
|
||||
Object1:
|
||||
type: object
|
||||
properties:
|
||||
responseType:
|
||||
type: string
|
||||
requestId:
|
||||
type: string
|
||||
success:
|
||||
type: boolean
|
||||
default: true
|
||||
required:
|
||||
- responseType
|
||||
- requestId
|
||||
- success
|
||||
discriminator:
|
||||
propertyName: responseType
|
||||
|
||||
Object2:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Object1'
|
||||
- type: object
|
||||
|
||||
Type1:
|
||||
type: object
|
||||
properties:
|
||||
pageSize:
|
||||
minimum: 1
|
||||
type: integer
|
||||
format: int32
|
||||
rowCount:
|
||||
minimum: 0
|
||||
type: integer
|
||||
format: int32
|
||||
required:
|
||||
- pageSize
|
||||
- rowCount
|
||||
|
||||
Object3:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Object2'
|
||||
properties:
|
||||
pageInfo:
|
||||
$ref: '#/components/schemas/Type1'
|
||||
required:
|
||||
- pageInfo
|
||||
|
||||
Object4:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Object3'
|
||||
- type: object
|
||||
properties:
|
||||
data:
|
||||
type: string
|
@ -115,6 +115,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**GetArrayOfEnums**](docs/FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums
|
||||
*FakeApi* | [**TestAdditionalPropertiesReference**](docs/FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||
|
@ -941,6 +941,23 @@ paths:
|
||||
summary: test json serialization of form data
|
||||
tags:
|
||||
- fake
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1868,6 +1885,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | |
|
||||
| [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | |
|
||||
| [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**TestAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | |
|
||||
| [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model |
|
||||
@ -547,6 +548,91 @@ 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)
|
||||
|
||||
<a id="testadditionalpropertiesreference"></a>
|
||||
# **TestAdditionalPropertiesReference**
|
||||
> void TestAdditionalPropertiesReference (Dictionary<string, Object> requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestAdditionalPropertiesReferenceExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReference(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReference: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestAdditionalPropertiesReferenceWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReferenceWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **requestBody** | [**Dictionary<string, Object>**](Object.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
<a id="testbodywithfileschema"></a>
|
||||
# **TestBodyWithFileSchema**
|
||||
> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
|
||||
|
@ -158,6 +158,26 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>ApiResponse of List<OuterEnum></returns>
|
||||
ApiResponse<List<OuterEnum>> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody, int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody, int operationIndex = 0);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -603,6 +623,31 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task of ApiResponse (List<OuterEnum>)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<List<OuterEnum>>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -1836,6 +1881,148 @@ namespace Org.OpenAPITools.Api
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
public void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody, int operationIndex = 0)
|
||||
{
|
||||
TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody, int operationIndex = 0)
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestAdditionalPropertiesReference";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Post<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
await TestAdditionalPropertiesReferenceWithHttpInfoAsync(requestBody, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestAdditionalPropertiesReference";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For this test, the body for this request much reference a schema named `File`.
|
||||
/// </summary>
|
||||
|
@ -941,6 +941,23 @@ paths:
|
||||
summary: test json serialization of form data
|
||||
tags:
|
||||
- fake
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1868,6 +1885,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | |
|
||||
| [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | |
|
||||
| [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**TestAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | |
|
||||
| [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model |
|
||||
@ -547,6 +548,91 @@ 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)
|
||||
|
||||
<a id="testadditionalpropertiesreference"></a>
|
||||
# **TestAdditionalPropertiesReference**
|
||||
> void TestAdditionalPropertiesReference (Dictionary<string, Object> requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using UseSourceGeneration.Api;
|
||||
using UseSourceGeneration.Client;
|
||||
using UseSourceGeneration.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestAdditionalPropertiesReferenceExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReference(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReference: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestAdditionalPropertiesReferenceWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReferenceWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **requestBody** | [**Dictionary<string, Object>**](Object.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
<a id="testbodywithfileschema"></a>
|
||||
# **TestBodyWithFileSchema**
|
||||
> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
|
||||
|
@ -171,6 +171,29 @@ namespace UseSourceGeneration.Api
|
||||
/// <returns><see cref="Task"/><<see cref="IGetArrayOfEnumsApiResponse"/>?></returns>
|
||||
Task<IGetArrayOfEnumsApiResponse?> GetArrayOfEnumsOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>></returns>
|
||||
Task<ITestAdditionalPropertiesReferenceApiResponse> TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>?></returns>
|
||||
Task<ITestAdditionalPropertiesReferenceApiResponse?> TestAdditionalPropertiesReferenceOrDefaultAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@ -544,6 +567,18 @@ namespace UseSourceGeneration.Api
|
||||
bool IsOk { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="ITestAdditionalPropertiesReferenceApiResponse"/>
|
||||
/// </summary>
|
||||
public interface ITestAdditionalPropertiesReferenceApiResponse : UseSourceGeneration.Client.IApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns true if the response is 200 Ok
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool IsOk { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="ITestBodyWithFileSchemaApiResponse"/>
|
||||
/// </summary>
|
||||
@ -801,6 +836,26 @@ namespace UseSourceGeneration.Api
|
||||
OnErrorGetArrayOfEnums?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs>? OnTestAdditionalPropertiesReference;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorTestAdditionalPropertiesReference;
|
||||
|
||||
internal void ExecuteOnTestAdditionalPropertiesReference(FakeApi.TestAdditionalPropertiesReferenceApiResponse apiResponse)
|
||||
{
|
||||
OnTestAdditionalPropertiesReference?.Invoke(this, new ApiResponseEventArgs(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestAdditionalPropertiesReference(Exception exception)
|
||||
{
|
||||
OnErrorTestAdditionalPropertiesReference?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
@ -2375,6 +2430,195 @@ namespace UseSourceGeneration.Api
|
||||
partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode);
|
||||
}
|
||||
|
||||
partial void FormatTestAdditionalPropertiesReference(Dictionary<string, Object> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="requestBody"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestAdditionalPropertiesReference(Dictionary<string, Object> requestBody)
|
||||
{
|
||||
if (requestBody == null)
|
||||
throw new ArgumentNullException(nameof(requestBody));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
private void AfterTestAdditionalPropertiesReferenceDefaultImplementation(ITestAdditionalPropertiesReferenceApiResponse apiResponseLocalVar, Dictionary<string, Object> requestBody)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
AfterTestAdditionalPropertiesReference(ref suppressDefaultLog, apiResponseLocalVar, requestBody);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
partial void AfterTestAdditionalPropertiesReference(ref bool suppressDefaultLog, ITestAdditionalPropertiesReferenceApiResponse apiResponseLocalVar, Dictionary<string, Object> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
private void OnErrorTestAdditionalPropertiesReferenceDefaultImplementation(Exception exception, string pathFormat, string path, Dictionary<string, Object> requestBody)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestAdditionalPropertiesReference(ref suppressDefaultLog, exception, pathFormat, path, requestBody);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
partial void OnErrorTestAdditionalPropertiesReference(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Dictionary<string, Object> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>></returns>
|
||||
public async Task<ITestAdditionalPropertiesReferenceApiResponse?> TestAdditionalPropertiesReferenceOrDefaultAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
return await TestAdditionalPropertiesReferenceAsync(requestBody, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>></returns>
|
||||
public async Task<ITestAdditionalPropertiesReferenceApiResponse> TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestAdditionalPropertiesReference(requestBody);
|
||||
|
||||
FormatTestAdditionalPropertiesReference(requestBody);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
|
||||
uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port;
|
||||
uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme;
|
||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/fake/additionalProperties-reference";
|
||||
|
||||
httpRequestMessageLocalVar.Content = (requestBody as object) is System.IO.Stream stream
|
||||
? httpRequestMessageLocalVar.Content = new StreamContent(stream)
|
||||
: httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize(requestBody, _jsonSerializerOptions));
|
||||
|
||||
httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri;
|
||||
|
||||
string[] contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
string? contentTypeLocalVar = ClientUtils.SelectHeaderContentType(contentTypes);
|
||||
|
||||
if (contentTypeLocalVar != null && httpRequestMessageLocalVar.Content != null)
|
||||
httpRequestMessageLocalVar.Content.Headers.ContentType = new MediaTypeHeaderValue(contentTypeLocalVar);
|
||||
|
||||
httpRequestMessageLocalVar.Method = HttpMethod.Post;
|
||||
|
||||
DateTime requestedAtLocalVar = DateTime.UtcNow;
|
||||
|
||||
using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
ILogger<TestAdditionalPropertiesReferenceApiResponse> apiResponseLoggerLocalVar = LoggerFactory.CreateLogger<TestAdditionalPropertiesReferenceApiResponse>();
|
||||
|
||||
TestAdditionalPropertiesReferenceApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/additionalProperties-reference", requestedAtLocalVar, _jsonSerializerOptions);
|
||||
|
||||
AfterTestAdditionalPropertiesReferenceDefaultImplementation(apiResponseLocalVar, requestBody);
|
||||
|
||||
Events.ExecuteOnTestAdditionalPropertiesReference(apiResponseLocalVar);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestAdditionalPropertiesReferenceDefaultImplementation(e, "/fake/additionalProperties-reference", uriBuilderLocalVar.Path, requestBody);
|
||||
Events.ExecuteOnErrorTestAdditionalPropertiesReference(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="TestAdditionalPropertiesReferenceApiResponse"/>
|
||||
/// </summary>
|
||||
public partial class TestAdditionalPropertiesReferenceApiResponse : UseSourceGeneration.Client.ApiResponse, ITestAdditionalPropertiesReferenceApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// The logger
|
||||
/// </summary>
|
||||
public ILogger<TestAdditionalPropertiesReferenceApiResponse> Logger { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="TestAdditionalPropertiesReferenceApiResponse"/>
|
||||
/// </summary>
|
||||
/// <param name="logger"></param>
|
||||
/// <param name="httpRequestMessage"></param>
|
||||
/// <param name="httpResponseMessage"></param>
|
||||
/// <param name="rawContent"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestedAt"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
public TestAdditionalPropertiesReferenceApiResponse(ILogger<TestAdditionalPropertiesReferenceApiResponse> logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions)
|
||||
{
|
||||
Logger = logger;
|
||||
OnCreated(httpRequestMessage, httpResponseMessage);
|
||||
}
|
||||
|
||||
partial void OnCreated(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage);
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the response is 200 Ok
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool IsOk => 200 == (int)StatusCode;
|
||||
|
||||
private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode);
|
||||
}
|
||||
|
||||
partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode);
|
||||
}
|
||||
|
||||
partial void FormatTestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass);
|
||||
|
||||
/// <summary>
|
||||
|
@ -941,6 +941,23 @@ paths:
|
||||
summary: test json serialization of form data
|
||||
tags:
|
||||
- fake
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1868,6 +1885,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | |
|
||||
| [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | |
|
||||
| [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**TestAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | |
|
||||
| [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model |
|
||||
@ -547,6 +548,91 @@ 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)
|
||||
|
||||
<a id="testadditionalpropertiesreference"></a>
|
||||
# **TestAdditionalPropertiesReference**
|
||||
> void TestAdditionalPropertiesReference (Dictionary<string, Object> requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestAdditionalPropertiesReferenceExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReference(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReference: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestAdditionalPropertiesReferenceWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReferenceWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **requestBody** | [**Dictionary<string, Object>**](Object.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
<a id="testbodywithfileschema"></a>
|
||||
# **TestBodyWithFileSchema**
|
||||
> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
|
||||
|
@ -171,6 +171,29 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns><see cref="Task"/><<see cref="IGetArrayOfEnumsApiResponse"/>?></returns>
|
||||
Task<IGetArrayOfEnumsApiResponse?> GetArrayOfEnumsOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>></returns>
|
||||
Task<ITestAdditionalPropertiesReferenceApiResponse> TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>?></returns>
|
||||
Task<ITestAdditionalPropertiesReferenceApiResponse?> TestAdditionalPropertiesReferenceOrDefaultAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@ -544,6 +567,18 @@ namespace Org.OpenAPITools.Api
|
||||
bool IsOk { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="ITestAdditionalPropertiesReferenceApiResponse"/>
|
||||
/// </summary>
|
||||
public interface ITestAdditionalPropertiesReferenceApiResponse : Org.OpenAPITools.Client.IApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns true if the response is 200 Ok
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool IsOk { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="ITestBodyWithFileSchemaApiResponse"/>
|
||||
/// </summary>
|
||||
@ -801,6 +836,26 @@ namespace Org.OpenAPITools.Api
|
||||
OnErrorGetArrayOfEnums?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs>? OnTestAdditionalPropertiesReference;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs>? OnErrorTestAdditionalPropertiesReference;
|
||||
|
||||
internal void ExecuteOnTestAdditionalPropertiesReference(FakeApi.TestAdditionalPropertiesReferenceApiResponse apiResponse)
|
||||
{
|
||||
OnTestAdditionalPropertiesReference?.Invoke(this, new ApiResponseEventArgs(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestAdditionalPropertiesReference(Exception exception)
|
||||
{
|
||||
OnErrorTestAdditionalPropertiesReference?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
@ -2375,6 +2430,195 @@ namespace Org.OpenAPITools.Api
|
||||
partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode);
|
||||
}
|
||||
|
||||
partial void FormatTestAdditionalPropertiesReference(Dictionary<string, Object> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="requestBody"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestAdditionalPropertiesReference(Dictionary<string, Object> requestBody)
|
||||
{
|
||||
if (requestBody == null)
|
||||
throw new ArgumentNullException(nameof(requestBody));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
private void AfterTestAdditionalPropertiesReferenceDefaultImplementation(ITestAdditionalPropertiesReferenceApiResponse apiResponseLocalVar, Dictionary<string, Object> requestBody)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
AfterTestAdditionalPropertiesReference(ref suppressDefaultLog, apiResponseLocalVar, requestBody);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
partial void AfterTestAdditionalPropertiesReference(ref bool suppressDefaultLog, ITestAdditionalPropertiesReferenceApiResponse apiResponseLocalVar, Dictionary<string, Object> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
private void OnErrorTestAdditionalPropertiesReferenceDefaultImplementation(Exception exception, string pathFormat, string path, Dictionary<string, Object> requestBody)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestAdditionalPropertiesReference(ref suppressDefaultLog, exception, pathFormat, path, requestBody);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
partial void OnErrorTestAdditionalPropertiesReference(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Dictionary<string, Object> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>></returns>
|
||||
public async Task<ITestAdditionalPropertiesReferenceApiResponse?> TestAdditionalPropertiesReferenceOrDefaultAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
return await TestAdditionalPropertiesReferenceAsync(requestBody, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>></returns>
|
||||
public async Task<ITestAdditionalPropertiesReferenceApiResponse> TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestAdditionalPropertiesReference(requestBody);
|
||||
|
||||
FormatTestAdditionalPropertiesReference(requestBody);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress!.Host;
|
||||
uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port;
|
||||
uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme;
|
||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/fake/additionalProperties-reference";
|
||||
|
||||
httpRequestMessageLocalVar.Content = (requestBody as object) is System.IO.Stream stream
|
||||
? httpRequestMessageLocalVar.Content = new StreamContent(stream)
|
||||
: httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize(requestBody, _jsonSerializerOptions));
|
||||
|
||||
httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri;
|
||||
|
||||
string[] contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
string? contentTypeLocalVar = ClientUtils.SelectHeaderContentType(contentTypes);
|
||||
|
||||
if (contentTypeLocalVar != null && httpRequestMessageLocalVar.Content != null)
|
||||
httpRequestMessageLocalVar.Content.Headers.ContentType = new MediaTypeHeaderValue(contentTypeLocalVar);
|
||||
|
||||
httpRequestMessageLocalVar.Method = HttpMethod.Post;
|
||||
|
||||
DateTime requestedAtLocalVar = DateTime.UtcNow;
|
||||
|
||||
using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
ILogger<TestAdditionalPropertiesReferenceApiResponse> apiResponseLoggerLocalVar = LoggerFactory.CreateLogger<TestAdditionalPropertiesReferenceApiResponse>();
|
||||
|
||||
TestAdditionalPropertiesReferenceApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/additionalProperties-reference", requestedAtLocalVar, _jsonSerializerOptions);
|
||||
|
||||
AfterTestAdditionalPropertiesReferenceDefaultImplementation(apiResponseLocalVar, requestBody);
|
||||
|
||||
Events.ExecuteOnTestAdditionalPropertiesReference(apiResponseLocalVar);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestAdditionalPropertiesReferenceDefaultImplementation(e, "/fake/additionalProperties-reference", uriBuilderLocalVar.Path, requestBody);
|
||||
Events.ExecuteOnErrorTestAdditionalPropertiesReference(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="TestAdditionalPropertiesReferenceApiResponse"/>
|
||||
/// </summary>
|
||||
public partial class TestAdditionalPropertiesReferenceApiResponse : Org.OpenAPITools.Client.ApiResponse, ITestAdditionalPropertiesReferenceApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// The logger
|
||||
/// </summary>
|
||||
public ILogger<TestAdditionalPropertiesReferenceApiResponse> Logger { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="TestAdditionalPropertiesReferenceApiResponse"/>
|
||||
/// </summary>
|
||||
/// <param name="logger"></param>
|
||||
/// <param name="httpRequestMessage"></param>
|
||||
/// <param name="httpResponseMessage"></param>
|
||||
/// <param name="rawContent"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestedAt"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
public TestAdditionalPropertiesReferenceApiResponse(ILogger<TestAdditionalPropertiesReferenceApiResponse> logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions)
|
||||
{
|
||||
Logger = logger;
|
||||
OnCreated(httpRequestMessage, httpResponseMessage);
|
||||
}
|
||||
|
||||
partial void OnCreated(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage);
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the response is 200 Ok
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool IsOk => 200 == (int)StatusCode;
|
||||
|
||||
private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode);
|
||||
}
|
||||
|
||||
partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode);
|
||||
}
|
||||
|
||||
partial void FormatTestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass);
|
||||
|
||||
/// <summary>
|
||||
|
@ -941,6 +941,23 @@ paths:
|
||||
summary: test json serialization of form data
|
||||
tags:
|
||||
- fake
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1868,6 +1885,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | |
|
||||
| [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | |
|
||||
| [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**TestAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | |
|
||||
| [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model |
|
||||
@ -547,6 +548,91 @@ 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)
|
||||
|
||||
<a id="testadditionalpropertiesreference"></a>
|
||||
# **TestAdditionalPropertiesReference**
|
||||
> void TestAdditionalPropertiesReference (Dictionary<string, Object> requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestAdditionalPropertiesReferenceExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReference(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReference: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestAdditionalPropertiesReferenceWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReferenceWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **requestBody** | [**Dictionary<string, Object>**](Object.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
<a id="testbodywithfileschema"></a>
|
||||
# **TestBodyWithFileSchema**
|
||||
> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
|
||||
|
@ -169,6 +169,29 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns><see cref="Task"/><<see cref="IGetArrayOfEnumsApiResponse"/>></returns>
|
||||
Task<IGetArrayOfEnumsApiResponse> GetArrayOfEnumsOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>></returns>
|
||||
Task<ITestAdditionalPropertiesReferenceApiResponse> TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>></returns>
|
||||
Task<ITestAdditionalPropertiesReferenceApiResponse> TestAdditionalPropertiesReferenceOrDefaultAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@ -542,6 +565,18 @@ namespace Org.OpenAPITools.Api
|
||||
bool IsOk { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="ITestAdditionalPropertiesReferenceApiResponse"/>
|
||||
/// </summary>
|
||||
public interface ITestAdditionalPropertiesReferenceApiResponse : Org.OpenAPITools.Client.IApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns true if the response is 200 Ok
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool IsOk { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="ITestBodyWithFileSchemaApiResponse"/>
|
||||
/// </summary>
|
||||
@ -799,6 +834,26 @@ namespace Org.OpenAPITools.Api
|
||||
OnErrorGetArrayOfEnums?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs> OnTestAdditionalPropertiesReference;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestAdditionalPropertiesReference;
|
||||
|
||||
internal void ExecuteOnTestAdditionalPropertiesReference(FakeApi.TestAdditionalPropertiesReferenceApiResponse apiResponse)
|
||||
{
|
||||
OnTestAdditionalPropertiesReference?.Invoke(this, new ApiResponseEventArgs(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestAdditionalPropertiesReference(Exception exception)
|
||||
{
|
||||
OnErrorTestAdditionalPropertiesReference?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
@ -2373,6 +2428,195 @@ namespace Org.OpenAPITools.Api
|
||||
partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode);
|
||||
}
|
||||
|
||||
partial void FormatTestAdditionalPropertiesReference(Dictionary<string, Object> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="requestBody"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestAdditionalPropertiesReference(Dictionary<string, Object> requestBody)
|
||||
{
|
||||
if (requestBody == null)
|
||||
throw new ArgumentNullException(nameof(requestBody));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
private void AfterTestAdditionalPropertiesReferenceDefaultImplementation(ITestAdditionalPropertiesReferenceApiResponse apiResponseLocalVar, Dictionary<string, Object> requestBody)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
AfterTestAdditionalPropertiesReference(ref suppressDefaultLog, apiResponseLocalVar, requestBody);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
partial void AfterTestAdditionalPropertiesReference(ref bool suppressDefaultLog, ITestAdditionalPropertiesReferenceApiResponse apiResponseLocalVar, Dictionary<string, Object> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
private void OnErrorTestAdditionalPropertiesReferenceDefaultImplementation(Exception exception, string pathFormat, string path, Dictionary<string, Object> requestBody)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestAdditionalPropertiesReference(ref suppressDefaultLog, exception, pathFormat, path, requestBody);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
partial void OnErrorTestAdditionalPropertiesReference(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Dictionary<string, Object> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>></returns>
|
||||
public async Task<ITestAdditionalPropertiesReferenceApiResponse> TestAdditionalPropertiesReferenceOrDefaultAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
return await TestAdditionalPropertiesReferenceAsync(requestBody, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>></returns>
|
||||
public async Task<ITestAdditionalPropertiesReferenceApiResponse> TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestAdditionalPropertiesReference(requestBody);
|
||||
|
||||
FormatTestAdditionalPropertiesReference(requestBody);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress.Host;
|
||||
uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port;
|
||||
uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme;
|
||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/fake/additionalProperties-reference";
|
||||
|
||||
httpRequestMessageLocalVar.Content = (requestBody as object) is System.IO.Stream stream
|
||||
? httpRequestMessageLocalVar.Content = new StreamContent(stream)
|
||||
: httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize(requestBody, _jsonSerializerOptions));
|
||||
|
||||
httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri;
|
||||
|
||||
string[] contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
string contentTypeLocalVar = ClientUtils.SelectHeaderContentType(contentTypes);
|
||||
|
||||
if (contentTypeLocalVar != null && httpRequestMessageLocalVar.Content != null)
|
||||
httpRequestMessageLocalVar.Content.Headers.ContentType = new MediaTypeHeaderValue(contentTypeLocalVar);
|
||||
|
||||
httpRequestMessageLocalVar.Method = HttpMethod.Post;
|
||||
|
||||
DateTime requestedAtLocalVar = DateTime.UtcNow;
|
||||
|
||||
using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
ILogger<TestAdditionalPropertiesReferenceApiResponse> apiResponseLoggerLocalVar = LoggerFactory.CreateLogger<TestAdditionalPropertiesReferenceApiResponse>();
|
||||
|
||||
TestAdditionalPropertiesReferenceApiResponse apiResponseLocalVar = new(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/additionalProperties-reference", requestedAtLocalVar, _jsonSerializerOptions);
|
||||
|
||||
AfterTestAdditionalPropertiesReferenceDefaultImplementation(apiResponseLocalVar, requestBody);
|
||||
|
||||
Events.ExecuteOnTestAdditionalPropertiesReference(apiResponseLocalVar);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestAdditionalPropertiesReferenceDefaultImplementation(e, "/fake/additionalProperties-reference", uriBuilderLocalVar.Path, requestBody);
|
||||
Events.ExecuteOnErrorTestAdditionalPropertiesReference(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="TestAdditionalPropertiesReferenceApiResponse"/>
|
||||
/// </summary>
|
||||
public partial class TestAdditionalPropertiesReferenceApiResponse : Org.OpenAPITools.Client.ApiResponse, ITestAdditionalPropertiesReferenceApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// The logger
|
||||
/// </summary>
|
||||
public ILogger<TestAdditionalPropertiesReferenceApiResponse> Logger { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="TestAdditionalPropertiesReferenceApiResponse"/>
|
||||
/// </summary>
|
||||
/// <param name="logger"></param>
|
||||
/// <param name="httpRequestMessage"></param>
|
||||
/// <param name="httpResponseMessage"></param>
|
||||
/// <param name="rawContent"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestedAt"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
public TestAdditionalPropertiesReferenceApiResponse(ILogger<TestAdditionalPropertiesReferenceApiResponse> logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions)
|
||||
{
|
||||
Logger = logger;
|
||||
OnCreated(httpRequestMessage, httpResponseMessage);
|
||||
}
|
||||
|
||||
partial void OnCreated(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage);
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the response is 200 Ok
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool IsOk => 200 == (int)StatusCode;
|
||||
|
||||
private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode);
|
||||
}
|
||||
|
||||
partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode);
|
||||
}
|
||||
|
||||
partial void FormatTestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass);
|
||||
|
||||
/// <summary>
|
||||
|
@ -941,6 +941,23 @@ paths:
|
||||
summary: test json serialization of form data
|
||||
tags:
|
||||
- fake
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1868,6 +1885,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | |
|
||||
| [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | |
|
||||
| [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**TestAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | |
|
||||
| [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model |
|
||||
@ -547,6 +548,91 @@ 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)
|
||||
|
||||
<a id="testadditionalpropertiesreference"></a>
|
||||
# **TestAdditionalPropertiesReference**
|
||||
> void TestAdditionalPropertiesReference (Dictionary<string, Object> requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestAdditionalPropertiesReferenceExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReference(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReference: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestAdditionalPropertiesReferenceWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReferenceWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **requestBody** | [**Dictionary<string, Object>**](Object.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
<a id="testbodywithfileschema"></a>
|
||||
# **TestBodyWithFileSchema**
|
||||
> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
|
||||
|
@ -168,6 +168,29 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns><see cref="Task"/><<see cref="IGetArrayOfEnumsApiResponse"/>></returns>
|
||||
Task<IGetArrayOfEnumsApiResponse> GetArrayOfEnumsOrDefaultAsync(System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>></returns>
|
||||
Task<ITestAdditionalPropertiesReferenceApiResponse> TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>></returns>
|
||||
Task<ITestAdditionalPropertiesReferenceApiResponse> TestAdditionalPropertiesReferenceOrDefaultAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@ -541,6 +564,18 @@ namespace Org.OpenAPITools.Api
|
||||
bool IsOk { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="ITestAdditionalPropertiesReferenceApiResponse"/>
|
||||
/// </summary>
|
||||
public interface ITestAdditionalPropertiesReferenceApiResponse : Org.OpenAPITools.Client.IApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns true if the response is 200 Ok
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
bool IsOk { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="ITestBodyWithFileSchemaApiResponse"/>
|
||||
/// </summary>
|
||||
@ -798,6 +833,26 @@ namespace Org.OpenAPITools.Api
|
||||
OnErrorGetArrayOfEnums?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
public event EventHandler<ApiResponseEventArgs> OnTestAdditionalPropertiesReference;
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after an error querying the server
|
||||
/// </summary>
|
||||
public event EventHandler<ExceptionEventArgs> OnErrorTestAdditionalPropertiesReference;
|
||||
|
||||
internal void ExecuteOnTestAdditionalPropertiesReference(FakeApi.TestAdditionalPropertiesReferenceApiResponse apiResponse)
|
||||
{
|
||||
OnTestAdditionalPropertiesReference?.Invoke(this, new ApiResponseEventArgs(apiResponse));
|
||||
}
|
||||
|
||||
internal void ExecuteOnErrorTestAdditionalPropertiesReference(Exception exception)
|
||||
{
|
||||
OnErrorTestAdditionalPropertiesReference?.Invoke(this, new ExceptionEventArgs(exception));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The event raised after the server response
|
||||
/// </summary>
|
||||
@ -2366,6 +2421,195 @@ namespace Org.OpenAPITools.Api
|
||||
partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode);
|
||||
}
|
||||
|
||||
partial void FormatTestAdditionalPropertiesReference(Dictionary<string, Object> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// Validates the request parameters
|
||||
/// </summary>
|
||||
/// <param name="requestBody"></param>
|
||||
/// <returns></returns>
|
||||
private void ValidateTestAdditionalPropertiesReference(Dictionary<string, Object> requestBody)
|
||||
{
|
||||
if (requestBody == null)
|
||||
throw new ArgumentNullException(nameof(requestBody));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
private void AfterTestAdditionalPropertiesReferenceDefaultImplementation(ITestAdditionalPropertiesReferenceApiResponse apiResponseLocalVar, Dictionary<string, Object> requestBody)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
AfterTestAdditionalPropertiesReference(ref suppressDefaultLog, apiResponseLocalVar, requestBody);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogInformation("{0,-9} | {1} | {3}", (apiResponseLocalVar.DownloadedAt - apiResponseLocalVar.RequestedAt).TotalSeconds, apiResponseLocalVar.StatusCode, apiResponseLocalVar.Path);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Processes the server response
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="apiResponseLocalVar"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
partial void AfterTestAdditionalPropertiesReference(ref bool suppressDefaultLog, ITestAdditionalPropertiesReferenceApiResponse apiResponseLocalVar, Dictionary<string, Object> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// Logs exceptions that occur while retrieving the server response
|
||||
/// </summary>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
private void OnErrorTestAdditionalPropertiesReferenceDefaultImplementation(Exception exception, string pathFormat, string path, Dictionary<string, Object> requestBody)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
OnErrorTestAdditionalPropertiesReference(ref suppressDefaultLog, exception, pathFormat, path, requestBody);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while sending the request to the server.");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A partial method that gives developers a way to provide customized exception handling
|
||||
/// </summary>
|
||||
/// <param name="suppressDefaultLog"></param>
|
||||
/// <param name="exception"></param>
|
||||
/// <param name="pathFormat"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestBody"></param>
|
||||
partial void OnErrorTestAdditionalPropertiesReference(ref bool suppressDefaultLog, Exception exception, string pathFormat, string path, Dictionary<string, Object> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>></returns>
|
||||
public async Task<ITestAdditionalPropertiesReferenceApiResponse> TestAdditionalPropertiesReferenceOrDefaultAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
return await TestAdditionalPropertiesReferenceAsync(requestBody, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ITestAdditionalPropertiesReferenceApiResponse"/>></returns>
|
||||
public async Task<ITestAdditionalPropertiesReferenceApiResponse> TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default)
|
||||
{
|
||||
UriBuilder uriBuilderLocalVar = new UriBuilder();
|
||||
|
||||
try
|
||||
{
|
||||
ValidateTestAdditionalPropertiesReference(requestBody);
|
||||
|
||||
FormatTestAdditionalPropertiesReference(requestBody);
|
||||
|
||||
using (HttpRequestMessage httpRequestMessageLocalVar = new HttpRequestMessage())
|
||||
{
|
||||
uriBuilderLocalVar.Host = HttpClient.BaseAddress.Host;
|
||||
uriBuilderLocalVar.Port = HttpClient.BaseAddress.Port;
|
||||
uriBuilderLocalVar.Scheme = HttpClient.BaseAddress.Scheme;
|
||||
uriBuilderLocalVar.Path = ClientUtils.CONTEXT_PATH + "/fake/additionalProperties-reference";
|
||||
|
||||
httpRequestMessageLocalVar.Content = (requestBody as object) is System.IO.Stream stream
|
||||
? httpRequestMessageLocalVar.Content = new StreamContent(stream)
|
||||
: httpRequestMessageLocalVar.Content = new StringContent(JsonSerializer.Serialize(requestBody, _jsonSerializerOptions));
|
||||
|
||||
httpRequestMessageLocalVar.RequestUri = uriBuilderLocalVar.Uri;
|
||||
|
||||
string[] contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
string contentTypeLocalVar = ClientUtils.SelectHeaderContentType(contentTypes);
|
||||
|
||||
if (contentTypeLocalVar != null && httpRequestMessageLocalVar.Content != null)
|
||||
httpRequestMessageLocalVar.Content.Headers.ContentType = new MediaTypeHeaderValue(contentTypeLocalVar);
|
||||
|
||||
httpRequestMessageLocalVar.Method = new HttpMethod("POST");
|
||||
|
||||
DateTime requestedAtLocalVar = DateTime.UtcNow;
|
||||
|
||||
using (HttpResponseMessage httpResponseMessageLocalVar = await HttpClient.SendAsync(httpRequestMessageLocalVar, cancellationToken).ConfigureAwait(false))
|
||||
{
|
||||
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync().ConfigureAwait(false);
|
||||
|
||||
ILogger<TestAdditionalPropertiesReferenceApiResponse> apiResponseLoggerLocalVar = LoggerFactory.CreateLogger<TestAdditionalPropertiesReferenceApiResponse>();
|
||||
|
||||
TestAdditionalPropertiesReferenceApiResponse apiResponseLocalVar = new TestAdditionalPropertiesReferenceApiResponse(apiResponseLoggerLocalVar, httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "/fake/additionalProperties-reference", requestedAtLocalVar, _jsonSerializerOptions);
|
||||
|
||||
AfterTestAdditionalPropertiesReferenceDefaultImplementation(apiResponseLocalVar, requestBody);
|
||||
|
||||
Events.ExecuteOnTestAdditionalPropertiesReference(apiResponseLocalVar);
|
||||
|
||||
return apiResponseLocalVar;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
OnErrorTestAdditionalPropertiesReferenceDefaultImplementation(e, "/fake/additionalProperties-reference", uriBuilderLocalVar.Path, requestBody);
|
||||
Events.ExecuteOnErrorTestAdditionalPropertiesReference(e);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="TestAdditionalPropertiesReferenceApiResponse"/>
|
||||
/// </summary>
|
||||
public partial class TestAdditionalPropertiesReferenceApiResponse : Org.OpenAPITools.Client.ApiResponse, ITestAdditionalPropertiesReferenceApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// The logger
|
||||
/// </summary>
|
||||
public ILogger<TestAdditionalPropertiesReferenceApiResponse> Logger { get; }
|
||||
|
||||
/// <summary>
|
||||
/// The <see cref="TestAdditionalPropertiesReferenceApiResponse"/>
|
||||
/// </summary>
|
||||
/// <param name="logger"></param>
|
||||
/// <param name="httpRequestMessage"></param>
|
||||
/// <param name="httpResponseMessage"></param>
|
||||
/// <param name="rawContent"></param>
|
||||
/// <param name="path"></param>
|
||||
/// <param name="requestedAt"></param>
|
||||
/// <param name="jsonSerializerOptions"></param>
|
||||
public TestAdditionalPropertiesReferenceApiResponse(ILogger<TestAdditionalPropertiesReferenceApiResponse> logger, System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.JsonSerializerOptions jsonSerializerOptions) : base(httpRequestMessage, httpResponseMessage, rawContent, path, requestedAt, jsonSerializerOptions)
|
||||
{
|
||||
Logger = logger;
|
||||
OnCreated(httpRequestMessage, httpResponseMessage);
|
||||
}
|
||||
|
||||
partial void OnCreated(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage);
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the response is 200 Ok
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public bool IsOk => 200 == (int)StatusCode;
|
||||
|
||||
private void OnDeserializationErrorDefaultImplementation(Exception exception, HttpStatusCode httpStatusCode)
|
||||
{
|
||||
bool suppressDefaultLog = false;
|
||||
OnDeserializationError(ref suppressDefaultLog, exception, httpStatusCode);
|
||||
if (!suppressDefaultLog)
|
||||
Logger.LogError(exception, "An error occurred while deserializing the {code} response.", httpStatusCode);
|
||||
}
|
||||
|
||||
partial void OnDeserializationError(ref bool suppressDefaultLog, Exception exception, HttpStatusCode httpStatusCode);
|
||||
}
|
||||
|
||||
partial void FormatTestBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass);
|
||||
|
||||
/// <summary>
|
||||
|
@ -140,6 +140,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**GetArrayOfEnums**](docs/FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums
|
||||
*FakeApi* | [**TestAdditionalPropertiesReference**](docs/FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||
|
@ -941,6 +941,23 @@ paths:
|
||||
summary: test json serialization of form data
|
||||
tags:
|
||||
- fake
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1868,6 +1885,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | |
|
||||
| [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | |
|
||||
| [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**TestAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | |
|
||||
| [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model |
|
||||
@ -571,6 +572,95 @@ 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)
|
||||
|
||||
<a id="testadditionalpropertiesreference"></a>
|
||||
# **TestAdditionalPropertiesReference**
|
||||
> void TestAdditionalPropertiesReference (Dictionary<string, Object> requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Net.Http;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestAdditionalPropertiesReferenceExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
// create instances of HttpClient, HttpClientHandler to be reused later with different Api classes
|
||||
HttpClient httpClient = new HttpClient();
|
||||
HttpClientHandler httpClientHandler = new HttpClientHandler();
|
||||
var apiInstance = new FakeApi(httpClient, config, httpClientHandler);
|
||||
var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReference(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReference: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestAdditionalPropertiesReferenceWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReferenceWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **requestBody** | [**Dictionary<string, Object>**](Object.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
<a id="testbodywithfileschema"></a>
|
||||
# **TestBodyWithFileSchema**
|
||||
> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
|
||||
|
@ -146,6 +146,24 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>ApiResponse of List<OuterEnum></returns>
|
||||
ApiResponse<List<OuterEnum>> GetArrayOfEnumsWithHttpInfo();
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <returns></returns>
|
||||
void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -559,6 +577,29 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task of ApiResponse (List<OuterEnum>)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<List<OuterEnum>>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -1715,6 +1756,119 @@ namespace Org.OpenAPITools.Api
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <returns></returns>
|
||||
public void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody)
|
||||
{
|
||||
TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody)
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Post<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null) throw _exception;
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
await TestAdditionalPropertiesReferenceWithHttpInfoAsync(requestBody, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
|
||||
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null) throw _exception;
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For this test, the body for this request much reference a schema named `File`.
|
||||
/// </summary>
|
||||
|
@ -127,6 +127,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**GetArrayOfEnums**](docs/FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums
|
||||
*FakeApi* | [**TestAdditionalPropertiesReference**](docs/FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||
|
@ -941,6 +941,23 @@ paths:
|
||||
summary: test json serialization of form data
|
||||
tags:
|
||||
- fake
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1868,6 +1885,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | |
|
||||
| [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | |
|
||||
| [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**TestAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | |
|
||||
| [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model |
|
||||
@ -547,6 +548,91 @@ 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)
|
||||
|
||||
<a id="testadditionalpropertiesreference"></a>
|
||||
# **TestAdditionalPropertiesReference**
|
||||
> void TestAdditionalPropertiesReference (Dictionary<string, Object> requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestAdditionalPropertiesReferenceExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReference(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReference: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestAdditionalPropertiesReferenceWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReferenceWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **requestBody** | [**Dictionary<string, Object>**](Object.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
<a id="testbodywithfileschema"></a>
|
||||
# **TestBodyWithFileSchema**
|
||||
> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
|
||||
|
@ -158,6 +158,26 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>ApiResponse of List<OuterEnum></returns>
|
||||
ApiResponse<List<OuterEnum>> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody, int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody, int operationIndex = 0);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -603,6 +623,31 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task of ApiResponse (List<OuterEnum>)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<List<OuterEnum>>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -1836,6 +1881,148 @@ namespace Org.OpenAPITools.Api
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
public void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody, int operationIndex = 0)
|
||||
{
|
||||
TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody, int operationIndex = 0)
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestAdditionalPropertiesReference";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Post<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
await TestAdditionalPropertiesReferenceWithHttpInfoAsync(requestBody, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestAdditionalPropertiesReference";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For this test, the body for this request much reference a schema named `File`.
|
||||
/// </summary>
|
||||
|
@ -127,6 +127,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**GetArrayOfEnums**](docs/FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums
|
||||
*FakeApi* | [**TestAdditionalPropertiesReference**](docs/FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||
|
@ -941,6 +941,23 @@ paths:
|
||||
summary: test json serialization of form data
|
||||
tags:
|
||||
- fake
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1868,6 +1885,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | |
|
||||
| [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | |
|
||||
| [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**TestAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | |
|
||||
| [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model |
|
||||
@ -547,6 +548,91 @@ 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)
|
||||
|
||||
<a id="testadditionalpropertiesreference"></a>
|
||||
# **TestAdditionalPropertiesReference**
|
||||
> void TestAdditionalPropertiesReference (Dictionary<string, Object> requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestAdditionalPropertiesReferenceExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReference(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReference: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestAdditionalPropertiesReferenceWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReferenceWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **requestBody** | [**Dictionary<string, Object>**](Object.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
<a id="testbodywithfileschema"></a>
|
||||
# **TestBodyWithFileSchema**
|
||||
> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
|
||||
|
@ -158,6 +158,26 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>ApiResponse of List<OuterEnum></returns>
|
||||
ApiResponse<List<OuterEnum>> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody, int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody, int operationIndex = 0);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -603,6 +623,31 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task of ApiResponse (List<OuterEnum>)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<List<OuterEnum>>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -1836,6 +1881,148 @@ namespace Org.OpenAPITools.Api
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
public void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody, int operationIndex = 0)
|
||||
{
|
||||
TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody, int operationIndex = 0)
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestAdditionalPropertiesReference";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Post<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
await TestAdditionalPropertiesReferenceWithHttpInfoAsync(requestBody, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestAdditionalPropertiesReference";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For this test, the body for this request much reference a schema named `File`.
|
||||
/// </summary>
|
||||
|
@ -127,6 +127,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**GetArrayOfEnums**](docs/FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums
|
||||
*FakeApi* | [**TestAdditionalPropertiesReference**](docs/FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||
|
@ -941,6 +941,23 @@ paths:
|
||||
summary: test json serialization of form data
|
||||
tags:
|
||||
- fake
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1868,6 +1885,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | |
|
||||
| [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | |
|
||||
| [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**TestAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | |
|
||||
| [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model |
|
||||
@ -547,6 +548,91 @@ 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)
|
||||
|
||||
<a id="testadditionalpropertiesreference"></a>
|
||||
# **TestAdditionalPropertiesReference**
|
||||
> void TestAdditionalPropertiesReference (Dictionary<string, Object> requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestAdditionalPropertiesReferenceExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReference(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReference: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestAdditionalPropertiesReferenceWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReferenceWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **requestBody** | [**Dictionary<string, Object>**](Object.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
<a id="testbodywithfileschema"></a>
|
||||
# **TestBodyWithFileSchema**
|
||||
> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
|
||||
|
@ -158,6 +158,26 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>ApiResponse of List<OuterEnum></returns>
|
||||
ApiResponse<List<OuterEnum>> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody, int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody, int operationIndex = 0);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -603,6 +623,31 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task of ApiResponse (List<OuterEnum>)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<List<OuterEnum>>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -1836,6 +1881,148 @@ namespace Org.OpenAPITools.Api
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
public void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody, int operationIndex = 0)
|
||||
{
|
||||
TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody, int operationIndex = 0)
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestAdditionalPropertiesReference";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Post<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
await TestAdditionalPropertiesReferenceWithHttpInfoAsync(requestBody, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestAdditionalPropertiesReference";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For this test, the body for this request much reference a schema named `File`.
|
||||
/// </summary>
|
||||
|
@ -101,6 +101,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums
|
||||
*FakeApi* | [**TestAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||
|
@ -941,6 +941,23 @@ paths:
|
||||
summary: test json serialization of form data
|
||||
tags:
|
||||
- fake
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1868,6 +1885,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | |
|
||||
| [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | |
|
||||
| [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**TestAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | |
|
||||
| [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model |
|
||||
@ -547,6 +548,91 @@ 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)
|
||||
|
||||
<a id="testadditionalpropertiesreference"></a>
|
||||
# **TestAdditionalPropertiesReference**
|
||||
> void TestAdditionalPropertiesReference (Dictionary<string, Object> requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestAdditionalPropertiesReferenceExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReference(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReference: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestAdditionalPropertiesReferenceWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReferenceWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **requestBody** | [**Dictionary<string, Object>**](Object.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
<a id="testbodywithfileschema"></a>
|
||||
# **TestBodyWithFileSchema**
|
||||
> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
|
||||
|
@ -145,6 +145,24 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>ApiResponse of List<OuterEnum></returns>
|
||||
ApiResponse<List<OuterEnum>> GetArrayOfEnumsWithHttpInfo();
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <returns></returns>
|
||||
void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -558,6 +576,29 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task of ApiResponse (List<OuterEnum>)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<List<OuterEnum>>> GetArrayOfEnumsWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -1711,6 +1752,130 @@ namespace Org.OpenAPITools.Api
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <returns></returns>
|
||||
public void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody)
|
||||
{
|
||||
TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody)
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Post<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null) throw _exception;
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
var task = TestAdditionalPropertiesReferenceWithHttpInfoAsync(requestBody, cancellationToken);
|
||||
#if UNITY_EDITOR || !UNITY_WEBGL
|
||||
await task.ConfigureAwait(false);
|
||||
#else
|
||||
await task;
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null) localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null) localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
|
||||
var task = this.AsynchronousClient.PostAsync<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration, cancellationToken);
|
||||
|
||||
#if UNITY_EDITOR || !UNITY_WEBGL
|
||||
var localVarResponse = await task.ConfigureAwait(false);
|
||||
#else
|
||||
var localVarResponse = await task;
|
||||
#endif
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null) throw _exception;
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For this test, the body for this request much reference a schema named `File`.
|
||||
/// </summary>
|
||||
|
@ -115,6 +115,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**GetArrayOfEnums**](docs/FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums
|
||||
*FakeApi* | [**TestAdditionalPropertiesReference**](docs/FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||
|
@ -941,6 +941,23 @@ paths:
|
||||
summary: test json serialization of form data
|
||||
tags:
|
||||
- fake
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1868,6 +1885,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | |
|
||||
| [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | |
|
||||
| [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**TestAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | |
|
||||
| [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model |
|
||||
@ -547,6 +548,91 @@ 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)
|
||||
|
||||
<a id="testadditionalpropertiesreference"></a>
|
||||
# **TestAdditionalPropertiesReference**
|
||||
> void TestAdditionalPropertiesReference (Dictionary<string, Object> requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestAdditionalPropertiesReferenceExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReference(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReference: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestAdditionalPropertiesReferenceWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReferenceWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **requestBody** | [**Dictionary<string, Object>**](Object.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
<a id="testbodywithfileschema"></a>
|
||||
# **TestBodyWithFileSchema**
|
||||
> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
|
||||
|
@ -158,6 +158,26 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>ApiResponse of List<OuterEnum></returns>
|
||||
ApiResponse<List<OuterEnum>> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody, int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody, int operationIndex = 0);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -603,6 +623,31 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task of ApiResponse (List<OuterEnum>)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<List<OuterEnum>>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -1836,6 +1881,148 @@ namespace Org.OpenAPITools.Api
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
public void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody, int operationIndex = 0)
|
||||
{
|
||||
TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody, int operationIndex = 0)
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestAdditionalPropertiesReference";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Post<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
await TestAdditionalPropertiesReferenceWithHttpInfoAsync(requestBody, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestAdditionalPropertiesReference";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For this test, the body for this request much reference a schema named `File`.
|
||||
/// </summary>
|
||||
|
@ -127,6 +127,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**GetArrayOfEnums**](docs/FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums
|
||||
*FakeApi* | [**TestAdditionalPropertiesReference**](docs/FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model
|
||||
|
@ -941,6 +941,23 @@ paths:
|
||||
summary: test json serialization of form data
|
||||
tags:
|
||||
- fake
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1868,6 +1885,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | |
|
||||
| [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | |
|
||||
| [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**TestAdditionalPropertiesReference**](FakeApi.md#testadditionalpropertiesreference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | |
|
||||
| [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model |
|
||||
@ -547,6 +548,91 @@ 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)
|
||||
|
||||
<a id="testadditionalpropertiesreference"></a>
|
||||
# **TestAdditionalPropertiesReference**
|
||||
> void TestAdditionalPropertiesReference (Dictionary<string, Object> requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class TestAdditionalPropertiesReferenceExample
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
Configuration config = new Configuration();
|
||||
config.BasePath = "http://petstore.swagger.io:80/v2";
|
||||
var apiInstance = new FakeApi(config);
|
||||
var requestBody = new Dictionary<string, Object>(); // Dictionary<string, Object> | request body
|
||||
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReference(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReference: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Using the TestAdditionalPropertiesReferenceWithHttpInfo variant
|
||||
This returns an ApiResponse object which contains the response data, status code and headers.
|
||||
|
||||
```csharp
|
||||
try
|
||||
{
|
||||
// test referenced additionalProperties
|
||||
apiInstance.TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
catch (ApiException e)
|
||||
{
|
||||
Debug.Print("Exception when calling FakeApi.TestAdditionalPropertiesReferenceWithHttpInfo: " + e.Message);
|
||||
Debug.Print("Status Code: " + e.ErrorCode);
|
||||
Debug.Print(e.StackTrace);
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------|------|-------------|-------|
|
||||
| **requestBody** | [**Dictionary<string, Object>**](Object.md) | request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### 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)
|
||||
|
||||
<a id="testbodywithfileschema"></a>
|
||||
# **TestBodyWithFileSchema**
|
||||
> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
|
||||
|
@ -158,6 +158,26 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>ApiResponse of List<OuterEnum></returns>
|
||||
ApiResponse<List<OuterEnum>> GetArrayOfEnumsWithHttpInfo(int operationIndex = 0);
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody, int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody, int operationIndex = 0);
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -603,6 +623,31 @@ namespace Org.OpenAPITools.Api
|
||||
/// <returns>Task of ApiResponse (List<OuterEnum>)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<List<OuterEnum>>> GetArrayOfEnumsWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
@ -1836,6 +1881,148 @@ namespace Org.OpenAPITools.Api
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns></returns>
|
||||
public void TestAdditionalPropertiesReference(Dictionary<string, Object> requestBody, int operationIndex = 0)
|
||||
{
|
||||
TestAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of Object(void)</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<Object> TestAdditionalPropertiesReferenceWithHttpInfo(Dictionary<string, Object> requestBody, int operationIndex = 0)
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestAdditionalPropertiesReference";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Post<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of void</returns>
|
||||
public async System.Threading.Tasks.Task TestAdditionalPropertiesReferenceAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
await TestAdditionalPropertiesReferenceWithHttpInfoAsync(requestBody, operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// test referenced additionalProperties
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="requestBody">request body</param>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<Object>> TestAdditionalPropertiesReferenceWithHttpInfoAsync(Dictionary<string, Object> requestBody, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null)
|
||||
{
|
||||
throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
string[] _contentTypes = new string[] {
|
||||
"application/json"
|
||||
};
|
||||
|
||||
// to determine the Accept header
|
||||
string[] _accepts = new string[] {
|
||||
};
|
||||
|
||||
var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
|
||||
if (localVarContentType != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
|
||||
if (localVarAccept != null)
|
||||
{
|
||||
localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
localVarRequestOptions.Data = requestBody;
|
||||
|
||||
localVarRequestOptions.Operation = "FakeApi.TestAdditionalPropertiesReference";
|
||||
localVarRequestOptions.OperationIndex = operationIndex;
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.PostAsync<Object>("/fake/additionalProperties-reference", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("TestAdditionalPropertiesReference", localVarResponse);
|
||||
if (_exception != null)
|
||||
{
|
||||
throw _exception;
|
||||
}
|
||||
}
|
||||
|
||||
return localVarResponse;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// For this test, the body for this request much reference a schema named `File`.
|
||||
/// </summary>
|
||||
|
@ -273,6 +273,37 @@ defmodule OpenapiPetstore.Api.Fake do
|
||||
])
|
||||
end
|
||||
|
||||
@doc """
|
||||
test referenced additionalProperties
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
- `connection` (OpenapiPetstore.Connection): Connection to server
|
||||
- `request_body` (%{optional(String.t) => any()}): request body
|
||||
- `opts` (keyword): Optional parameters
|
||||
|
||||
### Returns
|
||||
|
||||
- `{:ok, nil}` on success
|
||||
- `{:error, Tesla.Env.t}` on failure
|
||||
"""
|
||||
@spec test_additional_properties_reference(Tesla.Env.client, %{optional(String.t) => AnyType.t}, keyword()) :: {:ok, nil} | {:error, Tesla.Env.t}
|
||||
def test_additional_properties_reference(connection, request_body, _opts \\ []) do
|
||||
request =
|
||||
%{}
|
||||
|> method(:post)
|
||||
|> url("/fake/additionalProperties-reference")
|
||||
|> add_param(:body, :body, request_body)
|
||||
|> Enum.into([])
|
||||
|
||||
connection
|
||||
|> Connection.request(request)
|
||||
|> evaluate_response([
|
||||
{200, false}
|
||||
])
|
||||
end
|
||||
|
||||
@doc """
|
||||
For this test, the body has to be a binary file.
|
||||
|
||||
|
@ -273,9 +273,11 @@ golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBc
|
||||
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.2.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
|
||||
golang.org/x/term v0.2.0/go.mod h1:TVmDHMZPmdnySmBfhjOoOdhjzdE1h4u1VwSiw2l1Nuc=
|
||||
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
|
||||
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
||||
@ -283,6 +285,7 @@ golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
||||
golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
|
||||
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
|
||||
|
@ -12,6 +12,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | |
|
||||
| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | |
|
||||
| [**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | |
|
||||
| [**testAdditionalPropertiesReference**](FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | |
|
||||
| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | |
|
||||
@ -299,6 +300,41 @@ No authorization required
|
||||
| **200** | Output enum (int) | - |
|
||||
|
||||
|
||||
## testAdditionalPropertiesReference
|
||||
|
||||
> void testAdditionalPropertiesReference(requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
|
||||
|
||||
### Parameters
|
||||
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **requestBody** | [**Map<String, Object>**](Object.md)| request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**void**](Void.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
|
||||
## testBodyWithBinary
|
||||
|
||||
> void testBodyWithBinary(body)
|
||||
|
@ -102,6 +102,15 @@ public interface FakeApi {
|
||||
@Produces({ "*/*" })
|
||||
OuterObjectWithEnumProperty fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty) throws ApiException, ProcessingException;
|
||||
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
*
|
||||
*/
|
||||
@POST
|
||||
@Path("/additionalProperties-reference")
|
||||
@Consumes({ "application/json" })
|
||||
void testAdditionalPropertiesReference(Map<String, Object> requestBody) throws ApiException, ProcessingException;
|
||||
|
||||
@PUT
|
||||
@Path("/body-with-binary")
|
||||
@Consumes({ "image/png" })
|
||||
|
@ -12,6 +12,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | |
|
||||
| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | |
|
||||
| [**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | |
|
||||
| [**testAdditionalPropertiesReference**](FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | |
|
||||
| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | |
|
||||
@ -548,6 +549,71 @@ No authorization required
|
||||
| **200** | Output enum (int) | - |
|
||||
|
||||
|
||||
## testAdditionalPropertiesReference
|
||||
|
||||
> testAdditionalPropertiesReference(requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
|
||||
|
||||
### 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.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
Map<String, Object> requestBody = null; // Map<String, Object> | request body
|
||||
try {
|
||||
apiInstance.testAdditionalPropertiesReference(requestBody);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testAdditionalPropertiesReference");
|
||||
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 |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **requestBody** | [**Map<String, Object>**](Object.md)| request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
|
||||
## testBodyWithBinary
|
||||
|
||||
> testBodyWithBinary(body)
|
||||
|
@ -65,6 +65,14 @@ public interface FakeApi {
|
||||
|
||||
ApiResponse<OuterObjectWithEnumProperty> fakePropertyEnumIntegerSerialize(OuterObjectWithEnumProperty outerObjectWithEnumProperty);
|
||||
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
* @return {@code ApiResponse<Void>}
|
||||
*/
|
||||
ApiResponse<Void> testAdditionalPropertiesReference(Map<String, Object> requestBody);
|
||||
|
||||
ApiResponse<Void> testBodyWithBinary(File body);
|
||||
|
||||
ApiResponse<Void> testBodyWithFileSchema(FileSchemaTestClass fileSchemaTestClass);
|
||||
|
@ -68,6 +68,7 @@ public class FakeApiImpl implements FakeApi {
|
||||
protected static final GenericType<BigDecimal> RESPONSE_TYPE_fakeOuterNumberSerialize = ResponseType.create(BigDecimal.class);
|
||||
protected static final GenericType<String> RESPONSE_TYPE_fakeOuterStringSerialize = ResponseType.create(String.class);
|
||||
protected static final GenericType<OuterObjectWithEnumProperty> RESPONSE_TYPE_fakePropertyEnumIntegerSerialize = ResponseType.create(OuterObjectWithEnumProperty.class);
|
||||
protected static final GenericType<Void> RESPONSE_TYPE_testAdditionalPropertiesReference = ResponseType.create(Void.class);
|
||||
protected static final GenericType<Void> RESPONSE_TYPE_testBodyWithBinary = ResponseType.create(Void.class);
|
||||
protected static final GenericType<Void> RESPONSE_TYPE_testBodyWithFileSchema = ResponseType.create(Void.class);
|
||||
protected static final GenericType<Void> RESPONSE_TYPE_testBodyWithQueryParams = ResponseType.create(Void.class);
|
||||
@ -398,6 +399,44 @@ public class FakeApiImpl implements FakeApi {
|
||||
return ApiResponse.create(RESPONSE_TYPE_fakePropertyEnumIntegerSerialize, webClientResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResponse<Void> testAdditionalPropertiesReference(Map<String, Object> requestBody) {
|
||||
Objects.requireNonNull(requestBody, "Required parameter 'requestBody' not specified");
|
||||
WebClientRequestBuilder webClientRequestBuilder = testAdditionalPropertiesReferenceRequestBuilder(requestBody);
|
||||
return testAdditionalPropertiesReferenceSubmit(webClientRequestBuilder, requestBody);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a {@code WebClientRequestBuilder} for the testAdditionalPropertiesReference operation.
|
||||
* Optional customization point for subclasses.
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
* @return WebClientRequestBuilder for testAdditionalPropertiesReference
|
||||
*/
|
||||
protected WebClientRequestBuilder testAdditionalPropertiesReferenceRequestBuilder(Map<String, Object> requestBody) {
|
||||
WebClientRequestBuilder webClientRequestBuilder = apiClient.webClient()
|
||||
.method("POST");
|
||||
|
||||
webClientRequestBuilder.path("/fake/additionalProperties-reference");
|
||||
webClientRequestBuilder.contentType(MediaType.APPLICATION_JSON);
|
||||
webClientRequestBuilder.accept(MediaType.APPLICATION_JSON);
|
||||
|
||||
return webClientRequestBuilder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Initiates the request for the testAdditionalPropertiesReference operation.
|
||||
* Optional customization point for subclasses.
|
||||
*
|
||||
* @param webClientRequestBuilder the request builder to use for submitting the request
|
||||
* @param requestBody request body (required)
|
||||
* @return {@code ApiResponse<Void>} for the submitted request
|
||||
*/
|
||||
protected ApiResponse<Void> testAdditionalPropertiesReferenceSubmit(WebClientRequestBuilder webClientRequestBuilder, Map<String, Object> requestBody) {
|
||||
Single<WebClientResponse> webClientResponse = webClientRequestBuilder.submit(requestBody);
|
||||
return ApiResponse.create(RESPONSE_TYPE_testAdditionalPropertiesReference, webClientResponse);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApiResponse<Void> testBodyWithBinary(File body) {
|
||||
Objects.requireNonNull(body, "Required parameter 'body' not specified");
|
||||
|
@ -116,6 +116,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**fakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int |
|
||||
*FakeApi* | [**testAdditionalPropertiesReference**](docs/FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**testBodyWithBinary**](docs/FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary |
|
||||
*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
|
@ -1010,6 +1010,25 @@ paths:
|
||||
- fake
|
||||
x-content-type: application/x-www-form-urlencoded
|
||||
x-accepts: application/json
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
x-content-type: application/json
|
||||
x-accepts: application/json
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1851,6 +1870,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -12,6 +12,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | |
|
||||
| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | |
|
||||
| [**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | |
|
||||
| [**testAdditionalPropertiesReference**](FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | |
|
||||
| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | |
|
||||
@ -548,6 +549,71 @@ No authorization required
|
||||
| **200** | Output enum (int) | - |
|
||||
|
||||
|
||||
## testAdditionalPropertiesReference
|
||||
|
||||
> testAdditionalPropertiesReference(requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
|
||||
|
||||
### 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.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
Map<String, Object> requestBody = null; // Map<String, Object> | request body
|
||||
try {
|
||||
apiInstance.testAdditionalPropertiesReference(requestBody);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testAdditionalPropertiesReference");
|
||||
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 |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **requestBody** | [**Map<String, Object>**](Object.md)| request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
|
||||
## testBodyWithBinary
|
||||
|
||||
> testBodyWithBinary(body)
|
||||
|
@ -627,6 +627,77 @@ public class FakeApi {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testAdditionalPropertiesReference(Map<String, Object> requestBody) throws ApiException {
|
||||
this.testAdditionalPropertiesReference(requestBody, Collections.emptyMap());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
* @param additionalHeaders additionalHeaders for this call
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testAdditionalPropertiesReference(Map<String, Object> requestBody, Map<String, String> additionalHeaders) throws ApiException {
|
||||
Object localVarPostBody = requestBody;
|
||||
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/additionalProperties-reference";
|
||||
|
||||
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>();
|
||||
|
||||
|
||||
localVarHeaderParams.putAll(additionalHeaders);
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
apiClient.invokeAPI(
|
||||
localVarPath,
|
||||
"POST",
|
||||
localVarQueryParams,
|
||||
localVarCollectionQueryParams,
|
||||
localVarQueryStringJoiner.toString(),
|
||||
localVarPostBody,
|
||||
localVarHeaderParams,
|
||||
localVarCookieParams,
|
||||
localVarFormParams,
|
||||
localVarAccept,
|
||||
localVarContentType,
|
||||
localVarAuthNames,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* For this test, the body has to be a binary file.
|
||||
|
@ -1010,6 +1010,25 @@ paths:
|
||||
- fake
|
||||
x-content-type: application/x-www-form-urlencoded
|
||||
x-accepts: application/json
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
x-content-type: application/json
|
||||
x-accepts: application/json
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1851,6 +1870,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -314,6 +314,33 @@ public interface FakeApi extends ApiClient.Api {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
*/
|
||||
@RequestLine("POST /fake/additionalProperties-reference")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
void testAdditionalPropertiesReference(Map<String, Object> requestBody);
|
||||
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
* Similar to <code>testAdditionalPropertiesReference</code> but it also returns the http response headers .
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
*/
|
||||
@RequestLine("POST /fake/additionalProperties-reference")
|
||||
@Headers({
|
||||
"Content-Type: application/json",
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<Void> testAdditionalPropertiesReferenceWithHttpInfo(Map<String, Object> requestBody);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* For this test, the body has to be a binary file.
|
||||
|
@ -121,6 +121,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**getArrayOfEnums**](docs/FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums
|
||||
*FakeApi* | [**testAdditionalPropertiesReference**](docs/FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
|
@ -937,6 +937,25 @@ paths:
|
||||
- fake
|
||||
x-content-type: application/x-www-form-urlencoded
|
||||
x-accepts: application/json
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
x-content-type: application/json
|
||||
x-accepts: application/json
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1760,6 +1779,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -10,6 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | |
|
||||
| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | |
|
||||
| [**getArrayOfEnums**](FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**testAdditionalPropertiesReference**](FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | |
|
||||
| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model |
|
||||
@ -402,6 +403,70 @@ No authorization required
|
||||
| **200** | Got named array of enums | - |
|
||||
|
||||
|
||||
## testAdditionalPropertiesReference
|
||||
|
||||
> testAdditionalPropertiesReference(requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```java
|
||||
// Import classes:
|
||||
import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.ApiException;
|
||||
import org.openapitools.client.Configuration;
|
||||
import org.openapitools.client.model.*;
|
||||
import org.openapitools.client.api.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
Map<String, Object> requestBody = null; // Map<String, Object> | request body
|
||||
try {
|
||||
apiInstance.testAdditionalPropertiesReference(requestBody);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testAdditionalPropertiesReference");
|
||||
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 |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **requestBody** | **Map<String,Object>**| request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
|
||||
## testBodyWithFileSchema
|
||||
|
||||
> testBodyWithFileSchema(fileSchemaTestClass)
|
||||
|
@ -268,6 +268,45 @@ public class FakeApi {
|
||||
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||
null, localVarReturnType, false);
|
||||
}
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
* @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 void testAdditionalPropertiesReference(Map<String, Object> requestBody) throws ApiException {
|
||||
testAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
* @return ApiResponse<Void>
|
||||
* @throws ApiException if fails to make API call
|
||||
* @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<Void> testAdditionalPropertiesReferenceWithHttpInfo(Map<String, Object> requestBody) throws ApiException {
|
||||
// Check required parameters
|
||||
if (requestBody == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
String localVarAccept = apiClient.selectHeaderAccept();
|
||||
String localVarContentType = apiClient.selectHeaderContentType("application/json");
|
||||
return apiClient.invokeAPI("FakeApi.testAdditionalPropertiesReference", "/fake/additionalProperties-reference", "POST", new ArrayList<>(), requestBody,
|
||||
new LinkedHashMap<>(), new LinkedHashMap<>(), new LinkedHashMap<>(), localVarAccept, localVarContentType,
|
||||
null, null, false);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
|
@ -124,6 +124,8 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**fakeOuterStringSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterStringSerializeWithHttpInfo) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**getArrayOfEnums**](docs/FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums
|
||||
*FakeApi* | [**getArrayOfEnumsWithHttpInfo**](docs/FakeApi.md#getArrayOfEnumsWithHttpInfo) | **GET** /fake/array-of-enums | Array of Enums
|
||||
*FakeApi* | [**testAdditionalPropertiesReference**](docs/FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**testAdditionalPropertiesReferenceWithHttpInfo**](docs/FakeApi.md#testAdditionalPropertiesReferenceWithHttpInfo) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**testBodyWithFileSchemaWithHttpInfo**](docs/FakeApi.md#testBodyWithFileSchemaWithHttpInfo) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
|
@ -952,6 +952,25 @@ paths:
|
||||
- fake
|
||||
x-content-type: application/x-www-form-urlencoded
|
||||
x-accepts: application/json
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
x-content-type: application/json
|
||||
x-accepts: application/json
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1775,6 +1794,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -18,6 +18,8 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**fakeOuterStringSerializeWithHttpInfo**](FakeApi.md#fakeOuterStringSerializeWithHttpInfo) | **POST** /fake/outer/string | |
|
||||
| [**getArrayOfEnums**](FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**getArrayOfEnumsWithHttpInfo**](FakeApi.md#getArrayOfEnumsWithHttpInfo) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**testAdditionalPropertiesReference**](FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**testAdditionalPropertiesReferenceWithHttpInfo**](FakeApi.md#testAdditionalPropertiesReferenceWithHttpInfo) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**testBodyWithFileSchemaWithHttpInfo**](FakeApi.md#testBodyWithFileSchemaWithHttpInfo) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | |
|
||||
@ -1010,6 +1012,147 @@ No authorization required
|
||||
| **200** | Got named array of enums | - |
|
||||
|
||||
|
||||
## testAdditionalPropertiesReference
|
||||
|
||||
> CompletableFuture<Void> testAdditionalPropertiesReference(requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
|
||||
|
||||
### 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.FakeApi;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
Map<String, Object> requestBody = null; // Map<String, Object> | request body
|
||||
try {
|
||||
CompletableFuture<Void> result = apiInstance.testAdditionalPropertiesReference(requestBody);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testAdditionalPropertiesReference");
|
||||
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 |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **requestBody** | [**Map<String, Object>**](Object.md)| request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
CompletableFuture<void> (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
## testAdditionalPropertiesReferenceWithHttpInfo
|
||||
|
||||
> CompletableFuture<ApiResponse<Void>> testAdditionalPropertiesReference testAdditionalPropertiesReferenceWithHttpInfo(requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
|
||||
|
||||
### 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.FakeApi;
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
Map<String, Object> requestBody = null; // Map<String, Object> | request body
|
||||
try {
|
||||
CompletableFuture<ApiResponse<Void>> response = apiInstance.testAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
System.out.println("Status code: " + response.get().getStatusCode());
|
||||
System.out.println("Response headers: " + response.get().getHeaders());
|
||||
} catch (InterruptedException | ExecutionException e) {
|
||||
ApiException apiException = (ApiException)e.getCause();
|
||||
System.err.println("Exception when calling FakeApi#testAdditionalPropertiesReference");
|
||||
System.err.println("Status code: " + apiException.getCode());
|
||||
System.err.println("Response headers: " + apiException.getResponseHeaders());
|
||||
System.err.println("Reason: " + apiException.getResponseBody());
|
||||
e.printStackTrace();
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testAdditionalPropertiesReference");
|
||||
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 |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **requestBody** | [**Map<String, Object>**](Object.md)| request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
CompletableFuture<ApiResponse<Void>>
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
|
||||
## testBodyWithFileSchema
|
||||
|
||||
> CompletableFuture<Void> testBodyWithFileSchema(fileSchemaTestClass)
|
||||
|
@ -728,6 +728,89 @@ public class FakeApi {
|
||||
}
|
||||
return localVarRequestBuilder;
|
||||
}
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
* @return CompletableFuture<Void>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<Void> testAdditionalPropertiesReference(Map<String, Object> requestBody) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = testAdditionalPropertiesReferenceRequestBuilder(requestBody);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("testAdditionalPropertiesReference", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(null);
|
||||
});
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
* @return CompletableFuture<ApiResponse<Void>>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public CompletableFuture<ApiResponse<Void>> testAdditionalPropertiesReferenceWithHttpInfo(Map<String, Object> requestBody) throws ApiException {
|
||||
try {
|
||||
HttpRequest.Builder localVarRequestBuilder = testAdditionalPropertiesReferenceRequestBuilder(requestBody);
|
||||
return memberVarHttpClient.sendAsync(
|
||||
localVarRequestBuilder.build(),
|
||||
HttpResponse.BodyHandlers.ofString()).thenComposeAsync(localVarResponse -> {
|
||||
if (memberVarAsyncResponseInterceptor != null) {
|
||||
memberVarAsyncResponseInterceptor.accept(localVarResponse);
|
||||
}
|
||||
if (localVarResponse.statusCode()/ 100 != 2) {
|
||||
return CompletableFuture.failedFuture(getApiException("testAdditionalPropertiesReference", localVarResponse));
|
||||
}
|
||||
return CompletableFuture.completedFuture(
|
||||
new ApiResponse<Void>(localVarResponse.statusCode(), localVarResponse.headers().map(), null)
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (ApiException e) {
|
||||
return CompletableFuture.failedFuture(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testAdditionalPropertiesReferenceRequestBuilder(Map<String, Object> requestBody) throws ApiException {
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
String localVarPath = "/fake/additionalProperties-reference";
|
||||
|
||||
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
|
||||
|
||||
localVarRequestBuilder.header("Content-Type", "application/json");
|
||||
localVarRequestBuilder.header("Accept", "application/json");
|
||||
|
||||
try {
|
||||
byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(requestBody);
|
||||
localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
|
||||
} catch (IOException e) {
|
||||
throw new ApiException(e);
|
||||
}
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
return localVarRequestBuilder;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
|
@ -123,6 +123,8 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**fakeOuterStringSerializeWithHttpInfo**](docs/FakeApi.md#fakeOuterStringSerializeWithHttpInfo) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**getArrayOfEnums**](docs/FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums
|
||||
*FakeApi* | [**getArrayOfEnumsWithHttpInfo**](docs/FakeApi.md#getArrayOfEnumsWithHttpInfo) | **GET** /fake/array-of-enums | Array of Enums
|
||||
*FakeApi* | [**testAdditionalPropertiesReference**](docs/FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**testAdditionalPropertiesReferenceWithHttpInfo**](docs/FakeApi.md#testAdditionalPropertiesReferenceWithHttpInfo) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**testBodyWithFileSchemaWithHttpInfo**](docs/FakeApi.md#testBodyWithFileSchemaWithHttpInfo) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
|
@ -952,6 +952,25 @@ paths:
|
||||
- fake
|
||||
x-content-type: application/x-www-form-urlencoded
|
||||
x-accepts: application/json
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
x-content-type: application/json
|
||||
x-accepts: application/json
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1775,6 +1794,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -18,6 +18,8 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**fakeOuterStringSerializeWithHttpInfo**](FakeApi.md#fakeOuterStringSerializeWithHttpInfo) | **POST** /fake/outer/string | |
|
||||
| [**getArrayOfEnums**](FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**getArrayOfEnumsWithHttpInfo**](FakeApi.md#getArrayOfEnumsWithHttpInfo) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**testAdditionalPropertiesReference**](FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**testAdditionalPropertiesReferenceWithHttpInfo**](FakeApi.md#testAdditionalPropertiesReferenceWithHttpInfo) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**testBodyWithFileSchemaWithHttpInfo**](FakeApi.md#testBodyWithFileSchemaWithHttpInfo) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | |
|
||||
@ -947,6 +949,138 @@ No authorization required
|
||||
| **200** | Got named array of enums | - |
|
||||
|
||||
|
||||
## testAdditionalPropertiesReference
|
||||
|
||||
> void testAdditionalPropertiesReference(requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
|
||||
|
||||
### 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.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
Map<String, Object> requestBody = null; // Map<String, Object> | request body
|
||||
try {
|
||||
apiInstance.testAdditionalPropertiesReference(requestBody);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testAdditionalPropertiesReference");
|
||||
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 |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **requestBody** | [**Map<String, Object>**](Object.md)| request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
## testAdditionalPropertiesReferenceWithHttpInfo
|
||||
|
||||
> ApiResponse<Void> testAdditionalPropertiesReference testAdditionalPropertiesReferenceWithHttpInfo(requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
|
||||
|
||||
### 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.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
Map<String, Object> requestBody = null; // Map<String, Object> | request body
|
||||
try {
|
||||
ApiResponse<Void> response = apiInstance.testAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
System.out.println("Status code: " + response.getStatusCode());
|
||||
System.out.println("Response headers: " + response.getHeaders());
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testAdditionalPropertiesReference");
|
||||
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 |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **requestBody** | [**Map<String, Object>**](Object.md)| request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
|
||||
ApiResponse<Void>
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
|
||||
## testBodyWithFileSchema
|
||||
|
||||
> void testBodyWithFileSchema(fileSchemaTestClass)
|
||||
|
@ -580,6 +580,86 @@ public class FakeApi {
|
||||
}
|
||||
return localVarRequestBuilder;
|
||||
}
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testAdditionalPropertiesReference(Map<String, Object> requestBody) throws ApiException {
|
||||
testAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
* @return ApiResponse<Void>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<Void> testAdditionalPropertiesReferenceWithHttpInfo(Map<String, Object> requestBody) throws ApiException {
|
||||
HttpRequest.Builder localVarRequestBuilder = testAdditionalPropertiesReferenceRequestBuilder(requestBody);
|
||||
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("testAdditionalPropertiesReference", localVarResponse);
|
||||
}
|
||||
return new ApiResponse<Void>(
|
||||
localVarResponse.statusCode(),
|
||||
localVarResponse.headers().map(),
|
||||
null
|
||||
);
|
||||
} finally {
|
||||
// Drain the InputStream
|
||||
while (localVarResponse.body().read() != -1) {
|
||||
// Ignore
|
||||
}
|
||||
localVarResponse.body().close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
throw new ApiException(e);
|
||||
}
|
||||
catch (InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
throw new ApiException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private HttpRequest.Builder testAdditionalPropertiesReferenceRequestBuilder(Map<String, Object> requestBody) throws ApiException {
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
HttpRequest.Builder localVarRequestBuilder = HttpRequest.newBuilder();
|
||||
|
||||
String localVarPath = "/fake/additionalProperties-reference";
|
||||
|
||||
localVarRequestBuilder.uri(URI.create(memberVarBaseUri + localVarPath));
|
||||
|
||||
localVarRequestBuilder.header("Content-Type", "application/json");
|
||||
localVarRequestBuilder.header("Accept", "application/json");
|
||||
|
||||
try {
|
||||
byte[] localVarPostBody = memberVarObjectMapper.writeValueAsBytes(requestBody);
|
||||
localVarRequestBuilder.method("POST", HttpRequest.BodyPublishers.ofByteArray(localVarPostBody));
|
||||
} catch (IOException e) {
|
||||
throw new ApiException(e);
|
||||
}
|
||||
if (memberVarReadTimeout != null) {
|
||||
localVarRequestBuilder.timeout(memberVarReadTimeout);
|
||||
}
|
||||
if (memberVarInterceptor != null) {
|
||||
memberVarInterceptor.accept(localVarRequestBuilder);
|
||||
}
|
||||
return localVarRequestBuilder;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
|
@ -125,6 +125,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**getArrayOfEnums**](docs/FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums
|
||||
*FakeApi* | [**getParameterNameMapping**](docs/FakeApi.md#getParameterNameMapping) | **GET** /fake/parameter-name-mapping | parameter name mapping test
|
||||
*FakeApi* | [**testAdditionalPropertiesReference**](docs/FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
*FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
|
@ -933,6 +933,25 @@ paths:
|
||||
- fake
|
||||
x-content-type: application/x-www-form-urlencoded
|
||||
x-accepts: application/json
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
x-content-type: application/json
|
||||
x-accepts: application/json
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1906,6 +1925,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -11,6 +11,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | |
|
||||
| [**getArrayOfEnums**](FakeApi.md#getArrayOfEnums) | **GET** /fake/array-of-enums | Array of Enums |
|
||||
| [**getParameterNameMapping**](FakeApi.md#getParameterNameMapping) | **GET** /fake/parameter-name-mapping | parameter name mapping test |
|
||||
| [**testAdditionalPropertiesReference**](FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | |
|
||||
| [**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model |
|
||||
@ -446,6 +447,67 @@ No authorization required
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | OK | - |
|
||||
|
||||
<a id="testAdditionalPropertiesReference"></a>
|
||||
# **testAdditionalPropertiesReference**
|
||||
> testAdditionalPropertiesReference(requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
|
||||
|
||||
### 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.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
Map<String, Object> requestBody = null; // Map<String, Object> | request body
|
||||
try {
|
||||
apiInstance.testAdditionalPropertiesReference(requestBody);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testAdditionalPropertiesReference");
|
||||
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 |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **requestBody** | [**Map<String, Object>**](Object.md)| request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
<a id="testBodyWithFileSchema"></a>
|
||||
# **testBodyWithFileSchema**
|
||||
> testBodyWithFileSchema(fileSchemaTestClass)
|
||||
|
@ -927,6 +927,124 @@ public class FakeApi {
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for testAdditionalPropertiesReference
|
||||
* @param requestBody request body (required)
|
||||
* @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 testAdditionalPropertiesReferenceCall(Map<String, Object> requestBody, 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 = requestBody;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/additionalProperties-reference";
|
||||
|
||||
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>();
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
};
|
||||
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
|
||||
if (localVarAccept != null) {
|
||||
localVarHeaderParams.put("Accept", localVarAccept);
|
||||
}
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
|
||||
if (localVarContentType != null) {
|
||||
localVarHeaderParams.put("Content-Type", localVarContentType);
|
||||
}
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private okhttp3.Call testAdditionalPropertiesReferenceValidateBeforeCall(Map<String, Object> requestBody, final ApiCallback _callback) throws ApiException {
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null) {
|
||||
throw new ApiException("Missing the required parameter 'requestBody' when calling testAdditionalPropertiesReference(Async)");
|
||||
}
|
||||
|
||||
return testAdditionalPropertiesReferenceCall(requestBody, _callback);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
* @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 void testAdditionalPropertiesReference(Map<String, Object> requestBody) throws ApiException {
|
||||
testAdditionalPropertiesReferenceWithHttpInfo(requestBody);
|
||||
}
|
||||
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
* @return ApiResponse<Void>
|
||||
* @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<Void> testAdditionalPropertiesReferenceWithHttpInfo(Map<String, Object> requestBody) throws ApiException {
|
||||
okhttp3.Call localVarCall = testAdditionalPropertiesReferenceValidateBeforeCall(requestBody, null);
|
||||
return localVarApiClient.execute(localVarCall);
|
||||
}
|
||||
|
||||
/**
|
||||
* test referenced additionalProperties (asynchronously)
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
* @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 testAdditionalPropertiesReferenceAsync(Map<String, Object> requestBody, final ApiCallback<Void> _callback) throws ApiException {
|
||||
|
||||
okhttp3.Call localVarCall = testAdditionalPropertiesReferenceValidateBeforeCall(requestBody, _callback);
|
||||
localVarApiClient.executeAsync(localVarCall, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
/**
|
||||
* Build call for testBodyWithFileSchema
|
||||
* @param fileSchemaTestClass (required)
|
||||
|
@ -123,6 +123,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**fakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int |
|
||||
*FakeApi* | [**testAdditionalPropertiesReference**](docs/FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**testBodyWithBinary**](docs/FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary |
|
||||
*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
|
@ -1010,6 +1010,25 @@ paths:
|
||||
- fake
|
||||
x-content-type: application/x-www-form-urlencoded
|
||||
x-accepts: application/json
|
||||
/fake/additionalProperties-reference:
|
||||
post:
|
||||
description: ""
|
||||
operationId: testAdditionalPropertiesReference
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/FreeFormObject'
|
||||
description: request body
|
||||
required: true
|
||||
responses:
|
||||
"200":
|
||||
description: successful operation
|
||||
summary: test referenced additionalProperties
|
||||
tags:
|
||||
- fake
|
||||
x-content-type: application/json
|
||||
x-accepts: application/json
|
||||
/fake/inline-additionalProperties:
|
||||
post:
|
||||
description: ""
|
||||
@ -1851,6 +1870,10 @@ components:
|
||||
type: string
|
||||
type: array
|
||||
type: object
|
||||
FreeFormObject:
|
||||
additionalProperties: true
|
||||
description: A schema consisting only of additional properties
|
||||
type: object
|
||||
OuterEnum:
|
||||
enum:
|
||||
- placed
|
||||
|
@ -12,6 +12,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
| [**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number | |
|
||||
| [**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string | |
|
||||
| [**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int | |
|
||||
| [**testAdditionalPropertiesReference**](FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties |
|
||||
| [**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary | |
|
||||
| [**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema | |
|
||||
| [**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params | |
|
||||
@ -548,6 +549,71 @@ No authorization required
|
||||
| **200** | Output enum (int) | - |
|
||||
|
||||
|
||||
## testAdditionalPropertiesReference
|
||||
|
||||
> testAdditionalPropertiesReference(requestBody)
|
||||
|
||||
test referenced additionalProperties
|
||||
|
||||
|
||||
|
||||
### 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.FakeApi;
|
||||
|
||||
public class Example {
|
||||
public static void main(String[] args) {
|
||||
ApiClient defaultClient = Configuration.getDefaultApiClient();
|
||||
defaultClient.setBasePath("http://petstore.swagger.io:80/v2");
|
||||
|
||||
FakeApi apiInstance = new FakeApi(defaultClient);
|
||||
Map<String, Object> requestBody = null; // Map<String, Object> | request body
|
||||
try {
|
||||
apiInstance.testAdditionalPropertiesReference(requestBody);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling FakeApi#testAdditionalPropertiesReference");
|
||||
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 |
|
||||
|------------- | ------------- | ------------- | -------------|
|
||||
| **requestBody** | [**Map<String, Object>**](Object.md)| request body | |
|
||||
|
||||
### Return type
|
||||
|
||||
null (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
|
||||
### HTTP response details
|
||||
| Status code | Description | Response headers |
|
||||
|-------------|-------------|------------------|
|
||||
| **200** | successful operation | - |
|
||||
|
||||
|
||||
## testBodyWithBinary
|
||||
|
||||
> testBodyWithBinary(body)
|
||||
|
@ -364,6 +364,48 @@ public class FakeApi {
|
||||
GenericType<OuterObjectWithEnumProperty> localVarReturnType = new GenericType<OuterObjectWithEnumProperty>() {};
|
||||
return apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
|
||||
}
|
||||
/**
|
||||
* test referenced additionalProperties
|
||||
*
|
||||
* @param requestBody request body (required)
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public void testAdditionalPropertiesReference(Map<String, Object> requestBody) throws ApiException {
|
||||
Object localVarPostBody = requestBody;
|
||||
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'requestBody' when calling testAdditionalPropertiesReference");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/fake/additionalProperties-reference".replaceAll("\\{format\\}","json");
|
||||
|
||||
// query params
|
||||
List<Pair> localVarQueryParams = 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>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/json"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
|
||||
apiClient.invokeAPI(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
|
||||
}
|
||||
/**
|
||||
*
|
||||
* For this test, the body has to be a binary file.
|
||||
|
@ -123,6 +123,7 @@ Class | Method | HTTP request | Description
|
||||
*FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
*FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
*FakeApi* | [**fakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int |
|
||||
*FakeApi* | [**testAdditionalPropertiesReference**](docs/FakeApi.md#testAdditionalPropertiesReference) | **POST** /fake/additionalProperties-reference | test referenced additionalProperties
|
||||
*FakeApi* | [**testBodyWithBinary**](docs/FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary |
|
||||
*FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user