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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user