mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 18:45:23 +00:00
[General] fix InlineModelResolver's logic and use openapi-generator's InlineModelResolver, so that nested "required" works correctly (#1200)
* fix InlineModelResolver's logis and use openapi-generator's InlineModelResolver, so that nested "required" works correctly * add "required" to nested model schema * update ensure-up-to-date to include openapi v3's jaxrs * change test required field * fix sample shell script, hide timestamp * fix NPE * move test case to petstore-with-fake-endpoints-models-for-testing.yaml * fix jaxrs-jersey (oas3) example generate shell script to use petstore-with-fake-endpoints-models-for-testing.yaml * add default value * re-generate samples
This commit is contained in:
parent
51d2e4bd4c
commit
bb056ccf3d
@ -27,6 +27,6 @@ fi
|
||||
|
||||
# if you've executed sbt assembly previously it will use that instead.
|
||||
export JAVA_OPTS="${JAVA_OPTS} -XX:MaxPermSize=256M -Xmx1024M -DloggerPath=conf/log4j.properties"
|
||||
ags="generate --artifact-id "openapiv3-jaxrs-jersey-petstore-server" -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-jersey $@"
|
||||
ags="generate --artifact-id "openapiv3-jaxrs-jersey-petstore-server" -t modules/openapi-generator/src/main/resources/JavaJaxRS/ -i modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -g jaxrs-jersey -o samples/server/petstore/jaxrs-jersey -DhideGenerationTimestamp=true $@"
|
||||
|
||||
java $JAVA_OPTS -jar $executable $ags
|
||||
|
@ -13,6 +13,7 @@ sleep 5
|
||||
./bin/openapi3/ruby-client-petstore.sh > /dev/null 2>&1
|
||||
./bin/java-petstore-all.sh > /dev/null 2>&1
|
||||
./bin/java-jaxrs-petstore-server-all.sh > /dev/null 2>&1
|
||||
./bin/openapi3/jaxrs-jersey-petstore.sh > /dev/null 2>&1
|
||||
./bin/spring-all-pestore.sh > /dev/null 2>&1
|
||||
./bin/kotlin-client-petstore.sh > /dev/null 2>&1
|
||||
./bin/kotlin-client-string.sh > /dev/null 2>&1
|
||||
|
@ -500,6 +500,7 @@ public class InlineModelResolver {
|
||||
model.setExample(example);
|
||||
model.setName(object.getName());
|
||||
model.setXml(xml);
|
||||
model.setRequired(object.getRequired());
|
||||
if (properties != null) {
|
||||
flattenProperties(properties, path);
|
||||
model.setProperties(properties);
|
||||
@ -545,6 +546,9 @@ public class InlineModelResolver {
|
||||
|
||||
public void copyVendorExtensions(Schema source, Schema target) {
|
||||
Map<String, Object> vendorExtensions = source.getExtensions();
|
||||
if (vendorExtensions == null) {
|
||||
return;
|
||||
}
|
||||
for (String extName : vendorExtensions.keySet()) {
|
||||
target.addExtension(extName, vendorExtensions.get(extName));
|
||||
}
|
||||
|
@ -549,7 +549,6 @@ public class CodegenConfigurator implements Serializable {
|
||||
final List<AuthorizationValue> authorizationValues = AuthParser.parse(auth);
|
||||
ParseOptions options = new ParseOptions();
|
||||
options.setResolve(true);
|
||||
options.setFlatten(true);
|
||||
SwaggerParseResult result = new OpenAPIParser().readLocation(inputSpec, authorizationValues, options);
|
||||
|
||||
Set<String> validationMessages = new HashSet<>(result.getMessages());
|
||||
|
@ -1049,12 +1049,15 @@ definitions:
|
||||
name: Order
|
||||
Category:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
name:
|
||||
type: string
|
||||
default: default-name
|
||||
xml:
|
||||
name: Category
|
||||
User:
|
||||
|
@ -17,6 +17,18 @@ tags:
|
||||
- name: user
|
||||
description: Operations about user
|
||||
paths:
|
||||
/foo:
|
||||
get:
|
||||
responses:
|
||||
default:
|
||||
description: response
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
string:
|
||||
$ref: '#/components/schemas/Foo'
|
||||
/pet:
|
||||
post:
|
||||
tags:
|
||||
@ -1039,6 +1051,14 @@ components:
|
||||
type: http
|
||||
scheme: basic
|
||||
schemas:
|
||||
Foo:
|
||||
type: object
|
||||
properties:
|
||||
bar:
|
||||
$ref: '#/components/schemas/Bar'
|
||||
Bar:
|
||||
type: string
|
||||
default: bar
|
||||
Order:
|
||||
type: object
|
||||
properties:
|
||||
@ -1068,12 +1088,15 @@ components:
|
||||
name: Order
|
||||
Category:
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
name:
|
||||
type: string
|
||||
default: default-name
|
||||
xml:
|
||||
name: Category
|
||||
User:
|
||||
|
@ -1 +1 @@
|
||||
3.0.0-SNAPSHOT
|
||||
3.3.2-SNAPSHOT
|
@ -103,6 +103,8 @@ Class | Method | HTTP request | Description
|
||||
|
||||
- [Org.OpenAPITools.Model.ApiResponse](docs/ApiResponse.md)
|
||||
- [Org.OpenAPITools.Model.Category](docs/Category.md)
|
||||
- [Org.OpenAPITools.Model.InlineObject](docs/InlineObject.md)
|
||||
- [Org.OpenAPITools.Model.InlineObject1](docs/InlineObject1.md)
|
||||
- [Org.OpenAPITools.Model.Order](docs/Order.md)
|
||||
- [Org.OpenAPITools.Model.Pet](docs/Pet.md)
|
||||
- [Org.OpenAPITools.Model.Tag](docs/Tag.md)
|
||||
|
@ -0,0 +1,10 @@
|
||||
# Org.OpenAPITools.Model.InlineObject
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **string** | Updated name of the pet | [optional]
|
||||
**Status** | **string** | Updated status of the pet | [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,10 @@
|
||||
# Org.OpenAPITools.Model.InlineObject1
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**AdditionalMetadata** | **string** | Additional data to pass to server | [optional]
|
||||
**File** | **System.IO.Stream** | file to upload | [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)
|
||||
|
@ -251,7 +251,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: application/xml, application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -70,7 +70,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
@ -129,7 +129,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
@ -188,7 +188,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
@ -489,7 +489,7 @@ No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Content-Type**: application/json
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Model {
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class InlineObject {
|
||||
/// <summary>
|
||||
/// Updated name of the pet
|
||||
/// </summary>
|
||||
/// <value>Updated name of the pet</value>
|
||||
[DataMember(Name="name", EmitDefaultValue=false)]
|
||||
[JsonProperty(PropertyName = "name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updated status of the pet
|
||||
/// </summary>
|
||||
/// <value>Updated status of the pet</value>
|
||||
[DataMember(Name="status", EmitDefaultValue=false)]
|
||||
[JsonProperty(PropertyName = "status")]
|
||||
public string Status { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString() {
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineObject {\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" Status: ").Append(Status).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson() {
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Model {
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class InlineObject1 {
|
||||
/// <summary>
|
||||
/// Additional data to pass to server
|
||||
/// </summary>
|
||||
/// <value>Additional data to pass to server</value>
|
||||
[DataMember(Name="additionalMetadata", EmitDefaultValue=false)]
|
||||
[JsonProperty(PropertyName = "additionalMetadata")]
|
||||
public string AdditionalMetadata { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// file to upload
|
||||
/// </summary>
|
||||
/// <value>file to upload</value>
|
||||
[DataMember(Name="file", EmitDefaultValue=false)]
|
||||
[JsonProperty(PropertyName = "file")]
|
||||
public System.IO.Stream File { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString() {
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineObject1 {\n");
|
||||
sb.Append(" AdditionalMetadata: ").Append(AdditionalMetadata).Append("\n");
|
||||
sb.Append(" File: ").Append(File).Append("\n");
|
||||
sb.Append("}\n");
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the JSON string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>JSON string presentation of the object</returns>
|
||||
public string ToJson() {
|
||||
return JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="RestSharp.Net2" version="1.1.11" targetFramework="net20" developmentDependency="true" />
|
||||
<package id="Newtonsoft.Json" version="7.0.1" targetFramework="net20" developmentDependency="true" />
|
||||
</packages>
|
@ -4,7 +4,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Name** | **string** | | [optional]
|
||||
**Name** | **string** | | [default to "default-name"]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -30,15 +30,28 @@ namespace Org.OpenAPITools.Model
|
||||
[DataContract]
|
||||
public partial class Category : IEquatable<Category>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Category" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected Category() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Category" /> class.
|
||||
/// </summary>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="name">name.</param>
|
||||
public Category(long? id = default(long?), string name = default(string))
|
||||
/// <param name="name">name (required) (default to "default-name").</param>
|
||||
public Category(long? id = default(long?), string name = "default-name")
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
if (name == null)
|
||||
{
|
||||
throw new InvalidDataException("name is a required property for Category and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Name = name;
|
||||
}
|
||||
this.Id = id;
|
||||
this.Name = name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -1 +1 @@
|
||||
3.3.0-SNAPSHOT
|
||||
3.3.2-SNAPSHOT
|
@ -4,7 +4,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Name** | **string** | | [optional]
|
||||
**Name** | **string** | | [default to "default-name"]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
||||
**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional]
|
||||
**MapOfEnumString** | **Dictionary<string, string>** | | [optional]
|
||||
**DirectMap** | **Dictionary<string, bool?>** | | [optional]
|
||||
**IndirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||
**IndirectMap** | **Dictionary<string, bool?>** | | [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)
|
||||
|
||||
|
@ -30,15 +30,28 @@ namespace Org.OpenAPITools.Model
|
||||
[DataContract]
|
||||
public partial class Category : IEquatable<Category>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Category" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected Category() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Category" /> class.
|
||||
/// </summary>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="name">name.</param>
|
||||
public Category(long? id = default(long?), string name = default(string))
|
||||
/// <param name="name">name (required) (default to "default-name").</param>
|
||||
public Category(long? id = default(long?), string name = "default-name")
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
if (name == null)
|
||||
{
|
||||
throw new InvalidDataException("name is a required property for Category and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Name = name;
|
||||
}
|
||||
this.Id = id;
|
||||
this.Name = name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -63,7 +63,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="mapOfEnumString">mapOfEnumString.</param>
|
||||
/// <param name="directMap">directMap.</param>
|
||||
/// <param name="indirectMap">indirectMap.</param>
|
||||
public MapTest(Dictionary<string, Dictionary<string, string>> mapMapOfString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, InnerEnum> mapOfEnumString = default(Dictionary<string, InnerEnum>), Dictionary<string, bool?> directMap = default(Dictionary<string, bool?>), StringBooleanMap indirectMap = default(StringBooleanMap))
|
||||
public MapTest(Dictionary<string, Dictionary<string, string>> mapMapOfString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, InnerEnum> mapOfEnumString = default(Dictionary<string, InnerEnum>), Dictionary<string, bool?> directMap = default(Dictionary<string, bool?>), Dictionary<string, bool?> indirectMap = default(Dictionary<string, bool?>))
|
||||
{
|
||||
this.MapMapOfString = mapMapOfString;
|
||||
this.MapOfEnumString = mapOfEnumString;
|
||||
@ -88,7 +88,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets IndirectMap
|
||||
/// </summary>
|
||||
[DataMember(Name="indirect_map", EmitDefaultValue=false)]
|
||||
public StringBooleanMap IndirectMap { get; set; }
|
||||
public Dictionary<string, bool?> IndirectMap { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -153,8 +153,8 @@ namespace Org.OpenAPITools.Model
|
||||
) &&
|
||||
(
|
||||
this.IndirectMap == input.IndirectMap ||
|
||||
(this.IndirectMap != null &&
|
||||
this.IndirectMap.Equals(input.IndirectMap))
|
||||
this.IndirectMap != null &&
|
||||
this.IndirectMap.SequenceEqual(input.IndirectMap)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
3.3.0-SNAPSHOT
|
||||
3.3.2-SNAPSHOT
|
@ -4,7 +4,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Name** | **string** | | [optional]
|
||||
**Name** | **string** | | [default to "default-name"]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
||||
**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional]
|
||||
**MapOfEnumString** | **Dictionary<string, string>** | | [optional]
|
||||
**DirectMap** | **Dictionary<string, bool?>** | | [optional]
|
||||
**IndirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||
**IndirectMap** | **Dictionary<string, bool?>** | | [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)
|
||||
|
||||
|
@ -123,7 +123,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
foreach(var x in BaseValidate(validationContext)) yield return x;
|
||||
foreach(var x in base.BaseValidate(validationContext)) yield return x;
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
@ -30,15 +30,28 @@ namespace Org.OpenAPITools.Model
|
||||
[DataContract]
|
||||
public partial class Category : IEquatable<Category>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Category" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected Category() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Category" /> class.
|
||||
/// </summary>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="name">name.</param>
|
||||
public Category(long? id = default(long?), string name = default(string))
|
||||
/// <param name="name">name (required) (default to "default-name").</param>
|
||||
public Category(long? id = default(long?), string name = "default-name")
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
if (name == null)
|
||||
{
|
||||
throw new InvalidDataException("name is a required property for Category and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Name = name;
|
||||
}
|
||||
this.Id = id;
|
||||
this.Name = name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -123,7 +123,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
foreach(var x in BaseValidate(validationContext)) yield return x;
|
||||
foreach(var x in base.BaseValidate(validationContext)) yield return x;
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="mapOfEnumString">mapOfEnumString.</param>
|
||||
/// <param name="directMap">directMap.</param>
|
||||
/// <param name="indirectMap">indirectMap.</param>
|
||||
public MapTest(Dictionary<string, Dictionary<string, string>> mapMapOfString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, InnerEnum> mapOfEnumString = default(Dictionary<string, InnerEnum>), Dictionary<string, bool?> directMap = default(Dictionary<string, bool?>), StringBooleanMap indirectMap = default(StringBooleanMap))
|
||||
public MapTest(Dictionary<string, Dictionary<string, string>> mapMapOfString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, InnerEnum> mapOfEnumString = default(Dictionary<string, InnerEnum>), Dictionary<string, bool?> directMap = default(Dictionary<string, bool?>), Dictionary<string, bool?> indirectMap = default(Dictionary<string, bool?>))
|
||||
{
|
||||
this.MapMapOfString = mapMapOfString;
|
||||
this.MapOfEnumString = mapOfEnumString;
|
||||
@ -88,7 +88,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets IndirectMap
|
||||
/// </summary>
|
||||
[DataMember(Name="indirect_map", EmitDefaultValue=false)]
|
||||
public StringBooleanMap IndirectMap { get; set; }
|
||||
public Dictionary<string, bool?> IndirectMap { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -153,8 +153,8 @@ namespace Org.OpenAPITools.Model
|
||||
) &&
|
||||
(
|
||||
this.IndirectMap == input.IndirectMap ||
|
||||
(this.IndirectMap != null &&
|
||||
this.IndirectMap.Equals(input.IndirectMap))
|
||||
this.IndirectMap != null &&
|
||||
this.IndirectMap.SequenceEqual(input.IndirectMap)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
3.3.0-SNAPSHOT
|
||||
3.3.2-SNAPSHOT
|
@ -4,7 +4,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Name** | **string** | | [optional]
|
||||
**Name** | **string** | | [default to "default-name"]
|
||||
|
||||
[[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,63 @@
|
||||
# Org.OpenAPITools.Api.DefaultApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**FooGet**](DefaultApi.md#fooget) | **GET** /foo |
|
||||
|
||||
|
||||
<a name="fooget"></a>
|
||||
# **FooGet**
|
||||
> InlineResponseDefault FooGet ()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class FooGetExample
|
||||
{
|
||||
public void main()
|
||||
{
|
||||
var apiInstance = new DefaultApi();
|
||||
|
||||
try
|
||||
{
|
||||
InlineResponseDefault result = apiInstance.FooGet();
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Print("Exception when calling DefaultApi.FooGet: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,9 @@
|
||||
# Org.OpenAPITools.Model.Foo
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Bar** | **string** | | [optional] [default to "bar"]
|
||||
|
||||
[[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,10 @@
|
||||
# Org.OpenAPITools.Model.InlineObject
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **string** | Updated name of the pet | [optional]
|
||||
**Status** | **string** | Updated status of the pet | [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,10 @@
|
||||
# Org.OpenAPITools.Model.InlineObject1
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**AdditionalMetadata** | **string** | Additional data to pass to server | [optional]
|
||||
**File** | **System.IO.Stream** | file to upload | [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,10 @@
|
||||
# Org.OpenAPITools.Model.InlineObject2
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**EnumFormStringArray** | **List<string>** | Form parameter enum test (string array) | [optional]
|
||||
**EnumFormString** | **string** | Form parameter enum test (string) | [optional] [default to EnumFormStringEnum.Efg]
|
||||
|
||||
[[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,22 @@
|
||||
# Org.OpenAPITools.Model.InlineObject3
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Integer** | **int?** | None | [optional]
|
||||
**Int32** | **int?** | None | [optional]
|
||||
**Int64** | **long?** | None | [optional]
|
||||
**Number** | **decimal?** | None |
|
||||
**Float** | **float?** | None | [optional]
|
||||
**Double** | **double?** | None |
|
||||
**String** | **string** | None | [optional]
|
||||
**PatternWithoutDelimiter** | **string** | None |
|
||||
**Byte** | **byte[]** | None |
|
||||
**Binary** | **System.IO.Stream** | None | [optional]
|
||||
**Date** | **DateTime?** | None | [optional]
|
||||
**DateTime** | **DateTime?** | None | [optional]
|
||||
**Password** | **string** | None | [optional]
|
||||
**Callback** | **string** | None | [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,10 @@
|
||||
# Org.OpenAPITools.Model.InlineObject4
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Param** | **string** | field1 |
|
||||
**Param2** | **string** | field2 |
|
||||
|
||||
[[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,10 @@
|
||||
# Org.OpenAPITools.Model.InlineObject5
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**AdditionalMetadata** | **string** | Additional data to pass to server | [optional]
|
||||
**RequiredFile** | **System.IO.Stream** | file to upload |
|
||||
|
||||
[[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,9 @@
|
||||
# Org.OpenAPITools.Model.InlineResponseDefault
|
||||
## 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)
|
||||
|
@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
||||
**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional]
|
||||
**MapOfEnumString** | **Dictionary<string, string>** | | [optional]
|
||||
**DirectMap** | **Dictionary<string, bool?>** | | [optional]
|
||||
**IndirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||
**IndirectMap** | **Dictionary<string, bool?>** | | [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,289 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using RestSharp.Portable;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public interface IDefaultApi : IApiAccessor
|
||||
{
|
||||
#region Synchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
InlineResponseDefault FooGet ();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
ApiResponse<InlineResponseDefault> FooGetWithHttpInfo ();
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync ();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<InlineResponseDefault>> FooGetAsyncWithHttpInfo ();
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public partial class DefaultApi : IDefaultApi
|
||||
{
|
||||
private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DefaultApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DefaultApi(String basePath)
|
||||
{
|
||||
this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath };
|
||||
|
||||
ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DefaultApi"/> class
|
||||
/// using Configuration object
|
||||
/// </summary>
|
||||
/// <param name="configuration">An instance of Configuration</param>
|
||||
/// <returns></returns>
|
||||
public DefaultApi(Org.OpenAPITools.Client.Configuration configuration = null)
|
||||
{
|
||||
if (configuration == null) // use the default one in Configuration
|
||||
this.Configuration = Org.OpenAPITools.Client.Configuration.Default;
|
||||
else
|
||||
this.Configuration = configuration;
|
||||
|
||||
ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
public String GetBasePath()
|
||||
{
|
||||
return this.Configuration.ApiClient.RestClient.BaseUrl.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
|
||||
public void SetBasePath(String basePath)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration object
|
||||
/// </summary>
|
||||
/// <value>An instance of the Configuration</value>
|
||||
public Org.OpenAPITools.Client.Configuration Configuration {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// Provides a factory method hook for the creation of exceptions.
|
||||
/// </summary>
|
||||
public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
|
||||
{
|
||||
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
|
||||
}
|
||||
return _exceptionFactory;
|
||||
}
|
||||
set { _exceptionFactory = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default header.
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of HTTP header</returns>
|
||||
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
|
||||
public IDictionary<String, String> DefaultHeader()
|
||||
{
|
||||
return new ReadOnlyDictionary<string, string>(this.Configuration.DefaultHeader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add default header.
|
||||
/// </summary>
|
||||
/// <param name="key">Header field name.</param>
|
||||
/// <param name="value">Header field value.</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
|
||||
public void AddDefaultHeader(string key, string value)
|
||||
{
|
||||
this.Configuration.AddDefaultHeader(key, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
public InlineResponseDefault FooGet ()
|
||||
{
|
||||
ApiResponse<InlineResponseDefault> localVarResponse = FooGetWithHttpInfo();
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
public ApiResponse< InlineResponseDefault > FooGetWithHttpInfo ()
|
||||
{
|
||||
|
||||
var localVarPath = "./foo";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
String[] localVarHttpContentTypes = new String[] {
|
||||
};
|
||||
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("FooGet", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<InlineResponseDefault>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||
(InlineResponseDefault) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponseDefault)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
public async System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync ()
|
||||
{
|
||||
ApiResponse<InlineResponseDefault> localVarResponse = await FooGetAsyncWithHttpInfo();
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<InlineResponseDefault>> FooGetAsyncWithHttpInfo ()
|
||||
{
|
||||
|
||||
var localVarPath = "./foo";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
String[] localVarHttpContentTypes = new String[] {
|
||||
};
|
||||
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("FooGet", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<InlineResponseDefault>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Key, x => x.Value.ToString()),
|
||||
(InlineResponseDefault) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponseDefault)));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -28,15 +28,28 @@ namespace Org.OpenAPITools.Model
|
||||
[DataContract]
|
||||
public partial class Category : IEquatable<Category>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Category" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected Category() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Category" /> class.
|
||||
/// </summary>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="name">name.</param>
|
||||
public Category(long? id = default(long?), string name = default(string))
|
||||
/// <param name="name">name (required) (default to "default-name").</param>
|
||||
public Category(long? id = default(long?), string name = "default-name")
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
if (name == null)
|
||||
{
|
||||
throw new InvalidDataException("name is a required property for Category and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Name = name;
|
||||
}
|
||||
this.Id = id;
|
||||
this.Name = name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Foo
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class Foo : IEquatable<Foo>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Foo" /> class.
|
||||
/// </summary>
|
||||
/// <param name="bar">bar (default to "bar").</param>
|
||||
public Foo(string bar = "bar")
|
||||
{
|
||||
// use default value if no "bar" provided
|
||||
if (bar == null)
|
||||
{
|
||||
this.Bar = "bar";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Bar = bar;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Bar
|
||||
/// </summary>
|
||||
[DataMember(Name="bar", EmitDefaultValue=false)]
|
||||
public string Bar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Foo {\n");
|
||||
sb.Append(" Bar: ").Append(Bar).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as Foo);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if Foo instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of Foo to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(Foo input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Bar == input.Bar ||
|
||||
(this.Bar != null &&
|
||||
this.Bar.Equals(input.Bar))
|
||||
);
|
||||
}
|
||||
|
||||
/// <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.Bar != null)
|
||||
hashCode = hashCode * 59 + this.Bar.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,130 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// InlineObject
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class InlineObject : IEquatable<InlineObject>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject" /> class.
|
||||
/// </summary>
|
||||
/// <param name="name">Updated name of the pet.</param>
|
||||
/// <param name="status">Updated status of the pet.</param>
|
||||
public InlineObject(string name = default(string), string status = default(string))
|
||||
{
|
||||
this.Name = name;
|
||||
this.Status = status;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updated name of the pet
|
||||
/// </summary>
|
||||
/// <value>Updated name of the pet</value>
|
||||
[DataMember(Name="name", EmitDefaultValue=false)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updated status of the pet
|
||||
/// </summary>
|
||||
/// <value>Updated status of the pet</value>
|
||||
[DataMember(Name="status", EmitDefaultValue=false)]
|
||||
public string Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineObject {\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" Status: ").Append(Status).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as InlineObject);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if InlineObject instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of InlineObject to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(InlineObject input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Name == input.Name ||
|
||||
(this.Name != null &&
|
||||
this.Name.Equals(input.Name))
|
||||
) &&
|
||||
(
|
||||
this.Status == input.Status ||
|
||||
(this.Status != null &&
|
||||
this.Status.Equals(input.Status))
|
||||
);
|
||||
}
|
||||
|
||||
/// <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.Name != null)
|
||||
hashCode = hashCode * 59 + this.Name.GetHashCode();
|
||||
if (this.Status != null)
|
||||
hashCode = hashCode * 59 + this.Status.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,130 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// InlineObject1
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class InlineObject1 : IEquatable<InlineObject1>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject1" /> class.
|
||||
/// </summary>
|
||||
/// <param name="additionalMetadata">Additional data to pass to server.</param>
|
||||
/// <param name="file">file to upload.</param>
|
||||
public InlineObject1(string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream))
|
||||
{
|
||||
this.AdditionalMetadata = additionalMetadata;
|
||||
this.File = file;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Additional data to pass to server
|
||||
/// </summary>
|
||||
/// <value>Additional data to pass to server</value>
|
||||
[DataMember(Name="additionalMetadata", EmitDefaultValue=false)]
|
||||
public string AdditionalMetadata { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// file to upload
|
||||
/// </summary>
|
||||
/// <value>file to upload</value>
|
||||
[DataMember(Name="file", EmitDefaultValue=false)]
|
||||
public System.IO.Stream File { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineObject1 {\n");
|
||||
sb.Append(" AdditionalMetadata: ").Append(AdditionalMetadata).Append("\n");
|
||||
sb.Append(" File: ").Append(File).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as InlineObject1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if InlineObject1 instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of InlineObject1 to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(InlineObject1 input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.AdditionalMetadata == input.AdditionalMetadata ||
|
||||
(this.AdditionalMetadata != null &&
|
||||
this.AdditionalMetadata.Equals(input.AdditionalMetadata))
|
||||
) &&
|
||||
(
|
||||
this.File == input.File ||
|
||||
(this.File != null &&
|
||||
this.File.Equals(input.File))
|
||||
);
|
||||
}
|
||||
|
||||
/// <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.AdditionalMetadata != null)
|
||||
hashCode = hashCode * 59 + this.AdditionalMetadata.GetHashCode();
|
||||
if (this.File != null)
|
||||
hashCode = hashCode * 59 + this.File.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,186 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// InlineObject2
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class InlineObject2 : IEquatable<InlineObject2>
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines EnumFormStringArray
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum EnumFormStringArrayEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum GreaterThan for value: >
|
||||
/// </summary>
|
||||
[EnumMember(Value = ">")]
|
||||
GreaterThan = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Dollar for value: $
|
||||
/// </summary>
|
||||
[EnumMember(Value = "$")]
|
||||
Dollar = 2
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Form parameter enum test (string array)
|
||||
/// </summary>
|
||||
/// <value>Form parameter enum test (string array)</value>
|
||||
[DataMember(Name="enum_form_string_array", EmitDefaultValue=false)]
|
||||
public List<EnumFormStringArrayEnum> EnumFormStringArray { get; set; }
|
||||
/// <summary>
|
||||
/// Form parameter enum test (string)
|
||||
/// </summary>
|
||||
/// <value>Form parameter enum test (string)</value>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum EnumFormStringEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum Abc for value: _abc
|
||||
/// </summary>
|
||||
[EnumMember(Value = "_abc")]
|
||||
Abc = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Efg for value: -efg
|
||||
/// </summary>
|
||||
[EnumMember(Value = "-efg")]
|
||||
Efg = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Xyz for value: (xyz)
|
||||
/// </summary>
|
||||
[EnumMember(Value = "(xyz)")]
|
||||
Xyz = 3
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Form parameter enum test (string)
|
||||
/// </summary>
|
||||
/// <value>Form parameter enum test (string)</value>
|
||||
[DataMember(Name="enum_form_string", EmitDefaultValue=false)]
|
||||
public EnumFormStringEnum? EnumFormString { get; set; }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject2" /> class.
|
||||
/// </summary>
|
||||
/// <param name="enumFormStringArray">Form parameter enum test (string array).</param>
|
||||
/// <param name="enumFormString">Form parameter enum test (string) (default to EnumFormStringEnum.Efg).</param>
|
||||
public InlineObject2(List<EnumFormStringArrayEnum> enumFormStringArray = default(List<EnumFormStringArrayEnum>), EnumFormStringEnum? enumFormString = EnumFormStringEnum.Efg)
|
||||
{
|
||||
this.EnumFormStringArray = enumFormStringArray;
|
||||
// use default value if no "enumFormString" provided
|
||||
if (enumFormString == null)
|
||||
{
|
||||
this.EnumFormString = EnumFormStringEnum.Efg;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.EnumFormString = enumFormString;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineObject2 {\n");
|
||||
sb.Append(" EnumFormStringArray: ").Append(EnumFormStringArray).Append("\n");
|
||||
sb.Append(" EnumFormString: ").Append(EnumFormString).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as InlineObject2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if InlineObject2 instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of InlineObject2 to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(InlineObject2 input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.EnumFormStringArray == input.EnumFormStringArray ||
|
||||
this.EnumFormStringArray != null &&
|
||||
this.EnumFormStringArray.SequenceEqual(input.EnumFormStringArray)
|
||||
) &&
|
||||
(
|
||||
this.EnumFormString == input.EnumFormString ||
|
||||
(this.EnumFormString != null &&
|
||||
this.EnumFormString.Equals(input.EnumFormString))
|
||||
);
|
||||
}
|
||||
|
||||
/// <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.EnumFormStringArray != null)
|
||||
hashCode = hashCode * 59 + this.EnumFormStringArray.GetHashCode();
|
||||
if (this.EnumFormString != null)
|
||||
hashCode = hashCode * 59 + this.EnumFormString.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,372 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// InlineObject3
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class InlineObject3 : IEquatable<InlineObject3>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject3" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected InlineObject3() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject3" /> class.
|
||||
/// </summary>
|
||||
/// <param name="integer">None.</param>
|
||||
/// <param name="int32">None.</param>
|
||||
/// <param name="int64">None.</param>
|
||||
/// <param name="number">None (required).</param>
|
||||
/// <param name="_float">None.</param>
|
||||
/// <param name="_double">None (required).</param>
|
||||
/// <param name="_string">None.</param>
|
||||
/// <param name="patternWithoutDelimiter">None (required).</param>
|
||||
/// <param name="_byte">None (required).</param>
|
||||
/// <param name="binary">None.</param>
|
||||
/// <param name="date">None.</param>
|
||||
/// <param name="dateTime">None.</param>
|
||||
/// <param name="password">None.</param>
|
||||
/// <param name="callback">None.</param>
|
||||
public InlineObject3(int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), decimal? number = default(decimal?), float? _float = default(float?), double? _double = default(double?), string _string = default(string), string patternWithoutDelimiter = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string))
|
||||
{
|
||||
// to ensure "number" is required (not null)
|
||||
if (number == null)
|
||||
{
|
||||
throw new InvalidDataException("number is a required property for InlineObject3 and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Number = number;
|
||||
}
|
||||
// to ensure "_double" is required (not null)
|
||||
if (_double == null)
|
||||
{
|
||||
throw new InvalidDataException("_double is a required property for InlineObject3 and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Double = _double;
|
||||
}
|
||||
// to ensure "patternWithoutDelimiter" is required (not null)
|
||||
if (patternWithoutDelimiter == null)
|
||||
{
|
||||
throw new InvalidDataException("patternWithoutDelimiter is a required property for InlineObject3 and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.PatternWithoutDelimiter = patternWithoutDelimiter;
|
||||
}
|
||||
// to ensure "_byte" is required (not null)
|
||||
if (_byte == null)
|
||||
{
|
||||
throw new InvalidDataException("_byte is a required property for InlineObject3 and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Byte = _byte;
|
||||
}
|
||||
this.Integer = integer;
|
||||
this.Int32 = int32;
|
||||
this.Int64 = int64;
|
||||
this.Float = _float;
|
||||
this.String = _string;
|
||||
this.Binary = binary;
|
||||
this.Date = date;
|
||||
this.DateTime = dateTime;
|
||||
this.Password = password;
|
||||
this.Callback = callback;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="integer", EmitDefaultValue=false)]
|
||||
public int? Integer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="int32", EmitDefaultValue=false)]
|
||||
public int? Int32 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="int64", EmitDefaultValue=false)]
|
||||
public long? Int64 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="number", EmitDefaultValue=false)]
|
||||
public decimal? Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="float", EmitDefaultValue=false)]
|
||||
public float? Float { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="double", EmitDefaultValue=false)]
|
||||
public double? Double { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="string", EmitDefaultValue=false)]
|
||||
public string String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="pattern_without_delimiter", EmitDefaultValue=false)]
|
||||
public string PatternWithoutDelimiter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="byte", EmitDefaultValue=false)]
|
||||
public byte[] Byte { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="binary", EmitDefaultValue=false)]
|
||||
public System.IO.Stream Binary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="date", EmitDefaultValue=false)]
|
||||
[JsonConverter(typeof(OpenAPIDateConverter))]
|
||||
public DateTime? Date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="dateTime", EmitDefaultValue=false)]
|
||||
public DateTime? DateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="password", EmitDefaultValue=false)]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="callback", EmitDefaultValue=false)]
|
||||
public string Callback { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineObject3 {\n");
|
||||
sb.Append(" Integer: ").Append(Integer).Append("\n");
|
||||
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
||||
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" PatternWithoutDelimiter: ").Append(PatternWithoutDelimiter).Append("\n");
|
||||
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||
sb.Append(" Date: ").Append(Date).Append("\n");
|
||||
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
||||
sb.Append(" Password: ").Append(Password).Append("\n");
|
||||
sb.Append(" Callback: ").Append(Callback).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as InlineObject3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if InlineObject3 instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of InlineObject3 to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(InlineObject3 input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Integer == input.Integer ||
|
||||
(this.Integer != null &&
|
||||
this.Integer.Equals(input.Integer))
|
||||
) &&
|
||||
(
|
||||
this.Int32 == input.Int32 ||
|
||||
(this.Int32 != null &&
|
||||
this.Int32.Equals(input.Int32))
|
||||
) &&
|
||||
(
|
||||
this.Int64 == input.Int64 ||
|
||||
(this.Int64 != null &&
|
||||
this.Int64.Equals(input.Int64))
|
||||
) &&
|
||||
(
|
||||
this.Number == input.Number ||
|
||||
(this.Number != null &&
|
||||
this.Number.Equals(input.Number))
|
||||
) &&
|
||||
(
|
||||
this.Float == input.Float ||
|
||||
(this.Float != null &&
|
||||
this.Float.Equals(input.Float))
|
||||
) &&
|
||||
(
|
||||
this.Double == input.Double ||
|
||||
(this.Double != null &&
|
||||
this.Double.Equals(input.Double))
|
||||
) &&
|
||||
(
|
||||
this.String == input.String ||
|
||||
(this.String != null &&
|
||||
this.String.Equals(input.String))
|
||||
) &&
|
||||
(
|
||||
this.PatternWithoutDelimiter == input.PatternWithoutDelimiter ||
|
||||
(this.PatternWithoutDelimiter != null &&
|
||||
this.PatternWithoutDelimiter.Equals(input.PatternWithoutDelimiter))
|
||||
) &&
|
||||
(
|
||||
this.Byte == input.Byte ||
|
||||
(this.Byte != null &&
|
||||
this.Byte.Equals(input.Byte))
|
||||
) &&
|
||||
(
|
||||
this.Binary == input.Binary ||
|
||||
(this.Binary != null &&
|
||||
this.Binary.Equals(input.Binary))
|
||||
) &&
|
||||
(
|
||||
this.Date == input.Date ||
|
||||
(this.Date != null &&
|
||||
this.Date.Equals(input.Date))
|
||||
) &&
|
||||
(
|
||||
this.DateTime == input.DateTime ||
|
||||
(this.DateTime != null &&
|
||||
this.DateTime.Equals(input.DateTime))
|
||||
) &&
|
||||
(
|
||||
this.Password == input.Password ||
|
||||
(this.Password != null &&
|
||||
this.Password.Equals(input.Password))
|
||||
) &&
|
||||
(
|
||||
this.Callback == input.Callback ||
|
||||
(this.Callback != null &&
|
||||
this.Callback.Equals(input.Callback))
|
||||
);
|
||||
}
|
||||
|
||||
/// <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.Integer != null)
|
||||
hashCode = hashCode * 59 + this.Integer.GetHashCode();
|
||||
if (this.Int32 != null)
|
||||
hashCode = hashCode * 59 + this.Int32.GetHashCode();
|
||||
if (this.Int64 != null)
|
||||
hashCode = hashCode * 59 + this.Int64.GetHashCode();
|
||||
if (this.Number != null)
|
||||
hashCode = hashCode * 59 + this.Number.GetHashCode();
|
||||
if (this.Float != null)
|
||||
hashCode = hashCode * 59 + this.Float.GetHashCode();
|
||||
if (this.Double != null)
|
||||
hashCode = hashCode * 59 + this.Double.GetHashCode();
|
||||
if (this.String != null)
|
||||
hashCode = hashCode * 59 + this.String.GetHashCode();
|
||||
if (this.PatternWithoutDelimiter != null)
|
||||
hashCode = hashCode * 59 + this.PatternWithoutDelimiter.GetHashCode();
|
||||
if (this.Byte != null)
|
||||
hashCode = hashCode * 59 + this.Byte.GetHashCode();
|
||||
if (this.Binary != null)
|
||||
hashCode = hashCode * 59 + this.Binary.GetHashCode();
|
||||
if (this.Date != null)
|
||||
hashCode = hashCode * 59 + this.Date.GetHashCode();
|
||||
if (this.DateTime != null)
|
||||
hashCode = hashCode * 59 + this.DateTime.GetHashCode();
|
||||
if (this.Password != null)
|
||||
hashCode = hashCode * 59 + this.Password.GetHashCode();
|
||||
if (this.Callback != null)
|
||||
hashCode = hashCode * 59 + this.Callback.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,151 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// InlineObject4
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class InlineObject4 : IEquatable<InlineObject4>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject4" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected InlineObject4() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject4" /> class.
|
||||
/// </summary>
|
||||
/// <param name="param">field1 (required).</param>
|
||||
/// <param name="param2">field2 (required).</param>
|
||||
public InlineObject4(string param = default(string), string param2 = default(string))
|
||||
{
|
||||
// to ensure "param" is required (not null)
|
||||
if (param == null)
|
||||
{
|
||||
throw new InvalidDataException("param is a required property for InlineObject4 and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Param = param;
|
||||
}
|
||||
// to ensure "param2" is required (not null)
|
||||
if (param2 == null)
|
||||
{
|
||||
throw new InvalidDataException("param2 is a required property for InlineObject4 and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Param2 = param2;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// field1
|
||||
/// </summary>
|
||||
/// <value>field1</value>
|
||||
[DataMember(Name="param", EmitDefaultValue=false)]
|
||||
public string Param { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// field2
|
||||
/// </summary>
|
||||
/// <value>field2</value>
|
||||
[DataMember(Name="param2", EmitDefaultValue=false)]
|
||||
public string Param2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineObject4 {\n");
|
||||
sb.Append(" Param: ").Append(Param).Append("\n");
|
||||
sb.Append(" Param2: ").Append(Param2).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as InlineObject4);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if InlineObject4 instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of InlineObject4 to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(InlineObject4 input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Param == input.Param ||
|
||||
(this.Param != null &&
|
||||
this.Param.Equals(input.Param))
|
||||
) &&
|
||||
(
|
||||
this.Param2 == input.Param2 ||
|
||||
(this.Param2 != null &&
|
||||
this.Param2.Equals(input.Param2))
|
||||
);
|
||||
}
|
||||
|
||||
/// <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.Param != null)
|
||||
hashCode = hashCode * 59 + this.Param.GetHashCode();
|
||||
if (this.Param2 != null)
|
||||
hashCode = hashCode * 59 + this.Param2.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,143 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// InlineObject5
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class InlineObject5 : IEquatable<InlineObject5>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject5" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected InlineObject5() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject5" /> class.
|
||||
/// </summary>
|
||||
/// <param name="additionalMetadata">Additional data to pass to server.</param>
|
||||
/// <param name="requiredFile">file to upload (required).</param>
|
||||
public InlineObject5(string additionalMetadata = default(string), System.IO.Stream requiredFile = default(System.IO.Stream))
|
||||
{
|
||||
// to ensure "requiredFile" is required (not null)
|
||||
if (requiredFile == null)
|
||||
{
|
||||
throw new InvalidDataException("requiredFile is a required property for InlineObject5 and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.RequiredFile = requiredFile;
|
||||
}
|
||||
this.AdditionalMetadata = additionalMetadata;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Additional data to pass to server
|
||||
/// </summary>
|
||||
/// <value>Additional data to pass to server</value>
|
||||
[DataMember(Name="additionalMetadata", EmitDefaultValue=false)]
|
||||
public string AdditionalMetadata { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// file to upload
|
||||
/// </summary>
|
||||
/// <value>file to upload</value>
|
||||
[DataMember(Name="requiredFile", EmitDefaultValue=false)]
|
||||
public System.IO.Stream RequiredFile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineObject5 {\n");
|
||||
sb.Append(" AdditionalMetadata: ").Append(AdditionalMetadata).Append("\n");
|
||||
sb.Append(" RequiredFile: ").Append(RequiredFile).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as InlineObject5);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if InlineObject5 instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of InlineObject5 to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(InlineObject5 input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.AdditionalMetadata == input.AdditionalMetadata ||
|
||||
(this.AdditionalMetadata != null &&
|
||||
this.AdditionalMetadata.Equals(input.AdditionalMetadata))
|
||||
) &&
|
||||
(
|
||||
this.RequiredFile == input.RequiredFile ||
|
||||
(this.RequiredFile != null &&
|
||||
this.RequiredFile.Equals(input.RequiredFile))
|
||||
);
|
||||
}
|
||||
|
||||
/// <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.AdditionalMetadata != null)
|
||||
hashCode = hashCode * 59 + this.AdditionalMetadata.GetHashCode();
|
||||
if (this.RequiredFile != null)
|
||||
hashCode = hashCode * 59 + this.RequiredFile.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// InlineResponseDefault
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public partial class InlineResponseDefault : IEquatable<InlineResponseDefault>
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineResponseDefault" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_string">_string.</param>
|
||||
public InlineResponseDefault(Foo _string = default(Foo))
|
||||
{
|
||||
this.String = _string;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name="string", EmitDefaultValue=false)]
|
||||
public Foo String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineResponseDefault {\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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as InlineResponseDefault);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if InlineResponseDefault instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of InlineResponseDefault to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(InlineResponseDefault input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.String == input.String ||
|
||||
(this.String != null &&
|
||||
this.String.Equals(input.String))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.String != null)
|
||||
hashCode = hashCode * 59 + this.String.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -61,7 +61,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="mapOfEnumString">mapOfEnumString.</param>
|
||||
/// <param name="directMap">directMap.</param>
|
||||
/// <param name="indirectMap">indirectMap.</param>
|
||||
public MapTest(Dictionary<string, Dictionary<string, string>> mapMapOfString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, InnerEnum> mapOfEnumString = default(Dictionary<string, InnerEnum>), Dictionary<string, bool?> directMap = default(Dictionary<string, bool?>), StringBooleanMap indirectMap = default(StringBooleanMap))
|
||||
public MapTest(Dictionary<string, Dictionary<string, string>> mapMapOfString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, InnerEnum> mapOfEnumString = default(Dictionary<string, InnerEnum>), Dictionary<string, bool?> directMap = default(Dictionary<string, bool?>), Dictionary<string, bool?> indirectMap = default(Dictionary<string, bool?>))
|
||||
{
|
||||
this.MapMapOfString = mapMapOfString;
|
||||
this.MapOfEnumString = mapOfEnumString;
|
||||
@ -86,7 +86,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets IndirectMap
|
||||
/// </summary>
|
||||
[DataMember(Name="indirect_map", EmitDefaultValue=false)]
|
||||
public StringBooleanMap IndirectMap { get; set; }
|
||||
public Dictionary<string, bool?> IndirectMap { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -151,8 +151,8 @@ namespace Org.OpenAPITools.Model
|
||||
) &&
|
||||
(
|
||||
this.IndirectMap == input.IndirectMap ||
|
||||
(this.IndirectMap != null &&
|
||||
this.IndirectMap.Equals(input.IndirectMap))
|
||||
this.IndirectMap != null &&
|
||||
this.IndirectMap.SequenceEqual(input.IndirectMap)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
3.3.0-SNAPSHOT
|
||||
3.3.2-SNAPSHOT
|
@ -4,7 +4,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **long?** | | [optional]
|
||||
**Name** | **string** | | [optional]
|
||||
**Name** | **string** | | [default to "default-name"]
|
||||
|
||||
[[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,63 @@
|
||||
# Org.OpenAPITools.Api.DefaultApi
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io:80/v2*
|
||||
|
||||
Method | HTTP request | Description
|
||||
------------- | ------------- | -------------
|
||||
[**FooGet**](DefaultApi.md#fooget) | **GET** /foo |
|
||||
|
||||
|
||||
<a name="fooget"></a>
|
||||
# **FooGet**
|
||||
> InlineResponseDefault FooGet ()
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
```csharp
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Example
|
||||
{
|
||||
public class FooGetExample
|
||||
{
|
||||
public void main()
|
||||
{
|
||||
var apiInstance = new DefaultApi();
|
||||
|
||||
try
|
||||
{
|
||||
InlineResponseDefault result = apiInstance.FooGet();
|
||||
Debug.WriteLine(result);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Print("Exception when calling DefaultApi.FooGet: " + e.Message );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**InlineResponseDefault**](InlineResponseDefault.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
No authorization required
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: application/json
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
||||
|
@ -0,0 +1,9 @@
|
||||
# Org.OpenAPITools.Model.Foo
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Bar** | **string** | | [optional] [default to "bar"]
|
||||
|
||||
[[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,10 @@
|
||||
# Org.OpenAPITools.Model.InlineObject
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Name** | **string** | Updated name of the pet | [optional]
|
||||
**Status** | **string** | Updated status of the pet | [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,10 @@
|
||||
# Org.OpenAPITools.Model.InlineObject1
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**AdditionalMetadata** | **string** | Additional data to pass to server | [optional]
|
||||
**File** | **System.IO.Stream** | file to upload | [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,10 @@
|
||||
# Org.OpenAPITools.Model.InlineObject2
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**EnumFormStringArray** | **List<string>** | Form parameter enum test (string array) | [optional]
|
||||
**EnumFormString** | **string** | Form parameter enum test (string) | [optional] [default to EnumFormStringEnum.Efg]
|
||||
|
||||
[[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,22 @@
|
||||
# Org.OpenAPITools.Model.InlineObject3
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Integer** | **int?** | None | [optional]
|
||||
**Int32** | **int?** | None | [optional]
|
||||
**Int64** | **long?** | None | [optional]
|
||||
**Number** | **decimal?** | None |
|
||||
**Float** | **float?** | None | [optional]
|
||||
**Double** | **double?** | None |
|
||||
**String** | **string** | None | [optional]
|
||||
**PatternWithoutDelimiter** | **string** | None |
|
||||
**Byte** | **byte[]** | None |
|
||||
**Binary** | **System.IO.Stream** | None | [optional]
|
||||
**Date** | **DateTime?** | None | [optional]
|
||||
**DateTime** | **DateTime?** | None | [optional]
|
||||
**Password** | **string** | None | [optional]
|
||||
**Callback** | **string** | None | [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,10 @@
|
||||
# Org.OpenAPITools.Model.InlineObject4
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Param** | **string** | field1 |
|
||||
**Param2** | **string** | field2 |
|
||||
|
||||
[[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,10 @@
|
||||
# Org.OpenAPITools.Model.InlineObject5
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**AdditionalMetadata** | **string** | Additional data to pass to server | [optional]
|
||||
**RequiredFile** | **System.IO.Stream** | file to upload |
|
||||
|
||||
[[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,9 @@
|
||||
# Org.OpenAPITools.Model.InlineResponseDefault
|
||||
## 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)
|
||||
|
@ -6,7 +6,7 @@ Name | Type | Description | Notes
|
||||
**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional]
|
||||
**MapOfEnumString** | **Dictionary<string, string>** | | [optional]
|
||||
**DirectMap** | **Dictionary<string, bool?>** | | [optional]
|
||||
**IndirectMap** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
|
||||
**IndirectMap** | **Dictionary<string, bool?>** | | [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,80 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using RestSharp;
|
||||
using NUnit.Framework;
|
||||
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing DefaultApi
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
/// Please update the test case below to test the API endpoint.
|
||||
/// </remarks>
|
||||
[TestFixture]
|
||||
public class DefaultApiTests
|
||||
{
|
||||
private DefaultApi instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each unit test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
instance = new DefaultApi();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each unit test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of DefaultApi
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void InstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test 'IsInstanceOfType' DefaultApi
|
||||
//Assert.IsInstanceOfType(typeof(DefaultApi), instance, "instance is a DefaultApi");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test FooGet
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void FooGetTest()
|
||||
{
|
||||
// TODO uncomment below to test the method and replace null with proper value
|
||||
//var response = instance.FooGet();
|
||||
//Assert.IsInstanceOf<InlineResponseDefault> (response, "response is InlineResponseDefault");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing Foo
|
||||
/// </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>
|
||||
[TestFixture]
|
||||
public class FooTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for Foo
|
||||
//private Foo instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of Foo
|
||||
//instance = new Foo();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of Foo
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void FooInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" Foo
|
||||
//Assert.IsInstanceOfType<Foo> (instance, "variable 'instance' is a Foo");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Bar'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void BarTest()
|
||||
{
|
||||
// TODO unit test for the property 'Bar'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing InlineObject1
|
||||
/// </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>
|
||||
[TestFixture]
|
||||
public class InlineObject1Tests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for InlineObject1
|
||||
//private InlineObject1 instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of InlineObject1
|
||||
//instance = new InlineObject1();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of InlineObject1
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void InlineObject1InstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" InlineObject1
|
||||
//Assert.IsInstanceOfType<InlineObject1> (instance, "variable 'instance' is a InlineObject1");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'AdditionalMetadata'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void AdditionalMetadataTest()
|
||||
{
|
||||
// TODO unit test for the property 'AdditionalMetadata'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'File'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void FileTest()
|
||||
{
|
||||
// TODO unit test for the property 'File'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing InlineObject2
|
||||
/// </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>
|
||||
[TestFixture]
|
||||
public class InlineObject2Tests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for InlineObject2
|
||||
//private InlineObject2 instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of InlineObject2
|
||||
//instance = new InlineObject2();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of InlineObject2
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void InlineObject2InstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" InlineObject2
|
||||
//Assert.IsInstanceOfType<InlineObject2> (instance, "variable 'instance' is a InlineObject2");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'EnumFormStringArray'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void EnumFormStringArrayTest()
|
||||
{
|
||||
// TODO unit test for the property 'EnumFormStringArray'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'EnumFormString'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void EnumFormStringTest()
|
||||
{
|
||||
// TODO unit test for the property 'EnumFormString'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,184 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing InlineObject3
|
||||
/// </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>
|
||||
[TestFixture]
|
||||
public class InlineObject3Tests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for InlineObject3
|
||||
//private InlineObject3 instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of InlineObject3
|
||||
//instance = new InlineObject3();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of InlineObject3
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void InlineObject3InstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" InlineObject3
|
||||
//Assert.IsInstanceOfType<InlineObject3> (instance, "variable 'instance' is a InlineObject3");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Integer'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void IntegerTest()
|
||||
{
|
||||
// TODO unit test for the property 'Integer'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Int32'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void Int32Test()
|
||||
{
|
||||
// TODO unit test for the property 'Int32'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Int64'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void Int64Test()
|
||||
{
|
||||
// TODO unit test for the property 'Int64'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Number'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void NumberTest()
|
||||
{
|
||||
// TODO unit test for the property 'Number'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Float'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void FloatTest()
|
||||
{
|
||||
// TODO unit test for the property 'Float'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Double'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void DoubleTest()
|
||||
{
|
||||
// TODO unit test for the property 'Double'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'String'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void StringTest()
|
||||
{
|
||||
// TODO unit test for the property 'String'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'PatternWithoutDelimiter'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void PatternWithoutDelimiterTest()
|
||||
{
|
||||
// TODO unit test for the property 'PatternWithoutDelimiter'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Byte'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ByteTest()
|
||||
{
|
||||
// TODO unit test for the property 'Byte'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Binary'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void BinaryTest()
|
||||
{
|
||||
// TODO unit test for the property 'Binary'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Date'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void DateTest()
|
||||
{
|
||||
// TODO unit test for the property 'Date'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'DateTime'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void DateTimeTest()
|
||||
{
|
||||
// TODO unit test for the property 'DateTime'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Password'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void PasswordTest()
|
||||
{
|
||||
// TODO unit test for the property 'Password'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Callback'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void CallbackTest()
|
||||
{
|
||||
// TODO unit test for the property 'Callback'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing InlineObject4
|
||||
/// </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>
|
||||
[TestFixture]
|
||||
public class InlineObject4Tests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for InlineObject4
|
||||
//private InlineObject4 instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of InlineObject4
|
||||
//instance = new InlineObject4();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of InlineObject4
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void InlineObject4InstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" InlineObject4
|
||||
//Assert.IsInstanceOfType<InlineObject4> (instance, "variable 'instance' is a InlineObject4");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Param'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void ParamTest()
|
||||
{
|
||||
// TODO unit test for the property 'Param'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Param2'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void Param2Test()
|
||||
{
|
||||
// TODO unit test for the property 'Param2'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing InlineObject5
|
||||
/// </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>
|
||||
[TestFixture]
|
||||
public class InlineObject5Tests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for InlineObject5
|
||||
//private InlineObject5 instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of InlineObject5
|
||||
//instance = new InlineObject5();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of InlineObject5
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void InlineObject5InstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" InlineObject5
|
||||
//Assert.IsInstanceOfType<InlineObject5> (instance, "variable 'instance' is a InlineObject5");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'AdditionalMetadata'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void AdditionalMetadataTest()
|
||||
{
|
||||
// TODO unit test for the property 'AdditionalMetadata'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'RequiredFile'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void RequiredFileTest()
|
||||
{
|
||||
// TODO unit test for the property 'RequiredFile'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,88 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing InlineObject
|
||||
/// </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>
|
||||
[TestFixture]
|
||||
public class InlineObjectTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for InlineObject
|
||||
//private InlineObject instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of InlineObject
|
||||
//instance = new InlineObject();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of InlineObject
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void InlineObjectInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" InlineObject
|
||||
//Assert.IsInstanceOfType<InlineObject> (instance, "variable 'instance' is a InlineObject");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'Name'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void NameTest()
|
||||
{
|
||||
// TODO unit test for the property 'Name'
|
||||
}
|
||||
/// <summary>
|
||||
/// Test the property 'Status'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void StatusTest()
|
||||
{
|
||||
// TODO unit test for the property 'Status'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,80 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Collections.Generic;
|
||||
using Org.OpenAPITools.Api;
|
||||
using Org.OpenAPITools.Model;
|
||||
using Org.OpenAPITools.Client;
|
||||
using System.Reflection;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Org.OpenAPITools.Test
|
||||
{
|
||||
/// <summary>
|
||||
/// Class for testing InlineResponseDefault
|
||||
/// </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>
|
||||
[TestFixture]
|
||||
public class InlineResponseDefaultTests
|
||||
{
|
||||
// TODO uncomment below to declare an instance variable for InlineResponseDefault
|
||||
//private InlineResponseDefault instance;
|
||||
|
||||
/// <summary>
|
||||
/// Setup before each test
|
||||
/// </summary>
|
||||
[SetUp]
|
||||
public void Init()
|
||||
{
|
||||
// TODO uncomment below to create an instance of InlineResponseDefault
|
||||
//instance = new InlineResponseDefault();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clean up after each test
|
||||
/// </summary>
|
||||
[TearDown]
|
||||
public void Cleanup()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Test an instance of InlineResponseDefault
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void InlineResponseDefaultInstanceTest()
|
||||
{
|
||||
// TODO uncomment below to test "IsInstanceOfType" InlineResponseDefault
|
||||
//Assert.IsInstanceOfType<InlineResponseDefault> (instance, "variable 'instance' is a InlineResponseDefault");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Test the property 'String'
|
||||
/// </summary>
|
||||
[Test]
|
||||
public void StringTest()
|
||||
{
|
||||
// TODO unit test for the property 'String'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,289 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Linq;
|
||||
using RestSharp;
|
||||
using Org.OpenAPITools.Client;
|
||||
using Org.OpenAPITools.Model;
|
||||
|
||||
namespace Org.OpenAPITools.Api
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public interface IDefaultApi : IApiAccessor
|
||||
{
|
||||
#region Synchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
InlineResponseDefault FooGet ();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
ApiResponse<InlineResponseDefault> FooGetWithHttpInfo ();
|
||||
#endregion Synchronous Operations
|
||||
#region Asynchronous Operations
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync ();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
///
|
||||
/// </remarks>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
System.Threading.Tasks.Task<ApiResponse<InlineResponseDefault>> FooGetAsyncWithHttpInfo ();
|
||||
#endregion Asynchronous Operations
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Represents a collection of functions to interact with the API endpoints
|
||||
/// </summary>
|
||||
public partial class DefaultApi : IDefaultApi
|
||||
{
|
||||
private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DefaultApi"/> class.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DefaultApi(String basePath)
|
||||
{
|
||||
this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath };
|
||||
|
||||
ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="DefaultApi"/> class
|
||||
/// using Configuration object
|
||||
/// </summary>
|
||||
/// <param name="configuration">An instance of Configuration</param>
|
||||
/// <returns></returns>
|
||||
public DefaultApi(Org.OpenAPITools.Client.Configuration configuration = null)
|
||||
{
|
||||
if (configuration == null) // use the default one in Configuration
|
||||
this.Configuration = Org.OpenAPITools.Client.Configuration.Default;
|
||||
else
|
||||
this.Configuration = configuration;
|
||||
|
||||
ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
public String GetBasePath()
|
||||
{
|
||||
return this.Configuration.ApiClient.RestClient.BaseUrl.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Sets the base path of the API client.
|
||||
/// </summary>
|
||||
/// <value>The base path</value>
|
||||
[Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")]
|
||||
public void SetBasePath(String basePath)
|
||||
{
|
||||
// do nothing
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the configuration object
|
||||
/// </summary>
|
||||
/// <value>An instance of the Configuration</value>
|
||||
public Org.OpenAPITools.Client.Configuration Configuration {get; set;}
|
||||
|
||||
/// <summary>
|
||||
/// Provides a factory method hook for the creation of exceptions.
|
||||
/// </summary>
|
||||
public Org.OpenAPITools.Client.ExceptionFactory ExceptionFactory
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_exceptionFactory != null && _exceptionFactory.GetInvocationList().Length > 1)
|
||||
{
|
||||
throw new InvalidOperationException("Multicast delegate for ExceptionFactory is unsupported.");
|
||||
}
|
||||
return _exceptionFactory;
|
||||
}
|
||||
set { _exceptionFactory = value; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the default header.
|
||||
/// </summary>
|
||||
/// <returns>Dictionary of HTTP header</returns>
|
||||
[Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")]
|
||||
public IDictionary<String, String> DefaultHeader()
|
||||
{
|
||||
return new ReadOnlyDictionary<string, string>(this.Configuration.DefaultHeader);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Add default header.
|
||||
/// </summary>
|
||||
/// <param name="key">Header field name.</param>
|
||||
/// <param name="value">Header field value.</param>
|
||||
/// <returns></returns>
|
||||
[Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")]
|
||||
public void AddDefaultHeader(string key, string value)
|
||||
{
|
||||
this.Configuration.AddDefaultHeader(key, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>InlineResponseDefault</returns>
|
||||
public InlineResponseDefault FooGet ()
|
||||
{
|
||||
ApiResponse<InlineResponseDefault> localVarResponse = FooGetWithHttpInfo();
|
||||
return localVarResponse.Data;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>ApiResponse of InlineResponseDefault</returns>
|
||||
public ApiResponse< InlineResponseDefault > FooGetWithHttpInfo ()
|
||||
{
|
||||
|
||||
var localVarPath = "/foo";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
String[] localVarHttpContentTypes = new String[] {
|
||||
};
|
||||
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("FooGet", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<InlineResponseDefault>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(InlineResponseDefault) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponseDefault)));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of InlineResponseDefault</returns>
|
||||
public async System.Threading.Tasks.Task<InlineResponseDefault> FooGetAsync ()
|
||||
{
|
||||
ApiResponse<InlineResponseDefault> localVarResponse = await FooGetAsyncWithHttpInfo();
|
||||
return localVarResponse.Data;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="Org.OpenAPITools.Client.ApiException">Thrown when fails to make API call</exception>
|
||||
/// <returns>Task of ApiResponse (InlineResponseDefault)</returns>
|
||||
public async System.Threading.Tasks.Task<ApiResponse<InlineResponseDefault>> FooGetAsyncWithHttpInfo ()
|
||||
{
|
||||
|
||||
var localVarPath = "/foo";
|
||||
var localVarPathParams = new Dictionary<String, String>();
|
||||
var localVarQueryParams = new List<KeyValuePair<String, String>>();
|
||||
var localVarHeaderParams = new Dictionary<String, String>(this.Configuration.DefaultHeader);
|
||||
var localVarFormParams = new Dictionary<String, String>();
|
||||
var localVarFileParams = new Dictionary<String, FileParameter>();
|
||||
Object localVarPostBody = null;
|
||||
|
||||
// to determine the Content-Type header
|
||||
String[] localVarHttpContentTypes = new String[] {
|
||||
};
|
||||
String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes);
|
||||
|
||||
// to determine the Accept header
|
||||
String[] localVarHttpHeaderAccepts = new String[] {
|
||||
"application/json"
|
||||
};
|
||||
String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts);
|
||||
if (localVarHttpHeaderAccept != null)
|
||||
localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept);
|
||||
|
||||
|
||||
|
||||
// make the HTTP request
|
||||
IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath,
|
||||
Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams,
|
||||
localVarPathParams, localVarHttpContentType);
|
||||
|
||||
int localVarStatusCode = (int) localVarResponse.StatusCode;
|
||||
|
||||
if (ExceptionFactory != null)
|
||||
{
|
||||
Exception exception = ExceptionFactory("FooGet", localVarResponse);
|
||||
if (exception != null) throw exception;
|
||||
}
|
||||
|
||||
return new ApiResponse<InlineResponseDefault>(localVarStatusCode,
|
||||
localVarResponse.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()),
|
||||
(InlineResponseDefault) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(InlineResponseDefault)));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -146,7 +146,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
foreach(var x in BaseValidate(validationContext)) yield return x;
|
||||
foreach(var x in base.BaseValidate(validationContext)) yield return x;
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
@ -33,15 +33,28 @@ namespace Org.OpenAPITools.Model
|
||||
[ImplementPropertyChanged]
|
||||
public partial class Category : IEquatable<Category>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Category" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected Category() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Category" /> class.
|
||||
/// </summary>
|
||||
/// <param name="id">id.</param>
|
||||
/// <param name="name">name.</param>
|
||||
public Category(long? id = default(long?), string name = default(string))
|
||||
/// <param name="name">name (required) (default to "default-name").</param>
|
||||
public Category(long? id = default(long?), string name = "default-name")
|
||||
{
|
||||
// to ensure "name" is required (not null)
|
||||
if (name == null)
|
||||
{
|
||||
throw new InvalidDataException("name is a required property for Category and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Name = name;
|
||||
}
|
||||
this.Id = id;
|
||||
this.Name = name;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -146,7 +146,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
foreach(var x in BaseValidate(validationContext)) yield return x;
|
||||
foreach(var x in base.BaseValidate(validationContext)) yield return x;
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,155 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using PropertyChanged;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// Foo
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[ImplementPropertyChanged]
|
||||
public partial class Foo : IEquatable<Foo>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Foo" /> class.
|
||||
/// </summary>
|
||||
/// <param name="bar">bar (default to "bar").</param>
|
||||
public Foo(string bar = "bar")
|
||||
{
|
||||
// use default value if no "bar" provided
|
||||
if (bar == null)
|
||||
{
|
||||
this.Bar = "bar";
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Bar = bar;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets Bar
|
||||
/// </summary>
|
||||
[DataMember(Name="bar", EmitDefaultValue=false)]
|
||||
public string Bar { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class Foo {\n");
|
||||
sb.Append(" Bar: ").Append(Bar).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as Foo);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if Foo instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of Foo to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(Foo input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Bar == input.Bar ||
|
||||
(this.Bar != null &&
|
||||
this.Bar.Equals(input.Bar))
|
||||
);
|
||||
}
|
||||
|
||||
/// <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.Bar != null)
|
||||
hashCode = hashCode * 59 + this.Bar.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property changed event handler
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Trigger when a property changed
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Property Name</param>
|
||||
public virtual void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
// NOTE: property changed is handled via "code weaving" using Fody.
|
||||
// Properties with setters are modified at compile time to notify of changes.
|
||||
var propertyChanged = PropertyChanged;
|
||||
if (propertyChanged != null)
|
||||
{
|
||||
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,165 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using PropertyChanged;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// InlineObject
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[ImplementPropertyChanged]
|
||||
public partial class InlineObject : IEquatable<InlineObject>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject" /> class.
|
||||
/// </summary>
|
||||
/// <param name="name">Updated name of the pet.</param>
|
||||
/// <param name="status">Updated status of the pet.</param>
|
||||
public InlineObject(string name = default(string), string status = default(string))
|
||||
{
|
||||
this.Name = name;
|
||||
this.Status = status;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updated name of the pet
|
||||
/// </summary>
|
||||
/// <value>Updated name of the pet</value>
|
||||
[DataMember(Name="name", EmitDefaultValue=false)]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Updated status of the pet
|
||||
/// </summary>
|
||||
/// <value>Updated status of the pet</value>
|
||||
[DataMember(Name="status", EmitDefaultValue=false)]
|
||||
public string Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineObject {\n");
|
||||
sb.Append(" Name: ").Append(Name).Append("\n");
|
||||
sb.Append(" Status: ").Append(Status).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as InlineObject);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if InlineObject instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of InlineObject to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(InlineObject input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Name == input.Name ||
|
||||
(this.Name != null &&
|
||||
this.Name.Equals(input.Name))
|
||||
) &&
|
||||
(
|
||||
this.Status == input.Status ||
|
||||
(this.Status != null &&
|
||||
this.Status.Equals(input.Status))
|
||||
);
|
||||
}
|
||||
|
||||
/// <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.Name != null)
|
||||
hashCode = hashCode * 59 + this.Name.GetHashCode();
|
||||
if (this.Status != null)
|
||||
hashCode = hashCode * 59 + this.Status.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property changed event handler
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Trigger when a property changed
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Property Name</param>
|
||||
public virtual void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
// NOTE: property changed is handled via "code weaving" using Fody.
|
||||
// Properties with setters are modified at compile time to notify of changes.
|
||||
var propertyChanged = PropertyChanged;
|
||||
if (propertyChanged != null)
|
||||
{
|
||||
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,165 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using PropertyChanged;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// InlineObject1
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[ImplementPropertyChanged]
|
||||
public partial class InlineObject1 : IEquatable<InlineObject1>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject1" /> class.
|
||||
/// </summary>
|
||||
/// <param name="additionalMetadata">Additional data to pass to server.</param>
|
||||
/// <param name="file">file to upload.</param>
|
||||
public InlineObject1(string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream))
|
||||
{
|
||||
this.AdditionalMetadata = additionalMetadata;
|
||||
this.File = file;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Additional data to pass to server
|
||||
/// </summary>
|
||||
/// <value>Additional data to pass to server</value>
|
||||
[DataMember(Name="additionalMetadata", EmitDefaultValue=false)]
|
||||
public string AdditionalMetadata { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// file to upload
|
||||
/// </summary>
|
||||
/// <value>file to upload</value>
|
||||
[DataMember(Name="file", EmitDefaultValue=false)]
|
||||
public System.IO.Stream File { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineObject1 {\n");
|
||||
sb.Append(" AdditionalMetadata: ").Append(AdditionalMetadata).Append("\n");
|
||||
sb.Append(" File: ").Append(File).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as InlineObject1);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if InlineObject1 instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of InlineObject1 to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(InlineObject1 input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.AdditionalMetadata == input.AdditionalMetadata ||
|
||||
(this.AdditionalMetadata != null &&
|
||||
this.AdditionalMetadata.Equals(input.AdditionalMetadata))
|
||||
) &&
|
||||
(
|
||||
this.File == input.File ||
|
||||
(this.File != null &&
|
||||
this.File.Equals(input.File))
|
||||
);
|
||||
}
|
||||
|
||||
/// <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.AdditionalMetadata != null)
|
||||
hashCode = hashCode * 59 + this.AdditionalMetadata.GetHashCode();
|
||||
if (this.File != null)
|
||||
hashCode = hashCode * 59 + this.File.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property changed event handler
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Trigger when a property changed
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Property Name</param>
|
||||
public virtual void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
// NOTE: property changed is handled via "code weaving" using Fody.
|
||||
// Properties with setters are modified at compile time to notify of changes.
|
||||
var propertyChanged = PropertyChanged;
|
||||
if (propertyChanged != null)
|
||||
{
|
||||
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,221 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using PropertyChanged;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// InlineObject2
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[ImplementPropertyChanged]
|
||||
public partial class InlineObject2 : IEquatable<InlineObject2>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines EnumFormStringArray
|
||||
/// </summary>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum EnumFormStringArrayEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum GreaterThan for value: >
|
||||
/// </summary>
|
||||
[EnumMember(Value = ">")]
|
||||
GreaterThan = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Dollar for value: $
|
||||
/// </summary>
|
||||
[EnumMember(Value = "$")]
|
||||
Dollar = 2
|
||||
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Form parameter enum test (string array)
|
||||
/// </summary>
|
||||
/// <value>Form parameter enum test (string array)</value>
|
||||
[DataMember(Name="enum_form_string_array", EmitDefaultValue=false)]
|
||||
public List<EnumFormStringArrayEnum> EnumFormStringArray { get; set; }
|
||||
/// <summary>
|
||||
/// Form parameter enum test (string)
|
||||
/// </summary>
|
||||
/// <value>Form parameter enum test (string)</value>
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum EnumFormStringEnum
|
||||
{
|
||||
/// <summary>
|
||||
/// Enum Abc for value: _abc
|
||||
/// </summary>
|
||||
[EnumMember(Value = "_abc")]
|
||||
Abc = 1,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Efg for value: -efg
|
||||
/// </summary>
|
||||
[EnumMember(Value = "-efg")]
|
||||
Efg = 2,
|
||||
|
||||
/// <summary>
|
||||
/// Enum Xyz for value: (xyz)
|
||||
/// </summary>
|
||||
[EnumMember(Value = "(xyz)")]
|
||||
Xyz = 3
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Form parameter enum test (string)
|
||||
/// </summary>
|
||||
/// <value>Form parameter enum test (string)</value>
|
||||
[DataMember(Name="enum_form_string", EmitDefaultValue=false)]
|
||||
public EnumFormStringEnum? EnumFormString { get; set; }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject2" /> class.
|
||||
/// </summary>
|
||||
/// <param name="enumFormStringArray">Form parameter enum test (string array).</param>
|
||||
/// <param name="enumFormString">Form parameter enum test (string) (default to EnumFormStringEnum.Efg).</param>
|
||||
public InlineObject2(List<EnumFormStringArrayEnum> enumFormStringArray = default(List<EnumFormStringArrayEnum>), EnumFormStringEnum? enumFormString = EnumFormStringEnum.Efg)
|
||||
{
|
||||
this.EnumFormStringArray = enumFormStringArray;
|
||||
// use default value if no "enumFormString" provided
|
||||
if (enumFormString == null)
|
||||
{
|
||||
this.EnumFormString = EnumFormStringEnum.Efg;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.EnumFormString = enumFormString;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineObject2 {\n");
|
||||
sb.Append(" EnumFormStringArray: ").Append(EnumFormStringArray).Append("\n");
|
||||
sb.Append(" EnumFormString: ").Append(EnumFormString).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as InlineObject2);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if InlineObject2 instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of InlineObject2 to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(InlineObject2 input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.EnumFormStringArray == input.EnumFormStringArray ||
|
||||
this.EnumFormStringArray != null &&
|
||||
this.EnumFormStringArray.SequenceEqual(input.EnumFormStringArray)
|
||||
) &&
|
||||
(
|
||||
this.EnumFormString == input.EnumFormString ||
|
||||
(this.EnumFormString != null &&
|
||||
this.EnumFormString.Equals(input.EnumFormString))
|
||||
);
|
||||
}
|
||||
|
||||
/// <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.EnumFormStringArray != null)
|
||||
hashCode = hashCode * 59 + this.EnumFormStringArray.GetHashCode();
|
||||
if (this.EnumFormString != null)
|
||||
hashCode = hashCode * 59 + this.EnumFormString.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property changed event handler
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Trigger when a property changed
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Property Name</param>
|
||||
public virtual void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
// NOTE: property changed is handled via "code weaving" using Fody.
|
||||
// Properties with setters are modified at compile time to notify of changes.
|
||||
var propertyChanged = PropertyChanged;
|
||||
if (propertyChanged != null)
|
||||
{
|
||||
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,487 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using PropertyChanged;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// InlineObject3
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[ImplementPropertyChanged]
|
||||
public partial class InlineObject3 : IEquatable<InlineObject3>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject3" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected InlineObject3() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject3" /> class.
|
||||
/// </summary>
|
||||
/// <param name="integer">None.</param>
|
||||
/// <param name="int32">None.</param>
|
||||
/// <param name="int64">None.</param>
|
||||
/// <param name="number">None (required).</param>
|
||||
/// <param name="_float">None.</param>
|
||||
/// <param name="_double">None (required).</param>
|
||||
/// <param name="_string">None.</param>
|
||||
/// <param name="patternWithoutDelimiter">None (required).</param>
|
||||
/// <param name="_byte">None (required).</param>
|
||||
/// <param name="binary">None.</param>
|
||||
/// <param name="date">None.</param>
|
||||
/// <param name="dateTime">None.</param>
|
||||
/// <param name="password">None.</param>
|
||||
/// <param name="callback">None.</param>
|
||||
public InlineObject3(int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), decimal? number = default(decimal?), float? _float = default(float?), double? _double = default(double?), string _string = default(string), string patternWithoutDelimiter = default(string), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string))
|
||||
{
|
||||
// to ensure "number" is required (not null)
|
||||
if (number == null)
|
||||
{
|
||||
throw new InvalidDataException("number is a required property for InlineObject3 and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Number = number;
|
||||
}
|
||||
// to ensure "_double" is required (not null)
|
||||
if (_double == null)
|
||||
{
|
||||
throw new InvalidDataException("_double is a required property for InlineObject3 and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Double = _double;
|
||||
}
|
||||
// to ensure "patternWithoutDelimiter" is required (not null)
|
||||
if (patternWithoutDelimiter == null)
|
||||
{
|
||||
throw new InvalidDataException("patternWithoutDelimiter is a required property for InlineObject3 and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.PatternWithoutDelimiter = patternWithoutDelimiter;
|
||||
}
|
||||
// to ensure "_byte" is required (not null)
|
||||
if (_byte == null)
|
||||
{
|
||||
throw new InvalidDataException("_byte is a required property for InlineObject3 and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Byte = _byte;
|
||||
}
|
||||
this.Integer = integer;
|
||||
this.Int32 = int32;
|
||||
this.Int64 = int64;
|
||||
this.Float = _float;
|
||||
this.String = _string;
|
||||
this.Binary = binary;
|
||||
this.Date = date;
|
||||
this.DateTime = dateTime;
|
||||
this.Password = password;
|
||||
this.Callback = callback;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="integer", EmitDefaultValue=false)]
|
||||
public int? Integer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="int32", EmitDefaultValue=false)]
|
||||
public int? Int32 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="int64", EmitDefaultValue=false)]
|
||||
public long? Int64 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="number", EmitDefaultValue=false)]
|
||||
public decimal? Number { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="float", EmitDefaultValue=false)]
|
||||
public float? Float { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="double", EmitDefaultValue=false)]
|
||||
public double? Double { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="string", EmitDefaultValue=false)]
|
||||
public string String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="pattern_without_delimiter", EmitDefaultValue=false)]
|
||||
public string PatternWithoutDelimiter { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="byte", EmitDefaultValue=false)]
|
||||
public byte[] Byte { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="binary", EmitDefaultValue=false)]
|
||||
public System.IO.Stream Binary { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="date", EmitDefaultValue=false)]
|
||||
[JsonConverter(typeof(OpenAPIDateConverter))]
|
||||
public DateTime? Date { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="dateTime", EmitDefaultValue=false)]
|
||||
public DateTime? DateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="password", EmitDefaultValue=false)]
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// None
|
||||
/// </summary>
|
||||
/// <value>None</value>
|
||||
[DataMember(Name="callback", EmitDefaultValue=false)]
|
||||
public string Callback { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineObject3 {\n");
|
||||
sb.Append(" Integer: ").Append(Integer).Append("\n");
|
||||
sb.Append(" Int32: ").Append(Int32).Append("\n");
|
||||
sb.Append(" Int64: ").Append(Int64).Append("\n");
|
||||
sb.Append(" Number: ").Append(Number).Append("\n");
|
||||
sb.Append(" Float: ").Append(Float).Append("\n");
|
||||
sb.Append(" Double: ").Append(Double).Append("\n");
|
||||
sb.Append(" String: ").Append(String).Append("\n");
|
||||
sb.Append(" PatternWithoutDelimiter: ").Append(PatternWithoutDelimiter).Append("\n");
|
||||
sb.Append(" Byte: ").Append(Byte).Append("\n");
|
||||
sb.Append(" Binary: ").Append(Binary).Append("\n");
|
||||
sb.Append(" Date: ").Append(Date).Append("\n");
|
||||
sb.Append(" DateTime: ").Append(DateTime).Append("\n");
|
||||
sb.Append(" Password: ").Append(Password).Append("\n");
|
||||
sb.Append(" Callback: ").Append(Callback).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as InlineObject3);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if InlineObject3 instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of InlineObject3 to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(InlineObject3 input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Integer == input.Integer ||
|
||||
(this.Integer != null &&
|
||||
this.Integer.Equals(input.Integer))
|
||||
) &&
|
||||
(
|
||||
this.Int32 == input.Int32 ||
|
||||
(this.Int32 != null &&
|
||||
this.Int32.Equals(input.Int32))
|
||||
) &&
|
||||
(
|
||||
this.Int64 == input.Int64 ||
|
||||
(this.Int64 != null &&
|
||||
this.Int64.Equals(input.Int64))
|
||||
) &&
|
||||
(
|
||||
this.Number == input.Number ||
|
||||
(this.Number != null &&
|
||||
this.Number.Equals(input.Number))
|
||||
) &&
|
||||
(
|
||||
this.Float == input.Float ||
|
||||
(this.Float != null &&
|
||||
this.Float.Equals(input.Float))
|
||||
) &&
|
||||
(
|
||||
this.Double == input.Double ||
|
||||
(this.Double != null &&
|
||||
this.Double.Equals(input.Double))
|
||||
) &&
|
||||
(
|
||||
this.String == input.String ||
|
||||
(this.String != null &&
|
||||
this.String.Equals(input.String))
|
||||
) &&
|
||||
(
|
||||
this.PatternWithoutDelimiter == input.PatternWithoutDelimiter ||
|
||||
(this.PatternWithoutDelimiter != null &&
|
||||
this.PatternWithoutDelimiter.Equals(input.PatternWithoutDelimiter))
|
||||
) &&
|
||||
(
|
||||
this.Byte == input.Byte ||
|
||||
(this.Byte != null &&
|
||||
this.Byte.Equals(input.Byte))
|
||||
) &&
|
||||
(
|
||||
this.Binary == input.Binary ||
|
||||
(this.Binary != null &&
|
||||
this.Binary.Equals(input.Binary))
|
||||
) &&
|
||||
(
|
||||
this.Date == input.Date ||
|
||||
(this.Date != null &&
|
||||
this.Date.Equals(input.Date))
|
||||
) &&
|
||||
(
|
||||
this.DateTime == input.DateTime ||
|
||||
(this.DateTime != null &&
|
||||
this.DateTime.Equals(input.DateTime))
|
||||
) &&
|
||||
(
|
||||
this.Password == input.Password ||
|
||||
(this.Password != null &&
|
||||
this.Password.Equals(input.Password))
|
||||
) &&
|
||||
(
|
||||
this.Callback == input.Callback ||
|
||||
(this.Callback != null &&
|
||||
this.Callback.Equals(input.Callback))
|
||||
);
|
||||
}
|
||||
|
||||
/// <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.Integer != null)
|
||||
hashCode = hashCode * 59 + this.Integer.GetHashCode();
|
||||
if (this.Int32 != null)
|
||||
hashCode = hashCode * 59 + this.Int32.GetHashCode();
|
||||
if (this.Int64 != null)
|
||||
hashCode = hashCode * 59 + this.Int64.GetHashCode();
|
||||
if (this.Number != null)
|
||||
hashCode = hashCode * 59 + this.Number.GetHashCode();
|
||||
if (this.Float != null)
|
||||
hashCode = hashCode * 59 + this.Float.GetHashCode();
|
||||
if (this.Double != null)
|
||||
hashCode = hashCode * 59 + this.Double.GetHashCode();
|
||||
if (this.String != null)
|
||||
hashCode = hashCode * 59 + this.String.GetHashCode();
|
||||
if (this.PatternWithoutDelimiter != null)
|
||||
hashCode = hashCode * 59 + this.PatternWithoutDelimiter.GetHashCode();
|
||||
if (this.Byte != null)
|
||||
hashCode = hashCode * 59 + this.Byte.GetHashCode();
|
||||
if (this.Binary != null)
|
||||
hashCode = hashCode * 59 + this.Binary.GetHashCode();
|
||||
if (this.Date != null)
|
||||
hashCode = hashCode * 59 + this.Date.GetHashCode();
|
||||
if (this.DateTime != null)
|
||||
hashCode = hashCode * 59 + this.DateTime.GetHashCode();
|
||||
if (this.Password != null)
|
||||
hashCode = hashCode * 59 + this.Password.GetHashCode();
|
||||
if (this.Callback != null)
|
||||
hashCode = hashCode * 59 + this.Callback.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property changed event handler
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Trigger when a property changed
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Property Name</param>
|
||||
public virtual void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
// NOTE: property changed is handled via "code weaving" using Fody.
|
||||
// Properties with setters are modified at compile time to notify of changes.
|
||||
var propertyChanged = PropertyChanged;
|
||||
if (propertyChanged != null)
|
||||
{
|
||||
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
// Integer (int?) maximum
|
||||
if(this.Integer > (int?)100)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value less than or equal to 100.", new [] { "Integer" });
|
||||
}
|
||||
|
||||
// Integer (int?) minimum
|
||||
if(this.Integer < (int?)10)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Integer, must be a value greater than or equal to 10.", new [] { "Integer" });
|
||||
}
|
||||
|
||||
// Int32 (int?) maximum
|
||||
if(this.Int32 > (int?)200)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value less than or equal to 200.", new [] { "Int32" });
|
||||
}
|
||||
|
||||
// Int32 (int?) minimum
|
||||
if(this.Int32 < (int?)20)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Int32, must be a value greater than or equal to 20.", new [] { "Int32" });
|
||||
}
|
||||
|
||||
// Number (decimal?) maximum
|
||||
if(this.Number > (decimal?)543.2)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value less than or equal to 543.2.", new [] { "Number" });
|
||||
}
|
||||
|
||||
// Number (decimal?) minimum
|
||||
if(this.Number < (decimal?)32.1)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Number, must be a value greater than or equal to 32.1.", new [] { "Number" });
|
||||
}
|
||||
|
||||
// Float (float?) maximum
|
||||
if(this.Float > (float?)987.6)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value less than or equal to 987.6.", new [] { "Float" });
|
||||
}
|
||||
|
||||
// Double (double?) maximum
|
||||
if(this.Double > (double?)123.4)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value less than or equal to 123.4.", new [] { "Double" });
|
||||
}
|
||||
|
||||
// Double (double?) minimum
|
||||
if(this.Double < (double?)67.8)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Double, must be a value greater than or equal to 67.8.", new [] { "Double" });
|
||||
}
|
||||
|
||||
// String (string) pattern
|
||||
Regex regexString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);
|
||||
if (false == regexString.Match(this.String).Success)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for String, must match a pattern of " + regexString, new [] { "String" });
|
||||
}
|
||||
|
||||
// PatternWithoutDelimiter (string) pattern
|
||||
Regex regexPatternWithoutDelimiter = new Regex(@"^[A-Z].*", RegexOptions.CultureInvariant);
|
||||
if (false == regexPatternWithoutDelimiter.Match(this.PatternWithoutDelimiter).Success)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithoutDelimiter, must match a pattern of " + regexPatternWithoutDelimiter, new [] { "PatternWithoutDelimiter" });
|
||||
}
|
||||
|
||||
// Password (string) maxLength
|
||||
if(this.Password != null && this.Password.Length > 64)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be less than 64.", new [] { "Password" });
|
||||
}
|
||||
|
||||
// Password (string) minLength
|
||||
if(this.Password != null && this.Password.Length < 10)
|
||||
{
|
||||
yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Password, length must be greater than 10.", new [] { "Password" });
|
||||
}
|
||||
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,186 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using PropertyChanged;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// InlineObject4
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[ImplementPropertyChanged]
|
||||
public partial class InlineObject4 : IEquatable<InlineObject4>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject4" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected InlineObject4() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject4" /> class.
|
||||
/// </summary>
|
||||
/// <param name="param">field1 (required).</param>
|
||||
/// <param name="param2">field2 (required).</param>
|
||||
public InlineObject4(string param = default(string), string param2 = default(string))
|
||||
{
|
||||
// to ensure "param" is required (not null)
|
||||
if (param == null)
|
||||
{
|
||||
throw new InvalidDataException("param is a required property for InlineObject4 and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Param = param;
|
||||
}
|
||||
// to ensure "param2" is required (not null)
|
||||
if (param2 == null)
|
||||
{
|
||||
throw new InvalidDataException("param2 is a required property for InlineObject4 and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.Param2 = param2;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// field1
|
||||
/// </summary>
|
||||
/// <value>field1</value>
|
||||
[DataMember(Name="param", EmitDefaultValue=false)]
|
||||
public string Param { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// field2
|
||||
/// </summary>
|
||||
/// <value>field2</value>
|
||||
[DataMember(Name="param2", EmitDefaultValue=false)]
|
||||
public string Param2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineObject4 {\n");
|
||||
sb.Append(" Param: ").Append(Param).Append("\n");
|
||||
sb.Append(" Param2: ").Append(Param2).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as InlineObject4);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if InlineObject4 instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of InlineObject4 to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(InlineObject4 input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.Param == input.Param ||
|
||||
(this.Param != null &&
|
||||
this.Param.Equals(input.Param))
|
||||
) &&
|
||||
(
|
||||
this.Param2 == input.Param2 ||
|
||||
(this.Param2 != null &&
|
||||
this.Param2.Equals(input.Param2))
|
||||
);
|
||||
}
|
||||
|
||||
/// <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.Param != null)
|
||||
hashCode = hashCode * 59 + this.Param.GetHashCode();
|
||||
if (this.Param2 != null)
|
||||
hashCode = hashCode * 59 + this.Param2.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property changed event handler
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Trigger when a property changed
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Property Name</param>
|
||||
public virtual void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
// NOTE: property changed is handled via "code weaving" using Fody.
|
||||
// Properties with setters are modified at compile time to notify of changes.
|
||||
var propertyChanged = PropertyChanged;
|
||||
if (propertyChanged != null)
|
||||
{
|
||||
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,178 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using PropertyChanged;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// InlineObject5
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[ImplementPropertyChanged]
|
||||
public partial class InlineObject5 : IEquatable<InlineObject5>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject5" /> class.
|
||||
/// </summary>
|
||||
[JsonConstructorAttribute]
|
||||
protected InlineObject5() { }
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineObject5" /> class.
|
||||
/// </summary>
|
||||
/// <param name="additionalMetadata">Additional data to pass to server.</param>
|
||||
/// <param name="requiredFile">file to upload (required).</param>
|
||||
public InlineObject5(string additionalMetadata = default(string), System.IO.Stream requiredFile = default(System.IO.Stream))
|
||||
{
|
||||
// to ensure "requiredFile" is required (not null)
|
||||
if (requiredFile == null)
|
||||
{
|
||||
throw new InvalidDataException("requiredFile is a required property for InlineObject5 and cannot be null");
|
||||
}
|
||||
else
|
||||
{
|
||||
this.RequiredFile = requiredFile;
|
||||
}
|
||||
this.AdditionalMetadata = additionalMetadata;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Additional data to pass to server
|
||||
/// </summary>
|
||||
/// <value>Additional data to pass to server</value>
|
||||
[DataMember(Name="additionalMetadata", EmitDefaultValue=false)]
|
||||
public string AdditionalMetadata { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// file to upload
|
||||
/// </summary>
|
||||
/// <value>file to upload</value>
|
||||
[DataMember(Name="requiredFile", EmitDefaultValue=false)]
|
||||
public System.IO.Stream RequiredFile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineObject5 {\n");
|
||||
sb.Append(" AdditionalMetadata: ").Append(AdditionalMetadata).Append("\n");
|
||||
sb.Append(" RequiredFile: ").Append(RequiredFile).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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as InlineObject5);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if InlineObject5 instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of InlineObject5 to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(InlineObject5 input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.AdditionalMetadata == input.AdditionalMetadata ||
|
||||
(this.AdditionalMetadata != null &&
|
||||
this.AdditionalMetadata.Equals(input.AdditionalMetadata))
|
||||
) &&
|
||||
(
|
||||
this.RequiredFile == input.RequiredFile ||
|
||||
(this.RequiredFile != null &&
|
||||
this.RequiredFile.Equals(input.RequiredFile))
|
||||
);
|
||||
}
|
||||
|
||||
/// <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.AdditionalMetadata != null)
|
||||
hashCode = hashCode * 59 + this.AdditionalMetadata.GetHashCode();
|
||||
if (this.RequiredFile != null)
|
||||
hashCode = hashCode * 59 + this.RequiredFile.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property changed event handler
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Trigger when a property changed
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Property Name</param>
|
||||
public virtual void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
// NOTE: property changed is handled via "code weaving" using Fody.
|
||||
// Properties with setters are modified at compile time to notify of changes.
|
||||
var propertyChanged = PropertyChanged;
|
||||
if (propertyChanged != null)
|
||||
{
|
||||
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,147 @@
|
||||
/*
|
||||
* 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: \" \\
|
||||
*
|
||||
* OpenAPI spec version: 1.0.0
|
||||
*
|
||||
* Generated by: https://github.com/openapitools/openapi-generator.git
|
||||
*/
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using PropertyChanged;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter;
|
||||
|
||||
namespace Org.OpenAPITools.Model
|
||||
{
|
||||
/// <summary>
|
||||
/// InlineResponseDefault
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[ImplementPropertyChanged]
|
||||
public partial class InlineResponseDefault : IEquatable<InlineResponseDefault>, IValidatableObject
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="InlineResponseDefault" /> class.
|
||||
/// </summary>
|
||||
/// <param name="_string">_string.</param>
|
||||
public InlineResponseDefault(Foo _string = default(Foo))
|
||||
{
|
||||
this.String = _string;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or Sets String
|
||||
/// </summary>
|
||||
[DataMember(Name="string", EmitDefaultValue=false)]
|
||||
public Foo String { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
/// </summary>
|
||||
/// <returns>String presentation of the object</returns>
|
||||
public override string ToString()
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
sb.Append("class InlineResponseDefault {\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 JsonConvert.SerializeObject(this, Formatting.Indented);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if objects are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Object to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public override bool Equals(object input)
|
||||
{
|
||||
return this.Equals(input as InlineResponseDefault);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if InlineResponseDefault instances are equal
|
||||
/// </summary>
|
||||
/// <param name="input">Instance of InlineResponseDefault to be compared</param>
|
||||
/// <returns>Boolean</returns>
|
||||
public bool Equals(InlineResponseDefault input)
|
||||
{
|
||||
if (input == null)
|
||||
return false;
|
||||
|
||||
return
|
||||
(
|
||||
this.String == input.String ||
|
||||
(this.String != null &&
|
||||
this.String.Equals(input.String))
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the hash code
|
||||
/// </summary>
|
||||
/// <returns>Hash code</returns>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked // Overflow is fine, just wrap
|
||||
{
|
||||
int hashCode = 41;
|
||||
if (this.String != null)
|
||||
hashCode = hashCode * 59 + this.String.GetHashCode();
|
||||
return hashCode;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Property changed event handler
|
||||
/// </summary>
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Trigger when a property changed
|
||||
/// </summary>
|
||||
/// <param name="propertyName">Property Name</param>
|
||||
public virtual void OnPropertyChanged(string propertyName)
|
||||
{
|
||||
// NOTE: property changed is handled via "code weaving" using Fody.
|
||||
// Properties with setters are modified at compile time to notify of changes.
|
||||
var propertyChanged = PropertyChanged;
|
||||
if (propertyChanged != null)
|
||||
{
|
||||
propertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To validate all properties of the instance
|
||||
/// </summary>
|
||||
/// <param name="validationContext">Validation context</param>
|
||||
/// <returns>Validation Result</returns>
|
||||
IEnumerable<System.ComponentModel.DataAnnotations.ValidationResult> IValidatableObject.Validate(ValidationContext validationContext)
|
||||
{
|
||||
yield break;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -66,7 +66,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// <param name="mapOfEnumString">mapOfEnumString.</param>
|
||||
/// <param name="directMap">directMap.</param>
|
||||
/// <param name="indirectMap">indirectMap.</param>
|
||||
public MapTest(Dictionary<string, Dictionary<string, string>> mapMapOfString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, InnerEnum> mapOfEnumString = default(Dictionary<string, InnerEnum>), Dictionary<string, bool?> directMap = default(Dictionary<string, bool?>), StringBooleanMap indirectMap = default(StringBooleanMap))
|
||||
public MapTest(Dictionary<string, Dictionary<string, string>> mapMapOfString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, InnerEnum> mapOfEnumString = default(Dictionary<string, InnerEnum>), Dictionary<string, bool?> directMap = default(Dictionary<string, bool?>), Dictionary<string, bool?> indirectMap = default(Dictionary<string, bool?>))
|
||||
{
|
||||
this.MapMapOfString = mapMapOfString;
|
||||
this.MapOfEnumString = mapOfEnumString;
|
||||
@ -91,7 +91,7 @@ namespace Org.OpenAPITools.Model
|
||||
/// Gets or Sets IndirectMap
|
||||
/// </summary>
|
||||
[DataMember(Name="indirect_map", EmitDefaultValue=false)]
|
||||
public StringBooleanMap IndirectMap { get; set; }
|
||||
public Dictionary<string, bool?> IndirectMap { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the string presentation of the object
|
||||
@ -156,8 +156,8 @@ namespace Org.OpenAPITools.Model
|
||||
) &&
|
||||
(
|
||||
this.IndirectMap == input.IndirectMap ||
|
||||
(this.IndirectMap != null &&
|
||||
this.IndirectMap.Equals(input.IndirectMap))
|
||||
this.IndirectMap != null &&
|
||||
this.IndirectMap.SequenceEqual(input.IndirectMap)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -1033,14 +1033,17 @@ components:
|
||||
schemas:
|
||||
Category:
|
||||
example:
|
||||
name: name
|
||||
name: default-name
|
||||
id: 6
|
||||
properties:
|
||||
id:
|
||||
format: int64
|
||||
type: integer
|
||||
name:
|
||||
default: default-name
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
xml:
|
||||
name: Category
|
||||
@ -1525,7 +1528,7 @@ components:
|
||||
name: doggie
|
||||
id: 0
|
||||
category:
|
||||
name: name
|
||||
name: default-name
|
||||
id: 6
|
||||
tags:
|
||||
- name: name
|
||||
|
@ -4,7 +4,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**Id** | **int64** | | [optional]
|
||||
**Name** | **string** | | [optional]
|
||||
**Name** | **string** | | [default to default-name]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
|
@ -11,5 +11,5 @@ package petstore
|
||||
|
||||
type Category struct {
|
||||
Id int64 `json:"id,omitempty"`
|
||||
Name string `json:"name,omitempty"`
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
@ -505,7 +505,7 @@ mkCat catClassName =
|
||||
-- | Category
|
||||
data Category = Category
|
||||
{ categoryId :: !(Maybe Integer) -- ^ "id"
|
||||
, categoryName :: !(Maybe Text) -- ^ "name"
|
||||
, categoryName :: !(Text) -- ^ /Required/ "name"
|
||||
} deriving (P.Show, P.Eq, P.Typeable)
|
||||
|
||||
-- | FromJSON Category
|
||||
@ -513,7 +513,7 @@ instance A.FromJSON Category where
|
||||
parseJSON = A.withObject "Category" $ \o ->
|
||||
Category
|
||||
<$> (o .:? "id")
|
||||
<*> (o .:? "name")
|
||||
<*> (o .: "name")
|
||||
|
||||
-- | ToJSON Category
|
||||
instance A.ToJSON Category where
|
||||
@ -526,11 +526,12 @@ instance A.ToJSON Category where
|
||||
|
||||
-- | Construct a value of type 'Category' (by applying it's required fields, if any)
|
||||
mkCategory
|
||||
:: Category
|
||||
mkCategory =
|
||||
:: Text -- ^ 'categoryName'
|
||||
-> Category
|
||||
mkCategory categoryName =
|
||||
Category
|
||||
{ categoryId = Nothing
|
||||
, categoryName = Nothing
|
||||
, categoryName
|
||||
}
|
||||
|
||||
-- ** ClassModel
|
||||
|
@ -185,7 +185,7 @@ categoryIdL f Category{..} = (\categoryId -> Category { categoryId, ..} ) <$> f
|
||||
{-# INLINE categoryIdL #-}
|
||||
|
||||
-- | 'categoryName' Lens
|
||||
categoryNameL :: Lens_' Category (Maybe Text)
|
||||
categoryNameL :: Lens_' Category (Text)
|
||||
categoryNameL f Category{..} = (\categoryName -> Category { categoryName, ..} ) <$> f categoryName
|
||||
{-# INLINE categoryNameL #-}
|
||||
|
||||
|
@ -1033,14 +1033,17 @@ components:
|
||||
schemas:
|
||||
Category:
|
||||
example:
|
||||
name: name
|
||||
name: default-name
|
||||
id: 6
|
||||
properties:
|
||||
id:
|
||||
format: int64
|
||||
type: integer
|
||||
name:
|
||||
default: default-name
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
xml:
|
||||
name: Category
|
||||
@ -1525,7 +1528,7 @@ components:
|
||||
name: doggie
|
||||
id: 0
|
||||
category:
|
||||
name: name
|
||||
name: default-name
|
||||
id: 6
|
||||
tags:
|
||||
- name: name
|
||||
|
@ -151,7 +151,7 @@ instance Arbitrary Category where
|
||||
arbitrary =
|
||||
Category
|
||||
<$> arbitrary -- categoryId :: Maybe Integer
|
||||
<*> arbitrary -- categoryName :: Maybe Text
|
||||
<*> arbitrary -- categoryName :: Text
|
||||
|
||||
instance Arbitrary ClassModel where
|
||||
arbitrary =
|
||||
|
@ -30,7 +30,7 @@ public class Category {
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
private String name = "default-name";
|
||||
|
||||
public Category id(Long id) {
|
||||
this.id = id;
|
||||
@ -59,7 +59,7 @@ public class Category {
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ public class Category {
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
private String name = "default-name";
|
||||
|
||||
public Category id(Long id) {
|
||||
this.id = id;
|
||||
@ -59,7 +59,7 @@ public class Category {
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Long** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**name** | **String** | |
|
||||
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@ public class Category {
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
private String name = "default-name";
|
||||
|
||||
public Category id(Long id) {
|
||||
this.id = id;
|
||||
@ -59,7 +59,7 @@ public class Category {
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Long** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**name** | **String** | |
|
||||
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@ public class Category {
|
||||
private Long id;
|
||||
|
||||
@JsonProperty("name")
|
||||
private String name;
|
||||
private String name = "default-name";
|
||||
|
||||
public Category id(Long id) {
|
||||
this.id = id;
|
||||
@ -59,7 +59,7 @@ public class Category {
|
||||
* Get name
|
||||
* @return name
|
||||
**/
|
||||
@ApiModelProperty(value = "")
|
||||
@ApiModelProperty(required = true, value = "")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **Long** | | [optional]
|
||||
**name** | **String** | | [optional]
|
||||
**name** | **String** | |
|
||||
|
||||
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user