forked from loafle/openapi-generator-original
[Inline model resolver] better handling of inline responses and bug fixes (#12353)
* better handling of inline response schemas, bug fixes * update samples * add new files * better code format * remove unused ruby files * fix java test * remove unused js spec files * remove inline_response_default_test.dart * fix webclient tests * fix spring tests
This commit is contained in:
parent
2cf3d3805f
commit
12cdacabbf
@ -90,10 +90,34 @@ public class InlineModelResolver {
|
||||
}
|
||||
|
||||
for (Map.Entry<String, PathItem> pathsEntry : paths.entrySet()) {
|
||||
String pathname = pathsEntry.getKey();
|
||||
PathItem path = pathsEntry.getValue();
|
||||
List<Operation> operations = new ArrayList<>(path.readOperations());
|
||||
|
||||
// use path name (e.g. /foo/bar) and HTTP verb to come up with a name
|
||||
// in case operationId is not defined later in other methods
|
||||
String pathname = pathsEntry.getKey();
|
||||
String name = pathname;
|
||||
if (path.getDelete() != null) {
|
||||
name = pathname + "_delete";
|
||||
} else if (path.getGet() != null) {
|
||||
name = pathname + "_get";
|
||||
} else if (path.getHead() != null) {
|
||||
name = pathname + "_head";
|
||||
} else if (path.getOptions() != null) {
|
||||
name = pathname + "_options";
|
||||
} else if (path.getPatch() != null) {
|
||||
name = pathname + "_patch";
|
||||
} else if (path.getPost() != null) {
|
||||
name = pathname + "_post";
|
||||
} else if (path.getPut() != null) {
|
||||
name = pathname + "_put";
|
||||
} else if (path.getTrace() != null) {
|
||||
name = pathname + "_trace";
|
||||
} else {
|
||||
// no HTTP verb defined?
|
||||
//throw new RuntimeException("No HTTP verb found/detected in the inline model resolver");
|
||||
}
|
||||
|
||||
// Include callback operation as well
|
||||
for (Operation operation : path.readOperations()) {
|
||||
Map<String, Callback> callbacks = operation.getCallbacks();
|
||||
@ -106,9 +130,9 @@ public class InlineModelResolver {
|
||||
}
|
||||
|
||||
for (Operation operation : operations) {
|
||||
flattenRequestBody(pathname, operation);
|
||||
flattenParameters(pathname, operation);
|
||||
flattenResponses(pathname, operation);
|
||||
flattenRequestBody(name, operation);
|
||||
flattenParameters(name, operation);
|
||||
flattenResponses(name, operation);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -206,7 +230,7 @@ public class InlineModelResolver {
|
||||
if (schema.getAdditionalProperties() != null) {
|
||||
if (schema.getAdditionalProperties() instanceof Schema) {
|
||||
Schema inner = (Schema) schema.getAdditionalProperties();
|
||||
String schemaName = resolveModelName(schema.getTitle(), modelPrefix + "_" + "_value");
|
||||
String schemaName = resolveModelName(schema.getTitle(), modelPrefix + "_value");
|
||||
// Recurse to create $refs for inner models
|
||||
gatherInlineModels(inner, schemaName);
|
||||
if (isModelNeeded(inner)) {
|
||||
@ -362,10 +386,10 @@ public class InlineModelResolver {
|
||||
/**
|
||||
* Flatten inline models in RequestBody
|
||||
*
|
||||
* @param pathname target pathname
|
||||
* @param modelName inline model name prefix
|
||||
* @param operation target operation
|
||||
*/
|
||||
private void flattenRequestBody(String pathname, Operation operation) {
|
||||
private void flattenRequestBody(String modelName, Operation operation) {
|
||||
RequestBody requestBody = operation.getRequestBody();
|
||||
if (requestBody == null) {
|
||||
return;
|
||||
@ -377,8 +401,8 @@ public class InlineModelResolver {
|
||||
requestBody = openAPI.getComponents().getRequestBodies().get(ref);
|
||||
}
|
||||
|
||||
String name = operation.getOperationId() == null ? "inline_request" : operation.getOperationId() + "_request";
|
||||
flattenContent(requestBody.getContent(), name);
|
||||
flattenContent(requestBody.getContent(),
|
||||
(operation.getOperationId() == null ? modelName : operation.getOperationId()) + "_request");
|
||||
}
|
||||
|
||||
/**
|
||||
@ -438,10 +462,10 @@ public class InlineModelResolver {
|
||||
/**
|
||||
* Flatten inline models in ApiResponses
|
||||
*
|
||||
* @param pathname target pathname
|
||||
* @param modelName model name prefix
|
||||
* @param operation target operation
|
||||
*/
|
||||
private void flattenResponses(String pathname, Operation operation) {
|
||||
private void flattenResponses(String modelName, Operation operation) {
|
||||
ApiResponses responses = operation.getResponses();
|
||||
if (responses == null) {
|
||||
return;
|
||||
@ -450,78 +474,9 @@ public class InlineModelResolver {
|
||||
for (Map.Entry<String, ApiResponse> responsesEntry : responses.entrySet()) {
|
||||
String key = responsesEntry.getKey();
|
||||
ApiResponse response = responsesEntry.getValue();
|
||||
if (ModelUtils.getSchemaFromResponse(response) == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Schema property = ModelUtils.getSchemaFromResponse(response);
|
||||
if (property instanceof ObjectSchema) {
|
||||
ObjectSchema op = (ObjectSchema) property;
|
||||
if (op.getProperties() != null && op.getProperties().size() > 0) {
|
||||
String modelName = resolveModelName(op.getTitle(), "inline_response_" + key);
|
||||
Schema model = modelFromProperty(openAPI, op, modelName);
|
||||
String existing = matchGenerated(model);
|
||||
Content content = response.getContent();
|
||||
for (MediaType mediaType : content.values()) {
|
||||
if (existing != null) {
|
||||
Schema schema = this.makeSchema(existing, property);
|
||||
schema.setRequired(op.getRequired());
|
||||
mediaType.setSchema(schema);
|
||||
} else {
|
||||
modelName = addSchemas(modelName, model);
|
||||
Schema schema = this.makeSchema(modelName, property);
|
||||
schema.setRequired(op.getRequired());
|
||||
mediaType.setSchema(schema);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (property instanceof ArraySchema) {
|
||||
ArraySchema ap = (ArraySchema) property;
|
||||
Schema inner = ap.getItems();
|
||||
if (inner instanceof ObjectSchema) {
|
||||
ObjectSchema op = (ObjectSchema) inner;
|
||||
if (op.getProperties() != null && op.getProperties().size() > 0) {
|
||||
flattenProperties(openAPI, op.getProperties(), pathname);
|
||||
String modelName = resolveModelName(op.getTitle(),
|
||||
"inline_response_" + key);
|
||||
Schema innerModel = modelFromProperty(openAPI, op, modelName);
|
||||
String existing = matchGenerated(innerModel);
|
||||
if (existing != null) {
|
||||
Schema schema = this.makeSchema(existing, op);
|
||||
schema.setRequired(op.getRequired());
|
||||
ap.setItems(schema);
|
||||
} else {
|
||||
modelName = addSchemas(modelName, innerModel);
|
||||
Schema schema = this.makeSchema(modelName, op);
|
||||
schema.setRequired(op.getRequired());
|
||||
ap.setItems(schema);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (property instanceof MapSchema) {
|
||||
MapSchema mp = (MapSchema) property;
|
||||
Schema innerProperty = ModelUtils.getAdditionalProperties(openAPI, mp);
|
||||
if (innerProperty instanceof ObjectSchema) {
|
||||
ObjectSchema op = (ObjectSchema) innerProperty;
|
||||
if (op.getProperties() != null && op.getProperties().size() > 0) {
|
||||
flattenProperties(openAPI, op.getProperties(), pathname);
|
||||
String modelName = resolveModelName(op.getTitle(),
|
||||
"inline_response_" + key);
|
||||
Schema innerModel = modelFromProperty(openAPI, op, modelName);
|
||||
String existing = matchGenerated(innerModel);
|
||||
if (existing != null) {
|
||||
Schema schema = new Schema().$ref(existing);
|
||||
schema.setRequired(op.getRequired());
|
||||
mp.setAdditionalProperties(schema);
|
||||
} else {
|
||||
modelName = addSchemas(modelName, innerModel);
|
||||
Schema schema = new Schema().$ref(modelName);
|
||||
schema.setRequired(op.getRequired());
|
||||
mp.setAdditionalProperties(schema);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
flattenContent(response.getContent(),
|
||||
(operation.getOperationId() == null ? modelName : operation.getOperationId()) + "_" + key + "_response");
|
||||
}
|
||||
}
|
||||
|
||||
@ -608,12 +563,7 @@ public class InlineModelResolver {
|
||||
flattenComposedChildren(modelName + "_anyOf", m.getAnyOf());
|
||||
flattenComposedChildren(modelName + "_oneOf", m.getOneOf());
|
||||
} else if (model instanceof Schema) {
|
||||
//Schema m = model;
|
||||
//Map<String, Schema> properties = m.getProperties();
|
||||
//flattenProperties(openAPI, properties, modelName);
|
||||
//fixStringModel(m);
|
||||
gatherInlineModels(model, modelName);
|
||||
|
||||
} /*else if (ModelUtils.isArraySchema(model)) {
|
||||
ArraySchema m = (ArraySchema) model;
|
||||
Schema inner = m.getItems();
|
||||
|
@ -2356,6 +2356,7 @@ public class DefaultCodegenTest {
|
||||
.get("application/json")
|
||||
.getSchema());
|
||||
Assert.assertEquals(s.getExtensions().get("x-one-of-name"), "CreateStateRequest");
|
||||
|
||||
Assert.assertEquals(
|
||||
openAPI.getPaths()
|
||||
.get("/state")
|
||||
@ -2364,11 +2365,13 @@ public class DefaultCodegenTest {
|
||||
.get("200")
|
||||
.getContent()
|
||||
.get("application/json")
|
||||
.getSchema()
|
||||
.getExtensions()
|
||||
.get("x-one-of-name"),
|
||||
"GetState200"
|
||||
.getSchema().get$ref(),
|
||||
"#/components/schemas/getState_200_response"
|
||||
);
|
||||
Schema getState200 = openAPI.getComponents().getSchemas().get("getState_200_response");
|
||||
//Assert.assertEquals(getState200, "");
|
||||
Assert.assertEquals(getState200.getExtensions().get("x-one-of-name"), "GetState200Response");
|
||||
|
||||
// for the array schema, assert that a oneOf interface was added to schema map
|
||||
Schema items = ((ArraySchema) openAPI.getComponents().getSchemas().get("CustomOneOfArraySchema")).getItems();
|
||||
Assert.assertEquals(items.get$ref(), "#/components/schemas/CustomOneOfArraySchema_inner");
|
||||
|
@ -269,7 +269,7 @@ public class InlineModelResolverTest {
|
||||
OpenAPI openAPI = TestUtils.parseSpec("src/test/resources/3_0/6150_model_json_inline.yaml");
|
||||
new InlineModelResolver().flatten(openAPI);
|
||||
|
||||
Schema InlineResponse200 = openAPI.getComponents().getSchemas().get("inline_response_200");
|
||||
Schema InlineResponse200 = openAPI.getComponents().getSchemas().get("testOperation_200_response");
|
||||
assertEquals("object", InlineResponse200.getType());
|
||||
assertEquals("unknown", InlineResponse200.getFormat());
|
||||
Schema FooBarObject = openAPI.getComponents().getSchemas().get("FooBarObject");
|
||||
@ -475,7 +475,7 @@ public class InlineModelResolverTest {
|
||||
assertTrue(mediaType.getSchema() instanceof ArraySchema);
|
||||
|
||||
ArraySchema responseSchema = (ArraySchema) mediaType.getSchema();
|
||||
assertEquals("#/components/schemas/inline_response_200", responseSchema.getItems().get$ref());
|
||||
assertEquals("#/components/schemas/resolveInlineArrayResponse_200_response_inner", responseSchema.getItems().get$ref());
|
||||
|
||||
Schema items = ModelUtils.getReferencedSchema(openAPI, responseSchema.getItems());
|
||||
assertTrue(items.getProperties().get("array_response_property") instanceof StringSchema);
|
||||
@ -566,13 +566,13 @@ public class InlineModelResolverTest {
|
||||
|
||||
Schema additionalProperties = (Schema) mediaType.getSchema().getAdditionalProperties();
|
||||
assertNotNull(additionalProperties.get$ref());
|
||||
assertTrue(additionalProperties.get$ref().startsWith("#/components/schemas/inline_response_"));
|
||||
assertEquals("#/components/schemas/resolveInlineMapSchemaInResponse_200_response_value", additionalProperties.get$ref());
|
||||
|
||||
Schema referencedSchema = ModelUtils.getReferencedSchema(openAPI, additionalProperties);
|
||||
Schema referencedSchemaProperty = (Schema) referencedSchema.getProperties().get("resolve_inline_map_schema_in_response_property");
|
||||
|
||||
assertEquals(
|
||||
"#/components/schemas/_resolve_inline_map_schema_in_response_resolve_inline_map_schema_in_response_property",
|
||||
"#/components/schemas/resolveInlineMapSchemaInResponse_200_response_value_resolve_inline_map_schema_in_response_property",
|
||||
referencedSchemaProperty.get$ref()
|
||||
);
|
||||
assertNotNull(ModelUtils.getReferencedSchema(openAPI, referencedSchemaProperty));
|
||||
|
@ -517,8 +517,8 @@ public class SpringCodegenTest {
|
||||
generator.opts(input).generate();
|
||||
|
||||
JavaFileAssert.assertThat(Paths.get(outputPath + "/src/main/java/org/openapitools/api/ExampleApi.java"))
|
||||
.assertMethod("exampleApiPost", "InlineRequest")
|
||||
.hasParameter("inlineRequest")
|
||||
.assertMethod("exampleApiPost", "ExampleApiPostRequest")
|
||||
.hasParameter("exampleApiPostRequest")
|
||||
.assertParameterAnnotations()
|
||||
.containsWithNameAndAttributes("RequestBody", ImmutableMap.of("required", "false"));
|
||||
|
||||
@ -950,7 +950,7 @@ public class SpringCodegenTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void oneOf_5381() throws IOException {
|
||||
public void testOneOf5381() throws IOException {
|
||||
File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
|
||||
output.deleteOnExit();
|
||||
String outputPath = output.getAbsolutePath().replace('\\', '/');
|
||||
@ -988,7 +988,7 @@ public class SpringCodegenTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void oneOf_allOf() throws IOException {
|
||||
public void testOneOfAndAllOf() throws IOException {
|
||||
File output = Files.createTempDirectory("test").toFile().getCanonicalFile();
|
||||
output.deleteOnExit();
|
||||
String outputPath = output.getAbsolutePath().replace('\\', '/');
|
||||
@ -1007,7 +1007,7 @@ public class SpringCodegenTest {
|
||||
DefaultGenerator generator = new DefaultGenerator();
|
||||
codegen.setHateoas(true);
|
||||
generator.setGeneratorPropertyDefault(CodegenConstants.MODELS, "true");
|
||||
// generator.setGeneratorPropertyDefault(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, "true");
|
||||
//generator.setGeneratorPropertyDefault(CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, "true");
|
||||
generator.setGeneratorPropertyDefault(CodegenConstants.LEGACY_DISCRIMINATOR_BEHAVIOR, "false");
|
||||
|
||||
codegen.setUseOneOfInterfaces(true);
|
||||
|
@ -47,9 +47,9 @@ public class SharedTypeScriptTest {
|
||||
private void checkAPIFile(List<File> files, String apiFileName) throws IOException {
|
||||
File apiFile = files.stream().filter(file->file.getName().contains(apiFileName)).findFirst().get();
|
||||
String apiFileContent = FileUtils.readFileToString(apiFile, StandardCharsets.UTF_8);
|
||||
Assert.assertTrue(!apiFileContent.contains("import { OrganizationWrapper | PersonWrapper }"));
|
||||
Assert.assertTrue(!apiFileContent.contains("import { GetCustomer200Response | PersonWrapper }"));
|
||||
Assert.assertEquals(StringUtils.countMatches(apiFileContent,"import { PersonWrapper }"),1);
|
||||
Assert.assertEquals(StringUtils.countMatches(apiFileContent,"import { OrganizationWrapper }"),1);
|
||||
Assert.assertEquals(StringUtils.countMatches(apiFileContent,"import { GetCustomer200Response }"),1);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -56,7 +56,7 @@ public class TypeScriptClientCodegenTest {
|
||||
// TODO revise the commented test below as oneOf is no longer defined inline
|
||||
//but instead defined using $ref with the new inline model resolver in 6.x
|
||||
//Assert.assertEquals(operation.imports, Sets.newHashSet("Cat", "Dog"));
|
||||
Assert.assertEquals(operation.imports, Sets.newHashSet("InlineRequest"));
|
||||
Assert.assertEquals(operation.imports, Sets.newHashSet("PetsPatchRequest"));
|
||||
|
||||
}
|
||||
|
||||
|
@ -56,11 +56,12 @@ public class ModelUtilsTest {
|
||||
"SomeObj15",
|
||||
"SomeMapObj16",
|
||||
"MapItem16",
|
||||
"p17_200_response",
|
||||
"SomeObj17",
|
||||
"SomeObj18",
|
||||
"Common18",
|
||||
"SomeObj18_allOf",
|
||||
"inline_request",
|
||||
"_some_p19_patch_request",
|
||||
"Obj19ByAge",
|
||||
"Obj19ByType",
|
||||
"SomeObj20",
|
||||
@ -217,11 +218,11 @@ public class ModelUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAliasedTypeIsNotUnaliasedIfUsedForImportMapping(){
|
||||
public void testAliasedTypeIsNotUnaliasedIfUsedForImportMapping() {
|
||||
Schema emailSchema = new Schema().$ref("#/components/schemas/Email").type("string");
|
||||
StringSchema stringSchema = new StringSchema();
|
||||
HashMap<String, String> importMappings = new HashMap<>();
|
||||
importMappings.put("Email","foo.bar.Email");
|
||||
importMappings.put("Email", "foo.bar.Email");
|
||||
|
||||
OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("Email", stringSchema);
|
||||
|
||||
|
@ -1,40 +1,44 @@
|
||||
openapi: 3.0.1
|
||||
info:
|
||||
title: 'Buggy Api'
|
||||
version: '1.0'
|
||||
title: Buggy Api
|
||||
version: "1.0"
|
||||
servers:
|
||||
- url: /
|
||||
paths:
|
||||
/foo/bar:
|
||||
post:
|
||||
responses:
|
||||
'200':
|
||||
description: ok
|
||||
"200":
|
||||
content:
|
||||
'*/*':
|
||||
schema:
|
||||
$ref: '#/components/schemas/inline_response_200'
|
||||
|
||||
$ref: '#/components/schemas/_foo_bar_post_200_response'
|
||||
description: ok
|
||||
/foo/bar2:
|
||||
post:
|
||||
responses:
|
||||
'200':
|
||||
description: ok
|
||||
"200":
|
||||
content:
|
||||
'*/*':
|
||||
schema:
|
||||
$ref: '#/components/schemas/bar2'
|
||||
description: ok
|
||||
components:
|
||||
schemas:
|
||||
bar2:
|
||||
type: object
|
||||
example: { n: 4.56 }
|
||||
example:
|
||||
"n": 4.56
|
||||
properties:
|
||||
n:
|
||||
type: number
|
||||
"n":
|
||||
example: 4.56
|
||||
inline_response_200:
|
||||
type: object
|
||||
example: { n: 1.23 }
|
||||
properties:
|
||||
n:
|
||||
type: number
|
||||
type: object
|
||||
_foo_bar_post_200_response:
|
||||
example:
|
||||
"n": 1.23
|
||||
properties:
|
||||
"n":
|
||||
example: 1.23
|
||||
type: number
|
||||
type: object
|
||||
x-original-swagger-version: "2.0"
|
@ -17,11 +17,13 @@ paths:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/ObjA'
|
||||
- $ref: '#/components/schemas/ObjB'
|
||||
- $ref: '#/components/schemas/ObjD'
|
||||
discriminator:
|
||||
propertyName: realtype
|
||||
mapping:
|
||||
a-type: '#/components/schemas/ObjA'
|
||||
b-type: '#/components/schemas/ObjB'
|
||||
b-type: '#/components/schemas/ObjD'
|
||||
post:
|
||||
operationId: createState
|
||||
requestBody:
|
||||
@ -87,4 +89,11 @@ components:
|
||||
realtype:
|
||||
type: string
|
||||
state:
|
||||
type: string
|
||||
ObjD:
|
||||
type: object
|
||||
properties:
|
||||
realtype:
|
||||
type: string
|
||||
color:
|
||||
type: string
|
@ -37,6 +37,7 @@ docs/FakeClassnameTags123Api.md
|
||||
docs/File.md
|
||||
docs/FileSchemaTestClass.md
|
||||
docs/Foo.md
|
||||
docs/FooGetDefaultResponse.md
|
||||
docs/FormatTest.md
|
||||
docs/Fruit.md
|
||||
docs/FruitReq.md
|
||||
@ -44,7 +45,6 @@ docs/GmFruit.md
|
||||
docs/GrandparentAnimal.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/HealthCheckResult.md
|
||||
docs/InlineResponseDefault.md
|
||||
docs/IsoscelesTriangle.md
|
||||
docs/List.md
|
||||
docs/Mammal.md
|
||||
@ -144,6 +144,7 @@ src/Org.OpenAPITools/Model/EquilateralTriangle.cs
|
||||
src/Org.OpenAPITools/Model/File.cs
|
||||
src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
|
||||
src/Org.OpenAPITools/Model/Foo.cs
|
||||
src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs
|
||||
src/Org.OpenAPITools/Model/FormatTest.cs
|
||||
src/Org.OpenAPITools/Model/Fruit.cs
|
||||
src/Org.OpenAPITools/Model/FruitReq.cs
|
||||
@ -151,7 +152,6 @@ src/Org.OpenAPITools/Model/GmFruit.cs
|
||||
src/Org.OpenAPITools/Model/GrandparentAnimal.cs
|
||||
src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
|
||||
src/Org.OpenAPITools/Model/HealthCheckResult.cs
|
||||
src/Org.OpenAPITools/Model/InlineResponseDefault.cs
|
||||
src/Org.OpenAPITools/Model/IsoscelesTriangle.cs
|
||||
src/Org.OpenAPITools/Model/List.cs
|
||||
src/Org.OpenAPITools/Model/Mammal.cs
|
||||
|
@ -178,6 +178,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.File](docs/File.md)
|
||||
- [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [Model.Foo](docs/Foo.md)
|
||||
- [Model.FooGetDefaultResponse](docs/FooGetDefaultResponse.md)
|
||||
- [Model.FormatTest](docs/FormatTest.md)
|
||||
- [Model.Fruit](docs/Fruit.md)
|
||||
- [Model.FruitReq](docs/FruitReq.md)
|
||||
@ -185,7 +186,6 @@ Class | Method | HTTP request | Description
|
||||
- [Model.GrandparentAnimal](docs/GrandparentAnimal.md)
|
||||
- [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [Model.HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [Model.InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [Model.IsoscelesTriangle](docs/IsoscelesTriangle.md)
|
||||
- [Model.List](docs/List.md)
|
||||
- [Model.Mammal](docs/Mammal.md)
|
||||
|
@ -9,7 +9,7 @@ Method | HTTP request | Description
|
||||
|
||||
<a name="fooget"></a>
|
||||
# **FooGet**
|
||||
> InlineResponseDefault FooGet ()
|
||||
> FooGetDefaultResponse FooGet ()
|
||||
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ namespace Example
|
||||
|
||||
try
|
||||
{
|
||||
InlineResponseDefault result = apiInstance.FooGet();
|
||||
FooGetDefaultResponse result = apiInstance.FooGet();
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (ApiException e)
|
||||
@ -52,7 +52,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.FooGetDefaultResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**String** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing FooGetDefaultResponse
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class FooGetDefaultResponseTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for FooGetDefaultResponse
|
||||
//private FooGetDefaultResponse instance;
|
||||
|
||||
public FooGetDefaultResponseTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of FooGetDefaultResponse
|
||||
//instance = new FooGetDefaultResponse();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void FooGetDefaultResponseInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" FooGetDefaultResponse
|
||||
//Assert.IsType<FooGetDefaultResponse>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'String'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void StringTest()
|
||||
{
|
||||
// TODO unit test for the property 'String'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -31,8 +31,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
InlineResponseDefault FooGet(int operationIndex = 0);
|
||||
/// <returns>FooGetDefaultResponse</returns>
|
||||
FooGetDefaultResponse FooGet(int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -42,8 +42,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
ApiResponse<InlineResponseDefault> FooGetWithHttpInfo(int operationIndex = 0);
|
||||
/// <returns>ApiResponse of FooGetDefaultResponse</returns>
|
||||
ApiResponse<FooGetDefaultResponse> FooGetWithHttpInfo(int operationIndex = 0);
|
||||
#endregion Synchronous Operations
|
||||
}
|
||||
|
||||
@ -62,8 +62,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <returns>Task of FooGetDefaultResponse</returns>
|
||||
System.Threading.Tasks.Task<FooGetDefaultResponse> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -74,8 +74,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <returns>Task of ApiResponse (FooGetDefaultResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@ -201,10 +201,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
public InlineResponseDefault FooGet(int operationIndex = 0)
|
||||
/// <returns>FooGetDefaultResponse</returns>
|
||||
public FooGetDefaultResponse FooGet(int operationIndex = 0)
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> localVarResponse = FooGetWithHttpInfo();
|
||||
Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> localVarResponse = FooGetWithHttpInfo();
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@ -213,8 +213,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> FooGetWithHttpInfo(int operationIndex = 0)
|
||||
/// <returns>ApiResponse of FooGetDefaultResponse</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> FooGetWithHttpInfo(int operationIndex = 0)
|
||||
{
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
@ -244,7 +244,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Get<InlineResponseDefault>("/foo", localVarRequestOptions, this.Configuration);
|
||||
var localVarResponse = this.Client.Get<FooGetDefaultResponse>("/foo", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("FooGet", localVarResponse);
|
||||
@ -263,10 +263,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
public async System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
/// <returns>Task of FooGetDefaultResponse</returns>
|
||||
public async System.Threading.Tasks.Task<FooGetDefaultResponse> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> localVarResponse = await FooGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> localVarResponse = await FooGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@ -276,8 +276,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
/// <returns>Task of ApiResponse (FooGetDefaultResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
@ -308,7 +308,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<InlineResponseDefault>("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<FooGetDefaultResponse>("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
|
@ -0,0 +1,154 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[DataContract(Name = "_foo_get_default_response")]
|
||||
public partial class FooGetDefaultResponse : IEquatable<FooGetDefaultResponse>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_string">_string.</param>
|
||||
public FooGetDefaultResponse(Foo _string = default(Foo))
|
||||
{
|
||||
this._String = _string;
|
||||
if (this.String != null)
|
||||
{
|
||||
this._flagString = true;
|
||||
}
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name = "string", EmitDefaultValue = false)]
|
||||
public Foo String
|
||||
{
|
||||
get{ return _String;}
|
||||
set
|
||||
{
|
||||
_String = value;
|
||||
_flagString = true;
|
||||
}
|
||||
}
|
||||
private Foo _String;
|
||||
private bool _flagString;
|
||||
|
||||
/// <summary>
|
||||
/// Returns false as String should not be serialized given that it's read-only.
|
||||
/// </summary>
|
||||
/// <returns>false (boolean)</returns>
|
||||
public bool ShouldSerializeString()
|
||||
{
|
||||
return _flagString;
|
||||
}
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class FooGetDefaultResponse {\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input as FooGetDefaultResponse).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if FooGetDefaultResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of FooGetDefaultResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(FooGetDefaultResponse input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.String != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.String.GetHashCode();
|
||||
}
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -40,6 +40,7 @@ docs/models/EquilateralTriangle.md
|
||||
docs/models/File.md
|
||||
docs/models/FileSchemaTestClass.md
|
||||
docs/models/Foo.md
|
||||
docs/models/FooGetDefaultResponse.md
|
||||
docs/models/FormatTest.md
|
||||
docs/models/Fruit.md
|
||||
docs/models/FruitReq.md
|
||||
@ -47,7 +48,6 @@ docs/models/GmFruit.md
|
||||
docs/models/GrandparentAnimal.md
|
||||
docs/models/HasOnlyReadOnly.md
|
||||
docs/models/HealthCheckResult.md
|
||||
docs/models/InlineResponseDefault.md
|
||||
docs/models/IsoscelesTriangle.md
|
||||
docs/models/List.md
|
||||
docs/models/Mammal.md
|
||||
@ -146,6 +146,7 @@ src/Org.OpenAPITools/Model/EquilateralTriangle.cs
|
||||
src/Org.OpenAPITools/Model/File.cs
|
||||
src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
|
||||
src/Org.OpenAPITools/Model/Foo.cs
|
||||
src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs
|
||||
src/Org.OpenAPITools/Model/FormatTest.cs
|
||||
src/Org.OpenAPITools/Model/Fruit.cs
|
||||
src/Org.OpenAPITools/Model/FruitReq.cs
|
||||
@ -153,7 +154,6 @@ src/Org.OpenAPITools/Model/GmFruit.cs
|
||||
src/Org.OpenAPITools/Model/GrandparentAnimal.cs
|
||||
src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
|
||||
src/Org.OpenAPITools/Model/HealthCheckResult.cs
|
||||
src/Org.OpenAPITools/Model/InlineResponseDefault.cs
|
||||
src/Org.OpenAPITools/Model/IsoscelesTriangle.cs
|
||||
src/Org.OpenAPITools/Model/List.cs
|
||||
src/Org.OpenAPITools/Model/Mammal.cs
|
||||
|
@ -9,7 +9,7 @@ Method | HTTP request | Description
|
||||
|
||||
<a name="fooget"></a>
|
||||
# **FooGet**
|
||||
> InlineResponseDefault FooGet ()
|
||||
> FooGetDefaultResponse FooGet ()
|
||||
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ namespace Example
|
||||
|
||||
try
|
||||
{
|
||||
InlineResponseDefault result = apiInstance.FooGet();
|
||||
FooGetDefaultResponse result = apiInstance.FooGet();
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (ApiException e)
|
||||
@ -52,7 +52,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.FooGetDefaultResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**String** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing FooGetDefaultResponse
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class FooGetDefaultResponseTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for FooGetDefaultResponse
|
||||
//private FooGetDefaultResponse instance;
|
||||
|
||||
public FooGetDefaultResponseTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of FooGetDefaultResponse
|
||||
//instance = new FooGetDefaultResponse();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void FooGetDefaultResponseInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" FooGetDefaultResponse
|
||||
//Assert.IsType<FooGetDefaultResponse>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'String'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void StringTest()
|
||||
{
|
||||
// TODO unit test for the property 'String'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -36,8 +36,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<InlineResponseDefault?>></returns>
|
||||
Task<ApiResponse<InlineResponseDefault?>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
/// <returns>Task<ApiResponse<FooGetDefaultResponse?>></returns>
|
||||
Task<ApiResponse<FooGetDefaultResponse?>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -47,8 +47,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<InlineResponseDefault></returns>
|
||||
Task<InlineResponseDefault?> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
/// <returns>Task of ApiResponse<FooGetDefaultResponse></returns>
|
||||
Task<FooGetDefaultResponse?> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -57,8 +57,8 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<InlineResponseDefault?></returns>
|
||||
Task<InlineResponseDefault?> FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
/// <returns>Task of ApiResponse<FooGetDefaultResponse?></returns>
|
||||
Task<FooGetDefaultResponse?> FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
}
|
||||
|
||||
@ -136,10 +136,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="InlineResponseDefault"/>></returns>
|
||||
public async Task<InlineResponseDefault?> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
/// <returns><see cref="Task"/><<see cref="FooGetDefaultResponse"/>></returns>
|
||||
public async Task<FooGetDefaultResponse?> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<InlineResponseDefault?> result = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
ApiResponse<FooGetDefaultResponse?> result = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (result.Content == null)
|
||||
throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent);
|
||||
@ -152,10 +152,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="InlineResponseDefault"/>></returns>
|
||||
public async Task<InlineResponseDefault?> FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
/// <returns><see cref="Task"/><<see cref="FooGetDefaultResponse"/>></returns>
|
||||
public async Task<FooGetDefaultResponse?> FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<InlineResponseDefault?>? result = null;
|
||||
ApiResponse<FooGetDefaultResponse?>? result = null;
|
||||
try
|
||||
{
|
||||
result = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
@ -174,8 +174,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="InlineResponseDefault"/></returns>
|
||||
public async Task<ApiResponse<InlineResponseDefault?>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="FooGetDefaultResponse"/></returns>
|
||||
public async Task<ApiResponse<FooGetDefaultResponse?>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -217,10 +217,10 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
ApiResponse<InlineResponseDefault?> apiResponse = new ApiResponse<InlineResponseDefault?>(responseMessage, responseContent);
|
||||
ApiResponse<FooGetDefaultResponse?> apiResponse = new ApiResponse<FooGetDefaultResponse?>(responseMessage, responseContent);
|
||||
|
||||
if (apiResponse.IsSuccessStatusCode)
|
||||
apiResponse.Content = JsonSerializer.Deserialize<InlineResponseDefault>(apiResponse.RawContent, _jsonSerializerOptions);
|
||||
apiResponse.Content = JsonSerializer.Deserialize<FooGetDefaultResponse>(apiResponse.RawContent, _jsonSerializerOptions);
|
||||
|
||||
return apiResponse;
|
||||
}
|
||||
|
@ -0,0 +1,121 @@
|
||||
// <auto-generated>
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
#nullable enable
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// FooGetDefaultResponse
|
||||
/// </summary>
|
||||
public partial class FooGetDefaultResponse : IEquatable<FooGetDefaultResponse>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_string">_string</param>
|
||||
public FooGetDefaultResponse(Foo? _string = default)
|
||||
{
|
||||
String = _string;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[JsonPropertyName("string")]
|
||||
public Foo? String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, JsonElement> AdditionalProperties { get; set; } = new Dictionary<string, JsonElement>();
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class FooGetDefaultResponse {\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object? input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input as FooGetDefaultResponse).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if FooGetDefaultResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of FooGetDefaultResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(FooGetDefaultResponse? input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.String != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.String.GetHashCode();
|
||||
}
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -40,6 +40,7 @@ docs/models/EquilateralTriangle.md
|
||||
docs/models/File.md
|
||||
docs/models/FileSchemaTestClass.md
|
||||
docs/models/Foo.md
|
||||
docs/models/FooGetDefaultResponse.md
|
||||
docs/models/FormatTest.md
|
||||
docs/models/Fruit.md
|
||||
docs/models/FruitReq.md
|
||||
@ -47,7 +48,6 @@ docs/models/GmFruit.md
|
||||
docs/models/GrandparentAnimal.md
|
||||
docs/models/HasOnlyReadOnly.md
|
||||
docs/models/HealthCheckResult.md
|
||||
docs/models/InlineResponseDefault.md
|
||||
docs/models/IsoscelesTriangle.md
|
||||
docs/models/List.md
|
||||
docs/models/Mammal.md
|
||||
@ -146,6 +146,7 @@ src/Org.OpenAPITools/Model/EquilateralTriangle.cs
|
||||
src/Org.OpenAPITools/Model/File.cs
|
||||
src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
|
||||
src/Org.OpenAPITools/Model/Foo.cs
|
||||
src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs
|
||||
src/Org.OpenAPITools/Model/FormatTest.cs
|
||||
src/Org.OpenAPITools/Model/Fruit.cs
|
||||
src/Org.OpenAPITools/Model/FruitReq.cs
|
||||
@ -153,7 +154,6 @@ src/Org.OpenAPITools/Model/GmFruit.cs
|
||||
src/Org.OpenAPITools/Model/GrandparentAnimal.cs
|
||||
src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
|
||||
src/Org.OpenAPITools/Model/HealthCheckResult.cs
|
||||
src/Org.OpenAPITools/Model/InlineResponseDefault.cs
|
||||
src/Org.OpenAPITools/Model/IsoscelesTriangle.cs
|
||||
src/Org.OpenAPITools/Model/List.cs
|
||||
src/Org.OpenAPITools/Model/Mammal.cs
|
||||
|
@ -9,7 +9,7 @@ Method | HTTP request | Description
|
||||
|
||||
<a name="fooget"></a>
|
||||
# **FooGet**
|
||||
> InlineResponseDefault FooGet ()
|
||||
> FooGetDefaultResponse FooGet ()
|
||||
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ namespace Example
|
||||
|
||||
try
|
||||
{
|
||||
InlineResponseDefault result = apiInstance.FooGet();
|
||||
FooGetDefaultResponse result = apiInstance.FooGet();
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (ApiException e)
|
||||
@ -52,7 +52,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.FooGetDefaultResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**String** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing FooGetDefaultResponse
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class FooGetDefaultResponseTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for FooGetDefaultResponse
|
||||
//private FooGetDefaultResponse instance;
|
||||
|
||||
public FooGetDefaultResponseTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of FooGetDefaultResponse
|
||||
//instance = new FooGetDefaultResponse();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void FooGetDefaultResponseInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" FooGetDefaultResponse
|
||||
//Assert.IsType<FooGetDefaultResponse>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'String'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void StringTest()
|
||||
{
|
||||
// TODO unit test for the property 'String'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -34,8 +34,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<InlineResponseDefault>></returns>
|
||||
Task<ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
/// <returns>Task<ApiResponse<FooGetDefaultResponse>></returns>
|
||||
Task<ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -45,8 +45,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<InlineResponseDefault></returns>
|
||||
Task<InlineResponseDefault> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null); }
|
||||
/// <returns>Task of ApiResponse<FooGetDefaultResponse></returns>
|
||||
Task<FooGetDefaultResponse> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null); }
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -122,10 +122,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="InlineResponseDefault"/>></returns>
|
||||
public async Task<InlineResponseDefault> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
/// <returns><see cref="Task"/><<see cref="FooGetDefaultResponse"/>></returns>
|
||||
public async Task<FooGetDefaultResponse> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<InlineResponseDefault> result = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
ApiResponse<FooGetDefaultResponse> result = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (result.Content == null)
|
||||
throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent);
|
||||
@ -138,10 +138,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="InlineResponseDefault"/>></returns>
|
||||
public async Task<InlineResponseDefault> FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
/// <returns><see cref="Task"/><<see cref="FooGetDefaultResponse"/>></returns>
|
||||
public async Task<FooGetDefaultResponse> FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<InlineResponseDefault> result = null;
|
||||
ApiResponse<FooGetDefaultResponse> result = null;
|
||||
try
|
||||
{
|
||||
result = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
@ -160,8 +160,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="InlineResponseDefault"/></returns>
|
||||
public async Task<ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="FooGetDefaultResponse"/></returns>
|
||||
public async Task<ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -203,10 +203,10 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
ApiResponse<InlineResponseDefault> apiResponse = new ApiResponse<InlineResponseDefault>(responseMessage, responseContent);
|
||||
ApiResponse<FooGetDefaultResponse> apiResponse = new ApiResponse<FooGetDefaultResponse>(responseMessage, responseContent);
|
||||
|
||||
if (apiResponse.IsSuccessStatusCode)
|
||||
apiResponse.Content = JsonSerializer.Deserialize<InlineResponseDefault>(apiResponse.RawContent, _jsonSerializerOptions);
|
||||
apiResponse.Content = JsonSerializer.Deserialize<FooGetDefaultResponse>(apiResponse.RawContent, _jsonSerializerOptions);
|
||||
|
||||
return apiResponse;
|
||||
}
|
||||
|
@ -0,0 +1,119 @@
|
||||
// <auto-generated>
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// FooGetDefaultResponse
|
||||
/// </summary>
|
||||
public partial class FooGetDefaultResponse : IEquatable<FooGetDefaultResponse>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_string">_string</param>
|
||||
public FooGetDefaultResponse(Foo _string = default)
|
||||
{
|
||||
String = _string;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[JsonPropertyName("string")]
|
||||
public Foo String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, JsonElement> AdditionalProperties { get; set; } = new Dictionary<string, JsonElement>();
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class FooGetDefaultResponse {\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input as FooGetDefaultResponse).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if FooGetDefaultResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of FooGetDefaultResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(FooGetDefaultResponse input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.String != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.String.GetHashCode();
|
||||
}
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -40,6 +40,7 @@ docs/models/EquilateralTriangle.md
|
||||
docs/models/File.md
|
||||
docs/models/FileSchemaTestClass.md
|
||||
docs/models/Foo.md
|
||||
docs/models/FooGetDefaultResponse.md
|
||||
docs/models/FormatTest.md
|
||||
docs/models/Fruit.md
|
||||
docs/models/FruitReq.md
|
||||
@ -47,7 +48,6 @@ docs/models/GmFruit.md
|
||||
docs/models/GrandparentAnimal.md
|
||||
docs/models/HasOnlyReadOnly.md
|
||||
docs/models/HealthCheckResult.md
|
||||
docs/models/InlineResponseDefault.md
|
||||
docs/models/IsoscelesTriangle.md
|
||||
docs/models/List.md
|
||||
docs/models/Mammal.md
|
||||
@ -146,6 +146,7 @@ src/Org.OpenAPITools/Model/EquilateralTriangle.cs
|
||||
src/Org.OpenAPITools/Model/File.cs
|
||||
src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
|
||||
src/Org.OpenAPITools/Model/Foo.cs
|
||||
src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs
|
||||
src/Org.OpenAPITools/Model/FormatTest.cs
|
||||
src/Org.OpenAPITools/Model/Fruit.cs
|
||||
src/Org.OpenAPITools/Model/FruitReq.cs
|
||||
@ -153,7 +154,6 @@ src/Org.OpenAPITools/Model/GmFruit.cs
|
||||
src/Org.OpenAPITools/Model/GrandparentAnimal.cs
|
||||
src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
|
||||
src/Org.OpenAPITools/Model/HealthCheckResult.cs
|
||||
src/Org.OpenAPITools/Model/InlineResponseDefault.cs
|
||||
src/Org.OpenAPITools/Model/IsoscelesTriangle.cs
|
||||
src/Org.OpenAPITools/Model/List.cs
|
||||
src/Org.OpenAPITools/Model/Mammal.cs
|
||||
|
@ -9,7 +9,7 @@ Method | HTTP request | Description
|
||||
|
||||
<a name="fooget"></a>
|
||||
# **FooGet**
|
||||
> InlineResponseDefault FooGet ()
|
||||
> FooGetDefaultResponse FooGet ()
|
||||
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ namespace Example
|
||||
|
||||
try
|
||||
{
|
||||
InlineResponseDefault result = apiInstance.FooGet();
|
||||
FooGetDefaultResponse result = apiInstance.FooGet();
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (ApiException e)
|
||||
@ -52,7 +52,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.FooGetDefaultResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**String** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
|
||||
|
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing FooGetDefaultResponse
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class FooGetDefaultResponseTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for FooGetDefaultResponse
|
||||
//private FooGetDefaultResponse instance;
|
||||
|
||||
public FooGetDefaultResponseTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of FooGetDefaultResponse
|
||||
//instance = new FooGetDefaultResponse();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void FooGetDefaultResponseInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" FooGetDefaultResponse
|
||||
//Assert.IsType<FooGetDefaultResponse>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'String'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void StringTest()
|
||||
{
|
||||
// TODO unit test for the property 'String'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -34,8 +34,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task<ApiResponse<InlineResponseDefault>></returns>
|
||||
Task<ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
/// <returns>Task<ApiResponse<FooGetDefaultResponse>></returns>
|
||||
Task<ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -45,8 +45,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse<InlineResponseDefault></returns>
|
||||
Task<InlineResponseDefault> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null); }
|
||||
/// <returns>Task of ApiResponse<FooGetDefaultResponse></returns>
|
||||
Task<FooGetDefaultResponse> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null); }
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
@ -122,10 +122,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="InlineResponseDefault"/>></returns>
|
||||
public async Task<InlineResponseDefault> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
/// <returns><see cref="Task"/><<see cref="FooGetDefaultResponse"/>></returns>
|
||||
public async Task<FooGetDefaultResponse> FooGetAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<InlineResponseDefault> result = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
ApiResponse<FooGetDefaultResponse> result = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (result.Content == null)
|
||||
throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent);
|
||||
@ -138,10 +138,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="InlineResponseDefault"/>></returns>
|
||||
public async Task<InlineResponseDefault> FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
/// <returns><see cref="Task"/><<see cref="FooGetDefaultResponse"/>></returns>
|
||||
public async Task<FooGetDefaultResponse> FooGetOrDefaultAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
ApiResponse<InlineResponseDefault> result = null;
|
||||
ApiResponse<FooGetDefaultResponse> result = null;
|
||||
try
|
||||
{
|
||||
result = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
@ -160,8 +160,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="InlineResponseDefault"/></returns>
|
||||
public async Task<ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
/// <returns><see cref="Task"/><<see cref="ApiResponse{T}"/>> where T : <see cref="FooGetDefaultResponse"/></returns>
|
||||
public async Task<ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken? cancellationToken = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -203,10 +203,10 @@ namespace Org.OpenAPITools.Api
|
||||
}
|
||||
}
|
||||
|
||||
ApiResponse<InlineResponseDefault> apiResponse = new ApiResponse<InlineResponseDefault>(responseMessage, responseContent);
|
||||
ApiResponse<FooGetDefaultResponse> apiResponse = new ApiResponse<FooGetDefaultResponse>(responseMessage, responseContent);
|
||||
|
||||
if (apiResponse.IsSuccessStatusCode)
|
||||
apiResponse.Content = JsonSerializer.Deserialize<InlineResponseDefault>(apiResponse.RawContent, _jsonSerializerOptions);
|
||||
apiResponse.Content = JsonSerializer.Deserialize<FooGetDefaultResponse>(apiResponse.RawContent, _jsonSerializerOptions);
|
||||
|
||||
return apiResponse;
|
||||
}
|
||||
|
@ -0,0 +1,119 @@
|
||||
// <auto-generated>
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// FooGetDefaultResponse
|
||||
/// </summary>
|
||||
public partial class FooGetDefaultResponse : IEquatable<FooGetDefaultResponse>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_string">_string</param>
|
||||
public FooGetDefaultResponse(Foo _string = default)
|
||||
{
|
||||
String = _string;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[JsonPropertyName("string")]
|
||||
public Foo String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public Dictionary<string, JsonElement> AdditionalProperties { get; set; } = new Dictionary<string, JsonElement>();
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class FooGetDefaultResponse {\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input as FooGetDefaultResponse).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if FooGetDefaultResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of FooGetDefaultResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(FooGetDefaultResponse input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.String != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.String.GetHashCode();
|
||||
}
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -37,6 +37,7 @@ docs/FakeClassnameTags123Api.md
|
||||
docs/File.md
|
||||
docs/FileSchemaTestClass.md
|
||||
docs/Foo.md
|
||||
docs/FooGetDefaultResponse.md
|
||||
docs/FormatTest.md
|
||||
docs/Fruit.md
|
||||
docs/FruitReq.md
|
||||
@ -44,7 +45,6 @@ docs/GmFruit.md
|
||||
docs/GrandparentAnimal.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/HealthCheckResult.md
|
||||
docs/InlineResponseDefault.md
|
||||
docs/IsoscelesTriangle.md
|
||||
docs/List.md
|
||||
docs/Mammal.md
|
||||
@ -144,6 +144,7 @@ src/Org.OpenAPITools/Model/EquilateralTriangle.cs
|
||||
src/Org.OpenAPITools/Model/File.cs
|
||||
src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
|
||||
src/Org.OpenAPITools/Model/Foo.cs
|
||||
src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs
|
||||
src/Org.OpenAPITools/Model/FormatTest.cs
|
||||
src/Org.OpenAPITools/Model/Fruit.cs
|
||||
src/Org.OpenAPITools/Model/FruitReq.cs
|
||||
@ -151,7 +152,6 @@ src/Org.OpenAPITools/Model/GmFruit.cs
|
||||
src/Org.OpenAPITools/Model/GrandparentAnimal.cs
|
||||
src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
|
||||
src/Org.OpenAPITools/Model/HealthCheckResult.cs
|
||||
src/Org.OpenAPITools/Model/InlineResponseDefault.cs
|
||||
src/Org.OpenAPITools/Model/IsoscelesTriangle.cs
|
||||
src/Org.OpenAPITools/Model/List.cs
|
||||
src/Org.OpenAPITools/Model/Mammal.cs
|
||||
|
@ -203,6 +203,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.File](docs/File.md)
|
||||
- [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [Model.Foo](docs/Foo.md)
|
||||
- [Model.FooGetDefaultResponse](docs/FooGetDefaultResponse.md)
|
||||
- [Model.FormatTest](docs/FormatTest.md)
|
||||
- [Model.Fruit](docs/Fruit.md)
|
||||
- [Model.FruitReq](docs/FruitReq.md)
|
||||
@ -210,7 +211,6 @@ Class | Method | HTTP request | Description
|
||||
- [Model.GrandparentAnimal](docs/GrandparentAnimal.md)
|
||||
- [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [Model.HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [Model.InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [Model.IsoscelesTriangle](docs/IsoscelesTriangle.md)
|
||||
- [Model.List](docs/List.md)
|
||||
- [Model.Mammal](docs/Mammal.md)
|
||||
|
@ -9,7 +9,7 @@ Method | HTTP request | Description
|
||||
|
||||
<a name="fooget"></a>
|
||||
# **FooGet**
|
||||
> InlineResponseDefault FooGet ()
|
||||
> FooGetDefaultResponse FooGet ()
|
||||
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ namespace Example
|
||||
|
||||
try
|
||||
{
|
||||
InlineResponseDefault result = apiInstance.FooGet();
|
||||
FooGetDefaultResponse result = apiInstance.FooGet();
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (ApiException e)
|
||||
@ -56,7 +56,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.FooGetDefaultResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**String** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing FooGetDefaultResponse
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class FooGetDefaultResponseTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for FooGetDefaultResponse
|
||||
//private FooGetDefaultResponse instance;
|
||||
|
||||
public FooGetDefaultResponseTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of FooGetDefaultResponse
|
||||
//instance = new FooGetDefaultResponse();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void FooGetDefaultResponseInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" FooGetDefaultResponse
|
||||
//Assert.IsType<FooGetDefaultResponse>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'String'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void StringTest()
|
||||
{
|
||||
// TODO unit test for the property 'String'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -31,8 +31,8 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
InlineResponseDefault FooGet();
|
||||
/// <returns>FooGetDefaultResponse</returns>
|
||||
FooGetDefaultResponse FooGet();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -41,8 +41,8 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
ApiResponse<InlineResponseDefault> FooGetWithHttpInfo();
|
||||
/// <returns>ApiResponse of FooGetDefaultResponse</returns>
|
||||
ApiResponse<FooGetDefaultResponse> FooGetWithHttpInfo();
|
||||
#endregion Synchronous Operations
|
||||
}
|
||||
|
||||
@ -60,8 +60,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <returns>Task of FooGetDefaultResponse</returns>
|
||||
System.Threading.Tasks.Task<FooGetDefaultResponse> FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -71,8 +71,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <returns>Task of ApiResponse (FooGetDefaultResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@ -290,10 +290,10 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
public InlineResponseDefault FooGet()
|
||||
/// <returns>FooGetDefaultResponse</returns>
|
||||
public FooGetDefaultResponse FooGet()
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> localVarResponse = FooGetWithHttpInfo();
|
||||
Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> localVarResponse = FooGetWithHttpInfo();
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@ -301,8 +301,8 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> FooGetWithHttpInfo()
|
||||
/// <returns>ApiResponse of FooGetDefaultResponse</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> FooGetWithHttpInfo()
|
||||
{
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
@ -323,7 +323,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Get<InlineResponseDefault>("/foo", localVarRequestOptions, this.Configuration);
|
||||
var localVarResponse = this.Client.Get<FooGetDefaultResponse>("/foo", localVarRequestOptions, this.Configuration);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
@ -339,10 +339,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
public async System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
/// <returns>Task of FooGetDefaultResponse</returns>
|
||||
public async System.Threading.Tasks.Task<FooGetDefaultResponse> FooGetAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> localVarResponse = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> localVarResponse = await FooGetWithHttpInfoAsync(cancellationToken).ConfigureAwait(false);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@ -351,8 +351,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
/// <returns>Task of ApiResponse (FooGetDefaultResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
@ -376,7 +376,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
// make the HTTP request
|
||||
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<InlineResponseDefault>("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<FooGetDefaultResponse>("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
|
@ -0,0 +1,133 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using FileParameter = Org.OpenAPITools.Client.FileParameter;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[DataContract(Name = "_foo_get_default_response")]
|
||||
public partial class FooGetDefaultResponse : IEquatable<FooGetDefaultResponse>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_string">_string.</param>
|
||||
public FooGetDefaultResponse(Foo _string = default(Foo))
|
||||
{
|
||||
this.String = _string;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name = "string", EmitDefaultValue = false)]
|
||||
public Foo String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class FooGetDefaultResponse {\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input as FooGetDefaultResponse).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if FooGetDefaultResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of FooGetDefaultResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(FooGetDefaultResponse input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.String != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.String.GetHashCode();
|
||||
}
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -37,6 +37,7 @@ docs/FakeClassnameTags123Api.md
|
||||
docs/File.md
|
||||
docs/FileSchemaTestClass.md
|
||||
docs/Foo.md
|
||||
docs/FooGetDefaultResponse.md
|
||||
docs/FormatTest.md
|
||||
docs/Fruit.md
|
||||
docs/FruitReq.md
|
||||
@ -44,7 +45,6 @@ docs/GmFruit.md
|
||||
docs/GrandparentAnimal.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/HealthCheckResult.md
|
||||
docs/InlineResponseDefault.md
|
||||
docs/IsoscelesTriangle.md
|
||||
docs/List.md
|
||||
docs/Mammal.md
|
||||
@ -144,6 +144,7 @@ src/Org.OpenAPITools/Model/EquilateralTriangle.cs
|
||||
src/Org.OpenAPITools/Model/File.cs
|
||||
src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
|
||||
src/Org.OpenAPITools/Model/Foo.cs
|
||||
src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs
|
||||
src/Org.OpenAPITools/Model/FormatTest.cs
|
||||
src/Org.OpenAPITools/Model/Fruit.cs
|
||||
src/Org.OpenAPITools/Model/FruitReq.cs
|
||||
@ -151,7 +152,6 @@ src/Org.OpenAPITools/Model/GmFruit.cs
|
||||
src/Org.OpenAPITools/Model/GrandparentAnimal.cs
|
||||
src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
|
||||
src/Org.OpenAPITools/Model/HealthCheckResult.cs
|
||||
src/Org.OpenAPITools/Model/InlineResponseDefault.cs
|
||||
src/Org.OpenAPITools/Model/IsoscelesTriangle.cs
|
||||
src/Org.OpenAPITools/Model/List.cs
|
||||
src/Org.OpenAPITools/Model/Mammal.cs
|
||||
|
@ -190,6 +190,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.File](docs/File.md)
|
||||
- [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [Model.Foo](docs/Foo.md)
|
||||
- [Model.FooGetDefaultResponse](docs/FooGetDefaultResponse.md)
|
||||
- [Model.FormatTest](docs/FormatTest.md)
|
||||
- [Model.Fruit](docs/Fruit.md)
|
||||
- [Model.FruitReq](docs/FruitReq.md)
|
||||
@ -197,7 +198,6 @@ Class | Method | HTTP request | Description
|
||||
- [Model.GrandparentAnimal](docs/GrandparentAnimal.md)
|
||||
- [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [Model.HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [Model.InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [Model.IsoscelesTriangle](docs/IsoscelesTriangle.md)
|
||||
- [Model.List](docs/List.md)
|
||||
- [Model.Mammal](docs/Mammal.md)
|
||||
|
@ -9,7 +9,7 @@ Method | HTTP request | Description
|
||||
|
||||
<a name="fooget"></a>
|
||||
# **FooGet**
|
||||
> InlineResponseDefault FooGet ()
|
||||
> FooGetDefaultResponse FooGet ()
|
||||
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ namespace Example
|
||||
|
||||
try
|
||||
{
|
||||
InlineResponseDefault result = apiInstance.FooGet();
|
||||
FooGetDefaultResponse result = apiInstance.FooGet();
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (ApiException e)
|
||||
@ -52,7 +52,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.FooGetDefaultResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**String** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing FooGetDefaultResponse
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class FooGetDefaultResponseTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for FooGetDefaultResponse
|
||||
//private FooGetDefaultResponse instance;
|
||||
|
||||
public FooGetDefaultResponseTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of FooGetDefaultResponse
|
||||
//instance = new FooGetDefaultResponse();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void FooGetDefaultResponseInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" FooGetDefaultResponse
|
||||
//Assert.IsType<FooGetDefaultResponse>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'String'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void StringTest()
|
||||
{
|
||||
// TODO unit test for the property 'String'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -31,8 +31,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
InlineResponseDefault FooGet(int operationIndex = 0);
|
||||
/// <returns>FooGetDefaultResponse</returns>
|
||||
FooGetDefaultResponse FooGet(int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -42,8 +42,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
ApiResponse<InlineResponseDefault> FooGetWithHttpInfo(int operationIndex = 0);
|
||||
/// <returns>ApiResponse of FooGetDefaultResponse</returns>
|
||||
ApiResponse<FooGetDefaultResponse> FooGetWithHttpInfo(int operationIndex = 0);
|
||||
#endregion Synchronous Operations
|
||||
}
|
||||
|
||||
@ -62,8 +62,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <returns>Task of FooGetDefaultResponse</returns>
|
||||
System.Threading.Tasks.Task<FooGetDefaultResponse> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -74,8 +74,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <returns>Task of ApiResponse (FooGetDefaultResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@ -201,10 +201,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
public InlineResponseDefault FooGet(int operationIndex = 0)
|
||||
/// <returns>FooGetDefaultResponse</returns>
|
||||
public FooGetDefaultResponse FooGet(int operationIndex = 0)
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> localVarResponse = FooGetWithHttpInfo();
|
||||
Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> localVarResponse = FooGetWithHttpInfo();
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@ -213,8 +213,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> FooGetWithHttpInfo(int operationIndex = 0)
|
||||
/// <returns>ApiResponse of FooGetDefaultResponse</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> FooGetWithHttpInfo(int operationIndex = 0)
|
||||
{
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
@ -244,7 +244,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Get<InlineResponseDefault>("/foo", localVarRequestOptions, this.Configuration);
|
||||
var localVarResponse = this.Client.Get<FooGetDefaultResponse>("/foo", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("FooGet", localVarResponse);
|
||||
@ -263,10 +263,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
public async System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
/// <returns>Task of FooGetDefaultResponse</returns>
|
||||
public async System.Threading.Tasks.Task<FooGetDefaultResponse> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> localVarResponse = await FooGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> localVarResponse = await FooGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@ -276,8 +276,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
/// <returns>Task of ApiResponse (FooGetDefaultResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
@ -308,7 +308,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<InlineResponseDefault>("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<FooGetDefaultResponse>("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
|
@ -0,0 +1,132 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[DataContract(Name = "_foo_get_default_response")]
|
||||
public partial class FooGetDefaultResponse : IEquatable<FooGetDefaultResponse>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_string">_string.</param>
|
||||
public FooGetDefaultResponse(Foo _string = default(Foo))
|
||||
{
|
||||
this.String = _string;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name = "string", EmitDefaultValue = false)]
|
||||
public Foo String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class FooGetDefaultResponse {\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input as FooGetDefaultResponse).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if FooGetDefaultResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of FooGetDefaultResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(FooGetDefaultResponse input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.String != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.String.GetHashCode();
|
||||
}
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -37,6 +37,7 @@ docs/FakeClassnameTags123Api.md
|
||||
docs/File.md
|
||||
docs/FileSchemaTestClass.md
|
||||
docs/Foo.md
|
||||
docs/FooGetDefaultResponse.md
|
||||
docs/FormatTest.md
|
||||
docs/Fruit.md
|
||||
docs/FruitReq.md
|
||||
@ -44,7 +45,6 @@ docs/GmFruit.md
|
||||
docs/GrandparentAnimal.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/HealthCheckResult.md
|
||||
docs/InlineResponseDefault.md
|
||||
docs/IsoscelesTriangle.md
|
||||
docs/List.md
|
||||
docs/Mammal.md
|
||||
@ -144,6 +144,7 @@ src/Org.OpenAPITools/Model/EquilateralTriangle.cs
|
||||
src/Org.OpenAPITools/Model/File.cs
|
||||
src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
|
||||
src/Org.OpenAPITools/Model/Foo.cs
|
||||
src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs
|
||||
src/Org.OpenAPITools/Model/FormatTest.cs
|
||||
src/Org.OpenAPITools/Model/Fruit.cs
|
||||
src/Org.OpenAPITools/Model/FruitReq.cs
|
||||
@ -151,7 +152,6 @@ src/Org.OpenAPITools/Model/GmFruit.cs
|
||||
src/Org.OpenAPITools/Model/GrandparentAnimal.cs
|
||||
src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
|
||||
src/Org.OpenAPITools/Model/HealthCheckResult.cs
|
||||
src/Org.OpenAPITools/Model/InlineResponseDefault.cs
|
||||
src/Org.OpenAPITools/Model/IsoscelesTriangle.cs
|
||||
src/Org.OpenAPITools/Model/List.cs
|
||||
src/Org.OpenAPITools/Model/Mammal.cs
|
||||
|
@ -190,6 +190,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.File](docs/File.md)
|
||||
- [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [Model.Foo](docs/Foo.md)
|
||||
- [Model.FooGetDefaultResponse](docs/FooGetDefaultResponse.md)
|
||||
- [Model.FormatTest](docs/FormatTest.md)
|
||||
- [Model.Fruit](docs/Fruit.md)
|
||||
- [Model.FruitReq](docs/FruitReq.md)
|
||||
@ -197,7 +198,6 @@ Class | Method | HTTP request | Description
|
||||
- [Model.GrandparentAnimal](docs/GrandparentAnimal.md)
|
||||
- [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [Model.HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [Model.InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [Model.IsoscelesTriangle](docs/IsoscelesTriangle.md)
|
||||
- [Model.List](docs/List.md)
|
||||
- [Model.Mammal](docs/Mammal.md)
|
||||
|
@ -9,7 +9,7 @@ Method | HTTP request | Description
|
||||
|
||||
<a name="fooget"></a>
|
||||
# **FooGet**
|
||||
> InlineResponseDefault FooGet ()
|
||||
> FooGetDefaultResponse FooGet ()
|
||||
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ namespace Example
|
||||
|
||||
try
|
||||
{
|
||||
InlineResponseDefault result = apiInstance.FooGet();
|
||||
FooGetDefaultResponse result = apiInstance.FooGet();
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (ApiException e)
|
||||
@ -52,7 +52,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.FooGetDefaultResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**String** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing FooGetDefaultResponse
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class FooGetDefaultResponseTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for FooGetDefaultResponse
|
||||
//private FooGetDefaultResponse instance;
|
||||
|
||||
public FooGetDefaultResponseTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of FooGetDefaultResponse
|
||||
//instance = new FooGetDefaultResponse();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void FooGetDefaultResponseInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" FooGetDefaultResponse
|
||||
//Assert.IsType<FooGetDefaultResponse>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'String'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void StringTest()
|
||||
{
|
||||
// TODO unit test for the property 'String'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -31,8 +31,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
InlineResponseDefault FooGet(int operationIndex = 0);
|
||||
/// <returns>FooGetDefaultResponse</returns>
|
||||
FooGetDefaultResponse FooGet(int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -42,8 +42,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
ApiResponse<InlineResponseDefault> FooGetWithHttpInfo(int operationIndex = 0);
|
||||
/// <returns>ApiResponse of FooGetDefaultResponse</returns>
|
||||
ApiResponse<FooGetDefaultResponse> FooGetWithHttpInfo(int operationIndex = 0);
|
||||
#endregion Synchronous Operations
|
||||
}
|
||||
|
||||
@ -62,8 +62,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <returns>Task of FooGetDefaultResponse</returns>
|
||||
System.Threading.Tasks.Task<FooGetDefaultResponse> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -74,8 +74,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <returns>Task of ApiResponse (FooGetDefaultResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@ -201,10 +201,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
public InlineResponseDefault FooGet(int operationIndex = 0)
|
||||
/// <returns>FooGetDefaultResponse</returns>
|
||||
public FooGetDefaultResponse FooGet(int operationIndex = 0)
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> localVarResponse = FooGetWithHttpInfo();
|
||||
Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> localVarResponse = FooGetWithHttpInfo();
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@ -213,8 +213,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> FooGetWithHttpInfo(int operationIndex = 0)
|
||||
/// <returns>ApiResponse of FooGetDefaultResponse</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> FooGetWithHttpInfo(int operationIndex = 0)
|
||||
{
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
@ -244,7 +244,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Get<InlineResponseDefault>("/foo", localVarRequestOptions, this.Configuration);
|
||||
var localVarResponse = this.Client.Get<FooGetDefaultResponse>("/foo", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("FooGet", localVarResponse);
|
||||
@ -263,10 +263,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
public async System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
/// <returns>Task of FooGetDefaultResponse</returns>
|
||||
public async System.Threading.Tasks.Task<FooGetDefaultResponse> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> localVarResponse = await FooGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> localVarResponse = await FooGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@ -276,8 +276,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
/// <returns>Task of ApiResponse (FooGetDefaultResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
@ -308,7 +308,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<InlineResponseDefault>("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<FooGetDefaultResponse>("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
|
@ -0,0 +1,132 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[DataContract(Name = "_foo_get_default_response")]
|
||||
public partial class FooGetDefaultResponse : IEquatable<FooGetDefaultResponse>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_string">_string.</param>
|
||||
public FooGetDefaultResponse(Foo _string = default(Foo))
|
||||
{
|
||||
this.String = _string;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name = "string", EmitDefaultValue = false)]
|
||||
public Foo String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class FooGetDefaultResponse {\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input as FooGetDefaultResponse).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if FooGetDefaultResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of FooGetDefaultResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(FooGetDefaultResponse input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.String != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.String.GetHashCode();
|
||||
}
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -37,6 +37,7 @@ docs/FakeClassnameTags123Api.md
|
||||
docs/File.md
|
||||
docs/FileSchemaTestClass.md
|
||||
docs/Foo.md
|
||||
docs/FooGetDefaultResponse.md
|
||||
docs/FormatTest.md
|
||||
docs/Fruit.md
|
||||
docs/FruitReq.md
|
||||
@ -44,7 +45,6 @@ docs/GmFruit.md
|
||||
docs/GrandparentAnimal.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/HealthCheckResult.md
|
||||
docs/InlineResponseDefault.md
|
||||
docs/IsoscelesTriangle.md
|
||||
docs/List.md
|
||||
docs/Mammal.md
|
||||
@ -143,6 +143,7 @@ src/Org.OpenAPITools/Model/EquilateralTriangle.cs
|
||||
src/Org.OpenAPITools/Model/File.cs
|
||||
src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
|
||||
src/Org.OpenAPITools/Model/Foo.cs
|
||||
src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs
|
||||
src/Org.OpenAPITools/Model/FormatTest.cs
|
||||
src/Org.OpenAPITools/Model/Fruit.cs
|
||||
src/Org.OpenAPITools/Model/FruitReq.cs
|
||||
@ -150,7 +151,6 @@ src/Org.OpenAPITools/Model/GmFruit.cs
|
||||
src/Org.OpenAPITools/Model/GrandparentAnimal.cs
|
||||
src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
|
||||
src/Org.OpenAPITools/Model/HealthCheckResult.cs
|
||||
src/Org.OpenAPITools/Model/InlineResponseDefault.cs
|
||||
src/Org.OpenAPITools/Model/IsoscelesTriangle.cs
|
||||
src/Org.OpenAPITools/Model/List.cs
|
||||
src/Org.OpenAPITools/Model/Mammal.cs
|
||||
|
@ -178,6 +178,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.File](docs/File.md)
|
||||
- [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [Model.Foo](docs/Foo.md)
|
||||
- [Model.FooGetDefaultResponse](docs/FooGetDefaultResponse.md)
|
||||
- [Model.FormatTest](docs/FormatTest.md)
|
||||
- [Model.Fruit](docs/Fruit.md)
|
||||
- [Model.FruitReq](docs/FruitReq.md)
|
||||
@ -185,7 +186,6 @@ Class | Method | HTTP request | Description
|
||||
- [Model.GrandparentAnimal](docs/GrandparentAnimal.md)
|
||||
- [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [Model.HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [Model.InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [Model.IsoscelesTriangle](docs/IsoscelesTriangle.md)
|
||||
- [Model.List](docs/List.md)
|
||||
- [Model.Mammal](docs/Mammal.md)
|
||||
|
@ -9,7 +9,7 @@ Method | HTTP request | Description
|
||||
|
||||
<a name="fooget"></a>
|
||||
# **FooGet**
|
||||
> InlineResponseDefault FooGet ()
|
||||
> FooGetDefaultResponse FooGet ()
|
||||
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ namespace Example
|
||||
|
||||
try
|
||||
{
|
||||
InlineResponseDefault result = apiInstance.FooGet();
|
||||
FooGetDefaultResponse result = apiInstance.FooGet();
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (ApiException e)
|
||||
@ -52,7 +52,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.FooGetDefaultResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**String** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing FooGetDefaultResponse
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class FooGetDefaultResponseTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for FooGetDefaultResponse
|
||||
//private FooGetDefaultResponse instance;
|
||||
|
||||
public FooGetDefaultResponseTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of FooGetDefaultResponse
|
||||
//instance = new FooGetDefaultResponse();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void FooGetDefaultResponseInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" FooGetDefaultResponse
|
||||
//Assert.IsType<FooGetDefaultResponse>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'String'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void StringTest()
|
||||
{
|
||||
// TODO unit test for the property 'String'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -31,8 +31,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
InlineResponseDefault FooGet(int operationIndex = 0);
|
||||
/// <returns>FooGetDefaultResponse</returns>
|
||||
FooGetDefaultResponse FooGet(int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -42,8 +42,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
ApiResponse<InlineResponseDefault> FooGetWithHttpInfo(int operationIndex = 0);
|
||||
/// <returns>ApiResponse of FooGetDefaultResponse</returns>
|
||||
ApiResponse<FooGetDefaultResponse> FooGetWithHttpInfo(int operationIndex = 0);
|
||||
#endregion Synchronous Operations
|
||||
}
|
||||
|
||||
@ -62,8 +62,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <returns>Task of FooGetDefaultResponse</returns>
|
||||
System.Threading.Tasks.Task<FooGetDefaultResponse> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -74,8 +74,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <returns>Task of ApiResponse (FooGetDefaultResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@ -201,10 +201,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
public InlineResponseDefault FooGet(int operationIndex = 0)
|
||||
/// <returns>FooGetDefaultResponse</returns>
|
||||
public FooGetDefaultResponse FooGet(int operationIndex = 0)
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> localVarResponse = FooGetWithHttpInfo();
|
||||
Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> localVarResponse = FooGetWithHttpInfo();
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@ -213,8 +213,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> FooGetWithHttpInfo(int operationIndex = 0)
|
||||
/// <returns>ApiResponse of FooGetDefaultResponse</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> FooGetWithHttpInfo(int operationIndex = 0)
|
||||
{
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
@ -244,7 +244,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Get<InlineResponseDefault>("/foo", localVarRequestOptions, this.Configuration);
|
||||
var localVarResponse = this.Client.Get<FooGetDefaultResponse>("/foo", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("FooGet", localVarResponse);
|
||||
@ -263,10 +263,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
public async System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
/// <returns>Task of FooGetDefaultResponse</returns>
|
||||
public async System.Threading.Tasks.Task<FooGetDefaultResponse> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> localVarResponse = await FooGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> localVarResponse = await FooGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@ -276,8 +276,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
/// <returns>Task of ApiResponse (FooGetDefaultResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
@ -308,7 +308,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<InlineResponseDefault>("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<FooGetDefaultResponse>("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
|
@ -0,0 +1,132 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[DataContract(Name = "_foo_get_default_response")]
|
||||
public partial class FooGetDefaultResponse : IEquatable<FooGetDefaultResponse>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_string">_string.</param>
|
||||
public FooGetDefaultResponse(Foo _string = default(Foo))
|
||||
{
|
||||
this.String = _string;
|
||||
this.AdditionalProperties = new Dictionary<string, object>();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name = "string", EmitDefaultValue = false)]
|
||||
public Foo String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets additional properties
|
||||
/// </summary>
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, object> AdditionalProperties { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class FooGetDefaultResponse {\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" AdditionalProperties: ").Append(AdditionalProperties).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input as FooGetDefaultResponse).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if FooGetDefaultResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of FooGetDefaultResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(FooGetDefaultResponse input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.String != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.String.GetHashCode();
|
||||
}
|
||||
if (this.AdditionalProperties != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.AdditionalProperties.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -37,6 +37,7 @@ docs/FakeClassnameTags123Api.md
|
||||
docs/File.md
|
||||
docs/FileSchemaTestClass.md
|
||||
docs/Foo.md
|
||||
docs/FooGetDefaultResponse.md
|
||||
docs/FormatTest.md
|
||||
docs/Fruit.md
|
||||
docs/FruitReq.md
|
||||
@ -44,7 +45,6 @@ docs/GmFruit.md
|
||||
docs/GrandparentAnimal.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/HealthCheckResult.md
|
||||
docs/InlineResponseDefault.md
|
||||
docs/IsoscelesTriangle.md
|
||||
docs/List.md
|
||||
docs/Mammal.md
|
||||
@ -143,6 +143,7 @@ src/Org.OpenAPITools/Model/EquilateralTriangle.cs
|
||||
src/Org.OpenAPITools/Model/File.cs
|
||||
src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
|
||||
src/Org.OpenAPITools/Model/Foo.cs
|
||||
src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs
|
||||
src/Org.OpenAPITools/Model/FormatTest.cs
|
||||
src/Org.OpenAPITools/Model/Fruit.cs
|
||||
src/Org.OpenAPITools/Model/FruitReq.cs
|
||||
@ -150,7 +151,6 @@ src/Org.OpenAPITools/Model/GmFruit.cs
|
||||
src/Org.OpenAPITools/Model/GrandparentAnimal.cs
|
||||
src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
|
||||
src/Org.OpenAPITools/Model/HealthCheckResult.cs
|
||||
src/Org.OpenAPITools/Model/InlineResponseDefault.cs
|
||||
src/Org.OpenAPITools/Model/IsoscelesTriangle.cs
|
||||
src/Org.OpenAPITools/Model/List.cs
|
||||
src/Org.OpenAPITools/Model/Mammal.cs
|
||||
|
@ -190,6 +190,7 @@ Class | Method | HTTP request | Description
|
||||
- [Model.File](docs/File.md)
|
||||
- [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [Model.Foo](docs/Foo.md)
|
||||
- [Model.FooGetDefaultResponse](docs/FooGetDefaultResponse.md)
|
||||
- [Model.FormatTest](docs/FormatTest.md)
|
||||
- [Model.Fruit](docs/Fruit.md)
|
||||
- [Model.FruitReq](docs/FruitReq.md)
|
||||
@ -197,7 +198,6 @@ Class | Method | HTTP request | Description
|
||||
- [Model.GrandparentAnimal](docs/GrandparentAnimal.md)
|
||||
- [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [Model.HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [Model.InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [Model.IsoscelesTriangle](docs/IsoscelesTriangle.md)
|
||||
- [Model.List](docs/List.md)
|
||||
- [Model.Mammal](docs/Mammal.md)
|
||||
|
@ -9,7 +9,7 @@ Method | HTTP request | Description
|
||||
|
||||
<a name="fooget"></a>
|
||||
# **FooGet**
|
||||
> InlineResponseDefault FooGet ()
|
||||
> FooGetDefaultResponse FooGet ()
|
||||
|
||||
|
||||
|
||||
@ -33,7 +33,7 @@ namespace Example
|
||||
|
||||
try
|
||||
{
|
||||
InlineResponseDefault result = apiInstance.FooGet();
|
||||
FooGetDefaultResponse result = apiInstance.FooGet();
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (ApiException e)
|
||||
@ -52,7 +52,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.FooGetDefaultResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**String** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,70 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using Xunit;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing FooGetDefaultResponse
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class FooGetDefaultResponseTests : IDisposable
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for FooGetDefaultResponse
|
||||
//private FooGetDefaultResponse instance;
|
||||
|
||||
public FooGetDefaultResponseTests()
|
||||
{
|
||||
// TODO uncomment below to create an instance of FooGetDefaultResponse
|
||||
//instance = new FooGetDefaultResponse();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Cleanup when everything is done.
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void FooGetDefaultResponseInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsType" FooGetDefaultResponse
|
||||
//Assert.IsType<FooGetDefaultResponse>(instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'String'
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void StringTest()
|
||||
{
|
||||
// TODO unit test for the property 'String'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -31,8 +31,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
InlineResponseDefault FooGet(int operationIndex = 0);
|
||||
/// <returns>FooGetDefaultResponse</returns>
|
||||
FooGetDefaultResponse FooGet(int operationIndex = 0);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -42,8 +42,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
ApiResponse<InlineResponseDefault> FooGetWithHttpInfo(int operationIndex = 0);
|
||||
/// <returns>ApiResponse of FooGetDefaultResponse</returns>
|
||||
ApiResponse<FooGetDefaultResponse> FooGetWithHttpInfo(int operationIndex = 0);
|
||||
#endregion Synchronous Operations
|
||||
}
|
||||
|
||||
@ -62,8 +62,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <returns>Task of FooGetDefaultResponse</returns>
|
||||
System.Threading.Tasks.Task<FooGetDefaultResponse> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -74,8 +74,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
/// <returns>Task of ApiResponse (FooGetDefaultResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@ -201,10 +201,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
public InlineResponseDefault FooGet(int operationIndex = 0)
|
||||
/// <returns>FooGetDefaultResponse</returns>
|
||||
public FooGetDefaultResponse FooGet(int operationIndex = 0)
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> localVarResponse = FooGetWithHttpInfo();
|
||||
Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> localVarResponse = FooGetWithHttpInfo();
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@ -213,8 +213,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> FooGetWithHttpInfo(int operationIndex = 0)
|
||||
/// <returns>ApiResponse of FooGetDefaultResponse</returns>
|
||||
public Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> FooGetWithHttpInfo(int operationIndex = 0)
|
||||
{
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
|
||||
@ -244,7 +244,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = this.Client.Get<InlineResponseDefault>("/foo", localVarRequestOptions, this.Configuration);
|
||||
var localVarResponse = this.Client.Get<FooGetDefaultResponse>("/foo", localVarRequestOptions, this.Configuration);
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
Exception _exception = this.ExceptionFactory("FooGet", localVarResponse);
|
||||
@ -263,10 +263,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
public async System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
/// <returns>Task of FooGetDefaultResponse</returns>
|
||||
public async System.Threading.Tasks.Task<FooGetDefaultResponse> FooGetAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault> localVarResponse = await FooGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse> localVarResponse = await FooGetWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@ -276,8 +276,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="operationIndex">Index associated with the operation.</param>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel the request.</param>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
/// <returns>Task of ApiResponse (FooGetDefaultResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<Org.OpenAPITools.Client.ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
|
||||
{
|
||||
|
||||
Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
|
||||
@ -308,7 +308,7 @@ namespace Org.OpenAPITools.Api
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<InlineResponseDefault>("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
var localVarResponse = await this.AsynchronousClient.GetAsync<FooGetDefaultResponse>("/foo", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
|
||||
|
||||
if (this.ExceptionFactory != null)
|
||||
{
|
||||
|
@ -0,0 +1,120 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
using OpenAPIClientUtils = Org.OpenAPITools.Client.ClientUtils;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[DataContract(Name = "_foo_get_default_response")]
|
||||
public partial class FooGetDefaultResponse : IEquatable<FooGetDefaultResponse>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_string">_string.</param>
|
||||
public FooGetDefaultResponse(Foo _string = default(Foo))
|
||||
{
|
||||
this.String = _string;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name = "string", EmitDefaultValue = false)]
|
||||
public Foo String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.Append("class FooGetDefaultResponse {\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input as FooGetDefaultResponse).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if FooGetDefaultResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of FooGetDefaultResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(FooGetDefaultResponse input)
|
||||
{
|
||||
return OpenAPIClientUtils.compareLogic.Compare(this, input).AreEqual;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.String != null)
|
||||
{
|
||||
hashCode = (hashCode * 59) + this.String.GetHashCode();
|
||||
}
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
public IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -29,10 +29,10 @@ docs/FakeClassnameTags123Api.md
|
||||
docs/File.md
|
||||
docs/FileSchemaTestClass.md
|
||||
docs/Foo.md
|
||||
docs/FooGetDefaultResponse.md
|
||||
docs/FormatTest.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/HealthCheckResult.md
|
||||
docs/InlineResponseDefault.md
|
||||
docs/List.md
|
||||
docs/MapTest.md
|
||||
docs/MixedPropertiesAndAdditionalPropertiesClass.md
|
||||
@ -99,10 +99,10 @@ src/Org.OpenAPITools/Model/EnumTest.cs
|
||||
src/Org.OpenAPITools/Model/File.cs
|
||||
src/Org.OpenAPITools/Model/FileSchemaTestClass.cs
|
||||
src/Org.OpenAPITools/Model/Foo.cs
|
||||
src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs
|
||||
src/Org.OpenAPITools/Model/FormatTest.cs
|
||||
src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs
|
||||
src/Org.OpenAPITools/Model/HealthCheckResult.cs
|
||||
src/Org.OpenAPITools/Model/InlineResponseDefault.cs
|
||||
src/Org.OpenAPITools/Model/List.cs
|
||||
src/Org.OpenAPITools/Model/MapTest.cs
|
||||
src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs
|
||||
|
@ -171,10 +171,10 @@ Class | Method | HTTP request | Description
|
||||
- [Model.File](docs/File.md)
|
||||
- [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [Model.Foo](docs/Foo.md)
|
||||
- [Model.FooGetDefaultResponse](docs/FooGetDefaultResponse.md)
|
||||
- [Model.FormatTest](docs/FormatTest.md)
|
||||
- [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [Model.HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [Model.InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [Model.List](docs/List.md)
|
||||
- [Model.MapTest](docs/MapTest.md)
|
||||
- [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
|
||||
|
@ -10,7 +10,7 @@ Method | HTTP request | Description
|
||||
|
||||
## FooGet
|
||||
|
||||
> InlineResponseDefault FooGet ()
|
||||
> FooGetDefaultResponse FooGet ()
|
||||
|
||||
|
||||
|
||||
@ -34,7 +34,7 @@ namespace Example
|
||||
|
||||
try
|
||||
{
|
||||
InlineResponseDefault result = apiInstance.FooGet();
|
||||
FooGetDefaultResponse result = apiInstance.FooGet();
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (ApiException e)
|
||||
@ -54,7 +54,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
|
||||
# Org.OpenAPITools.Model.FooGetDefaultResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**String** | [**Foo**](Foo.md) | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models)
|
||||
[[Back to API list]](../README.md#documentation-for-api-endpoints)
|
||||
[[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,79 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing FooGetDefaultResponse
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the model.
|
||||
/// </remarks>
|
||||
public class FooGetDefaultResponseTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for FooGetDefaultResponse
|
||||
//private FooGetDefaultResponse instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of FooGetDefaultResponse
|
||||
//instance = new FooGetDefaultResponse();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void FooGetDefaultResponseInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOf" FooGetDefaultResponse
|
||||
//Assert.IsInstanceOf(typeof(FooGetDefaultResponse), instance);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'String'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void StringTest()
|
||||
{
|
||||
// TODO unit test for the property 'String'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -32,8 +32,8 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
InlineResponseDefault FooGet ();
|
||||
/// <returns>FooGetDefaultResponse</returns>
|
||||
FooGetDefaultResponse FooGet ();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -42,8 +42,8 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
ApiResponse<InlineResponseDefault> FooGetWithHttpInfo ();
|
||||
/// <returns>ApiResponse of FooGetDefaultResponse</returns>
|
||||
ApiResponse<FooGetDefaultResponse> FooGetWithHttpInfo ();
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
@ -54,8 +54,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync (CancellationToken cancellationToken = default(CancellationToken));
|
||||
/// <returns>Task of FooGetDefaultResponse</returns>
|
||||
System.Threading.Tasks.Task<FooGetDefaultResponse> FooGetAsync (CancellationToken cancellationToken = default(CancellationToken));
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@ -65,8 +65,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken));
|
||||
/// <returns>Task of ApiResponse (FooGetDefaultResponse)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken));
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
@ -182,10 +182,10 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
public InlineResponseDefault FooGet ()
|
||||
/// <returns>FooGetDefaultResponse</returns>
|
||||
public FooGetDefaultResponse FooGet ()
|
||||
{
|
||||
ApiResponse<InlineResponseDefault> localVarResponse = FooGetWithHttpInfo();
|
||||
ApiResponse<FooGetDefaultResponse> localVarResponse = FooGetWithHttpInfo();
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
@ -193,8 +193,8 @@ namespace Org.OpenAPITools.Api
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
public ApiResponse<InlineResponseDefault> FooGetWithHttpInfo ()
|
||||
/// <returns>ApiResponse of FooGetDefaultResponse</returns>
|
||||
public ApiResponse<FooGetDefaultResponse> FooGetWithHttpInfo ()
|
||||
{
|
||||
|
||||
var localVarPath = "/foo";
|
||||
@ -233,9 +233,9 @@ namespace Org.OpenAPITools.Api
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<InlineResponseDefault>(localVarStatusCode,
|
||||
return new ApiResponse<FooGetDefaultResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
||||
(InlineResponseDefault) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponseDefault)));
|
||||
(FooGetDefaultResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(FooGetDefaultResponse)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -243,10 +243,10 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
public async System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync (CancellationToken cancellationToken = default(CancellationToken))
|
||||
/// <returns>Task of FooGetDefaultResponse</returns>
|
||||
public async System.Threading.Tasks.Task<FooGetDefaultResponse> FooGetAsync (CancellationToken cancellationToken = default(CancellationToken))
|
||||
{
|
||||
ApiResponse<InlineResponseDefault> localVarResponse = await FooGetWithHttpInfoAsync(cancellationToken);
|
||||
ApiResponse<FooGetDefaultResponse> localVarResponse = await FooGetWithHttpInfoAsync(cancellationToken);
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
@ -256,8 +256,8 @@ namespace Org.OpenAPITools.Api
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <param name="cancellationToken">Cancellation Token to cancel request (optional) </param>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<InlineResponseDefault>> FooGetWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken))
|
||||
/// <returns>Task of ApiResponse (FooGetDefaultResponse)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<FooGetDefaultResponse>> FooGetWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken))
|
||||
{
|
||||
|
||||
var localVarPath = "/foo";
|
||||
@ -296,9 +296,9 @@ namespace Org.OpenAPITools.Api
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<InlineResponseDefault>(localVarStatusCode,
|
||||
return new ApiResponse<FooGetDefaultResponse>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)),
|
||||
(InlineResponseDefault) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponseDefault)));
|
||||
(FooGetDefaultResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(FooGetDefaultResponse)));
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,124 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
*
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// FooGetDefaultResponse
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class FooGetDefaultResponse : IEquatable<FooGetDefaultResponse>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="FooGetDefaultResponse" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_string">_string.</param>
|
||||
public FooGetDefaultResponse(Foo _string = default(Foo))
|
||||
{
|
||||
this.String = _string;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name="string", EmitDefaultValue=false)]
|
||||
public Foo String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class FooGetDefaultResponse {\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public virtual string ToJson()
|
||||
{
|
||||
return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as FooGetDefaultResponse);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if FooGetDefaultResponse instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of FooGetDefaultResponse to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(FooGetDefaultResponse input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.String == input.String ||
|
||||
(this.String != null &&
|
||||
this.String.Equals(input.String))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.String != null)
|
||||
hashCode = hashCode * 59 + this.String.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -10,6 +10,7 @@ lib/openapi_petstore/api/store.ex
|
||||
lib/openapi_petstore/api/user.ex
|
||||
lib/openapi_petstore/connection.ex
|
||||
lib/openapi_petstore/deserializer.ex
|
||||
lib/openapi_petstore/model/_foo_get_default_response.ex
|
||||
lib/openapi_petstore/model/_special_model_name_.ex
|
||||
lib/openapi_petstore/model/additional_properties_class.ex
|
||||
lib/openapi_petstore/model/all_of_with_single_ref.ex
|
||||
@ -36,7 +37,6 @@ lib/openapi_petstore/model/foo.ex
|
||||
lib/openapi_petstore/model/format_test.ex
|
||||
lib/openapi_petstore/model/has_only_read_only.ex
|
||||
lib/openapi_petstore/model/health_check_result.ex
|
||||
lib/openapi_petstore/model/inline_response_default.ex
|
||||
lib/openapi_petstore/model/list.ex
|
||||
lib/openapi_petstore/model/map_test.ex
|
||||
lib/openapi_petstore/model/mixed_properties_and_additional_properties_class.ex
|
||||
|
@ -19,10 +19,10 @@ defmodule OpenapiPetstore.Api.Default do
|
||||
- opts (KeywordList): [optional] Optional parameters
|
||||
## Returns
|
||||
|
||||
{:ok, OpenapiPetstore.Model.InlineResponseDefault.t} on success
|
||||
{:ok, OpenapiPetstore.Model.FooGetDefaultResponse.t} on success
|
||||
{:error, Tesla.Env.t} on failure
|
||||
"""
|
||||
@spec foo_get(Tesla.Env.client, keyword()) :: {:ok, OpenapiPetstore.Model.InlineResponseDefault.t} | {:error, Tesla.Env.t}
|
||||
@spec foo_get(Tesla.Env.client, keyword()) :: {:ok, OpenapiPetstore.Model.FooGetDefaultResponse.t} | {:error, Tesla.Env.t}
|
||||
def foo_get(connection, _opts \\ []) do
|
||||
%{}
|
||||
|> method(:get)
|
||||
@ -30,7 +30,7 @@ defmodule OpenapiPetstore.Api.Default do
|
||||
|> Enum.into([])
|
||||
|> (&Connection.request(connection, &1)).()
|
||||
|> evaluate_response([
|
||||
{ :default, %OpenapiPetstore.Model.InlineResponseDefault{}}
|
||||
{ :default, %OpenapiPetstore.Model.FooGetDefaultResponse{}}
|
||||
])
|
||||
end
|
||||
end
|
||||
|
@ -0,0 +1,27 @@
|
||||
# NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
# https://openapi-generator.tech
|
||||
# Do not edit the class manually.
|
||||
|
||||
defmodule OpenapiPetstore.Model.FooGetDefaultResponse do
|
||||
@moduledoc """
|
||||
|
||||
"""
|
||||
|
||||
@derive [Poison.Encoder]
|
||||
defstruct [
|
||||
:"string"
|
||||
]
|
||||
|
||||
@type t :: %__MODULE__{
|
||||
:"string" => OpenapiPetstore.Model.Foo.t | nil
|
||||
}
|
||||
end
|
||||
|
||||
defimpl Poison.Decoder, for: OpenapiPetstore.Model.FooGetDefaultResponse do
|
||||
import OpenapiPetstore.Deserializer
|
||||
def decode(value, options) do
|
||||
value
|
||||
|> deserialize(:"string", :struct, OpenapiPetstore.Model.Foo, options)
|
||||
end
|
||||
end
|
||||
|
@ -60,10 +60,10 @@ src/main/java/org/openapitools/client/model/EnumTest.java
|
||||
src/main/java/org/openapitools/client/model/File.java
|
||||
src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
|
||||
src/main/java/org/openapitools/client/model/Foo.java
|
||||
src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java
|
||||
src/main/java/org/openapitools/client/model/FormatTest.java
|
||||
src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
|
||||
src/main/java/org/openapitools/client/model/HealthCheckResult.java
|
||||
src/main/java/org/openapitools/client/model/InlineResponseDefault.java
|
||||
src/main/java/org/openapitools/client/model/MapTest.java
|
||||
src/main/java/org/openapitools/client/model/MixedPropertiesAndAdditionalPropertiesClass.java
|
||||
src/main/java/org/openapitools/client/model/Model200Response.java
|
||||
|
@ -48,7 +48,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inline_response_default'
|
||||
$ref: '#/components/schemas/_foo_get_default_response'
|
||||
description: response
|
||||
x-accepts: application/json
|
||||
/pet:
|
||||
@ -1969,7 +1969,7 @@ components:
|
||||
- user
|
||||
title: SingleRefType
|
||||
type: string
|
||||
inline_response_default:
|
||||
_foo_get_default_response:
|
||||
example:
|
||||
string:
|
||||
bar: bar
|
||||
|
@ -4,7 +4,7 @@ import org.openapitools.client.ApiClient;
|
||||
import org.openapitools.client.EncodingUtils;
|
||||
import org.openapitools.client.model.ApiResponse;
|
||||
|
||||
import org.openapitools.client.model.InlineResponseDefault;
|
||||
import org.openapitools.client.model.FooGetDefaultResponse;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@ -19,13 +19,13 @@ public interface DefaultApi extends ApiClient.Api {
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return InlineResponseDefault
|
||||
* @return FooGetDefaultResponse
|
||||
*/
|
||||
@RequestLine("GET /foo")
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
InlineResponseDefault fooGet();
|
||||
FooGetDefaultResponse fooGet();
|
||||
|
||||
/**
|
||||
*
|
||||
@ -37,7 +37,7 @@ public interface DefaultApi extends ApiClient.Api {
|
||||
@Headers({
|
||||
"Accept: application/json",
|
||||
})
|
||||
ApiResponse<InlineResponseDefault> fooGetWithHttpInfo();
|
||||
ApiResponse<FooGetDefaultResponse> fooGetWithHttpInfo();
|
||||
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,109 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.Foo;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
|
||||
/**
|
||||
* FooGetDefaultResponse
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
FooGetDefaultResponse.JSON_PROPERTY_STRING
|
||||
})
|
||||
@JsonTypeName("_foo_get_default_response")
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class FooGetDefaultResponse {
|
||||
public static final String JSON_PROPERTY_STRING = "string";
|
||||
private Foo string;
|
||||
|
||||
public FooGetDefaultResponse() {
|
||||
}
|
||||
|
||||
public FooGetDefaultResponse string(Foo string) {
|
||||
|
||||
this.string = string;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get string
|
||||
* @return string
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_STRING)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public Foo getString() {
|
||||
return string;
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_STRING)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setString(Foo string) {
|
||||
this.string = string;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o;
|
||||
return Objects.equals(this.string, fooGetDefaultResponse.string);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(string);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class FooGetDefaultResponse {\n");
|
||||
sb.append(" string: ").append(toIndentedString(string)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.Foo;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
||||
/**
|
||||
* Model tests for FooGetDefaultResponse
|
||||
*/
|
||||
class FooGetDefaultResponseTest {
|
||||
private final FooGetDefaultResponse model = new FooGetDefaultResponse();
|
||||
|
||||
/**
|
||||
* Model tests for FooGetDefaultResponse
|
||||
*/
|
||||
@Test
|
||||
void testFooGetDefaultResponse() {
|
||||
// TODO: test FooGetDefaultResponse
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'string'
|
||||
*/
|
||||
@Test
|
||||
void stringTest() {
|
||||
// TODO: test string
|
||||
}
|
||||
|
||||
}
|
@ -39,6 +39,7 @@ docs/FakeApi.md
|
||||
docs/FakeClassnameTags123Api.md
|
||||
docs/FileSchemaTestClass.md
|
||||
docs/Foo.md
|
||||
docs/FooGetDefaultResponse.md
|
||||
docs/FormatTest.md
|
||||
docs/Fruit.md
|
||||
docs/FruitReq.md
|
||||
@ -46,7 +47,6 @@ docs/GmFruit.md
|
||||
docs/GrandparentAnimal.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/HealthCheckResult.md
|
||||
docs/InlineResponseDefault.md
|
||||
docs/IsoscelesTriangle.md
|
||||
docs/Mammal.md
|
||||
docs/MapTest.md
|
||||
@ -153,6 +153,7 @@ src/main/java/org/openapitools/client/model/EnumTest.java
|
||||
src/main/java/org/openapitools/client/model/EquilateralTriangle.java
|
||||
src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
|
||||
src/main/java/org/openapitools/client/model/Foo.java
|
||||
src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java
|
||||
src/main/java/org/openapitools/client/model/FormatTest.java
|
||||
src/main/java/org/openapitools/client/model/Fruit.java
|
||||
src/main/java/org/openapitools/client/model/FruitReq.java
|
||||
@ -160,7 +161,6 @@ src/main/java/org/openapitools/client/model/GmFruit.java
|
||||
src/main/java/org/openapitools/client/model/GrandparentAnimal.java
|
||||
src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
|
||||
src/main/java/org/openapitools/client/model/HealthCheckResult.java
|
||||
src/main/java/org/openapitools/client/model/InlineResponseDefault.java
|
||||
src/main/java/org/openapitools/client/model/IsoscelesTriangle.java
|
||||
src/main/java/org/openapitools/client/model/Mammal.java
|
||||
src/main/java/org/openapitools/client/model/MapTest.java
|
||||
|
@ -186,6 +186,7 @@ Class | Method | HTTP request | Description
|
||||
- [EquilateralTriangle](docs/EquilateralTriangle.md)
|
||||
- [FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [Foo](docs/Foo.md)
|
||||
- [FooGetDefaultResponse](docs/FooGetDefaultResponse.md)
|
||||
- [FormatTest](docs/FormatTest.md)
|
||||
- [Fruit](docs/Fruit.md)
|
||||
- [FruitReq](docs/FruitReq.md)
|
||||
@ -193,7 +194,6 @@ Class | Method | HTTP request | Description
|
||||
- [GrandparentAnimal](docs/GrandparentAnimal.md)
|
||||
- [HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [IsoscelesTriangle](docs/IsoscelesTriangle.md)
|
||||
- [Mammal](docs/Mammal.md)
|
||||
- [MapTest](docs/MapTest.md)
|
||||
|
@ -48,7 +48,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inline_response_default'
|
||||
$ref: '#/components/schemas/_foo_get_default_response'
|
||||
description: response
|
||||
x-accepts: application/json
|
||||
/pet:
|
||||
@ -2136,7 +2136,7 @@ components:
|
||||
$ref: '#/components/schemas/Bar'
|
||||
type: array
|
||||
type: object
|
||||
inline_response_default:
|
||||
_foo_get_default_response:
|
||||
example:
|
||||
string:
|
||||
bar: bar
|
||||
|
@ -10,7 +10,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
## fooGet
|
||||
|
||||
> InlineResponseDefault fooGet()
|
||||
> FooGetDefaultResponse fooGet()
|
||||
|
||||
|
||||
|
||||
@ -31,7 +31,7 @@ public class Example {
|
||||
|
||||
DefaultApi apiInstance = new DefaultApi(defaultClient);
|
||||
try {
|
||||
InlineResponseDefault result = apiInstance.fooGet();
|
||||
FooGetDefaultResponse result = apiInstance.fooGet();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling DefaultApi#fooGet");
|
||||
@ -50,7 +50,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
# FooGetDefaultResponse
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**string** | [**Foo**](Foo.md) | | [optional] |
|
||||
|
||||
|
||||
|
@ -8,7 +8,7 @@ import org.openapitools.client.Pair;
|
||||
|
||||
import jakarta.ws.rs.core.GenericType;
|
||||
|
||||
import org.openapitools.client.model.InlineResponseDefault;
|
||||
import org.openapitools.client.model.FooGetDefaultResponse;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@ -48,7 +48,7 @@ public class DefaultApi {
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return InlineResponseDefault
|
||||
* @return FooGetDefaultResponse
|
||||
* @throws ApiException if fails to make API call
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
@ -56,14 +56,14 @@ public class DefaultApi {
|
||||
<tr><td> 0 </td><td> response </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public InlineResponseDefault fooGet() throws ApiException {
|
||||
public FooGetDefaultResponse fooGet() throws ApiException {
|
||||
return fooGetWithHttpInfo().getData();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return ApiResponse<InlineResponseDefault>
|
||||
* @return ApiResponse<FooGetDefaultResponse>
|
||||
* @throws ApiException if fails to make API call
|
||||
* @http.response.details
|
||||
<table summary="Response Details" border="1">
|
||||
@ -71,7 +71,7 @@ public class DefaultApi {
|
||||
<tr><td> 0 </td><td> response </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public ApiResponse<InlineResponseDefault> fooGetWithHttpInfo() throws ApiException {
|
||||
public ApiResponse<FooGetDefaultResponse> fooGetWithHttpInfo() throws ApiException {
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// create path and map variables
|
||||
@ -99,7 +99,7 @@ public class DefaultApi {
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
GenericType<InlineResponseDefault> localVarReturnType = new GenericType<InlineResponseDefault>() {};
|
||||
GenericType<FooGetDefaultResponse> localVarReturnType = new GenericType<FooGetDefaultResponse>() {};
|
||||
|
||||
return apiClient.invokeAPI("DefaultApi.fooGet", localVarPath, "GET", localVarQueryParams, localVarPostBody,
|
||||
localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAccept, localVarContentType,
|
||||
|
@ -0,0 +1,114 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.Foo;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
|
||||
/**
|
||||
* FooGetDefaultResponse
|
||||
*/
|
||||
@JsonPropertyOrder({
|
||||
FooGetDefaultResponse.JSON_PROPERTY_STRING
|
||||
})
|
||||
@JsonTypeName("_foo_get_default_response")
|
||||
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class FooGetDefaultResponse {
|
||||
public static final String JSON_PROPERTY_STRING = "string";
|
||||
private Foo string;
|
||||
|
||||
public FooGetDefaultResponse() {
|
||||
}
|
||||
|
||||
public FooGetDefaultResponse string(Foo string) {
|
||||
this.string = string;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get string
|
||||
* @return string
|
||||
**/
|
||||
@jakarta.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
@JsonProperty(JSON_PROPERTY_STRING)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
|
||||
public Foo getString() {
|
||||
return string;
|
||||
}
|
||||
|
||||
|
||||
@JsonProperty(JSON_PROPERTY_STRING)
|
||||
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
|
||||
public void setString(Foo string) {
|
||||
this.string = string;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return true if this _foo_get_default_response object is equal to o.
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o;
|
||||
return Objects.equals(this.string, fooGetDefaultResponse.string);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(string);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class FooGetDefaultResponse {\n");
|
||||
sb.append(" string: ").append(toIndentedString(string)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonCreator;
|
||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||
import com.fasterxml.jackson.annotation.JsonValue;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import org.openapitools.client.model.Foo;
|
||||
|
||||
import org.junit.jupiter.api.Assertions;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
* Model tests for FooGetDefaultResponse
|
||||
*/
|
||||
public class FooGetDefaultResponseTest {
|
||||
private final FooGetDefaultResponse model = new FooGetDefaultResponse();
|
||||
|
||||
/**
|
||||
* Model tests for FooGetDefaultResponse
|
||||
*/
|
||||
@Test
|
||||
public void testFooGetDefaultResponse() {
|
||||
// TODO: test FooGetDefaultResponse
|
||||
}
|
||||
|
||||
/**
|
||||
* Test the property 'string'
|
||||
*/
|
||||
@Test
|
||||
public void stringTest() {
|
||||
// TODO: test string
|
||||
}
|
||||
|
||||
}
|
@ -40,6 +40,7 @@ docs/FakeApi.md
|
||||
docs/FakeClassnameTags123Api.md
|
||||
docs/FileSchemaTestClass.md
|
||||
docs/Foo.md
|
||||
docs/FooGetDefaultResponse.md
|
||||
docs/FormatTest.md
|
||||
docs/Fruit.md
|
||||
docs/FruitReq.md
|
||||
@ -47,7 +48,6 @@ docs/GmFruit.md
|
||||
docs/GrandparentAnimal.md
|
||||
docs/HasOnlyReadOnly.md
|
||||
docs/HealthCheckResult.md
|
||||
docs/InlineResponseDefault.md
|
||||
docs/IsoscelesTriangle.md
|
||||
docs/Mammal.md
|
||||
docs/MapTest.md
|
||||
@ -159,6 +159,7 @@ src/main/java/org/openapitools/client/model/EnumTest.java
|
||||
src/main/java/org/openapitools/client/model/EquilateralTriangle.java
|
||||
src/main/java/org/openapitools/client/model/FileSchemaTestClass.java
|
||||
src/main/java/org/openapitools/client/model/Foo.java
|
||||
src/main/java/org/openapitools/client/model/FooGetDefaultResponse.java
|
||||
src/main/java/org/openapitools/client/model/FormatTest.java
|
||||
src/main/java/org/openapitools/client/model/Fruit.java
|
||||
src/main/java/org/openapitools/client/model/FruitReq.java
|
||||
@ -166,7 +167,6 @@ src/main/java/org/openapitools/client/model/GmFruit.java
|
||||
src/main/java/org/openapitools/client/model/GrandparentAnimal.java
|
||||
src/main/java/org/openapitools/client/model/HasOnlyReadOnly.java
|
||||
src/main/java/org/openapitools/client/model/HealthCheckResult.java
|
||||
src/main/java/org/openapitools/client/model/InlineResponseDefault.java
|
||||
src/main/java/org/openapitools/client/model/IsoscelesTriangle.java
|
||||
src/main/java/org/openapitools/client/model/Mammal.java
|
||||
src/main/java/org/openapitools/client/model/MapTest.java
|
||||
|
@ -187,6 +187,7 @@ Class | Method | HTTP request | Description
|
||||
- [EquilateralTriangle](docs/EquilateralTriangle.md)
|
||||
- [FileSchemaTestClass](docs/FileSchemaTestClass.md)
|
||||
- [Foo](docs/Foo.md)
|
||||
- [FooGetDefaultResponse](docs/FooGetDefaultResponse.md)
|
||||
- [FormatTest](docs/FormatTest.md)
|
||||
- [Fruit](docs/Fruit.md)
|
||||
- [FruitReq](docs/FruitReq.md)
|
||||
@ -194,7 +195,6 @@ Class | Method | HTTP request | Description
|
||||
- [GrandparentAnimal](docs/GrandparentAnimal.md)
|
||||
- [HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
|
||||
- [HealthCheckResult](docs/HealthCheckResult.md)
|
||||
- [InlineResponseDefault](docs/InlineResponseDefault.md)
|
||||
- [IsoscelesTriangle](docs/IsoscelesTriangle.md)
|
||||
- [Mammal](docs/Mammal.md)
|
||||
- [MapTest](docs/MapTest.md)
|
||||
|
@ -48,7 +48,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/inline_response_default'
|
||||
$ref: '#/components/schemas/_foo_get_default_response'
|
||||
description: response
|
||||
x-accepts: application/json
|
||||
/pet:
|
||||
@ -2186,7 +2186,7 @@ components:
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
inline_response_default:
|
||||
_foo_get_default_response:
|
||||
example:
|
||||
string:
|
||||
bar: bar
|
||||
|
@ -9,7 +9,7 @@ All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
<a name="fooGet"></a>
|
||||
# **fooGet**
|
||||
> InlineResponseDefault fooGet()
|
||||
> FooGetDefaultResponse fooGet()
|
||||
|
||||
|
||||
|
||||
@ -29,7 +29,7 @@ public class Example {
|
||||
|
||||
DefaultApi apiInstance = new DefaultApi(defaultClient);
|
||||
try {
|
||||
InlineResponseDefault result = apiInstance.fooGet();
|
||||
FooGetDefaultResponse result = apiInstance.fooGet();
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling DefaultApi#fooGet");
|
||||
@ -47,7 +47,7 @@ This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
|
@ -0,0 +1,13 @@
|
||||
|
||||
|
||||
# FooGetDefaultResponse
|
||||
|
||||
|
||||
## Properties
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
|------------ | ------------- | ------------- | -------------|
|
||||
|**string** | [**Foo**](Foo.md) | | [optional] |
|
||||
|
||||
|
||||
|
@ -249,13 +249,13 @@ public class JSON {
|
||||
.registerTypeAdapterFactory(new org.openapitools.client.model.EquilateralTriangle.CustomTypeAdapterFactory())
|
||||
.registerTypeAdapterFactory(new org.openapitools.client.model.FileSchemaTestClass.CustomTypeAdapterFactory())
|
||||
.registerTypeAdapterFactory(new org.openapitools.client.model.Foo.CustomTypeAdapterFactory())
|
||||
.registerTypeAdapterFactory(new org.openapitools.client.model.FooGetDefaultResponse.CustomTypeAdapterFactory())
|
||||
.registerTypeAdapterFactory(new org.openapitools.client.model.FormatTest.CustomTypeAdapterFactory())
|
||||
.registerTypeAdapterFactory(new org.openapitools.client.model.Fruit.CustomTypeAdapterFactory())
|
||||
.registerTypeAdapterFactory(new org.openapitools.client.model.FruitReq.CustomTypeAdapterFactory())
|
||||
.registerTypeAdapterFactory(new org.openapitools.client.model.GmFruit.CustomTypeAdapterFactory())
|
||||
.registerTypeAdapterFactory(new org.openapitools.client.model.HasOnlyReadOnly.CustomTypeAdapterFactory())
|
||||
.registerTypeAdapterFactory(new org.openapitools.client.model.HealthCheckResult.CustomTypeAdapterFactory())
|
||||
.registerTypeAdapterFactory(new org.openapitools.client.model.InlineResponseDefault.CustomTypeAdapterFactory())
|
||||
.registerTypeAdapterFactory(new org.openapitools.client.model.IsoscelesTriangle.CustomTypeAdapterFactory())
|
||||
.registerTypeAdapterFactory(new org.openapitools.client.model.Mammal.CustomTypeAdapterFactory())
|
||||
.registerTypeAdapterFactory(new org.openapitools.client.model.MapTest.CustomTypeAdapterFactory())
|
||||
|
@ -27,7 +27,7 @@ import com.google.gson.reflect.TypeToken;
|
||||
import java.io.IOException;
|
||||
|
||||
|
||||
import org.openapitools.client.model.InlineResponseDefault;
|
||||
import org.openapitools.client.model.FooGetDefaultResponse;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.ArrayList;
|
||||
@ -141,7 +141,7 @@ public class DefaultApi {
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return InlineResponseDefault
|
||||
* @return FooGetDefaultResponse
|
||||
* @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">
|
||||
@ -149,15 +149,15 @@ public class DefaultApi {
|
||||
<tr><td> 0 </td><td> response </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public InlineResponseDefault fooGet() throws ApiException {
|
||||
ApiResponse<InlineResponseDefault> localVarResp = fooGetWithHttpInfo();
|
||||
public FooGetDefaultResponse fooGet() throws ApiException {
|
||||
ApiResponse<FooGetDefaultResponse> localVarResp = fooGetWithHttpInfo();
|
||||
return localVarResp.getData();
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @return ApiResponse<InlineResponseDefault>
|
||||
* @return ApiResponse<FooGetDefaultResponse>
|
||||
* @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">
|
||||
@ -165,9 +165,9 @@ public class DefaultApi {
|
||||
<tr><td> 0 </td><td> response </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public ApiResponse<InlineResponseDefault> fooGetWithHttpInfo() throws ApiException {
|
||||
public ApiResponse<FooGetDefaultResponse> fooGetWithHttpInfo() throws ApiException {
|
||||
okhttp3.Call localVarCall = fooGetValidateBeforeCall(null);
|
||||
Type localVarReturnType = new TypeToken<InlineResponseDefault>(){}.getType();
|
||||
Type localVarReturnType = new TypeToken<FooGetDefaultResponse>(){}.getType();
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
}
|
||||
|
||||
@ -183,10 +183,10 @@ public class DefaultApi {
|
||||
<tr><td> 0 </td><td> response </td><td> - </td></tr>
|
||||
</table>
|
||||
*/
|
||||
public okhttp3.Call fooGetAsync(final ApiCallback<InlineResponseDefault> _callback) throws ApiException {
|
||||
public okhttp3.Call fooGetAsync(final ApiCallback<FooGetDefaultResponse> _callback) throws ApiException {
|
||||
|
||||
okhttp3.Call localVarCall = fooGetValidateBeforeCall(_callback);
|
||||
Type localVarReturnType = new TypeToken<InlineResponseDefault>(){}.getType();
|
||||
Type localVarReturnType = new TypeToken<FooGetDefaultResponse>(){}.getType();
|
||||
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
|
||||
return localVarCall;
|
||||
}
|
||||
|
@ -0,0 +1,275 @@
|
||||
/*
|
||||
* OpenAPI Petstore
|
||||
* This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
package org.openapitools.client.model;
|
||||
|
||||
import java.util.Objects;
|
||||
import java.util.Arrays;
|
||||
import com.google.gson.TypeAdapter;
|
||||
import com.google.gson.annotations.JsonAdapter;
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import com.google.gson.stream.JsonReader;
|
||||
import com.google.gson.stream.JsonWriter;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import java.io.IOException;
|
||||
import org.openapitools.client.model.Foo;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import com.google.gson.GsonBuilder;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonDeserializationContext;
|
||||
import com.google.gson.JsonDeserializer;
|
||||
import com.google.gson.JsonElement;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gson.JsonParseException;
|
||||
import com.google.gson.TypeAdapterFactory;
|
||||
import com.google.gson.reflect.TypeToken;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import org.openapitools.client.JSON;
|
||||
|
||||
/**
|
||||
* FooGetDefaultResponse
|
||||
*/
|
||||
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||
public class FooGetDefaultResponse {
|
||||
public static final String SERIALIZED_NAME_STRING = "string";
|
||||
@SerializedName(SERIALIZED_NAME_STRING)
|
||||
private Foo string;
|
||||
|
||||
public FooGetDefaultResponse() {
|
||||
}
|
||||
|
||||
public FooGetDefaultResponse string(Foo string) {
|
||||
|
||||
this.string = string;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get string
|
||||
* @return string
|
||||
**/
|
||||
@javax.annotation.Nullable
|
||||
@ApiModelProperty(value = "")
|
||||
|
||||
public Foo getString() {
|
||||
return string;
|
||||
}
|
||||
|
||||
|
||||
public void setString(Foo string) {
|
||||
this.string = string;
|
||||
}
|
||||
|
||||
/**
|
||||
* A container for additional, undeclared properties.
|
||||
* This is a holder for any undeclared properties as specified with
|
||||
* the 'additionalProperties' keyword in the OAS document.
|
||||
*/
|
||||
private Map<String, Object> additionalProperties;
|
||||
|
||||
/**
|
||||
* Set the additional (undeclared) property with the specified name and value.
|
||||
* If the property does not already exist, create it otherwise replace it.
|
||||
*/
|
||||
public FooGetDefaultResponse putAdditionalProperty(String key, Object value) {
|
||||
if (this.additionalProperties == null) {
|
||||
this.additionalProperties = new HashMap<String, Object>();
|
||||
}
|
||||
this.additionalProperties.put(key, value);
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property.
|
||||
*/
|
||||
public Map<String, Object> getAdditionalProperties() {
|
||||
return additionalProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the additional (undeclared) property with the specified name.
|
||||
*/
|
||||
public Object getAdditionalProperty(String key) {
|
||||
if (this.additionalProperties == null) {
|
||||
return null;
|
||||
}
|
||||
return this.additionalProperties.get(key);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
FooGetDefaultResponse fooGetDefaultResponse = (FooGetDefaultResponse) o;
|
||||
return Objects.equals(this.string, fooGetDefaultResponse.string)&&
|
||||
Objects.equals(this.additionalProperties, fooGetDefaultResponse.additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(string, additionalProperties);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("class FooGetDefaultResponse {\n");
|
||||
sb.append(" string: ").append(toIndentedString(string)).append("\n");
|
||||
sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
|
||||
sb.append("}");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert the given object to string with each line indented by 4 spaces
|
||||
* (except the first line).
|
||||
*/
|
||||
private String toIndentedString(Object o) {
|
||||
if (o == null) {
|
||||
return "null";
|
||||
}
|
||||
return o.toString().replace("\n", "\n ");
|
||||
}
|
||||
|
||||
|
||||
public static HashSet<String> openapiFields;
|
||||
public static HashSet<String> openapiRequiredFields;
|
||||
|
||||
static {
|
||||
// a set of all properties/fields (JSON key names)
|
||||
openapiFields = new HashSet<String>();
|
||||
openapiFields.add("string");
|
||||
|
||||
// a set of required properties/fields (JSON key names)
|
||||
openapiRequiredFields = new HashSet<String>();
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates the JSON Object and throws an exception if issues found
|
||||
*
|
||||
* @param jsonObj JSON Object
|
||||
* @throws IOException if the JSON Object is invalid with respect to FooGetDefaultResponse
|
||||
*/
|
||||
public static void validateJsonObject(JsonObject jsonObj) throws IOException {
|
||||
if (jsonObj == null) {
|
||||
if (FooGetDefaultResponse.openapiRequiredFields.isEmpty()) {
|
||||
return;
|
||||
} else { // has required fields
|
||||
throw new IllegalArgumentException(String.format("The required field(s) %s in FooGetDefaultResponse is not found in the empty JSON string", FooGetDefaultResponse.openapiRequiredFields.toString()));
|
||||
}
|
||||
}
|
||||
// validate the optional field `string`
|
||||
if (jsonObj.getAsJsonObject("string") != null) {
|
||||
Foo.validateJsonObject(jsonObj.getAsJsonObject("string"));
|
||||
}
|
||||
}
|
||||
|
||||
public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public <T> TypeAdapter<T> create(Gson gson, TypeToken<T> type) {
|
||||
if (!FooGetDefaultResponse.class.isAssignableFrom(type.getRawType())) {
|
||||
return null; // this class only serializes 'FooGetDefaultResponse' and its subtypes
|
||||
}
|
||||
final TypeAdapter<JsonElement> elementAdapter = gson.getAdapter(JsonElement.class);
|
||||
final TypeAdapter<FooGetDefaultResponse> thisAdapter
|
||||
= gson.getDelegateAdapter(this, TypeToken.get(FooGetDefaultResponse.class));
|
||||
|
||||
return (TypeAdapter<T>) new TypeAdapter<FooGetDefaultResponse>() {
|
||||
@Override
|
||||
public void write(JsonWriter out, FooGetDefaultResponse value) throws IOException {
|
||||
JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
|
||||
obj.remove("additionalProperties");
|
||||
// serialize additonal properties
|
||||
if (value.getAdditionalProperties() != null) {
|
||||
for (Map.Entry<String, Object> entry : value.getAdditionalProperties().entrySet()) {
|
||||
if (entry.getValue() instanceof String)
|
||||
obj.addProperty(entry.getKey(), (String) entry.getValue());
|
||||
else if (entry.getValue() instanceof Number)
|
||||
obj.addProperty(entry.getKey(), (Number) entry.getValue());
|
||||
else if (entry.getValue() instanceof Boolean)
|
||||
obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
|
||||
else if (entry.getValue() instanceof Character)
|
||||
obj.addProperty(entry.getKey(), (Character) entry.getValue());
|
||||
else {
|
||||
obj.add(entry.getKey(), gson.toJsonTree(entry.getValue()).getAsJsonObject());
|
||||
}
|
||||
}
|
||||
}
|
||||
elementAdapter.write(out, obj);
|
||||
}
|
||||
|
||||
@Override
|
||||
public FooGetDefaultResponse read(JsonReader in) throws IOException {
|
||||
JsonObject jsonObj = elementAdapter.read(in).getAsJsonObject();
|
||||
validateJsonObject(jsonObj);
|
||||
// store additional fields in the deserialized instance
|
||||
FooGetDefaultResponse instance = thisAdapter.fromJsonTree(jsonObj);
|
||||
for (Map.Entry<String, JsonElement> entry : jsonObj.entrySet()) {
|
||||
if (!openapiFields.contains(entry.getKey())) {
|
||||
if (entry.getValue().isJsonPrimitive()) { // primitive type
|
||||
if (entry.getValue().getAsJsonPrimitive().isString())
|
||||
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
|
||||
else if (entry.getValue().getAsJsonPrimitive().isNumber())
|
||||
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
|
||||
else if (entry.getValue().getAsJsonPrimitive().isBoolean())
|
||||
instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
|
||||
else
|
||||
throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
|
||||
} else { // non-primitive type
|
||||
instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
|
||||
}
|
||||
}
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
}.nullSafe();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of FooGetDefaultResponse given an JSON string
|
||||
*
|
||||
* @param jsonString JSON string
|
||||
* @return An instance of FooGetDefaultResponse
|
||||
* @throws IOException if the JSON string is invalid with respect to FooGetDefaultResponse
|
||||
*/
|
||||
public static FooGetDefaultResponse fromJson(String jsonString) throws IOException {
|
||||
return JSON.getGson().fromJson(jsonString, FooGetDefaultResponse.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert an instance of FooGetDefaultResponse to an JSON string
|
||||
*
|
||||
* @return JSON string
|
||||
*/
|
||||
public String toJson() {
|
||||
return JSON.getGson().toJson(this);
|
||||
}
|
||||
}
|
||||
|
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