diff --git a/appveyor.yml b/appveyor.yml index e14c8966489..f2fcac6c248 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -42,15 +42,6 @@ build_script: ## build C# API client (.net 5.0 with ConditionalSerialization) #- dotnet build samples\client\petstore\csharp-netcore\OpenAPIClient-ConditionalSerialization\Org.OpenAPITools.sln - ## build C# API client - #- nuget restore samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln - #- msbuild samples\client\petstore\csharp\OpenAPIClient\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - ## build C# API client (with PropertyChanged) - #- nuget restore samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln - #- msbuild samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" - # build C# .net standard 1.3+ API client - #- nuget restore samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln - #- msbuild samples\client\petstore\csharp\OpenAPIClientNetStandard\Org.OpenAPITools.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" test_script: # test c# API client (multiple frameworks) - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClientCoreAndNet47\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj @@ -69,10 +60,6 @@ test_script: - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-net5.0\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj # test C# API Client using conditional-serialization - dotnet test samples\client\petstore\csharp-netcore\OpenAPIClient-ConditionalSerialization\src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj - ## test c# API client - #- nunit3-console samples\client\petstore\csharp\OpenAPIClient\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor - ## test c# API client (with PropertyChanged) - #- nunit3-console samples\client\petstore\csharp\OpenAPIClientWithPropertyChanged\src\Org.OpenAPITools.Test\bin\Debug\Org.OpenAPITools.Test.dll --result=myresults.xml;format=AppVeyor ### TODO: Execute all generators via powershell or other # generate all petstore clients diff --git a/bin/configs/csharp-OpenAPIClient.yaml b/bin/configs/csharp-OpenAPIClient.yaml deleted file mode 100644 index 5855eb4a350..00000000000 --- a/bin/configs/csharp-OpenAPIClient.yaml +++ /dev/null @@ -1,6 +0,0 @@ -generatorName: csharp -outputDir: samples/client/petstore/csharp/OpenAPIClient -inputSpec: modules/openapi-generator/src/test/resources/3_0/petstore-with-fake-endpoints-models-for-testing.yaml -templateDir: modules/openapi-generator/src/main/resources/csharp -additionalProperties: - packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' diff --git a/bin/configs/unmaintained/csharp-OpenAPIClientNet35.yaml b/bin/configs/unmaintained/csharp-OpenAPIClientNet35.yaml deleted file mode 100644 index c308c2ceed9..00000000000 --- a/bin/configs/unmaintained/csharp-OpenAPIClientNet35.yaml +++ /dev/null @@ -1,7 +0,0 @@ -generatorName: csharp -outputDir: samples/client/petstore/csharp/OpenAPIClientNet35 -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -templateDir: modules/openapi-generator/src/main/resources/csharp -additionalProperties: - targetFramework: v3.5 - packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' diff --git a/bin/configs/unmaintained/csharp-OpenAPIClientNet40.yaml b/bin/configs/unmaintained/csharp-OpenAPIClientNet40.yaml deleted file mode 100644 index bd5d7cf794e..00000000000 --- a/bin/configs/unmaintained/csharp-OpenAPIClientNet40.yaml +++ /dev/null @@ -1,7 +0,0 @@ -generatorName: csharp -outputDir: samples/client/petstore/csharp/OpenAPIClientNet40 -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -templateDir: modules/openapi-generator/src/main/resources/csharp -additionalProperties: - targetFramework: v4.0 - packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' diff --git a/bin/configs/unmaintained/csharp-OpenAPIClientNetCoreProject.yaml b/bin/configs/unmaintained/csharp-OpenAPIClientNetCoreProject.yaml deleted file mode 100644 index e9fca548604..00000000000 --- a/bin/configs/unmaintained/csharp-OpenAPIClientNetCoreProject.yaml +++ /dev/null @@ -1,8 +0,0 @@ -generatorName: csharp -outputDir: samples/client/petstore/csharp/OpenAPIClientNetCoreProject -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -templateDir: modules/openapi-generator/src/main/resources/csharp -additionalProperties: - targetFramework: netstandard1.3 - packageGuid: '{67035b31-f8e5-41a4-9673-954035084f7d}' - netCoreProjectFile: "true" diff --git a/bin/configs/unmaintained/csharp-OpenAPIClientNetStandard.yaml b/bin/configs/unmaintained/csharp-OpenAPIClientNetStandard.yaml deleted file mode 100644 index b4f72b50b28..00000000000 --- a/bin/configs/unmaintained/csharp-OpenAPIClientNetStandard.yaml +++ /dev/null @@ -1,7 +0,0 @@ -generatorName: csharp -outputDir: samples/client/petstore/csharp/OpenAPIClientNetStandard -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -templateDir: modules/openapi-generator/src/main/resources/csharp -additionalProperties: - targetFramework: netstandard1.3 - packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}' diff --git a/bin/configs/unmaintained/csharp-OpenAPIClientWithPropertyChanged.yaml b/bin/configs/unmaintained/csharp-OpenAPIClientWithPropertyChanged.yaml deleted file mode 100644 index d5e7325510f..00000000000 --- a/bin/configs/unmaintained/csharp-OpenAPIClientWithPropertyChanged.yaml +++ /dev/null @@ -1,8 +0,0 @@ -generatorName: csharp -outputDir: samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged -inputSpec: modules/openapi-generator/src/test/resources/2_0/petstore-with-fake-endpoints-models-for-testing.yaml -templateDir: modules/openapi-generator/src/main/resources/csharp -additionalProperties: - packageGuid: '{5CD900DE-8266-412F-A758-28E1F9C623D5}' - generatePropertyChanged: "true" - optionalEmitDefaultValues: "true" diff --git a/docs/generators.md b/docs/generators.md index c36524639d2..be5dbba7348 100644 --- a/docs/generators.md +++ b/docs/generators.md @@ -18,7 +18,6 @@ The following generators are available: * [cpp-tizen](generators/cpp-tizen.md) * [cpp-ue4 (beta)](generators/cpp-ue4.md) * [crystal (beta)](generators/crystal.md) -* [csharp](generators/csharp.md) * [csharp-netcore](generators/csharp-netcore.md) * [dart](generators/dart.md) * [dart-dio](generators/dart-dio.md) diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md deleted file mode 100644 index 54e15181d8b..00000000000 --- a/docs/generators/csharp.md +++ /dev/null @@ -1,318 +0,0 @@ ---- -title: Documentation for the csharp Generator ---- - -## METADATA - -| Property | Value | Notes | -| -------- | ----- | ----- | -| generator name | csharp | pass this to the generate command after -g | -| generator stability | STABLE | | -| generator type | CLIENT | | -| generator language | C# | | -| generator default templating engine | mustache | | -| helpTxt | Generates a CSharp client library. | | - -## CONFIG OPTIONS -These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details. - -| Option | Description | Values | Default | -| ------ | ----------- | ------ | ------- | -|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false| -|caseInsensitiveResponseHeaders|Make API response's headers case-insensitive| |false| -|generatePropertyChanged|Specifies a AssemblyDescription for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |false| -|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true| -|interfacePrefix|Prefix interfaces with a community standard or widely accepted prefix.| |I| -|modelPropertyNaming|Naming convention for the property: 'camelCase', 'PascalCase', 'snake_case' and 'original', which keeps the original name| |PascalCase| -|netCoreProjectFile|Use the new format (.NET Core) for .NET project files (.csproj).| |false| -|nonPublicApi|Generates code with reduced access modifiers; allows embedding elsewhere without exposing non-public API calls to consumers.| |false| -|optionalAssemblyInfo|Generate AssemblyInfo.cs.| |true| -|optionalEmitDefaultValues|Set DataMember's EmitDefaultValue.| |false| -|optionalMethodArgument|C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).| |true| -|optionalProjectFile|Generate {PackageName}.csproj.| |true| -|packageGuid|The GUID that will be associated with the C# project| |null| -|packageName|C# package name (convention: Title.Case).| |Org.OpenAPITools| -|packageVersion|C# package version.| |1.0.0| -|returnICollection|Return ICollection<T> instead of the concrete type.| |false| -|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |true| -|sourceFolder|source folder for generated code| |src| -|targetFramework|The target .NET framework version. To target multiple frameworks, use `;` as the separator, e.g. `netstandard2.1;netcoreapp3.1`|
**v3.5**
.NET Framework 3.5 compatible
**v4.0**
.NET Framework 4.0 compatible
**v4.5**
.NET Framework 4.5 compatible
**v4.5.2**
.NET Framework 4.5.2+ compatible
**netstandard1.3**
.NET Standard 1.3 compatible (DEPRECATED. Please use `csharp-netcore` generator instead)
**uwp**
Universal Windows Platform (DEPRECATED. Please use `csharp-netcore` generator instead)
|v4.5| -|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false| -|useCompareNetObjects|Use KellermanSoftware.CompareNetObjects for deep recursive object comparison. WARNING: this option incurs potential performance impact.| |false| -|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false| -|validatable|Generates self-validatable models.| |true| - -## IMPORT MAPPING - -| Type/Alias | Imports | -| ---------- | ------- | - - -## INSTANTIATION TYPES - -| Type/Alias | Instantiated By | -| ---------- | --------------- | -|array|List| -|list|List| -|map|Dictionary| - - -## LANGUAGE PRIMITIVES - - - -## RESERVED WORDS - - - -## FEATURE SET - - -### Client Modification Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasePath|✓|ToolingExtension -|Authorizations|✗|ToolingExtension -|UserAgent|✓|ToolingExtension -|MockServer|✗|ToolingExtension - -### Data Type Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Custom|✗|OAS2,OAS3 -|Int32|✓|OAS2,OAS3 -|Int64|✓|OAS2,OAS3 -|Float|✓|OAS2,OAS3 -|Double|✓|OAS2,OAS3 -|Decimal|✓|ToolingExtension -|String|✓|OAS2,OAS3 -|Byte|✓|OAS2,OAS3 -|Binary|✓|OAS2,OAS3 -|Boolean|✓|OAS2,OAS3 -|Date|✓|OAS2,OAS3 -|DateTime|✓|OAS2,OAS3 -|Password|✓|OAS2,OAS3 -|File|✓|OAS2 -|Uuid|✗| -|Array|✓|OAS2,OAS3 -|Null|✗|OAS3 -|AnyType|✗|OAS2,OAS3 -|Object|✓|OAS2,OAS3 -|Maps|✓|ToolingExtension -|CollectionFormat|✓|OAS2 -|CollectionFormatMulti|✓|OAS2 -|Enum|✓|OAS2,OAS3 -|ArrayOfEnum|✓|ToolingExtension -|ArrayOfModel|✓|ToolingExtension -|ArrayOfCollectionOfPrimitives|✓|ToolingExtension -|ArrayOfCollectionOfModel|✓|ToolingExtension -|ArrayOfCollectionOfEnum|✓|ToolingExtension -|MapOfEnum|✓|ToolingExtension -|MapOfModel|✓|ToolingExtension -|MapOfCollectionOfPrimitives|✓|ToolingExtension -|MapOfCollectionOfModel|✓|ToolingExtension -|MapOfCollectionOfEnum|✓|ToolingExtension - -### Documentation Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Readme|✓|ToolingExtension -|Model|✓|ToolingExtension -|Api|✓|ToolingExtension - -### Global Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Host|✓|OAS2,OAS3 -|BasePath|✓|OAS2,OAS3 -|Info|✓|OAS2,OAS3 -|Schemes|✗|OAS2,OAS3 -|PartialSchemes|✓|OAS2,OAS3 -|Consumes|✓|OAS2 -|Produces|✓|OAS2 -|ExternalDocumentation|✓|OAS2,OAS3 -|Examples|✓|OAS2,OAS3 -|XMLStructureDefinitions|✗|OAS2,OAS3 -|MultiServer|✗|OAS3 -|ParameterizedServer|✗|OAS3 -|ParameterStyling|✗|OAS3 -|Callbacks|✗|OAS3 -|LinkObjects|✗|OAS3 - -### Parameter Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Path|✓|OAS2,OAS3 -|Query|✓|OAS2,OAS3 -|Header|✓|OAS2,OAS3 -|Body|✓|OAS2 -|FormUnencoded|✓|OAS2 -|FormMultipart|✓|OAS2 -|Cookie|✗|OAS3 - -### Schema Support Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|Simple|✓|OAS2,OAS3 -|Composite|✓|OAS2,OAS3 -|Polymorphism|✓|OAS2,OAS3 -|Union|✗|OAS3 -|allOf|✗|OAS2,OAS3 -|anyOf|✗|OAS3 -|oneOf|✗|OAS3 -|not|✗|OAS3 - -### Security Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|BasicAuth|✓|OAS2,OAS3 -|ApiKey|✓|OAS2,OAS3 -|OpenIDConnect|✗|OAS3 -|BearerToken|✗|OAS3 -|OAuth2_Implicit|✓|OAS2,OAS3 -|OAuth2_Password|✗|OAS2,OAS3 -|OAuth2_ClientCredentials|✗|OAS2,OAS3 -|OAuth2_AuthorizationCode|✗|OAS2,OAS3 -|SignatureAuth|✗|OAS3 - -### Wire Format Feature -| Name | Supported | Defined By | -| ---- | --------- | ---------- | -|JSON|✓|OAS2,OAS3 -|XML|✓|OAS2,OAS3 -|PROTOBUF|✗|ToolingExtension -|Custom|✗|OAS2,OAS3 diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java deleted file mode 100644 index 4960f7b9219..00000000000 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java +++ /dev/null @@ -1,986 +0,0 @@ -/* - * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - * Copyright 2018 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.openapitools.codegen.languages; - -import com.google.common.collect.ImmutableMap; -import com.samskivert.mustache.Mustache; -import io.swagger.v3.oas.models.media.ArraySchema; -import io.swagger.v3.oas.models.media.Schema; -import org.openapitools.codegen.*; -import org.openapitools.codegen.meta.features.*; -import org.openapitools.codegen.utils.ModelUtils; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import java.io.File; -import java.util.*; - -import static org.apache.commons.lang3.StringUtils.isEmpty; -import static org.openapitools.codegen.utils.CamelizeOption.LOWERCASE_FIRST_LETTER; -import static org.openapitools.codegen.utils.StringUtils.camelize; -import static org.openapitools.codegen.utils.StringUtils.underscore; - -public class CSharpClientCodegen extends AbstractCSharpCodegen { - @SuppressWarnings("hiding") - private final Logger LOGGER = LoggerFactory.getLogger(CSharpClientCodegen.class); - private static final String NUNIT = "nunit"; - private static final String RESTSHARP = "restsharp"; - private static final String NEWTONSOFT_JSON = "newtonsoft-json"; - private static final String JSON_SUBTYPES = "json-subtypes"; - private static final String FODY = "fody"; - private static final String PROPERTYCHANGED_FODY = "propertychanged-fody"; - private static final String NET452 = "v4.5.2"; - private static final String NET45 = "v4.5"; - private static final String NET40 = "v4.0"; - private static final String NET35 = "v3.5"; - private static final String NETSTANDARD = "netstandard1.3"; - private static final String UWP = "uwp"; - - // Defines the sdk option for targeted frameworks, which differs from targetFramework and targetFrameworkNuget - private static final String MCS_NET_VERSION_KEY = "x-mcs-sdk"; - - protected String packageGuid = "{" + java.util.UUID.randomUUID().toString().toUpperCase(Locale.ROOT) + "}"; - protected String clientPackage = "Org.OpenAPITools.Client"; - protected String apiDocPath = "docs/"; - protected String modelDocPath = "docs/"; - - // Defines TargetFrameworkVersion in csproj files - protected String targetFramework = NET45; - - // Defines nuget identifiers for target framework - protected String targetFrameworkNuget = "net45"; - protected boolean supportsAsync = Boolean.TRUE; - protected boolean supportsUWP = Boolean.FALSE; - protected boolean netStandard = Boolean.FALSE; - protected boolean generatePropertyChanged = Boolean.FALSE; - - protected boolean validatable = Boolean.TRUE; - protected Map regexModifiers; - protected final Map frameworks; - - // By default, generated code is considered public - protected boolean nonPublicApi = Boolean.FALSE; - - // use KellermanSoftware.CompareNetObjects for deep recursive object comparison - protected boolean useCompareNetObjects = Boolean.FALSE; - - // To make API response's headers dictionary case insensitive - protected boolean caseInsensitiveResponseHeaders = Boolean.FALSE; - - public CSharpClientCodegen() { - super(); - - modifyFeatureSet(features -> features - .includeDocumentationFeatures(DocumentationFeature.Readme) - .securityFeatures(EnumSet.of( - SecurityFeature.OAuth2_Implicit, - SecurityFeature.BasicAuth, - SecurityFeature.ApiKey - )) - .excludeGlobalFeatures( - GlobalFeature.XMLStructureDefinitions, - GlobalFeature.Callbacks, - GlobalFeature.LinkObjects, - GlobalFeature.ParameterStyling - ) - .includeSchemaSupportFeatures( - SchemaSupportFeature.Polymorphism - ) - .excludeParameterFeatures( - ParameterFeature.Cookie - ) - .includeClientModificationFeatures( - ClientModificationFeature.BasePath, - ClientModificationFeature.UserAgent - ) - ); - - supportsInheritance = true; - modelTemplateFiles.put("model.mustache", ".cs"); - apiTemplateFiles.put("api.mustache", ".cs"); - - modelDocTemplateFiles.put("model_doc.mustache", ".md"); - apiDocTemplateFiles.put("api_doc.mustache", ".md"); - - hideGenerationTimestamp = Boolean.TRUE; - - cliOptions.clear(); - - typeMapping.put("boolean", "bool"); - typeMapping.put("integer", "int"); - typeMapping.put("long", "long"); - typeMapping.put("UnsignedInteger", "uint"); - typeMapping.put("UnsignedLong", "ulong"); - typeMapping.put("float", "float"); - typeMapping.put("double", "double"); - typeMapping.put("number", "decimal"); - typeMapping.put("decimal", "decimal"); - typeMapping.put("DateTime", "DateTime"); - typeMapping.put("date", "DateTime"); - typeMapping.put("UUID", "Guid"); - typeMapping.put("URI", "string"); - - setSupportNullable(Boolean.TRUE); - - // CLI options - addOption(CodegenConstants.PACKAGE_NAME, - "C# package name (convention: Title.Case).", - this.packageName); - - addOption(CodegenConstants.PACKAGE_VERSION, - "C# package version.", - this.packageVersion); - - addOption(CodegenConstants.SOURCE_FOLDER, - CodegenConstants.SOURCE_FOLDER_DESC, - sourceFolder); - - addOption(CodegenConstants.OPTIONAL_PROJECT_GUID, - CodegenConstants.OPTIONAL_PROJECT_GUID_DESC, - null); - - addOption(CodegenConstants.INTERFACE_PREFIX, - CodegenConstants.INTERFACE_PREFIX_DESC, - interfacePrefix); - - CliOption framework = new CliOption( - CodegenConstants.DOTNET_FRAMEWORK, - CodegenConstants.DOTNET_FRAMEWORK_DESC - ); - frameworks = new ImmutableMap.Builder() - .put(NET35, ".NET Framework 3.5 compatible") - .put(NET40, ".NET Framework 4.0 compatible") - .put(NET45, ".NET Framework 4.5 compatible") - .put(NET452, ".NET Framework 4.5.2+ compatible") - .put(NETSTANDARD, ".NET Standard 1.3 compatible (DEPRECATED. Please use `csharp-netcore` generator instead)") - .put(UWP, "Universal Windows Platform (DEPRECATED. Please use `csharp-netcore` generator instead)") - .build(); - framework.defaultValue(this.targetFramework); - framework.setEnum(frameworks); - cliOptions.add(framework); - - CliOption modelPropertyNaming = new CliOption(CodegenConstants.MODEL_PROPERTY_NAMING, CodegenConstants.MODEL_PROPERTY_NAMING_DESC); - cliOptions.add(modelPropertyNaming.defaultValue("PascalCase")); - - // CLI Switches - addSwitch(CodegenConstants.HIDE_GENERATION_TIMESTAMP, - CodegenConstants.HIDE_GENERATION_TIMESTAMP_DESC, - this.hideGenerationTimestamp); - - addSwitch(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, - CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG_DESC, - this.sortParamsByRequiredFlag); - - addSwitch(CodegenConstants.USE_DATETIME_OFFSET, - CodegenConstants.USE_DATETIME_OFFSET_DESC, - this.useDateTimeOffsetFlag); - - addSwitch(CodegenConstants.USE_COLLECTION, - CodegenConstants.USE_COLLECTION_DESC, - this.useCollection); - - addSwitch(CodegenConstants.RETURN_ICOLLECTION, - CodegenConstants.RETURN_ICOLLECTION_DESC, - this.returnICollection); - - addSwitch(CodegenConstants.OPTIONAL_METHOD_ARGUMENT, - "C# Optional method argument, e.g. void square(int x=10) (.net 4.0+ only).", - this.optionalMethodArgumentFlag); - - addSwitch(CodegenConstants.OPTIONAL_ASSEMBLY_INFO, - CodegenConstants.OPTIONAL_ASSEMBLY_INFO_DESC, - this.optionalAssemblyInfoFlag); - - addSwitch(CodegenConstants.OPTIONAL_EMIT_DEFAULT_VALUES, - CodegenConstants.OPTIONAL_EMIT_DEFAULT_VALUES_DESC, - this.optionalEmitDefaultValuesFlag); - - addSwitch(CodegenConstants.OPTIONAL_PROJECT_FILE, - CodegenConstants.OPTIONAL_PROJECT_FILE_DESC, - this.optionalProjectFileFlag); - - addSwitch(CodegenConstants.GENERATE_PROPERTY_CHANGED, - CodegenConstants.PACKAGE_DESCRIPTION_DESC, - this.generatePropertyChanged); - - // NOTE: This will reduce visibility of all public members in templates. Users can use InternalsVisibleTo - // https://msdn.microsoft.com/en-us/library/system.runtime.compilerservices.internalsvisibletoattribute(v=vs.110).aspx - // to expose to shared code if the generated code is not embedded into another project. Otherwise, users of codegen - // should rely on default public visibility. - addSwitch(CodegenConstants.NON_PUBLIC_API, - CodegenConstants.NON_PUBLIC_API_DESC, - this.nonPublicApi); - - addSwitch(CodegenConstants.ALLOW_UNICODE_IDENTIFIERS, - CodegenConstants.ALLOW_UNICODE_IDENTIFIERS_DESC, - this.allowUnicodeIdentifiers); - - addSwitch(CodegenConstants.NETCORE_PROJECT_FILE, - CodegenConstants.NETCORE_PROJECT_FILE_DESC, - this.netCoreProjectFileFlag); - - addSwitch(CodegenConstants.VALIDATABLE, - CodegenConstants.VALIDATABLE_DESC, - this.validatable); - - addSwitch(CodegenConstants.USE_COMPARE_NET_OBJECTS, - CodegenConstants.USE_COMPARE_NET_OBJECTS_DESC, - this.useCompareNetObjects); - - addSwitch(CodegenConstants.CASE_INSENSITIVE_RESPONSE_HEADERS, - CodegenConstants.CASE_INSENSITIVE_RESPONSE_HEADERS_DESC, - this.caseInsensitiveResponseHeaders); - - regexModifiers = new HashMap(); - regexModifiers.put('i', "IgnoreCase"); - regexModifiers.put('m', "Multiline"); - regexModifiers.put('s', "Singleline"); - regexModifiers.put('x', "IgnorePatternWhitespace"); - } - - @Override - public void processOpts() { - super.processOpts(); - - /* - * NOTE: When supporting boolean additionalProperties, you should read the value and write it back as a boolean. - * This avoids oddities where additionalProperties contains "false" rather than false, which will cause the - * templating engine to behave unexpectedly. - * - * Use the pattern: - * if (additionalProperties.containsKey(prop)) convertPropertyToBooleanAndWriteBack(prop); - */ - - if (additionalProperties.containsKey(CodegenConstants.MODEL_PROPERTY_NAMING)) { - setModelPropertyNaming((String) additionalProperties.get(CodegenConstants.MODEL_PROPERTY_NAMING)); - } - - - if (isEmpty(apiPackage)) { - setApiPackage("Api"); - } - if (isEmpty(modelPackage)) { - setModelPackage("Model"); - } - clientPackage = "Client"; - - Boolean excludeTests = false; - if (additionalProperties.containsKey(CodegenConstants.EXCLUDE_TESTS)) { - excludeTests = convertPropertyToBooleanAndWriteBack(CodegenConstants.EXCLUDE_TESTS); - } - - if (additionalProperties.containsKey(CodegenConstants.VALIDATABLE)) { - setValidatable(convertPropertyToBooleanAndWriteBack(CodegenConstants.VALIDATABLE)); - } else { - additionalProperties.put(CodegenConstants.VALIDATABLE, validatable); - } - - if (additionalProperties.containsKey(CodegenConstants.DOTNET_FRAMEWORK)) { - setTargetFramework((String) additionalProperties.get(CodegenConstants.DOTNET_FRAMEWORK)); - } else { - // Ensure default is set. - setTargetFramework(NET45); - additionalProperties.put(CodegenConstants.DOTNET_FRAMEWORK, this.targetFramework); - } - - if (NET35.equals(this.targetFramework)) { - // This is correct, mono will require you build .NET 3.5 sources using 4.0 SDK - additionalProperties.put(MCS_NET_VERSION_KEY, "4"); - additionalProperties.put("net35", true); - if (additionalProperties.containsKey(CodegenConstants.SUPPORTS_ASYNC)) { - LOGGER.warn(".NET 3.5 generator does not support async."); - additionalProperties.remove(CodegenConstants.SUPPORTS_ASYNC); - } - - setTargetFrameworkNuget("net35"); - setValidatable(Boolean.FALSE); - setSupportsAsync(Boolean.FALSE); - } else if (NETSTANDARD.equals(this.targetFramework)) { - LOGGER.warn(".NET Standard 1.3 support has been DEPRECATED in this generator. Please use `csharp-netcore` generator instead."); - additionalProperties.put(MCS_NET_VERSION_KEY, "4.6-api"); - if (additionalProperties.containsKey("supportsUWP")) { - LOGGER.warn(".NET {} generator does not support UWP.", NETSTANDARD); - additionalProperties.remove("supportsUWP"); - } - - setTargetFrameworkNuget("netstandard1.3"); - setSupportsAsync(Boolean.TRUE); - setSupportsUWP(Boolean.FALSE); - setNetStandard(Boolean.TRUE); - - //Tests not yet implemented for .NET Standard codegen - //Todo implement it - excludeTests = true; - } else if (UWP.equals(this.targetFramework)) { - LOGGER.warn("UWP support has been DEPRECATED in this generator. Please use `csharp-netcore` generator instead."); - // TODO: NETSTANDARD here is misrepresenting a PCL v5.0 which supports .NET Framework 4.6+, .NET Core 1.0, and Windows Universal 10.0 - setTargetFrameworkNuget("uwp"); - setSupportsAsync(Boolean.TRUE); - setSupportsUWP(Boolean.TRUE); - } else if (NET40.equals(this.targetFramework)) { - additionalProperties.put(MCS_NET_VERSION_KEY, "4"); - if (additionalProperties.containsKey(CodegenConstants.SUPPORTS_ASYNC)) { - LOGGER.warn(".NET {} generator does not support async.", NET40); - additionalProperties.remove(CodegenConstants.SUPPORTS_ASYNC); - } - - setTargetFrameworkNuget("net40"); - setSupportsAsync(Boolean.FALSE); - } else if (NET452.equals(this.targetFramework)) { - additionalProperties.put(MCS_NET_VERSION_KEY, "4.5.2-api"); - setTargetFrameworkNuget("net452"); - setSupportsAsync(Boolean.TRUE); - } else { - additionalProperties.put(MCS_NET_VERSION_KEY, "4.5.2-api"); - setTargetFrameworkNuget("net45"); - setSupportsAsync(Boolean.TRUE); - } - - if (additionalProperties.containsKey(CodegenConstants.GENERATE_PROPERTY_CHANGED)) { - if (NET35.equals(targetFramework)) { - LOGGER.warn("{} is only supported by generated code for .NET 4+.", CodegenConstants.GENERATE_PROPERTY_CHANGED); - additionalProperties.remove(CodegenConstants.GENERATE_PROPERTY_CHANGED); - } else if (NETSTANDARD.equals(targetFramework)) { - LOGGER.warn("{} is not supported in .NET Standard generated code.", CodegenConstants.GENERATE_PROPERTY_CHANGED); - additionalProperties.remove(CodegenConstants.GENERATE_PROPERTY_CHANGED); - } else if (Boolean.TRUE.equals(netCoreProjectFileFlag)) { - LOGGER.warn("{} is not supported in .NET Core csproj project format.", CodegenConstants.GENERATE_PROPERTY_CHANGED); - additionalProperties.remove(CodegenConstants.GENERATE_PROPERTY_CHANGED); - } else { - setGeneratePropertyChanged(convertPropertyToBooleanAndWriteBack(CodegenConstants.GENERATE_PROPERTY_CHANGED)); - } - } - - additionalProperties.put(CodegenConstants.API_PACKAGE, apiPackage); - additionalProperties.put(CodegenConstants.MODEL_PACKAGE, modelPackage); - additionalProperties.put("clientPackage", clientPackage); - - additionalProperties.put(CodegenConstants.EXCLUDE_TESTS, excludeTests); - additionalProperties.put(CodegenConstants.VALIDATABLE, this.validatable); - additionalProperties.put(CodegenConstants.SUPPORTS_ASYNC, this.supportsAsync); - additionalProperties.put("supportsUWP", this.supportsUWP); - additionalProperties.put("netStandard", this.netStandard); - additionalProperties.put("targetFrameworkNuget", this.targetFrameworkNuget); - - if (additionalProperties.containsKey(CodegenConstants.OPTIONAL_PROJECT_FILE)) { - setOptionalProjectFileFlag(convertPropertyToBooleanAndWriteBack(CodegenConstants.OPTIONAL_PROJECT_FILE)); - } else { - additionalProperties.put(CodegenConstants.OPTIONAL_PROJECT_FILE, optionalProjectFileFlag); - } - - if (additionalProperties.containsKey(CodegenConstants.OPTIONAL_PROJECT_GUID)) { - setPackageGuid((String) additionalProperties.get(CodegenConstants.OPTIONAL_PROJECT_GUID)); - } else { - additionalProperties.put(CodegenConstants.OPTIONAL_PROJECT_GUID, packageGuid); - } - - if (additionalProperties.containsKey(CodegenConstants.OPTIONAL_METHOD_ARGUMENT)) { - setOptionalMethodArgumentFlag(convertPropertyToBooleanAndWriteBack(CodegenConstants.OPTIONAL_METHOD_ARGUMENT)); - } else { - additionalProperties.put(CodegenConstants.OPTIONAL_METHOD_ARGUMENT, optionalMethodArgumentFlag); - } - - if (additionalProperties.containsKey(CodegenConstants.OPTIONAL_ASSEMBLY_INFO)) { - setOptionalAssemblyInfoFlag(convertPropertyToBooleanAndWriteBack(CodegenConstants.OPTIONAL_ASSEMBLY_INFO)); - } else { - additionalProperties.put(CodegenConstants.OPTIONAL_ASSEMBLY_INFO, optionalAssemblyInfoFlag); - } - - if (additionalProperties.containsKey(CodegenConstants.OPTIONAL_EMIT_DEFAULT_VALUES)) { - setOptionalEmitDefaultValuesFlag(convertPropertyToBooleanAndWriteBack(CodegenConstants.OPTIONAL_EMIT_DEFAULT_VALUES)); - } else { - additionalProperties.put(CodegenConstants.OPTIONAL_EMIT_DEFAULT_VALUES, optionalEmitDefaultValuesFlag); - } - - if (additionalProperties.containsKey(CodegenConstants.NON_PUBLIC_API)) { - setNonPublicApi(convertPropertyToBooleanAndWriteBack(CodegenConstants.NON_PUBLIC_API)); - } else { - additionalProperties.put(CodegenConstants.NON_PUBLIC_API, isNonPublicApi()); - } - - final String testPackageName = testPackageName(); - String packageFolder = sourceFolder + File.separator + packageName; - String clientPackageDir = packageFolder + File.separator + clientPackage; - String testPackageFolder = testFolder + File.separator + testPackageName; - - additionalProperties.put("testPackageName", testPackageName); - - //Compute the relative path to the bin directory where the external assemblies live - //This is necessary to properly generate the project file - int packageDepth = packageFolder.length() - packageFolder.replace(java.io.File.separator, "").length(); - String binRelativePath = "..\\"; - for (int i = 0; i < packageDepth; i = i + 1) - binRelativePath += "..\\"; - binRelativePath += "vendor"; - additionalProperties.put("binRelativePath", binRelativePath); - - supportingFiles.add(new SupportingFile("IApiAccessor.mustache", - clientPackageDir, "IApiAccessor.cs")); - supportingFiles.add(new SupportingFile("Configuration.mustache", - clientPackageDir, "Configuration.cs")); - supportingFiles.add(new SupportingFile("ApiClient.mustache", - clientPackageDir, "ApiClient.cs")); - supportingFiles.add(new SupportingFile("ApiException.mustache", - clientPackageDir, "ApiException.cs")); - supportingFiles.add(new SupportingFile("ApiResponse.mustache", - clientPackageDir, "ApiResponse.cs")); - supportingFiles.add(new SupportingFile("ExceptionFactory.mustache", - clientPackageDir, "ExceptionFactory.cs")); - supportingFiles.add(new SupportingFile("OpenAPIDateConverter.mustache", - clientPackageDir, "OpenAPIDateConverter.cs")); - - if (NET40.equals(this.targetFramework)) { - // .net 4.0 doesn't include ReadOnlyDictionary… - supportingFiles.add(new SupportingFile("ReadOnlyDictionary.mustache", - clientPackageDir, "ReadOnlyDictionary.cs")); - } - - if (Boolean.FALSE.equals(this.netStandard) && Boolean.FALSE.equals(this.netCoreProjectFileFlag)) { - supportingFiles.add(new SupportingFile("compile.mustache", "", "build.bat")); - supportingFiles.add(new SupportingFile("compile-mono.sh.mustache", "", "build.sh")); - - // copy package.config to nuget's standard location for project-level installs - supportingFiles.add(new SupportingFile("packages.config.mustache", packageFolder + File.separator, "packages.config")); - // .travis.yml for travis-ci.org CI - supportingFiles.add(new SupportingFile("travis.mustache", "", ".travis.yml")); - } else if (Boolean.FALSE.equals(this.netCoreProjectFileFlag)) { - supportingFiles.add(new SupportingFile("project.json.mustache", packageFolder + File.separator, "project.json")); - } - - supportingFiles.add(new SupportingFile("IReadableConfiguration.mustache", - clientPackageDir, "IReadableConfiguration.cs")); - supportingFiles.add(new SupportingFile("GlobalConfiguration.mustache", - clientPackageDir, "GlobalConfiguration.cs")); - - // Only write out test related files if excludeTests is unset or explicitly set to false (see start of this method) - if (Boolean.FALSE.equals(excludeTests)) { - // shell script to run the nunit test - supportingFiles.add(new SupportingFile("mono_nunit_test.mustache", "", "mono_nunit_test.sh")); - - modelTestTemplateFiles.put("model_test.mustache", ".cs"); - apiTestTemplateFiles.put("api_test.mustache", ".cs"); - - if (Boolean.FALSE.equals(this.netCoreProjectFileFlag)) { - supportingFiles.add(new SupportingFile("packages_test.config.mustache", testPackageFolder + File.separator, "packages.config")); - } - - if (NET40.equals(this.targetFramework)) { - // Include minimal tests for modifications made to JsonSubTypes, since code is quite different for .net 4.0 from original implementation - supportingFiles.add(new SupportingFile("JsonSubTypesTests.mustache", - testPackageFolder + File.separator + "Client", - "JsonSubTypesTests.cs")); - } - } - - if (Boolean.TRUE.equals(generatePropertyChanged)) { - supportingFiles.add(new SupportingFile("FodyWeavers.xml", packageFolder, "FodyWeavers.xml")); - } - - supportingFiles.add(new SupportingFile("README.mustache", "", "README.md")); - supportingFiles.add(new SupportingFile("git_push.sh.mustache", "", "git_push.sh")); - supportingFiles.add(new SupportingFile("gitignore.mustache", "", ".gitignore")); - - if (optionalAssemblyInfoFlag && Boolean.FALSE.equals(this.netCoreProjectFileFlag)) { - supportingFiles.add(new SupportingFile("AssemblyInfo.mustache", packageFolder + File.separator + "Properties", "AssemblyInfo.cs")); - } - if (optionalProjectFileFlag) { - supportingFiles.add(new SupportingFile("Solution.mustache", "", packageName + ".sln")); - - if (Boolean.TRUE.equals(this.netCoreProjectFileFlag)) { - supportingFiles.add(new SupportingFile("netcore_project.mustache", packageFolder, packageName + ".csproj")); - } else { - supportingFiles.add(new SupportingFile("Project.mustache", packageFolder, packageName + ".csproj")); - if (Boolean.FALSE.equals(this.netStandard)) { - supportingFiles.add(new SupportingFile("nuspec.mustache", packageFolder, packageName + ".nuspec")); - } - } - - if (Boolean.FALSE.equals(excludeTests)) { - // NOTE: This exists here rather than previous excludeTests block because the test project is considered an optional project file. - if (Boolean.TRUE.equals(this.netCoreProjectFileFlag)) { - supportingFiles.add(new SupportingFile("netcore_testproject.mustache", testPackageFolder, testPackageName + ".csproj")); - } else { - supportingFiles.add(new SupportingFile("TestProject.mustache", testPackageFolder, testPackageName + ".csproj")); - } - } - } - - additionalProperties.put("apiDocPath", apiDocPath); - additionalProperties.put("modelDocPath", modelDocPath); - } - - public void setModelPropertyNaming(String naming) { - if ("original".equals(naming) || "camelCase".equals(naming) || - "PascalCase".equals(naming) || "snake_case".equals(naming)) { - this.modelPropertyNaming = naming; - } else { - throw new IllegalArgumentException("Invalid model property naming '" + - naming + "'. Must be 'original', 'camelCase', " + - "'PascalCase' or 'snake_case'"); - } - } - - public String getModelPropertyNaming() { - return this.modelPropertyNaming; - } - - @Override - public CodegenType getTag() { - return CodegenType.CLIENT; - } - - @Override - public String getName() { - return "csharp"; - } - - @Override - public String getHelp() { - return "Generates a CSharp client library."; - } - - public void setOptionalAssemblyInfoFlag(boolean flag) { - this.optionalAssemblyInfoFlag = flag; - } - - public void setOptionalEmitDefaultValuesFlag(boolean flag) { - this.optionalEmitDefaultValuesFlag = flag; - } - - @Override - public CodegenModel fromModel(String name, Schema model) { - Map allDefinitions = ModelUtils.getSchemas(this.openAPI); - CodegenModel codegenModel = super.fromModel(name, model); - if (allDefinitions != null && codegenModel != null && codegenModel.parent != null) { - final Schema parentModel = allDefinitions.get(toModelName(codegenModel.parent)); - if (parentModel != null) { - final CodegenModel parentCodegenModel = super.fromModel(codegenModel.parent, parentModel); - if (codegenModel.hasEnums) { - codegenModel = this.reconcileInlineEnums(codegenModel, parentCodegenModel); - } - - Map propertyHash = new HashMap<>(codegenModel.vars.size()); - for (final CodegenProperty property : codegenModel.vars) { - propertyHash.put(property.name, property); - } - - for (final CodegenProperty property : codegenModel.readWriteVars) { - if (property.defaultValue == null && parentCodegenModel.discriminator != null && property.name.equals(parentCodegenModel.discriminator.getPropertyName())) { - property.defaultValue = "\"" + name + "\""; - } - } - - CodegenProperty last = null; - for (final CodegenProperty property : parentCodegenModel.vars) { - // helper list of parentVars simplifies templating - if (!propertyHash.containsKey(property.name)) { - final CodegenProperty parentVar = property.clone(); - parentVar.isInherited = true; - last = parentVar; - LOGGER.info("adding parent variable {}", property.name); - codegenModel.parentVars.add(parentVar); - } - } - } - } - - // Cleanup possible duplicates. Currently, readWriteVars can contain the same property twice. May or may not be isolated to C#. - if (codegenModel != null && codegenModel.readWriteVars != null && codegenModel.readWriteVars.size() > 1) { - int length = codegenModel.readWriteVars.size() - 1; - for (int i = length; i > (length / 2); i--) { - final CodegenProperty codegenProperty = codegenModel.readWriteVars.get(i); - // If the property at current index is found earlier in the list, remove this last instance. - if (codegenModel.readWriteVars.indexOf(codegenProperty) < i) { - codegenModel.readWriteVars.remove(i); - } - } - } - - return codegenModel; - } - - public void setOptionalProjectFileFlag(boolean flag) { - this.optionalProjectFileFlag = flag; - } - - public void setPackageGuid(String packageGuid) { - this.packageGuid = packageGuid; - } - - @Override - public void postProcessParameter(CodegenParameter parameter) { - postProcessPattern(parameter.pattern, parameter.vendorExtensions); - postProcessEmitDefaultValue(parameter.vendorExtensions); - super.postProcessParameter(parameter); - - if (nullableType.contains(parameter.dataType)) { - if (!parameter.required) { //optional - parameter.dataType = parameter.dataType + "?"; - } else { - parameter.vendorExtensions.put("x-csharp-value-type", true); - } - } - } - - @Override - public void postProcessModelProperty(CodegenModel model, CodegenProperty property) { - postProcessPattern(property.pattern, property.vendorExtensions); - postProcessEmitDefaultValue(property.vendorExtensions); - super.postProcessModelProperty(model, property); - - if (!property.isContainer && (nullableType.contains(property.dataType) || property.isEnum)) { - property.vendorExtensions.put("x-csharp-value-type", true); - } - } - - /* - * The pattern spec follows the Perl convention and style of modifiers. .NET - * does not support this syntax directly so we need to convert the pattern to a .NET compatible - * format and apply modifiers in a compatible way. - * See https://msdn.microsoft.com/en-us/library/yd1hzczs(v=vs.110).aspx for .NET options. - */ - public void postProcessPattern(String pattern, Map vendorExtensions) { - if (pattern != null) { - int i = pattern.lastIndexOf('/'); - - //Must follow Perl /pattern/modifiers convention - if (pattern.charAt(0) != '/' || i < 2) { - throw new IllegalArgumentException("Pattern must follow the Perl " - + "/pattern/modifiers convention. " + pattern + " is not valid."); - } - - String regex = pattern.substring(1, i).replace("'", "\'"); - List modifiers = new ArrayList(); - - // perl requires an explicit modifier to be culture specific and .NET is the reverse. - modifiers.add("CultureInvariant"); - - for (char c : pattern.substring(i).toCharArray()) { - if (regexModifiers.containsKey(c)) { - String modifier = regexModifiers.get(c); - modifiers.add(modifier); - } else if (c == 'l') { - modifiers.remove("CultureInvariant"); - } - } - - vendorExtensions.put("x-regex", regex); - vendorExtensions.put("x-modifiers", modifiers); - } - } - - public void postProcessEmitDefaultValue(Map vendorExtensions) { - vendorExtensions.put("x-emit-default-value", optionalEmitDefaultValuesFlag); - } - - public void setTargetFramework(String dotnetFramework) { - if (!frameworks.containsKey(dotnetFramework)) { - LOGGER.warn("Invalid .NET framework version, defaulting to {}", this.targetFramework); - } else { - this.targetFramework = dotnetFramework; - } - switch (targetFramework) { - case NET35: - additionalProperties.put(RESTSHARP, new LibraryDependency("105.1.0", "net35")); - additionalProperties.put(JSON_SUBTYPES, new LibraryDependency("1.6.0", "net35")); - additionalProperties.put(NEWTONSOFT_JSON, new LibraryDependency("12.0.3", "net35")); - additionalProperties.put(NUNIT, new LibraryDependency("3.11.0", "net35")); - break; - case NET40: - additionalProperties.put(RESTSHARP, new LibraryDependency("105.1.0", "net4")); - additionalProperties.put(JSON_SUBTYPES, new LibraryDependency("1.6.0", "net40")); - additionalProperties.put(NEWTONSOFT_JSON, new LibraryDependency("12.0.3", "net40")); - additionalProperties.put(NUNIT, new LibraryDependency("3.11.0", "net40")); - break; - case NET45: - additionalProperties.put(RESTSHARP, new LibraryDependency("105.1.0", "net45")); - additionalProperties.put(JSON_SUBTYPES, new LibraryDependency("1.6.0", "net45")); - additionalProperties.put(NEWTONSOFT_JSON, new LibraryDependency("12.0.3", "net45")); - additionalProperties.put(NUNIT, new LibraryDependency("3.11.0", "net45")); - break; - case NET452: - additionalProperties.put(RESTSHARP, new LibraryDependency("106.10.1", "net452")); - additionalProperties.put(JSON_SUBTYPES, new LibraryDependency("1.6.0", "net45")); - additionalProperties.put(NEWTONSOFT_JSON, new LibraryDependency("12.0.3", "net45")); - additionalProperties.put(NUNIT, new LibraryDependency("3.11.0", "net45")); - additionalProperties.put("isRestSharp_106_10_1_above", true); - break; - case UWP: - additionalProperties.put(RESTSHARP, new LibraryDependency("105.1.0", "uwp")); - additionalProperties.put(JSON_SUBTYPES, new LibraryDependency("1.6.0", "uwp")); - additionalProperties.put(NEWTONSOFT_JSON, new LibraryDependency("12.0.3", "uwp")); - additionalProperties.put(NUNIT, new LibraryDependency("3.11.0", "uwp")); - break; - case NETSTANDARD: - additionalProperties.put(RESTSHARP, new LibraryDependency("105.1.0", "netstandard1.3")); - additionalProperties.put(JSON_SUBTYPES, new LibraryDependency("1.6.0", "netstandard1.3")); - additionalProperties.put(NEWTONSOFT_JSON, new LibraryDependency("12.0.3", "netstandard1.3")); - additionalProperties.put(NUNIT, new LibraryDependency("3.11.0", "netstandard1.3")); - break; - } - - LOGGER.info("Generating code for .NET Framework {}", this.targetFramework); - } - - private CodegenModel reconcileInlineEnums(CodegenModel codegenModel, CodegenModel parentCodegenModel) { - // This generator uses inline classes to define enums, which breaks when - // dealing with models that have subTypes. To clean this up, we will analyze - // the parent and child models, look for enums that match, and remove - // them from the child models and leave them in the parent. - // Because the child models extend the parents, the enums will be available via the parent. - - // Only bother with reconciliation if the parent model has enums. - if (parentCodegenModel.hasEnums) { - - // Get the properties for the parent and child models - final List parentModelCodegenProperties = parentCodegenModel.vars; - List codegenProperties = codegenModel.vars; - - // Iterate over all of the parent model properties - boolean removedChildEnum = false; - for (CodegenProperty parentModelCodegenProperty : parentModelCodegenProperties) { - // Look for enums - if (parentModelCodegenProperty.isEnum) { - // Now that we have found an enum in the parent class, - // and search the child class for the same enum. - Iterator iterator = codegenProperties.iterator(); - while (iterator.hasNext()) { - CodegenProperty codegenProperty = iterator.next(); - if (codegenProperty.isEnum && codegenProperty.equals(parentModelCodegenProperty)) { - // We found an enum in the child class that is - // a duplicate of the one in the parent, so remove it. - iterator.remove(); - removedChildEnum = true; - } - } - } - } - - if (removedChildEnum) { - codegenModel.vars = codegenProperties; - } - } - - return codegenModel; - } - - @Override - public String toEnumVarName(String value, String datatype) { - if (value.length() == 0) { - return "Empty"; - } - - // for symbol, e.g. $, # - if (getSymbolName(value) != null) { - return camelize(getSymbolName(value)); - } - - // number - if (datatype.startsWith("int") || datatype.startsWith("uint") || - datatype.startsWith("ulong") || datatype.startsWith("long") || - datatype.startsWith("double") || datatype.startsWith("float")) { - String varName = "NUMBER_" + value; - varName = varName.replaceAll("-", "MINUS_"); - varName = varName.replaceAll("\\+", "PLUS_"); - varName = varName.replaceAll("\\.", "_DOT_"); - return varName; - } - - // string - String var = value.replaceAll("_", " "); - //var = WordUtils.capitalizeFully(var); - var = camelize(var); - var = var.replaceAll("\\W+", ""); - - if (var.matches("\\d.*")) { - return "_" + var; - } else { - return var; - } - } - - @Override - public String toVarName(String name) { - // sanitize name - name = sanitizeName(name); - - // if it's all upper case, do nothing - if (name.matches("^[A-Z_]*$")) { - return name; - } - - name = getNameUsingModelPropertyNaming(name); - - // for reserved word or word starting with number, append _ - if (isReservedWord(name) || name.matches("^\\d.*")) { - name = escapeReservedWord(name); - } - - return name; - } - - public String getNameUsingModelPropertyNaming(String name) { - switch (CodegenConstants.MODEL_PROPERTY_NAMING_TYPE.valueOf(getModelPropertyNaming())) { - case original: - return name; - case camelCase: - return camelize(name, LOWERCASE_FIRST_LETTER); - case PascalCase: - return camelize(name); - case snake_case: - return underscore(name); - default: - throw new IllegalArgumentException("Invalid model property naming '" + - name + "'. Must be 'original', 'camelCase', " + - "'PascalCase' or 'snake_case'"); - } - } - - @Override - public void setPackageName(String packageName) { - this.packageName = packageName; - } - - @Override - public void setPackageVersion(String packageVersion) { - this.packageVersion = packageVersion; - } - - public void setTargetFrameworkNuget(String targetFrameworkNuget) { - this.targetFrameworkNuget = targetFrameworkNuget; - } - - public void setSupportsAsync(Boolean supportsAsync) { - this.supportsAsync = supportsAsync; - } - - public void setSupportsUWP(Boolean supportsUWP) { - this.supportsUWP = supportsUWP; - } - - public void setNetStandard(Boolean netStandard) { - this.netStandard = netStandard; - } - - public void setGeneratePropertyChanged(final Boolean generatePropertyChanged) { - this.generatePropertyChanged = generatePropertyChanged; - if (this.generatePropertyChanged) { - additionalProperties.put(FODY, new LibraryDependency("1.29.4", targetFrameworkNuget)); - additionalProperties.put(PROPERTYCHANGED_FODY, new LibraryDependency("1.51.3", targetFrameworkNuget)); - } - } - - public void setUseCompareNetObjects(final Boolean useCompareNetObjects) { - this.useCompareNetObjects = useCompareNetObjects; - } - - public void setCaseInsensitiveResponseHeaders(final Boolean caseInsensitiveResponseHeaders) { - this.caseInsensitiveResponseHeaders = caseInsensitiveResponseHeaders; - } - - public boolean isNonPublicApi() { - return nonPublicApi; - } - - public void setNonPublicApi(final boolean nonPublicApi) { - this.nonPublicApi = nonPublicApi; - } - - public void setValidatable(boolean validatable) { - this.validatable = validatable; - } - - @Override - public String toModelDocFilename(String name) { - return toModelFilename(name); - } - - @Override - public String apiDocFileFolder() { - return (outputFolder + "/" + apiDocPath).replace('/', File.separatorChar); - } - - @Override - public String modelDocFileFolder() { - return (outputFolder + "/" + modelDocPath).replace('/', File.separatorChar); - } - - @Override - public String apiTestFileFolder() { - return outputFolder + File.separator + testFolder + File.separator + testPackageName() + File.separator + apiPackage(); - } - - @Override - public String modelTestFileFolder() { - return outputFolder + File.separator + testFolder + File.separator + testPackageName() + File.separator + modelPackage(); - } - - @Override - public Mustache.Compiler processCompiler(Mustache.Compiler compiler) { - // To avoid unexpected behaviors when options are passed programmatically such as { "supportsAsync": "" } - return super.processCompiler(compiler).emptyStringIsFalse(true); - } - - /** - * Return the instantiation type of the property, especially for map and array - * - * @param schema property schema - * @return string presentation of the instantiation type of the property - */ - @Override - public String toInstantiationType(Schema schema) { - if (ModelUtils.isMapSchema(schema)) { - Schema additionalProperties = getAdditionalProperties(schema); - String inner = getSchemaType(additionalProperties); - if (ModelUtils.isMapSchema(additionalProperties)) { - inner = toInstantiationType(additionalProperties); - } - return instantiationTypes.get("map") + ""; - } else if (ModelUtils.isArraySchema(schema)) { - ArraySchema arraySchema = (ArraySchema) schema; - String inner = getSchemaType(arraySchema.getItems()); - return instantiationTypes.get("array") + "<" + inner + ">"; - } else { - return null; - } - } - - @Override - public String getNullableType(Schema p, String type) { - if (languageSpecificPrimitives.contains(type)) { - if (isSupportNullable() && ModelUtils.isNullable(p) && nullableType.contains(type)) { - return type + "?"; - } else { - return type; - } - } else { - return null; - } - } - -} - -class LibraryDependency { - String version; - String targetFramework; - - public LibraryDependency(String version, String targetFramework) { - this.version = version; - this.targetFramework = targetFramework; - } -} diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java index 18d16c858e1..33d8254d40f 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java @@ -79,7 +79,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { protected static final String NET_70_OR_LATER = "net70OrLater"; @SuppressWarnings("hiding") - private final Logger LOGGER = LoggerFactory.getLogger(CSharpClientCodegen.class); + private final Logger LOGGER = LoggerFactory.getLogger(CSharpNetCoreClientCodegen.class); private static final List frameworkStrategies = Arrays.asList( FrameworkStrategy.NETSTANDARD_1_3, FrameworkStrategy.NETSTANDARD_1_4, @@ -1309,7 +1309,7 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { @SuppressWarnings("Duplicates") private static abstract class FrameworkStrategy { - private final Logger LOGGER = LoggerFactory.getLogger(CSharpClientCodegen.class); + private final Logger LOGGER = LoggerFactory.getLogger(CSharpNetCoreClientCodegen.class); static FrameworkStrategy NETSTANDARD_1_3 = new FrameworkStrategy("netstandard1.3", ".NET Standard 1.3", "net7.0") { }; diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreReducedClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreReducedClientCodegen.java index b8ca9a1169e..5884aa99e48 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreReducedClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreReducedClientCodegen.java @@ -60,7 +60,7 @@ public class CSharpNetCoreReducedClientCodegen extends AbstractCSharpCodegen { protected static final String TARGET_FRAMEWORK_VERSION = "targetFrameworkVersion"; @SuppressWarnings("hiding") - private final Logger LOGGER = LoggerFactory.getLogger(CSharpClientCodegen.class); + private final Logger LOGGER = LoggerFactory.getLogger(CSharpNetCoreReducedClientCodegen.class); private static final List frameworkStrategies = Arrays.asList( FrameworkStrategy.NETSTANDARD_1_3, FrameworkStrategy.NETSTANDARD_1_4, @@ -969,7 +969,7 @@ public class CSharpNetCoreReducedClientCodegen extends AbstractCSharpCodegen { @SuppressWarnings("Duplicates") private static abstract class FrameworkStrategy { - private final Logger LOGGER = LoggerFactory.getLogger(CSharpClientCodegen.class); + private final Logger LOGGER = LoggerFactory.getLogger(CSharpNetCoreReducedClientCodegen.class); static FrameworkStrategy NETSTANDARD_1_3 = new FrameworkStrategy("netstandard1.3", ".NET Standard 1.3 compatible", "netcoreapp2.0") { }; diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig index 504da19da17..ef5cea24b42 100644 --- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig +++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig @@ -20,7 +20,6 @@ org.openapitools.codegen.languages.CppRestSdkClientCodegen org.openapitools.codegen.languages.CppTinyClientCodegen org.openapitools.codegen.languages.CppTizenClientCodegen org.openapitools.codegen.languages.CppUE4ClientCodegen -org.openapitools.codegen.languages.CSharpClientCodegen org.openapitools.codegen.languages.CSharpNetCoreClientCodegen org.openapitools.codegen.languages.CsharpNetcoreFunctionsServerCodegen org.openapitools.codegen.languages.DartClientCodegen diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/ApiClient.mustache deleted file mode 100644 index ba509dd1558..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/ApiClient.mustache +++ /dev/null @@ -1,314 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Globalization; -using System.Text.RegularExpressions; -using System.IO; -using System.Web; -using System.Linq; -using System.Net; -using System.Text; -using Newtonsoft.Json; -using RestSharp; -using RestSharp.Extensions; - -namespace {{clientPackage}} -{ - /// - /// API client is mainly responsible for making the HTTP call to the API backend. - /// - public class ApiClient - { - private readonly Dictionary _defaultHeaderMap = new Dictionary(); - - /// - /// Initializes a new instance of the class. - /// - /// The base path. - public ApiClient(String basePath="{{{basePath}}}") - { - BasePath = basePath; - RestClient = new RestClient(BasePath); - } - - /// - /// Gets or sets the base path. - /// - /// The base path - public string BasePath { get; set; } - - /// - /// Gets or sets the RestClient. - /// - /// An instance of the RestClient - public RestClient RestClient { get; set; } - - /// - /// Gets the default header. - /// - public Dictionary DefaultHeader - { - get { return _defaultHeaderMap; } - } - - /// - /// Makes the HTTP request (Sync). - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Authentication settings. - /// Object - public Object CallApi(String path, RestSharp.Method method, Dictionary queryParams, String postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, String[] authSettings) - { - - var request = new RestRequest(path, method); - - UpdateParamsForAuth(queryParams, headerParams, authSettings); - - // add default header, if any - foreach(var defaultHeader in _defaultHeaderMap) - request.AddHeader(defaultHeader.Key, defaultHeader.Value); - - // add header parameter, if any - foreach(var param in headerParams) - request.AddHeader(param.Key, param.Value); - - // add query parameter, if any - foreach(var param in queryParams) - request.AddParameter(param.Key, param.Value, ParameterType.GetOrPost); - - // add form parameter, if any - foreach(var param in formParams) - request.AddParameter(param.Key, param.Value, ParameterType.GetOrPost); - - // add file parameter, if any - foreach(var param in fileParams) - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); - - if (postBody != null) // http body (model) parameter - request.AddParameter("application/json", postBody, ParameterType.RequestBody); - - return (Object)RestClient.Execute(request); - - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - public void AddDefaultHeader(string key, string value) - { - _defaultHeaderMap.Add(key, value); - } - - /// - /// Escape string (url-encoded). - /// - /// String to be escaped. - /// Escaped string. - public string EscapeString(string str) - { - return RestSharp.Contrib.HttpUtility.UrlEncode(str); - } - - /// - /// Create FileParameter based on Stream. - /// - /// Parameter name. - /// Input stream. - /// FileParameter. - public FileParameter ParameterToFile(string name, Stream stream) - { - if (stream is FileStream) - return FileParameter.Create(name, stream.ReadAsBytes(), Path.GetFileName(((FileStream)stream).Name)); - else - return FileParameter.Create(name, stream.ReadAsBytes(), "no_file_name_provided"); - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list of string, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// Formatted string. - public string ParameterToString(object obj) - { - if (obj is DateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTime)obj).ToString (Configuration.DateTimeFormat); - else if (obj is bool) - return (bool)obj ? "true" : "false"; - else if (obj is List) - return String.Join(",", (obj as List).ToArray()); - else - return Convert.ToString (obj); - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// HTTP body (e.g. string, JSON). - /// Object type. - /// HTTP headers. - /// Object representation of the JSON string. - public object Deserialize(string content, Type type, IList headers=null) - { - if (type == typeof(Object)) // return an object - { - return content; - } - - if (type == typeof(Stream)) - { - var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) - ? Path.GetTempPath() - : Configuration.TempFolderPath; - - var fileName = filePath + Guid.NewGuid(); - if (headers != null) - { - var regex = new Regex(@"Content-Disposition:.*filename=['""]?([^'""\s]+)['""]?$"); - var match = regex.Match(headers.ToString()); - if (match.Success) - fileName = filePath + match.Value.Replace("\"", "").Replace("'", ""); - } - File.WriteAllText(fileName, content); - return new FileStream(fileName, FileMode.Open); - - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(content, null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return ConvertType(content, type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(content, type); - } - catch (IOException e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Serialize an object into JSON string. - /// - /// Object. - /// JSON string. - public string Serialize(object obj) - { - try - { - return obj != null ? JsonConvert.SerializeObject(obj) : null; - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Get the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix (string apiKeyIdentifier) - { - var apiKeyValue = ""; - Configuration.ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); - var apiKeyPrefix = ""; - if (Configuration.ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) - return apiKeyPrefix + " " + apiKeyValue; - else - return apiKeyValue; - } - - /// - /// Update parameters based on authentication. - /// - /// Query parameters. - /// Header parameters. - /// Authentication settings. - public void UpdateParamsForAuth(Dictionary queryParams, Dictionary headerParams, string[] authSettings) - { - if (authSettings == null || authSettings.Length == 0) - return; - - foreach (string auth in authSettings) - { - // determine which one to use - switch(auth) - { - {{#authMethods}} - case "{{name}}": - {{#isApiKey}} - {{#isKeyInHeader}} - headerParams["{{keyParamName}}"] = GetApiKeyWithPrefix("{{keyParamName}}"); - {{/isKeyInHeader}} - {{#isKeyInQuery}} - queryParams["{{keyParamName}}"] = GetApiKeyWithPrefix("{{keyParamName}}"); - {{/isKeyInQuery}} - {{/isApiKey}} - {{#isBasic}} - {{#isBasicBasic}} - headerParams["Authorization"] = "Basic " + Base64Encode(Configuration.Username + ":" + Configuration.Password); - {{/isBasicBasic}} - {{#isBasicBearer}} - headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; - {{/isBasicBearer}} - {{/isBasic}} - {{#isOAuth}} - headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; - {{/isOAuth}} - break; - {{/authMethods}} - default: - //TODO show warning about security definition not found - break; - } - } - } - - /// - /// Encode string in base64 format. - /// - /// String to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - var textByte = System.Text.Encoding.UTF8.GetBytes(text); - return System.Convert.ToBase64String(textByte); - } - - /// - /// Dynamically cast the object into target type. - /// - /// Object to be casted - /// Target type - /// Casted object - public static Object ConvertType(Object fromObject, Type toObject) { - return Convert.ChangeType(fromObject, toObject); - } - - } -} diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/ApiException.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/ApiException.mustache deleted file mode 100644 index 1bc6d7c5a6f..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/ApiException.mustache +++ /dev/null @@ -1,47 +0,0 @@ -using System; - -namespace {{clientPackage}} { - /// - /// API Exception - /// - public class ApiException : Exception { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public Object ErrorContent { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() {} - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - public ApiException(int errorCode, string message, Object errorContent = null) : base(message) { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - } - - } - -} diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/Configuration.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/Configuration.mustache deleted file mode 100644 index 6c0e9a58ad8..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/Configuration.mustache +++ /dev/null @@ -1,138 +0,0 @@ -using System; -using System.Reflection; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace {{clientPackage}} -{ - /// - /// Represents a set of configuration settings - /// - public class Configuration - { - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "{{packageVersion}}"; - - /// - /// Gets or sets the default API client for making HTTP calls. - /// - /// The API client. - public static ApiClient DefaultApiClient = new ApiClient(); - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public static String Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public static String Password { get; set; } - - /// - /// Gets or sets the access token (Bearer/OAuth authentication). - /// - /// The access token. - public static String AccessToken { get; set; } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public static Dictionary ApiKey = new Dictionary(); - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - public static Dictionary ApiKeyPrefix = new Dictionary(); - - private static string _tempFolderPath = Path.GetTempPath(); - - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public static String TempFolderPath - { - get { return _tempFolderPath; } - - set - { - if (String.IsNullOrEmpty(value)) - { - _tempFolderPath = value; - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - Directory.CreateDirectory(value); - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - _tempFolderPath = value; - else - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - - private const string ISO8601_DATETIME_FORMAT = "o"; - - private static string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - - /// - /// Gets or sets the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public static String DateTimeFormat - { - get - { - return _dateTimeFormat; - } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Returns a string with essential information for debugging. - /// - public static String ToDebugReport() - { - String report = "C# SDK ({{packageName}}) Debug Report:\n"; - report += " OS: " + Environment.OSVersion + "\n"; - report += " .NET Framework Version: " + Assembly - .GetExecutingAssembly() - .GetReferencedAssemblies() - .Where(x => x.Name == "System.Core").First().Version.ToString() + "\n"; - report += " Version of the API: {{version}}\n"; - report += " SDK Package Version: {{packageVersion}}\n"; - - return report; - } - } -} diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/README.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/README.mustache deleted file mode 100644 index 12f4b1932eb..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/README.mustache +++ /dev/null @@ -1,168 +0,0 @@ -# {{packageName}} - the C# library for the {{appName}} - -{{#appDescriptionWithNewLines}} -{{{.}}} -{{/appDescriptionWithNewLines}} - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: {{appVersion}} -- SDK version: {{packageVersion}} -{{^hideGenerationTimestamp}} -- Build date: {{generatedDate}} -{{/hideGenerationTimestamp}} -- Build package: {{generatorClass}} -{{#infoUrl}} - For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) -{{/infoUrl}} - - -## Frameworks supported -- .NET 2.0 - - -## Dependencies -- Mono compiler -- Newtonsoft.Json.7.0.1 -- RestSharp.Net2.1.1.11 - -Note: NuGet is downloaded by the mono compilation script and packages are installed with it. No dependency DLLs are bundled with this generator - - -## Installation -Run the following command to generate the DLL -- [Mac/Linux] `/bin/sh compile-mono.sh` -- [Windows] TODO - -Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: -```csharp -using {{apiPackage}}; -using {{clientPackage}}; -using {{modelPackage}}; -``` - -## Getting Started - -```csharp -using System; -using System.Diagnostics; -using {{apiPackage}}; -using {{clientPackage}}; -using {{modelPackage}}; - -namespace Example -{ - public class {{operationId}}Example - { - public void main() - { - {{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} - {{#hasAuthMethods}} - {{#authMethods}} - {{#isBasic}} - {{#isBasicBasic}} - // Configure HTTP basic authorization: {{{name}}} - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - {{/isBasicBasic}} - {{#isBasicBearer}} - // Configure Bearer access token for authorization: {{{name}}} - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - {{/isBasicBearer}} - {{/isBasic}} - {{#isApiKey}} - // Configure API key authorization: {{{name}}} - Configuration.Default.ApiKey.Add("{{{keyParamName}}}", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer"); - {{/isApiKey}} - {{#isOAuth}} - // Configure OAuth2 access token for authorization: {{{name}}} - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - {{/isOAuth}} - {{/authMethods}} - {{/hasAuthMethods}} - - var apiInstance = new {{classname}}(); - {{#allParams}} - {{#isPrimitiveType}} - var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/isPrimitiveType}} - {{^isPrimitiveType}} - var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/isPrimitiveType}} - {{/allParams}} - - try - { - {{#summary}} - // {{{.}}} - {{/summary}} - {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} - Debug.WriteLine(result);{{/returnType}} - } - catch (Exception e) - { - Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message ); - } - } - } -}{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} -``` - - -## Documentation for API Endpoints - -All URIs are relative to *{{{basePath}}}* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} -{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} - - -## Documentation for Models - -{{#modelPackage}} -{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) -{{/model}}{{/models}} -{{/modelPackage}} -{{^modelPackage}} -No model defined in this package -{{/modelPackage}} - - -## Documentation for Authorization - -{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} -{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} -{{#authMethods}} - -### {{name}} - -{{#isApiKey}} -- **Type**: API key -- **API key parameter name**: {{keyParamName}} -- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} -{{/isApiKey}} -{{#isBasic}} -{{#isBasicBasic}} -- **Type**: HTTP basic authentication -{{/isBasicBasic}} -{{#isBasicBearer}} -- **Type**: HTTP bearer authentication -{{/isBasicBearer}} -{{#isHttpSignature}} -- **Type**: HTTP signature authentication -{{/isHttpSignature}} -{{/isBasic}} -{{#isOAuth}} -- **Type**: OAuth -- **Flow**: {{flow}} -- **Authorization URL**: {{authorizationUrl}} -- **Scopes**: {{^scopes}}N/A{{/scopes}} -{{#scopes}} - {{scope}}: {{description}} -{{/scopes}} -{{/isOAuth}} - -{{/authMethods}} diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/api.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/api.mustache deleted file mode 100644 index 40e59a1ffb6..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/api.mustache +++ /dev/null @@ -1,135 +0,0 @@ -using System; -using System.Collections.Generic; -using RestSharp; -using {{clientPackage}}; -{{#hasImport}}using {{modelPackage}}; -{{/hasImport}} - -namespace {{apiPackage}} -{ - {{#operations}} - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface I{{classname}} - { - {{#operation}} - /// - /// {{summary}} {{notes}} - /// - {{#allParams}}/// {{description}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// {{returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - {{{returnType}}}{{^returnType}}void{{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - {{/operation}} - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public class {{classname}} : I{{classname}} - { - /// - /// Initializes a new instance of the class. - /// - /// an instance of ApiClient (optional) - /// - public {{classname}}(ApiClient apiClient = null) - { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; - } - - /// - /// Initializes a new instance of the class. - /// - /// - public {{classname}}(String basePath) - { - this.ApiClient = new ApiClient(basePath); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - /// The base path - public void SetBasePath(String basePath) - { - this.ApiClient.BasePath = basePath; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - /// The base path - public String GetBasePath(String basePath) - { - return this.ApiClient.BasePath; - } - - /// - /// Gets or sets the API client. - /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - - {{#operation}} - /// - /// {{summary}} {{notes}} - /// - {{#allParams}}/// {{description}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// {{returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} {{nickname}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^-last}}, {{/-last}}{{/allParams}}) - { - {{#allParams}}{{#required}} - // verify the required parameter '{{paramName}}' is set - if ({{paramName}} == null) throw new ApiException(400, "Missing required parameter '{{paramName}}' when calling {{nickname}}"); - {{/required}}{{/allParams}} - - var path = "{{{path}}}"; - path = path.Replace("{format}", "json"); - {{#pathParams}}path = path.Replace("{" + "{{baseName}}" + "}", ApiClient.ParameterToString({{{paramName}}})); - {{/pathParams}} - - var queryParams = new Dictionary(); - var headerParams = new Dictionary(); - var formParams = new Dictionary(); - var fileParams = new Dictionary(); - String postBody = null; - - {{#queryParams}} if ({{paramName}} != null) queryParams.Add("{{baseName}}", ApiClient.ParameterToString({{paramName}})); // query parameter - {{/queryParams}} - {{#headerParams}} if ({{paramName}} != null) headerParams.Add("{{baseName}}", ApiClient.ParameterToString({{paramName}})); // header parameter - {{/headerParams}} - {{#formParams}}if ({{paramName}} != null) {{#isFile}}fileParams.Add("{{baseName}}", ApiClient.ParameterToFile("{{baseName}}", {{paramName}}));{{/isFile}}{{^isFile}}formParams.Add("{{baseName}}", ApiClient.ParameterToString({{paramName}})); // form parameter{{/isFile}} - {{/formParams}} - {{#bodyParam}}postBody = ApiClient.Serialize({{paramName}}); // http body (model) parameter - {{/bodyParam}} - - // authentication setting, if any - String[] authSettings = new String[] { {{#authMethods}}"{{name}}"{{^-last}}, {{/-last}}{{/authMethods}} }; - - // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path, Method.{{httpMethod}}, queryParams, postBody, headerParams, formParams, fileParams, authSettings); - - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling {{nickname}}: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling {{nickname}}: " + response.ErrorMessage, response.ErrorMessage); - - {{#returnType}}return ({{{returnType}}}) ApiClient.Deserialize(response.Content, typeof({{{returnType}}}), response.Headers);{{/returnType}}{{^returnType}}return;{{/returnType}} - } - - {{/operation}} - } - {{/operations}} -} diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/api_doc.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/api_doc.mustache deleted file mode 100644 index 39540efe2a2..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/api_doc.mustache +++ /dev/null @@ -1,116 +0,0 @@ -# {{apiPackage}}.{{classname}}{{#description}} -{{.}}{{/description}} - -All URIs are relative to *{{{basePath}}}* - -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} -{{/operation}}{{/operations}} - -{{#operations}} -{{#operation}} - -# **{{{operationId}}}** -> {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) - -{{{summary}}}{{#notes}} - -{{{.}}}{{/notes}} - -### Example -```csharp -using System; -using System.Diagnostics; -using {{apiPackage}}; -using {{clientPackage}}; -using {{modelPackage}}; - -namespace Example -{ - public class {{operationId}}Example - { - public void main() - { - {{#hasAuthMethods}} - {{#authMethods}} - {{#isBasic}} - {{#isBasicBasic}} - // Configure HTTP basic authorization: {{{name}}} - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - {{/isBasicBasic}} - {{#isBasicBearer}} - // Configure Bearer access token: {{{name}}} - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - {{/isBasicBearer}} - {{/isBasic}} - {{#isApiKey}} - // Configure API key authorization: {{{name}}} - Configuration.Default.ApiKey.Add("{{{keyParamName}}}", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer"); - {{/isApiKey}} - {{#isOAuth}} - // Configure OAuth2 access token for authorization: {{{name}}} - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - {{/isOAuth}} - {{/authMethods}} - - {{/hasAuthMethods}} - var apiInstance = new {{classname}}(); - {{#allParams}} - {{#isPrimitiveType}} - {{^isBinary}} - var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/isBinary}} - {{#isBinary}} - var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/isBinary}} - {{/isPrimitiveType}} - {{^isPrimitiveType}} - var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/isPrimitiveType}} - {{/allParams}} - - try - { - {{#summary}} - // {{{.}}} - {{/summary}} - {{#returnType}}{{.}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} - Debug.WriteLine(result);{{/returnType}} - } - catch (Exception e) - { - Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message ); - } - } - } -} -``` - -### Parameters -{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} -Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{baseType}}.md){{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} -{{/allParams}} - -### Return type - -{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{{returnType}}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} - -### Authorization - -{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} - -### HTTP request headers - - - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} - - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} - -[[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) - -{{/operation}} -{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/compile-mono.sh.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/compile-mono.sh.mustache deleted file mode 100644 index 2287344892a..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/compile-mono.sh.mustache +++ /dev/null @@ -1,12 +0,0 @@ -wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe; -mozroots --import --sync -mono nuget.exe install vendor/packages.config -o vendor; -mkdir -p bin; -mcs -sdk:2 -r:vendor/Newtonsoft.Json.7.0.1/lib/net20/Newtonsoft.Json.dll,\ -vendor/RestSharp.Net2.1.1.11/lib/net20/RestSharp.Net2.dll,\ -System.Runtime.Serialization.dll \ --target:library \ --out:bin/{{packageName}}.dll \ --recurse:'src/*.cs' \ --doc:bin/{{packageName}}.xml \ --platform:anycpu diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/gitignore b/modules/openapi-generator/src/main/resources/csharp-dotnet2/gitignore deleted file mode 100644 index 1ee53850b84..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/gitignore +++ /dev/null @@ -1,362 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/model.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/model.mustache deleted file mode 100644 index 4a642e80e42..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/model.mustache +++ /dev/null @@ -1,56 +0,0 @@ -using System; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; -using Newtonsoft.Json; - -{{#models}} -{{#model}} -namespace {{modelPackage}} { - - /// - /// {{description}} - /// - [DataContract] - public class {{classname}}{{#parent}} : {{{.}}}{{/parent}} { - {{#vars}} - /// - /// {{^description}}Gets or Sets {{{name}}}{{/description}}{{{description}}} - /// {{#description}} - /// {{{.}}}{{/description}} - [DataMember(Name="{{baseName}}", EmitDefaultValue=false)] - [JsonProperty(PropertyName = "{{baseName}}")] - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{dataType}}} {{name}} { get; set; } - - {{/vars}} - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class {{classname}} {\n"); - {{#vars}} - sb.Append(" {{name}}: ").Append({{name}}).Append("\n"); - {{/vars}} - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public {{#parent}} new {{/parent}}string ToJson() { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - -} -{{/model}} -{{/models}} -} diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/model_doc.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/model_doc.mustache deleted file mode 100644 index e6f7f2c9b83..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/model_doc.mustache +++ /dev/null @@ -1,15 +0,0 @@ -{{#models}} -{{#model}} -# {{{modelPackage}}}.{{{classname}}} - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{{dataType}}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{{dataType}}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} -{{/vars}} - -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - -{{/model}} -{{/models}} diff --git a/modules/openapi-generator/src/main/resources/csharp-dotnet2/packages.config.mustache b/modules/openapi-generator/src/main/resources/csharp-dotnet2/packages.config.mustache deleted file mode 100644 index 7b9cf186303..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp-dotnet2/packages.config.mustache +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache b/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache deleted file mode 100644 index 3b8529e9a75..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/ApiClient.mustache +++ /dev/null @@ -1,601 +0,0 @@ -{{>partial_header}} -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Text.RegularExpressions; -using System.IO; -using System.Threading; -{{^netStandard}} -{{^supportsUWP}} -using System.Web; -{{/supportsUWP}} -{{/netStandard}} -using System.Linq; -using System.Net; -using System.Text; -using Newtonsoft.Json; -{{#netStandard}} -using RestSharp.Portable; -using RestSharp.Portable.HttpClient; -{{/netStandard}} -{{^netStandard}} -using RestSharp; -{{/netStandard}} - -namespace {{packageName}}.Client -{ - /// - /// API client is mainly responsible for making the HTTP call to the API backend. - /// - {{>visibility}} partial class ApiClient - { - public JsonSerializerSettings serializerSettings = new JsonSerializerSettings - { - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor - }; - - /// - /// Allows for extending request processing for generated code. - /// - /// The RestSharp request object - partial void InterceptRequest(IRestRequest request); - - /// - /// Allows for extending response processing for generated code. - /// - /// The RestSharp request object - /// The RestSharp response object - partial void InterceptResponse(IRestRequest request, IRestResponse response); - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - public ApiClient() - { - Configuration = {{packageName}}.Client.Configuration.Default; - RestClient = new RestClient("{{{basePath}}}"); - {{#netStandard}} - RestClient.IgnoreResponseStatusCode = true; - {{/netStandard}} - } - - /// - /// Initializes a new instance of the class - /// with default base path ({{{basePath}}}). - /// - /// An instance of Configuration. - public ApiClient(Configuration config) - { - Configuration = config ?? {{packageName}}.Client.Configuration.Default; - - RestClient = new RestClient(Configuration.BasePath); - {{#netStandard}} - RestClient.IgnoreResponseStatusCode = true; - {{/netStandard}} - } - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - /// The base path. - public ApiClient(String basePath = "{{{basePath}}}") - { - if (String.IsNullOrEmpty(basePath)) - throw new ArgumentException("basePath cannot be empty"); - - RestClient = new RestClient(basePath); - {{#netStandard}} - RestClient.IgnoreResponseStatusCode = true; - {{/netStandard}} - Configuration = Client.Configuration.Default; - } - - /// - /// Gets or sets the default API client for making HTTP calls. - /// - /// The default API client. - [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] - public static ApiClient Default; - - /// - /// Gets or sets an instance of the IReadableConfiguration. - /// - /// An instance of the IReadableConfiguration. - /// - /// helps us to avoid modifying possibly global - /// configuration values from within a given client. It does not guarantee thread-safety - /// of the instance in any way. - /// - public IReadableConfiguration Configuration { get; set; } - - /// - /// Gets or sets the RestClient. - /// - /// An instance of the RestClient - public RestClient RestClient { get; set; } - - // Creates and sets up a RestRequest prior to a call. - private RestRequest PrepareRequest( - String path, {{^netStandard}}RestSharp.{{/netStandard}}Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = new RestRequest(path, method); - {{#netStandard}} - // disable ResetSharp.Portable built-in serialization - request.Serializer = null; - {{/netStandard}} - - // add path parameter, if any - foreach(var param in pathParams) - request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); - - // add header parameter, if any - foreach(var param in headerParams) - request.AddHeader(param.Key, param.Value); - - // add query parameter, if any - foreach(var param in queryParams) - request.AddQueryParameter(param.Key, param.Value); - - // add form parameter, if any - foreach(var param in formParams) - request.AddParameter(param.Key, param.Value); - - // add file parameter, if any - foreach(var param in fileParams) - { - {{#netStandard}} - request.AddFile(param.Value); - {{/netStandard}} - {{^netStandard}} - {{^supportsUWP}} - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName{{#isRestSharp_106_10_1_above}}, param.Value.ContentLength{{/isRestSharp_106_10_1_above}}, param.Value.ContentType); - {{/supportsUWP}} - {{#supportsUWP}} - byte[] paramWriter = null; - param.Value.Writer = delegate (Stream stream) { paramWriter = ToByteArray(stream); }; - request.AddFile(param.Value.Name, paramWriter, param.Value.FileName, param.Value.ContentType); - {{/supportsUWP}} - {{/netStandard}} - } - - if (postBody != null) // http body (model or byte[]) parameter - { - {{#netStandard}} - request.AddParameter(new Parameter { Value = postBody, Type = ParameterType.RequestBody, ContentType = contentType }); - {{/netStandard}} - {{^netStandard}} - request.AddParameter(contentType, postBody, ParameterType.RequestBody); - {{/netStandard}} - } - - return request; - } - - /// - /// Makes the HTTP request (Sync). - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content Type of the request - /// Object - public Object CallApi( - String path, {{^netStandard}}RestSharp.{{/netStandard}}Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - - // set timeout - {{#netStandard}}RestClient.Timeout = TimeSpan.FromMilliseconds(Configuration.Timeout);{{/netStandard}} - {{^netStandard}}RestClient.Timeout = Configuration.Timeout;{{/netStandard}} - // set user agent - RestClient.UserAgent = Configuration.UserAgent; - - InterceptRequest(request); - {{#netStandard}} - var response = RestClient.Execute(request).Result; - {{/netStandard}} - {{^netStandard}} - {{^supportsUWP}} - var response = RestClient.Execute(request); - {{/supportsUWP}} - {{#supportsUWP}} - // Using async method to perform sync call (uwp-only) - var response = RestClient.ExecuteTaskAsync(request).Result; - {{/supportsUWP}} - {{/netStandard}} - InterceptResponse(request, response); - - return (Object) response; - } - {{#supportsAsync}} - /// - /// Makes the asynchronous HTTP request. - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content type. - /// Cancellation Token. - /// The Task instance. - public async System.Threading.Tasks.Task CallApiAsync( - String path, {{^netStandard}}RestSharp.{{/netStandard}}Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType, CancellationToken cancellationToken) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - RestClient.UserAgent = Configuration.UserAgent; - InterceptRequest(request); - var response = await RestClient.Execute{{^netStandard}}TaskAsync{{/netStandard}}(request, cancellationToken); - InterceptResponse(request, response); - return (Object)response; - }{{/supportsAsync}} - - /// - /// Escape string (url-encoded). - /// - /// String to be escaped. - /// Escaped string. - public string EscapeString(string str) - { - return UrlEncode(str); - } - - /// - /// Create FileParameter based on Stream. - /// - /// Parameter name. - /// Input stream. - /// FileParameter. - public FileParameter ParameterToFile(string name, Stream stream) - { - if (stream is FileStream) - return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); - else - return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// Formatted string. - public string ParameterToString(object obj) - { - if (obj is DateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTime)obj).ToString (Configuration.DateTimeFormat); - else if (obj is DateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); - else if (obj is bool) - return (bool)obj ? "true" : "false"; - else if (obj is IList) - { - var flattenedString = new StringBuilder(); - foreach (var param in (IList)obj) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } - else - return Convert.ToString (obj); - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The HTTP response. - /// Object type. - /// Object representation of the JSON string. - public object Deserialize(IRestResponse response, Type type) - { - {{^netStandard}}IList{{/netStandard}}{{#netStandard}}IHttpHeaders{{/netStandard}} headers = response.Headers; - if (type == typeof(byte[])) // return byte array - { - return response.RawBytes; - } - - // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) - if (type == typeof(Stream)) - { - if (headers != null) - { - var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) - ? Path.GetTempPath() - : Configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); - foreach (var header in headers) - { - var match = regex.Match(header.ToString()); - if (match.Success) - { - string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); - } - } - } - var stream = new MemoryStream(response.RawBytes); - return stream; - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return ConvertType(response.Content, type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Serialize an input (model) into JSON string - /// - /// Object. - /// JSON string. - public String Serialize(object obj) - { - try - { - return obj != null ? JsonConvert.SerializeObject(obj) : null; - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - ///Check if the given MIME is a JSON MIME. - ///JSON MIME examples: - /// application/json - /// application/json; charset=UTF8 - /// APPLICATION/JSON - /// application/vnd.company+json - /// - /// MIME - /// Returns True if MIME type is json. - public bool IsJsonMime(String mime) - { - var jsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); - return mime != null && (jsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json")); - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON type exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public String SelectHeaderContentType(String[] contentTypes) - { - if (contentTypes.Length == 0) - return "application/json"; - - foreach (var contentType in contentTypes) - { - if (IsJsonMime(contentType.ToLower())) - return contentType; - } - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public String SelectHeaderAccept(String[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return String.Join(",", accepts); - } - - /// - /// Encode string in base64 format. - /// - /// String to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Dynamically cast the object into target type. - /// - /// Object to be casted - /// Target type - /// Casted object - {{#supportsAsync}} - public static dynamic ConvertType(dynamic fromObject, Type toObject) - {{/supportsAsync}} - {{^supportsAsync}} - public static object ConvertType(T fromObject, Type toObject) where T : class - {{/supportsAsync}} - { - return Convert.ChangeType(fromObject, toObject); - } - - /// - /// Convert stream to byte array - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream inputStream) - { - byte[] buf = new byte[16*1024]; - using (MemoryStream ms = new MemoryStream()) - { - int count; - while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) - { - ms.Write(buf, 0, count); - } - return ms.ToArray(); - } - } - - /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 - /// - /// String to be URL encoded - /// Byte array - public static string UrlEncode(string input) - { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); - } - - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - - if (match.Success) - { - return match.Groups[1].Value; - } - else - { - return filename; - } - } - {{^netStandard}} - {{#supportsUWP}} - /// - /// Convert stream to byte array - /// - /// IO stream - /// Byte array - public static byte[] ToByteArray(Stream stream) - { - stream.Position = 0; - byte[] buffer = new byte[stream.Length]; - for (int totalBytesCopied = 0; totalBytesCopied < stream.Length;) - totalBytesCopied += stream.Read(buffer, totalBytesCopied, Convert.ToInt32(stream.Length) - totalBytesCopied); - return buffer; - } - {{/supportsUWP}} - {{/netStandard}} - - /// - /// Convert params to key/value pairs. - /// Use collectionFormat to properly format lists and collections. - /// - /// Collection format. - /// Key name. - /// Value object. - /// A list of KeyValuePairs - public IEnumerable> ParameterToKeyValuePairs(string collectionFormat, string name, object value) - { - var parameters = new List>(); - - if (IsCollection(value) && collectionFormat == "multi") - { - var valueCollection = value as IEnumerable; - parameters.AddRange(from object item in valueCollection select new KeyValuePair(name, ParameterToString(item))); - } - else - { - parameters.Add(new KeyValuePair(name, ParameterToString(value))); - } - - return parameters; - } - - /// - /// Check if generic object is a collection. - /// - /// - /// True if object is a collection type - private static bool IsCollection(object value) - { - return value is IList || value is ICollection; - } - } -} diff --git a/modules/openapi-generator/src/main/resources/csharp/ApiException.mustache b/modules/openapi-generator/src/main/resources/csharp/ApiException.mustache deleted file mode 100644 index ca8044580f2..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/ApiException.mustache +++ /dev/null @@ -1,51 +0,0 @@ -{{>partial_header}} -using System; - -namespace {{packageName}}.Client -{ - /// - /// API Exception - /// - {{>visibility}} class ApiException : Exception - { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public {{#supportsAsync}}dynamic{{/supportsAsync}}{{^supportsAsync}}object{{/supportsAsync}} ErrorContent { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() {} - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) - { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - public ApiException(int errorCode, string message, {{#supportsAsync}}dynamic{{/supportsAsync}}{{^supportsAsync}}object{{/supportsAsync}} errorContent = null) : base(message) - { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - } - } - -} diff --git a/modules/openapi-generator/src/main/resources/csharp/ApiResponse.mustache b/modules/openapi-generator/src/main/resources/csharp/ApiResponse.mustache deleted file mode 100644 index d04575d7ad9..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/ApiResponse.mustache +++ /dev/null @@ -1,45 +0,0 @@ -{{>partial_header}} -using System; -using System.Collections.Generic; - -namespace {{packageName}}.Client -{ - /// - /// API Response - /// - {{>visibility}} class ApiResponse - { - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - public int StatusCode { get; private set; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public IDictionary Headers { get; private set; } - - /// - /// Gets or sets the data (parsed HTTP body) - /// - /// The data. - public T Data { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - public ApiResponse(int statusCode, IDictionary headers, T data) - { - this.StatusCode= statusCode; - this.Headers = headers; - this.Data = data; - } - - } - -} diff --git a/modules/openapi-generator/src/main/resources/csharp/AssemblyInfo.mustache b/modules/openapi-generator/src/main/resources/csharp/AssemblyInfo.mustache deleted file mode 100644 index bf80d7d4568..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/AssemblyInfo.mustache +++ /dev/null @@ -1,32 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("{{packageTitle}}")] -[assembly: AssemblyDescription("{{packageDescription}}")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("{{packageCompany}}")] -[assembly: AssemblyProduct("{{packageProductName}}")] -[assembly: AssemblyCopyright("{{packageCopyright}}")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("{{packageVersion}}")] -[assembly: AssemblyFileVersion("{{packageVersion}}")] diff --git a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache b/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache deleted file mode 100644 index b21c370a043..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/Configuration.mustache +++ /dev/null @@ -1,453 +0,0 @@ -{{>partial_header}} -using System; -using System.Reflection; -{{^net35}} -using System.Collections.Concurrent; -{{/net35}} -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace {{packageName}}.Client -{ - /// - /// Represents a set of configuration settings - /// - {{>visibility}} class Configuration : IReadableConfiguration - { - #region Constants - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "{{packageVersion}}"; - - /// - /// Identifier for ISO 8601 DateTime Format - /// - /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. - // ReSharper disable once InconsistentNaming - public const string ISO8601_DATETIME_FORMAT = "o"; - - #endregion Constants - - #region Static Members - - private static readonly object GlobalConfigSync = new { }; - private static Configuration _globalConfiguration; - - /// - /// Default creation of exceptions for a given method name and response object - /// - public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => - { - var status = (int)response.StatusCode; - if (status >= 400) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.Content), - response.Content); - } - {{^netStandard}}if (status == 0) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage); - }{{/netStandard}} - return null; - }; - - /// - /// Gets or sets the default Configuration. - /// - /// Configuration. - public static Configuration Default - { - get { return _globalConfiguration; } - set - { - lock (GlobalConfigSync) - { - _globalConfiguration = value; - } - } - } - - #endregion Static Members - - #region Private Members - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - private IDictionary _apiKey = null; - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - private IDictionary _apiKeyPrefix = null; - - private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - private string _tempFolderPath = Path.GetTempPath(); - - #endregion Private Members - - #region Constructors - - static Configuration() - { - _globalConfiguration = new GlobalConfiguration(); - } - - /// - /// Initializes a new instance of the class - /// - public Configuration() - { - UserAgent = "{{httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{packageVersion}}/csharp{{/httpUserAgent}}"; - BasePath = "{{{basePath}}}"; - DefaultHeader = new {{^net35}}Concurrent{{/net35}}Dictionary(); - ApiKey = new {{^net35}}Concurrent{{/net35}}Dictionary(); - ApiKeyPrefix = new {{^net35}}Concurrent{{/net35}}Dictionary(); - - // Setting Timeout has side effects (forces ApiClient creation). - Timeout = 100000; - } - - /// - /// Initializes a new instance of the class - /// - public Configuration( - IDictionary defaultHeader, - IDictionary apiKey, - IDictionary apiKeyPrefix, - string basePath = "{{{basePath}}}") : this() - { - if (string.{{^net35}}IsNullOrWhiteSpace{{/net35}}{{#net35}}IsNullOrEmpty{{/net35}}(basePath)) - throw new ArgumentException("The provided basePath is invalid.", "basePath"); - if (defaultHeader == null) - throw new ArgumentNullException("defaultHeader"); - if (apiKey == null) - throw new ArgumentNullException("apiKey"); - if (apiKeyPrefix == null) - throw new ArgumentNullException("apiKeyPrefix"); - - BasePath = basePath; - - foreach (var keyValuePair in defaultHeader) - { - DefaultHeader.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKey) - { - ApiKey.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKeyPrefix) - { - ApiKeyPrefix.Add(keyValuePair); - } - } - - /// - /// Initializes a new instance of the class with different settings - /// - /// Api client - /// Dictionary of default HTTP header - /// Username - /// Password - /// accessToken - /// Dictionary of API key - /// Dictionary of API key prefix - /// Temp folder path - /// DateTime format string - /// HTTP connection timeout (in milliseconds) - /// HTTP user agent - [Obsolete("Use explicit object construction and setting of properties.", true)] - public Configuration( - // ReSharper disable UnusedParameter.Local - ApiClient apiClient = null, - IDictionary defaultHeader = null, - string username = null, - string password = null, - string accessToken = null, - IDictionary apiKey = null, - IDictionary apiKeyPrefix = null, - string tempFolderPath = null, - string dateTimeFormat = null, - int timeout = 100000, - string userAgent = "{{httpUserAgent}}{{^httpUserAgent}}OpenAPI-Generator/{{packageVersion}}/csharp{{/httpUserAgent}}" - // ReSharper restore UnusedParameter.Local - ) - { - - } - - /// - /// Initializes a new instance of the Configuration class. - /// - /// Api client. - [Obsolete("This constructor caused unexpected sharing of static data. It is no longer supported.", true)] - // ReSharper disable once UnusedParameter.Local - public Configuration(ApiClient apiClient) - { - - } - - #endregion Constructors - - - #region Properties - - private ApiClient _apiClient = null; - /// - /// Gets an instance of an ApiClient for this configuration - /// - public virtual ApiClient ApiClient - { - get - { - if (_apiClient == null) _apiClient = CreateApiClient(); - return _apiClient; - } - } - - private String _basePath = null; - /// - /// Gets or sets the base path for API access. - /// - public virtual string BasePath { - get { return _basePath; } - set { - _basePath = value; - // pass-through to ApiClient if it's set. - if(_apiClient != null) { - _apiClient.RestClient.BaseUrl = new Uri(_basePath); - } - } - } - - /// - /// Gets or sets the default header. - /// - public virtual IDictionary DefaultHeader { get; set; } - - /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. - /// - public virtual int Timeout - { - {{#netStandard}}get { return (int)ApiClient.RestClient.Timeout.GetValueOrDefault(TimeSpan.FromSeconds(0)).TotalMilliseconds; } - set { ApiClient.RestClient.Timeout = TimeSpan.FromMilliseconds(value); }{{/netStandard}}{{^netStandard}} - get { return ApiClient.RestClient.Timeout; } - set { ApiClient.RestClient.Timeout = value; }{{/netStandard}} - } - - /// - /// Gets or sets the HTTP user agent. - /// - /// Http user agent. - public virtual string UserAgent { get; set; } - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public virtual string Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public virtual string Password { get; set; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix(string apiKeyIdentifier) - { - var apiKeyValue = ""; - ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); - var apiKeyPrefix = ""; - if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) - return apiKeyPrefix + " " + apiKeyValue; - else - return apiKeyValue; - } - - /// - /// Gets or sets the access token for OAuth2 authentication. - /// - /// The access token. - public virtual string AccessToken { get; set; } - - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public virtual string TempFolderPath - { - get { return _tempFolderPath; } - - set - { - if (string.IsNullOrEmpty(value)) - { - _tempFolderPath = Path.GetTempPath(); - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - { - Directory.CreateDirectory(value); - } - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - { - _tempFolderPath = value; - } - else - { - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - } - - /// - /// Gets or sets the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public virtual string DateTimeFormat - { - get { return _dateTimeFormat; } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - public virtual IDictionary ApiKeyPrefix - { - get { return _apiKeyPrefix; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); - } - _apiKeyPrefix = value; - } - } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public virtual IDictionary ApiKey - { - get { return _apiKey; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKey collection may not be null."); - } - _apiKey = value; - } - } - - #endregion Properties - - #region Methods - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - public void AddDefaultHeader(string key, string value) - { - DefaultHeader[key] = value; - } - - /// - /// Creates a new based on this instance. - /// - /// - public ApiClient CreateApiClient() - { - return new ApiClient(BasePath) { Configuration = this }; - } - - - /// - /// Returns a string with essential information for debugging. - /// - public static String ToDebugReport() - { - String report = "C# SDK ({{{packageName}}}) Debug Report:\n"; - {{^netStandard}} - {{^supportsUWP}} - report += " OS: " + System.Environment.OSVersion + "\n"; - report += " .NET Framework Version: " + System.Environment.Version + "\n"; - {{/supportsUWP}} - {{/netStandard}} - {{#netStandard}} - report += " OS: " + System.Runtime.InteropServices.RuntimeInformation.OSDescription + "\n"; - {{/netStandard}} - report += " Version of the API: {{{version}}}\n"; - report += " SDK Package Version: {{{packageVersion}}}\n"; - - return report; - } - - /// - /// Add Api Key Header. - /// - /// Api Key name. - /// Api Key value. - /// - public void AddApiKey(string key, string value) - { - ApiKey[key] = value; - } - - /// - /// Sets the API key prefix. - /// - /// Api Key name. - /// Api Key value. - public void AddApiKeyPrefix(string key, string value) - { - ApiKeyPrefix[key] = value; - } - - #endregion Methods - } -} diff --git a/modules/openapi-generator/src/main/resources/csharp/ExceptionFactory.mustache b/modules/openapi-generator/src/main/resources/csharp/ExceptionFactory.mustache deleted file mode 100644 index 7b330b7735f..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/ExceptionFactory.mustache +++ /dev/null @@ -1,20 +0,0 @@ -{{>partial_header}} - -using System; -{{#netStandard}} -using RestSharp.Portable; -{{/netStandard}} -{{^netStandard}} -using RestSharp; -{{/netStandard}} - -namespace {{packageName}}.Client -{ - /// - /// A delegate to ExceptionFactory method - /// - /// Method name - /// Response - /// Exceptions - {{>visibility}} delegate Exception ExceptionFactory(string methodName, IRestResponse response); -} diff --git a/modules/openapi-generator/src/main/resources/csharp/FodyWeavers.xml b/modules/openapi-generator/src/main/resources/csharp/FodyWeavers.xml deleted file mode 100644 index da017fcbf60..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/FodyWeavers.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/modules/openapi-generator/src/main/resources/csharp/GlobalConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp/GlobalConfiguration.mustache deleted file mode 100644 index 6afffc4ea65..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/GlobalConfiguration.mustache +++ /dev/null @@ -1,25 +0,0 @@ -{{>partial_header}} - -using System; -using System.Reflection; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; - -namespace {{packageName}}.Client -{ - /// - /// provides a compile-time extension point for globally configuring - /// API Clients. - /// - /// - /// A customized implementation via partial class may reside in another file and may - /// be excluded from automatic generation via a .openapi-generator-ignore file. - /// - public partial class GlobalConfiguration : Configuration - { - - } -} \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/IApiAccessor.mustache b/modules/openapi-generator/src/main/resources/csharp/IApiAccessor.mustache deleted file mode 100644 index 8834fb888d4..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/IApiAccessor.mustache +++ /dev/null @@ -1,38 +0,0 @@ -{{>partial_header}} - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -{{#netStandard}} -using RestSharp.Portable; -{{/netStandard}} -{{^netStandard}} -using RestSharp; -{{/netStandard}} - -namespace {{packageName}}.Client -{ - /// - /// Represents configuration aspects required to interact with the API endpoints. - /// - {{>visibility}} interface IApiAccessor - { - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - Configuration Configuration {get; set;} - - /// - /// Gets the base path of the API client. - /// - /// The base path - String GetBasePath(); - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - ExceptionFactory ExceptionFactory { get; set; } - } -} diff --git a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache deleted file mode 100644 index 18d3382c5fd..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/IReadableConfiguration.mustache +++ /dev/null @@ -1,85 +0,0 @@ -{{>partial_header}} - -using System.Collections.Generic; - -namespace {{packageName}}.Client -{ - /// - /// Represents a readable-only configuration contract. - /// - public interface IReadableConfiguration - { - /// - /// Gets the access token. - /// - /// Access token. - string AccessToken { get; } - - /// - /// Gets the API key. - /// - /// API key. - IDictionary ApiKey { get; } - - /// - /// Gets the API key prefix. - /// - /// API key prefix. - IDictionary ApiKeyPrefix { get; } - - /// - /// Gets the base path. - /// - /// Base path. - string BasePath { get; } - - /// - /// Gets the date time format. - /// - /// Date time format. - string DateTimeFormat { get; } - - /// - /// Gets the default header. - /// - /// Default header. - IDictionary DefaultHeader { get; } - - /// - /// Gets the temp folder path. - /// - /// Temp folder path. - string TempFolderPath { get; } - - /// - /// Gets the HTTP connection timeout (in milliseconds) - /// - /// HTTP connection timeout. - int Timeout { get; } - - /// - /// Gets the user agent. - /// - /// User agent. - string UserAgent { get; } - - /// - /// Gets the username. - /// - /// Username. - string Username { get; } - - /// - /// Gets the password. - /// - /// Password. - string Password { get; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - string GetApiKeyWithPrefix(string apiKeyIdentifier); - } -} diff --git a/modules/openapi-generator/src/main/resources/csharp/JsonSubTypesTests.mustache b/modules/openapi-generator/src/main/resources/csharp/JsonSubTypesTests.mustache deleted file mode 100644 index 55b1d51837d..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/JsonSubTypesTests.mustache +++ /dev/null @@ -1,125 +0,0 @@ -{{>partial_header}} - -using System.Collections.Generic; -using System.Linq; -using JsonSubTypes; -using Newtonsoft.Json; -using NUnit.Framework; - -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.{{modelPackage}}; -using {{packageName}}.Client; - -namespace {{packageName}}.Test.Client -{ - public class JsonSubTypesTests - { - [Test] - public void TestSimpleJsonSubTypesExample() - { - var animal = - JsonConvert.DeserializeObject("{\"Kind\":\"Dog\",\"Breed\":\"Jack Russell Terrier\"}"); - Assert.AreEqual("Jack Russell Terrier", (animal as Dog)?.Breed); - } - - [Test] - public void DeserializeObjectWithCustomMapping() - { - var animal = - JsonConvert.DeserializeObject("{\"Sound\":\"Bark\",\"Breed\":\"Jack Russell Terrier\"}"); - Assert.AreEqual("Jack Russell Terrier", (animal as Dog2)?.Breed); - } - - [Test] - public void DeserializeObjectMappingByPropertyPresence() - { - string json = - "[{\"Department\":\"Department1\",\"JobTitle\":\"JobTitle1\",\"FirstName\":\"FirstName1\",\"LastName\":\"LastName1\"}," + - "{\"Department\":\"Department1\",\"JobTitle\":\"JobTitle1\",\"FirstName\":\"FirstName1\",\"LastName\":\"LastName1\"}," + - "{\"Skill\":\"Painter\",\"FirstName\":\"FirstName1\",\"LastName\":\"LastName1\"}]"; - - - var persons = JsonConvert.DeserializeObject>(json); - Assert.AreEqual("Painter", (persons.Last() as Artist)?.Skill); - } - } - - [JsonConverter(typeof(JsonSubtypes), "Kind")] - public interface IAnimal - { - string Kind { get; } - } - - public class Dog : IAnimal - { - public Dog() - { - Kind = "Dog"; - } - - public string Kind { get; } - public string Breed { get; set; } - } - - class Cat : IAnimal - { - public Cat() - { - Kind = "Cat"; - } - - public string Kind { get; } - bool Declawed { get; set; } - } - - [JsonConverter(typeof(JsonSubtypes), "Sound")] - [JsonSubtypes.KnownSubType(typeof(Dog2), "Bark")] - [JsonSubtypes.KnownSubType(typeof(Cat2), "Meow")] - public class Animal2 - { - public virtual string Sound { get; } - public string Color { get; set; } - } - - public class Dog2 : Animal2 - { - public Dog2() - { - Sound = "Bark"; - } - - public override string Sound { get; } - public string Breed { get; set; } - } - - public class Cat2 : Animal2 - { - public Cat2() - { - Sound = "Meow"; - } - - public override string Sound { get; } - public bool Declawed { get; set; } - } - - [JsonConverter(typeof(JsonSubtypes))] - [JsonSubtypes.KnownSubTypeWithProperty(typeof(Employee), "JobTitle")] - [JsonSubtypes.KnownSubTypeWithProperty(typeof(Artist), "Skill")] - public class Person - { - public string FirstName { get; set; } - public string LastName { get; set; } - } - - public class Employee : Person - { - public string Department { get; set; } - public string JobTitle { get; set; } - } - - public class Artist : Person - { - public string Skill { get; set; } - } -} diff --git a/modules/openapi-generator/src/main/resources/csharp/OpenAPIDateConverter.mustache b/modules/openapi-generator/src/main/resources/csharp/OpenAPIDateConverter.mustache deleted file mode 100644 index d7905102576..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/OpenAPIDateConverter.mustache +++ /dev/null @@ -1,21 +0,0 @@ -{{>partial_header}} -using Newtonsoft.Json.Converters; - -namespace {{packageName}}.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public OpenAPIDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/modules/openapi-generator/src/main/resources/csharp/Project.mustache b/modules/openapi-generator/src/main/resources/csharp/Project.mustache deleted file mode 100644 index 04458a3d168..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/Project.mustache +++ /dev/null @@ -1,120 +0,0 @@ - - - - - {{#netStandard}}14.0{{/netStandard}} - Debug - AnyCPU - {{packageGuid}} - Library - Properties - {{packageName}} - {{packageName}} - {{#netStandard}} - {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - {{targetFramework}} - {{/netStandard}} - {{^netStandard}} - {{^supportsUWP}} - {{targetFramework}} - {{/supportsUWP}} - {{#supportsUWP}} - UAP - 10.0.10240.0 - 10.0.10240.0 - 14 - {{/supportsUWP}} - {{/netStandard}} - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\{{packageName}}.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\{{packageName}}.xml - - - {{^netStandard}} - - - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll - {{binRelativePath}}\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll - ..\packages\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll - {{binRelativePath}}\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll - - - $(SolutionDir)\packages\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll - ..\packages\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll - ..\..\packages\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll - {{binRelativePath}}\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll - - {{#generatePropertyChanged}} - - ..\..\packages\PropertyChanged.Fody.{{propertychanged-fody.version}}\Lib\portable-net4+sl4+wp8+win8+wpa81+MonoAndroid16+MonoTouch40\PropertyChanged.dll - - {{/generatePropertyChanged}} - {{/netStandard}} - {{#netStandard}} - - - {{/netStandard}} - - - - - {{^netStandard}} - - - {{#generatePropertyChanged}} - - {{/generatePropertyChanged}} - - - {{#generatePropertyChanged}} - - {{/generatePropertyChanged}} - {{/netStandard}} - {{#netStandard}} - - - {{/netStandard}} - diff --git a/modules/openapi-generator/src/main/resources/csharp/README.mustache b/modules/openapi-generator/src/main/resources/csharp/README.mustache deleted file mode 100644 index ba0ea30fc03..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/README.mustache +++ /dev/null @@ -1,228 +0,0 @@ -# {{packageName}} - the C# library for the {{appName}} - -{{#appDescriptionWithNewLines}} -{{{.}}} -{{/appDescriptionWithNewLines}} - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: {{appVersion}} -- SDK version: {{packageVersion}} -{{^hideGenerationTimestamp}} -- Build date: {{generatedDate}} -{{/hideGenerationTimestamp}} -- Build package: {{generatorClass}} -{{#infoUrl}} - For more information, please visit [{{{infoUrl}}}]({{{infoUrl}}}) -{{/infoUrl}} - -## Frameworks supported - -{{#netStandard}} - -- .NET Core >=1.0 -- .NET Framework >=4.6 -- Mono/Xamarin >=vNext -- UWP >=10.0 -{{/netStandard}} -{{^netStandard}} -{{^supportsUWP}} - -- .NET 4.0 or later -- Windows Phone 7.1 (Mango) -{{/supportsUWP}} -{{#supportsUWP}} - -- UWP -{{/supportsUWP}} -{{/netStandard}} - -## Dependencies - -{{#netStandard}} - -- FubarCoder.RestSharp.Portable.Core >=4.0.7 -- FubarCoder.RestSharp.Portable.HttpClient >=4.0.7 -- Newtonsoft.Json >=10.0.3 -{{/netStandard}} -{{^netStandard}} - -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 105.1.0 or later -- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.2.0 or later - -The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages: - -``` -Install-Package RestSharp -Install-Package Newtonsoft.Json -Install-Package JsonSubTypes -``` - -NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742) -{{/netStandard}} - -## Installation - -{{#netStandard}} -Generate the DLL using your preferred tool -{{/netStandard}} -{{^netStandard}} -Run the following command to generate the DLL - -- [Mac/Linux] `/bin/sh build.sh` -- [Windows] `build.bat` -{{/netStandard}} - -Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: - -```csharp -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.Client; -using {{packageName}}.{{modelPackage}}; - -``` - -{{^netStandard}} - -## Packaging - -A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages. - -This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly: - -``` -nuget pack -Build -OutputDirectory out {{packageName}}.csproj -``` - -Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual. - -{{/netStandard}} - -## Getting Started - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.Client; -using {{packageName}}.{{modelPackage}}; - -namespace Example -{ - public class {{operationId}}Example - { - public static void Main() - { -{{#apiInfo}}{{#apis}}{{#-first}}{{#operations}}{{#operation}}{{#-first}} - Configuration.Default.BasePath = "{{{basePath}}}"; - {{#hasAuthMethods}} - {{#authMethods}} - {{#isBasic}} - {{#isBasicBasic}} - // Configure HTTP basic authorization: {{{name}}} - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - {{/isBasicBasic}} - {{#isBasicBearer}} - // Configure HTTP bearer authorization: {{{name}}} - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - {{/isBasicBearer}} - {{/isBasic}} - {{#isApiKey}} - // Configure API key authorization: {{{name}}} - Configuration.Default.ApiKey.Add("{{{keyParamName}}}", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.ApiKeyPrefix.Add("{{{keyParamName}}}", "Bearer"); - {{/isApiKey}} - {{#isOAuth}} - // Configure OAuth2 access token for authorization: {{{name}}} - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - {{/isOAuth}} - {{/authMethods}} - - {{/hasAuthMethods}} - var apiInstance = new {{classname}}(Configuration.Default); - {{#allParams}} - {{#isPrimitiveType}} - var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/isPrimitiveType}} - {{^isPrimitiveType}} - var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/isPrimitiveType}} - {{/allParams}} - - try - { - {{#summary}} - // {{{.}}} - {{/summary}} - {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} - Debug.WriteLine(result);{{/returnType}} - } - catch (ApiException e) - { - Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } -{{/-first}}{{/operation}}{{/operations}}{{/-first}}{{/apis}}{{/apiInfo}} - } - } -} -``` - -## Documentation for API Endpoints - -All URIs are relative to *{{{basePath}}}* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{{summary}}} -{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}} - -## Documentation for Models - -{{#modelPackage}} -{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}]({{modelDocPath}}{{{classname}}}.md) -{{/model}}{{/models}} -{{/modelPackage}} -{{^modelPackage}} -No model defined in this package -{{/modelPackage}} - - -## Documentation for Authorization - -{{^authMethods}}Endpoints do not require authorization.{{/authMethods}} -{{#hasAuthMethods}}Authentication schemes defined for the API:{{/hasAuthMethods}} -{{#authMethods}} - -### {{name}} - -{{#isApiKey}} -- **Type**: API key -- **API key parameter name**: {{keyParamName}} -- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} -{{/isApiKey}} -{{#isBasic}} -{{#isBasicBasic}} -- **Type**: HTTP basic authentication -{{/isBasicBasic}} -{{#isBasicBearer}} -- **Type**: HTTP bearer authentication -{{/isBasicBearer}} -{{#isHttpSignature}} -- **Type**: HTTP signature authentication -{{/isHttpSignature}} -{{/isBasic}} -{{#isOAuth}} -- **Type**: OAuth -- **Flow**: {{flow}} -- **Authorization URL**: {{authorizationUrl}} -- **Scopes**: {{^scopes}}N/A{{/scopes}} -{{#scopes}} - {{scope}}: {{description}} -{{/scopes}} -{{/isOAuth}} - -{{/authMethods}} diff --git a/modules/openapi-generator/src/main/resources/csharp/ReadOnlyDictionary.mustache b/modules/openapi-generator/src/main/resources/csharp/ReadOnlyDictionary.mustache deleted file mode 100644 index 1299b2436be..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/ReadOnlyDictionary.mustache +++ /dev/null @@ -1,137 +0,0 @@ -{{>partial_header}} -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace {{packageName}}.Client -{ - public class ReadOnlyDictionary : IDictionary - { - private IDictionary _dictionaryImplementation; - public IEnumerator> GetEnumerator() - { - return _dictionaryImplementation.GetEnumerator(); - } - - public ReadOnlyDictionary() - { - _dictionaryImplementation = new Dictionary(); - } - - public ReadOnlyDictionary(IDictionary dictionaryImplementation) - { - if (dictionaryImplementation == null) throw new ArgumentNullException("dictionaryImplementation"); - _dictionaryImplementation = dictionaryImplementation; - } - - IEnumerator IEnumerable.GetEnumerator() - { - return ((IEnumerable) _dictionaryImplementation).GetEnumerator(); - } - - public void Add(KeyValuePair item) - { - throw new ReadonlyOperationException("This instance is readonly."); - } - - public void Clear() - { - throw new ReadonlyOperationException("This instance is readonly."); - } - - public bool Contains(KeyValuePair item) - { - return _dictionaryImplementation.Contains(item); - } - - public void CopyTo(KeyValuePair[] array, int arrayIndex) - { - _dictionaryImplementation.CopyTo(array, arrayIndex); - } - - public bool Remove(KeyValuePair item) - { - throw new ReadonlyOperationException("This instance is readonly."); - } - - public int Count - { - get { return _dictionaryImplementation.Count; } - } - - public bool IsReadOnly - { - get { return true; } - } - - public void Add(T key, K value) - { - throw new ReadonlyOperationException("This instance is readonly."); - } - - public bool ContainsKey(T key) - { - return _dictionaryImplementation.ContainsKey(key); - } - - public bool Remove(T key) - { - throw new ReadonlyOperationException("This instance is readonly."); - } - - public bool TryGetValue(T key, out K value) - { - return _dictionaryImplementation.TryGetValue(key, out value); - } - - public K this[T key] - { - get { return _dictionaryImplementation[key]; } - set - { - throw new ReadonlyOperationException("This instance is readonly."); - - } - } - - public ICollection Keys - { - get { return _dictionaryImplementation.Keys; } - } - - public ICollection Values - { - get { return _dictionaryImplementation.Values; } - } - } - - [Serializable] - public class ReadonlyOperationException : Exception - { - // - // For guidelines regarding the creation of new exception types, see - // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp - // and - // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp - // - - public ReadonlyOperationException() - { - } - - public ReadonlyOperationException(string message) : base(message) - { - } - - public ReadonlyOperationException(string message, Exception inner) : base(message, inner) - { - } - - protected ReadonlyOperationException( - SerializationInfo info, - StreamingContext context) : base(info, context) - { - } - } -} diff --git a/modules/openapi-generator/src/main/resources/csharp/Solution.mustache b/modules/openapi-generator/src/main/resources/csharp/Solution.mustache deleted file mode 100644 index 112cc3dc405..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/Solution.mustache +++ /dev/null @@ -1,27 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio {{^netStandard}}2012{{/netStandard}}{{#netStandard}}14{{/netStandard}} -VisualStudioVersion = {{^netStandard}}12.0.0.0{{/netStandard}}{{#netStandard}}14.0.25420.1{{/netStandard}} -MinimumVisualStudioVersion = {{^netStandard}}10.0.0.1{{/netStandard}}{{#netStandard}}10.0.40219.1{{/netStandard}} -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{packageName}}", "src\{{packageName}}\{{packageName}}.csproj", "{{packageGuid}}" -EndProject -{{^excludeTests}}Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "{{testPackageName}}", "src\{{testPackageName}}\{{testPackageName}}.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" -EndProject -{{/excludeTests}}Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {{packageGuid}}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {{packageGuid}}.Debug|Any CPU.Build.0 = Debug|Any CPU - {{packageGuid}}.Release|Any CPU.ActiveCfg = Release|Any CPU - {{packageGuid}}.Release|Any CPU.Build.0 = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal \ No newline at end of file diff --git a/modules/openapi-generator/src/main/resources/csharp/TestProject.mustache b/modules/openapi-generator/src/main/resources/csharp/TestProject.mustache deleted file mode 100644 index 1068f8db247..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/TestProject.mustache +++ /dev/null @@ -1,100 +0,0 @@ - - - - - Debug - AnyCPU - {19F1DEBC-DE5E-4517-8062-F000CD499087} - Library - Properties - {{testPackageName}} - {{testPackageName}} - {{^supportsUWP}} - {{targetFramework}} - {{/supportsUWP}} - {{#supportsUWP}} - UAP - 10.0.10240.0 - 10.0.10240.0 - 14 - {{/supportsUWP}} - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll - {{binRelativePath}}\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll - ..\packages\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll - {{binRelativePath}}\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll - - - $(SolutionDir)\packages\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll - ..\packages\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll - ..\..\packages\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll - {{binRelativePath}}\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll - - - $(SolutionDir)\packages\NUnit.{{nunit.version}}\lib\{{nunit.targetFramework}}\nunit.framework.dll - ..\packages\NUnit.{{nunit.version}}\lib\{{nunit.targetFramework}}\nunit.framework.dll - ..\..\packages\NUnit.{{nunit.version}}\lib\{{nunit.targetFramework}}\nunit.framework.dll - {{binRelativePath}}\NUnit.{{nunit.version}}\lib\{{nunit.targetFramework}}\nunit.framework.dll - - - - - - - - - - - - {{packageGuid}} - {{packageName}} - - - diff --git a/modules/openapi-generator/src/main/resources/csharp/api.mustache b/modules/openapi-generator/src/main/resources/csharp/api.mustache deleted file mode 100644 index 61f0f76c31c..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/api.mustache +++ /dev/null @@ -1,508 +0,0 @@ -{{>partial_header}} -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -{{#netStandard}} -using RestSharp.Portable; -{{/netStandard}} -{{^netStandard}} -using RestSharp; -{{/netStandard}} -using {{packageName}}.Client; -{{#hasImport}}using {{packageName}}.{{modelPackage}}; -{{/hasImport}} - -namespace {{packageName}}.{{apiPackage}} -{ - {{#operations}} - /// - /// Represents a collection of functions to interact with the API endpoints - /// - {{>visibility}} interface {{interfacePrefix}}{{classname}} : IApiAccessor - { - #region Synchronous Operations - {{#operation}} - /// - /// {{{summary}}} - /// - /// - /// {{{notes}}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// {{{returnType}}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); - - /// - /// {{{summary}}} - /// - /// - /// {{{notes}}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// ApiResponse of {{{returnType}}}{{^returnType}}Object(void){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}); - {{/operation}} - #endregion Synchronous Operations - {{#supportsAsync}} - #region Asynchronous Operations - {{#operation}} - /// - /// {{{summary}}} - /// - /// - /// {{{notes}}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// Cancellation Token to cancel request (optional) - /// Task of {{{returnType}}}{{^returnType}}void{{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - {{#returnType}}System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// {{summary}} - /// - /// - /// {{{notes}}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// Cancellation Token to cancel request (optional) - /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}CancellationToken cancellationToken = default(CancellationToken)); - {{/operation}} - #endregion Asynchronous Operations - {{/supportsAsync}} - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - {{>visibility}} partial class {{classname}} : {{interfacePrefix}}{{classname}} - { - private {{packageName}}.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public {{classname}}(String basePath) - { - this.Configuration = new {{packageName}}.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public {{classname}}() - { - this.Configuration = {{packageName}}.Client.Configuration.Default; - - ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public {{classname}}({{packageName}}.Client.Configuration configuration = null) - { - if (configuration == null) // use the default one in Configuration - this.Configuration = {{packageName}}.Client.Configuration.Default; - else - this.Configuration = configuration; - - ExceptionFactory = {{packageName}}.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public {{packageName}}.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - public {{packageName}}.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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new {{^net35}}ReadOnly{{/net35}}Dictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - {{#operation}} - /// - /// {{{summary}}} {{{notes}}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// {{{returnType}}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - public {{{returnType}}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) - { - {{#returnType}}ApiResponse<{{{returnType}}}> localVarResponse = {{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - return localVarResponse.Data;{{/returnType}}{{^returnType}}{{operationId}}WithHttpInfo({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{/returnType}} - } - - /// - /// {{{summary}}} {{{notes}}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// ApiResponse of {{{returnType}}}{{^returnType}}Object(void){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - public ApiResponse<{{{returnType}}}{{^returnType}}Object{{/returnType}}> {{operationId}}WithHttpInfo ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) - { - {{#allParams}} - {{#required}} - // verify the required parameter '{{paramName}}' is set - if ({{paramName}} == null) - throw new ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - {{/required}} - {{/allParams}} - - var localVarPath = "{{#netStandard}}.{{/netStandard}}{{{path}}}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - {{#consumes}} - "{{{mediaType}}}"{{^-last}}, {{/-last}} - {{/consumes}} - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - {{#produces}} - "{{{mediaType}}}"{{^-last}},{{/-last}} - {{/produces}} - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - {{#pathParams}} - if ({{paramName}} != null) localVarPathParams.Add("{{baseName}}", this.Configuration.ApiClient.ParameterToString({{paramName}})); // path parameter - {{/pathParams}} - {{#queryParams}} - if ({{paramName}} != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("{{collectionFormat}}", "{{baseName}}", {{paramName}})); // query parameter - {{/queryParams}} - {{#headerParams}} - if ({{paramName}} != null) localVarHeaderParams.Add("{{baseName}}", this.Configuration.ApiClient.ParameterToString({{paramName}})); // header parameter - {{/headerParams}} - {{#formParams}} - if ({{paramName}} != null) {{#isFile}}localVarFileParams.Add("{{baseName}}", this.Configuration.ApiClient.ParameterToFile("{{baseName}}", {{paramName}}));{{/isFile}}{{^isFile}}localVarFormParams.Add("{{baseName}}", {{#vendorExtensions.x-is-json}}{{paramName}}.ToJson(){{/vendorExtensions.x-is-json}}{{^vendorExtensions.x-is-json}}this.Configuration.ApiClient.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}}){{/vendorExtensions.x-is-json}}); // form parameter{{/isFile}} - {{/formParams}} - {{#bodyParam}} - if ({{paramName}} != null && {{paramName}}.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize({{paramName}}); // http body (model) parameter - } - else - { - localVarPostBody = {{paramName}}; // byte array - } - {{/bodyParam}} - - {{#authMethods}} - // authentication ({{name}}) required - {{#isApiKey}} - {{#isKeyInHeader}} - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarHeaderParams["{{keyParamName}}"] = this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"); - } - {{/isKeyInHeader}} - {{#isKeyInQuery}} - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); - } - {{/isKeyInQuery}} - {{/isApiKey}} - {{#isBasic}} - {{#isBasicBasic}} - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - {{/isBasicBasic}} - {{#isBasicBearer}} - // http bearer authentication required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - {{/isBasicBearer}} - {{/isBasic}} - {{#isOAuth}} - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - {{/isOAuth}} - {{/authMethods}} - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.{{httpMethod}}, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("{{operationId}}", localVarResponse); - if (exception != null) throw exception; - } - - {{#returnType}} - return new ApiResponse<{{{returnType}}}>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.{{^netStandard}}Name{{/netStandard}}{{#netStandard}}Key{{/netStandard}}, x => string.Join(",", x.Value){{#caseInsensitiveResponseHeaders}}, StringComparer.OrdinalIgnoreCase{{/caseInsensitiveResponseHeaders}}), - ({{{returnType}}}) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof({{{returnContainer}}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}))); - {{/returnType}} - {{^returnType}} - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.{{^netStandard}}Name{{/netStandard}}{{#netStandard}}Key{{/netStandard}}, x => string.Join(",", x.Value){{#caseInsensitiveResponseHeaders}}, StringComparer.OrdinalIgnoreCase{{/caseInsensitiveResponseHeaders}}), - null); - {{/returnType}} - } - - {{#supportsAsync}} - /// - /// {{{summary}}} {{{notes}}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// Cancellation Token to cancel request (optional) - /// Task of {{{returnType}}}{{^returnType}}void{{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - {{#returnType}}public async System.Threading.Tasks.Task<{{{.}}}>{{/returnType}}{{^returnType}}public async System.Threading.Tasks.Task{{/returnType}} {{operationId}}Async ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}CancellationToken cancellationToken = default(CancellationToken)) - { - {{#returnType}}ApiResponse<{{{returnType}}}> localVarResponse = await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken); - return localVarResponse.Data;{{/returnType}}{{^returnType}}await {{operationId}}WithHttpInfoAsync({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}cancellationToken);{{/returnType}} - - } - - /// - /// {{{summary}}} {{{notes}}} - /// - /// Thrown when fails to make API call - {{#allParams}}/// {{description}}{{^required}} (optional{{#defaultValue}}, default to {{.}}{{/defaultValue}}){{/required}}{{#isDeprecated}} (deprecated){{/isDeprecated}} - {{/allParams}}/// Cancellation Token to cancel request (optional) - /// Task of ApiResponse{{#returnType}} ({{.}}){{/returnType}} - {{#isDeprecated}} - [Obsolete] - {{/isDeprecated}} - public async System.Threading.Tasks.Task> {{operationId}}WithHttpInfoAsync ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = default({{{dataType}}}){{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}{{#allParams.0}}, {{/allParams.0}}CancellationToken cancellationToken = default(CancellationToken)) - { - {{#allParams}} - {{#required}} - // verify the required parameter '{{paramName}}' is set - if ({{paramName}} == null) - throw new ApiException(400, "Missing required parameter '{{paramName}}' when calling {{classname}}->{{operationId}}"); - {{/required}} - {{/allParams}} - - var localVarPath = "{{#netStandard}}.{{/netStandard}}{{{path}}}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - {{#consumes}} - "{{{mediaType}}}"{{^-last}}, {{/-last}} - {{/consumes}} - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - {{#produces}} - "{{{mediaType}}}"{{^-last}},{{/-last}} - {{/produces}} - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - {{#pathParams}} - if ({{paramName}} != null) localVarPathParams.Add("{{baseName}}", this.Configuration.ApiClient.ParameterToString({{paramName}})); // path parameter - {{/pathParams}} - {{#queryParams}} - if ({{paramName}} != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("{{collectionFormat}}", "{{baseName}}", {{paramName}})); // query parameter - {{/queryParams}} - {{#headerParams}} - if ({{paramName}} != null) localVarHeaderParams.Add("{{baseName}}", this.Configuration.ApiClient.ParameterToString({{paramName}})); // header parameter - {{/headerParams}} - {{#formParams}} - if ({{paramName}} != null) {{#isFile}}localVarFileParams.Add("{{baseName}}", this.Configuration.ApiClient.ParameterToFile("{{baseName}}", {{paramName}}));{{/isFile}}{{^isFile}}localVarFormParams.Add("{{baseName}}", {{#vendorExtensions.x-is-json}}{{paramName}}.ToJson(){{/vendorExtensions.x-is-json}}{{^vendorExtensions.x-is-json}}this.Configuration.ApiClient.{{#isPrimitiveType}}ParameterToString{{/isPrimitiveType}}{{^isPrimitiveType}}Serialize{{/isPrimitiveType}}({{paramName}}){{/vendorExtensions.x-is-json}}); // form parameter{{/isFile}} - {{/formParams}} - {{#bodyParam}} - if ({{paramName}} != null && {{paramName}}.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize({{paramName}}); // http body (model) parameter - } - else - { - localVarPostBody = {{paramName}}; // byte array - } - {{/bodyParam}} - - {{#authMethods}} - // authentication ({{name}}) required - {{#isApiKey}} - {{#isKeyInHeader}} - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarHeaderParams["{{keyParamName}}"] = this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"); - } - {{/isKeyInHeader}} - {{#isKeyInQuery}} - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "{{keyParamName}}", this.Configuration.GetApiKeyWithPrefix("{{keyParamName}}"))); - } - {{/isKeyInQuery}} - {{/isApiKey}} - {{#isBasic}} - {{#isBasicBasic}} - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - {{/isBasicBasic}} - {{#isBasicBearer}} - // http bearer authentication required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - {{/isBasicBearer}} - {{/isBasic}} - {{#isOAuth}} - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - {{/isOAuth}} - {{/authMethods}} - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.{{httpMethod}}, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("{{operationId}}", localVarResponse); - if (exception != null) throw exception; - } - - {{#returnType}} - return new ApiResponse<{{{returnType}}}>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.{{^netStandard}}Name{{/netStandard}}{{#netStandard}}Key{{/netStandard}}, x => string.Join(",", x.Value){{#caseInsensitiveResponseHeaders}}, StringComparer.OrdinalIgnoreCase{{/caseInsensitiveResponseHeaders}}), - ({{{returnType}}}) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof({{{returnContainer}}}{{^returnContainer}}{{{returnType}}}{{/returnContainer}}))); - {{/returnType}} - {{^returnType}} - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.{{^netStandard}}Name{{/netStandard}}{{#netStandard}}Key{{/netStandard}}, x => string.Join(",", x.Value){{#caseInsensitiveResponseHeaders}}, StringComparer.OrdinalIgnoreCase{{/caseInsensitiveResponseHeaders}}), - null); - {{/returnType}} - } - - {{/supportsAsync}} - {{/operation}} - } - {{/operations}} -} diff --git a/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache b/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache deleted file mode 100644 index 617e197006d..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/api_doc.mustache +++ /dev/null @@ -1,131 +0,0 @@ -# {{packageName}}.{{apiPackage}}.{{classname}}{{#description}} - -{{.}}{{/description}} - -All URIs are relative to *{{{basePath}}}* - -Method | HTTP request | Description -------------- | ------------- | ------------- -{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{summary}} -{{/operation}}{{/operations}} - -{{#operations}} -{{#operation}} - -## {{{operationId}}} - -> {{returnType}}{{^returnType}}void{{/returnType}} {{operationId}} ({{#allParams}}{{{dataType}}} {{paramName}}{{^required}}{{#optionalMethodArgument}} = null{{/optionalMethodArgument}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}}) - -{{{summary}}}{{#notes}} - -{{{.}}}{{/notes}} - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.Client; -using {{packageName}}.{{modelPackage}}; - -namespace Example -{ - public class {{operationId}}Example - { - public static void Main() - { - Configuration.Default.BasePath = "{{{basePath}}}"; - {{#hasAuthMethods}} - {{#authMethods}} - {{#isBasic}} - {{#isBasicBasic}} - // Configure HTTP basic authorization: {{{name}}} - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - {{/isBasicBasic}} - {{#isBasicBearer}} - // Configure HTTP bearer authorization: {{{name}}} - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - {{/isBasicBearer}} - {{/isBasic}} - {{#isApiKey}} - // Configure API key authorization: {{{name}}} - Configuration.Default.AddApiKey("{{{keyParamName}}}", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("{{{keyParamName}}}", "Bearer"); - {{/isApiKey}} - {{#isOAuth}} - // Configure OAuth2 access token for authorization: {{{name}}} - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - {{/isOAuth}} - {{/authMethods}} - - {{/hasAuthMethods}} - var apiInstance = new {{classname}}(Configuration.Default); - {{#allParams}} - {{#isPrimitiveType}} - var {{paramName}} = {{{example}}}; // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/isPrimitiveType}} - {{^isPrimitiveType}} - var {{paramName}} = new {{{dataType}}}(); // {{{dataType}}} | {{{description}}}{{^required}} (optional) {{/required}}{{#defaultValue}} (default to {{{.}}}){{/defaultValue}} - {{/isPrimitiveType}} - {{/allParams}} - - try - { - {{#summary}} - // {{{.}}} - {{/summary}} - {{#returnType}}{{{.}}} result = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}});{{#returnType}} - Debug.WriteLine(result);{{/returnType}} - } - catch (ApiException e) - { - Debug.Print("Exception when calling {{classname}}.{{operationId}}: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}} -Name | Type | Description | Notes -------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}} -{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{#isContainer}}{{baseType}}{{/isContainer}}{{^isContainer}}{{dataType}}{{/isContainer}}.md){{/isPrimitiveType}}| {{description}} | {{^required}}[optional] {{/required}}{{#defaultValue}}[default to {{.}}]{{/defaultValue}} -{{/allParams}} - -### Return type - -{{#returnType}}{{#returnTypeIsPrimitive}}**{{{returnType}}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}[**{{returnType}}**]({{returnBaseType}}.md){{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}void (empty response body){{/returnType}} - -### Authorization - -{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{{name}}}](../README.md#{{{name}}}){{^-last}}, {{/-last}}{{/authMethods}} - -### HTTP request headers - -- **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}} -- **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}} - -{{#responses.0}} - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -{{#responses}} -| **{{code}}** | {{message}} | {{#headers}} * {{baseName}} - {{description}}
{{/headers}}{{^headers.0}} - {{/headers.0}} | -{{/responses}} -{{/responses.0}} - -[[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) - -{{/operation}} -{{/operations}} diff --git a/modules/openapi-generator/src/main/resources/csharp/api_test.mustache b/modules/openapi-generator/src/main/resources/csharp/api_test.mustache deleted file mode 100644 index 67d6b3dfbce..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/api_test.mustache +++ /dev/null @@ -1,74 +0,0 @@ -{{>partial_header}} -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 {{packageName}}.Client; -using {{packageName}}.{{apiPackage}}; -{{#hasImport}}using {{packageName}}.{{modelPackage}}; -{{/hasImport}} - -namespace {{packageName}}.Test -{ - /// - /// Class for testing {{classname}} - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class {{classname}}Tests - { - private {{classname}} instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new {{classname}}(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of {{classname}} - /// - [Test] - public void {{operationId}}InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' {{classname}} - //Assert.IsInstanceOf(typeof({{classname}}), instance); - } - - {{#operations}}{{#operation}} - /// - /// Test {{operationId}} - /// - [Test] - public void {{operationId}}Test() - { - // TODO uncomment below to test the method and replace null with proper value - {{#allParams}} - //{{{dataType}}} {{paramName}} = null; - {{/allParams}} - //{{#returnType}}var response = {{/returnType}}instance.{{operationId}}({{#allParams}}{{paramName}}{{^-last}}, {{/-last}}{{/allParams}}); - {{#returnType}}//Assert.IsInstanceOf(typeof({{{returnType}}}), response, "response is {{{returnType}}}");{{/returnType}} - } - {{/operation}}{{/operations}} - } - -} diff --git a/modules/openapi-generator/src/main/resources/csharp/compile-mono.sh.mustache b/modules/openapi-generator/src/main/resources/csharp/compile-mono.sh.mustache deleted file mode 100644 index 011cc0f6d5f..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/compile-mono.sh.mustache +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env bash -# -# Generated by: https://github.com/openapitools/openapi-generator.git -# - -frameworkVersion={{targetFrameworkNuget}} - -# sdk must match installed frameworks under PREFIX/lib/mono/[value] -sdk={{x-mcs-sdk}} - -# langversion refers to C# language features. see man mcs for details. -langversion=${sdk} -nuget_cmd=nuget - -# Match against our known SDK possibilities -case "${sdk}" in - 4) - langversion=4 - ;; - 4.5*) - langversion=5 - ;; - 4.6*) - langversion=6 - ;; - 4.7*) - langversion=7 # ignoring 7.1 for now. - ;; - *) - langversion=6 - ;; -esac - -echo "[INFO] Target framework: ${frameworkVersion}" - -if ! type nuget &>/dev/null; then - echo "[INFO] Download nuget and packages" - wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe; - nuget_cmd="mono nuget.exe" -fi - -mozroots --import --sync -${nuget_cmd} install src/{{packageName}}/packages.config -o packages; - -echo "[INFO] Copy DLLs to the 'bin' folder" -mkdir -p bin; -cp packages/Newtonsoft.Json.{{newtonsoft-json.version}}/lib/{{newtonsoft-json.targetFramework}}/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; -cp packages/RestSharp.{{restsharp.version}}/lib/{{restsharp.targetFramework}}/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.{{json-subtypes.version}}/lib/{{json-subtypes.targetFramework}}/JsonSubTypes.dll bin/JsonSubTypes.dll -{{#generatePropertyChanged}} -cp packages/Fody.{{fody.version}}/Fody.dll bin/Fody.dll -cp packages/PropertyChanged.Fody.{{propertychanged-fody.version}}/PropertyChanged.Fody.dll bin/PropertyChanged.Fody.dll -cp packages/PropertyChanged.Fody.{{propertychanged-fody.version}}/Lib/dotnet/PropertyChanged.dll bin/PropertyChanged.dll -{{/generatePropertyChanged}} - -echo "[INFO] Run 'mcs' to build bin/{{{packageName}}}.dll" -mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\ -{{#generatePropertyChanged}} -bin/Fody.dll,\ -bin/PropertyChanged.Fody.dll,\ -bin/PropertyChanged.dll,\ -{{/generatePropertyChanged}} -bin/RestSharp.dll,\ -System.ComponentModel.DataAnnotations.dll,\ -System.Runtime.Serialization.dll \ --target:library \ --out:bin/{{packageName}}.dll \ --recurse:'src/{{packageName}}/*.cs' \ --doc:bin/{{packageName}}.xml \ --platform:anycpu - -if [ $? -ne 0 ] -then - echo "[ERROR] Compilation failed with exit code $?" - exit 1 -else - echo "[INFO] bin/{{{packageName}}}.dll was created successfully" -fi diff --git a/modules/openapi-generator/src/main/resources/csharp/compile.mustache b/modules/openapi-generator/src/main/resources/csharp/compile.mustache deleted file mode 100644 index 920ce2c2427..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/compile.mustache +++ /dev/null @@ -1,26 +0,0 @@ -:: Generated by: https://github.com/openapitools/openapi-generator.git -:: - -@echo off - -{{#supportsAsync}} -SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319 -{{/supportsAsync}} -{{^supportsAsync}} -SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v3.5 -{{/supportsAsync}} - -if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '.\nuget.exe')" -.\nuget.exe install src\{{packageName}}\packages.config -o packages - -if not exist ".\bin" mkdir bin - -copy packages\Newtonsoft.Json.{{newtonsoft-json.version}}\lib\{{newtonsoft-json.targetFramework}}\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.{{json-subtypes.version}}\lib\{{json-subtypes.targetFramework}}\JsonSubTypes.dll bin\JsonSubTypes.dll -copy packages\RestSharp.{{restsharp.version}}\lib\{{restsharp.targetFramework}}\RestSharp.dll bin\RestSharp.dll -{{#generatePropertyChanged}} -copy packages\Fody.{{fody.version}}\Fody.dll bin\Fody.dll -copy packages\PropertyChanged.Fody.{{propertychanged-fody.version}}\PropertyChanged.Fody.dll bin\PropertyChanged.Fody.dll -copy packages\PropertyChanged.Fody.{{propertychanged-fody.version}}\Lib\dotnet\PropertyChanged.dll bin\PropertyChanged.dll -{{/generatePropertyChanged}} -%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll {{#generatePropertyChanged}}/r:bin\Fody.dll;bin\PropertyChanged.Fody.dll;bin\PropertyChanged.dll{{/generatePropertyChanged}} /target:library /out:bin\{{packageName}}.dll /recurse:src\{{packageName}}\*.cs /doc:bin\{{packageName}}.xml diff --git a/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache b/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache deleted file mode 100644 index 017e8acaa78..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/enumClass.mustache +++ /dev/null @@ -1,22 +0,0 @@ - /// - /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} - /// - {{#description}} - /// {{.}} - {{/description}} - {{^useGenericHost}} - [JsonConverter(typeof(StringEnumConverter))] - {{/useGenericHost}} - {{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}} - { - {{#allowableValues}} - {{#enumVars}} - /// - /// Enum {{name}} for {{{value}}} - /// - [EnumMember(Value = {{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isFloat}}"{{/isFloat}}{{#isDouble}}"{{/isDouble}}{{{value}}}{{#isLong}}"{{/isLong}}{{#isInteger}}"{{/isInteger}}{{#isDouble}}"{{/isDouble}}{{#isFloat}}"{{/isFloat}})] - {{name}}{{#isLong}} = {{{value}}}{{/isLong}}{{#isInteger}} = {{{value}}}{{/isInteger}}{{^isInteger}} = {{-index}}{{/isInteger}}{{^-last}},{{/-last}} - - {{/enumVars}} - {{/allowableValues}} - } diff --git a/modules/openapi-generator/src/main/resources/csharp/git_push.sh.mustache b/modules/openapi-generator/src/main/resources/csharp/git_push.sh.mustache deleted file mode 100755 index 0e3776ae6dd..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/git_push.sh.mustache +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="{{{gitHost}}}" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="{{{gitUserId}}}" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="{{{gitRepoId}}}" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="{{{releaseNote}}}" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/modules/openapi-generator/src/main/resources/csharp/gitignore.mustache b/modules/openapi-generator/src/main/resources/csharp/gitignore.mustache deleted file mode 100644 index 1ee53850b84..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/gitignore.mustache +++ /dev/null @@ -1,362 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd diff --git a/modules/openapi-generator/src/main/resources/csharp/model.mustache b/modules/openapi-generator/src/main/resources/csharp/model.mustache deleted file mode 100644 index ceed733d5a3..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/model.mustache +++ /dev/null @@ -1,38 +0,0 @@ -{{>partial_header}} -using System; -using System.Linq; -using System.IO; -using System.Text; -{{^netStandard}} -using System.Text.RegularExpressions; -{{/netStandard}} -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -{{#models}} -{{#model}} -{{#discriminator}} -using JsonSubTypes; -{{/discriminator}} -{{/model}} -{{/models}} -{{^netStandard}} -{{#generatePropertyChanged}} -using PropertyChanged; -using System.ComponentModel; -{{/generatePropertyChanged}} -using System.ComponentModel.DataAnnotations; -{{/netStandard}} -using OpenAPIDateConverter = {{packageName}}.Client.OpenAPIDateConverter; - -{{#models}} -{{#model}} -namespace {{packageName}}.{{modelPackage}} -{ -{{#isEnum}}{{>modelEnum}}{{/isEnum}}{{^isEnum}}{{>modelGeneric}}{{/isEnum}} -{{/model}} -{{/models}} -} diff --git a/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache b/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache deleted file mode 100644 index f3e0e9106dc..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/modelEnum.mustache +++ /dev/null @@ -1,24 +0,0 @@ - /// - /// {{description}}{{^description}}Defines {{{name}}}{{/description}} - /// - {{#description}} - /// {{.}} - {{/description}} - {{#allowableValues}}{{#enumVars}}{{#-first}}{{#isString}}{{^useGenericHost}} - [JsonConverter(typeof(StringEnumConverter))] - {{/useGenericHost}}{{/isString}}{{/-first}}{{/enumVars}}{{/allowableValues}} - {{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} - { - {{#allowableValues}} - {{#enumVars}} - /// - /// Enum {{name}} for value: {{{value}}} - /// - {{#isString}} - [EnumMember(Value = "{{{value}}}")] - {{/isString}} - {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}},{{/-last}} - - {{/enumVars}} - {{/allowableValues}} - }{{! NOTE: This model's enumVars is modified to look like CodegenProperty}} diff --git a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache b/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache deleted file mode 100644 index ecc0296e6e8..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/modelGeneric.mustache +++ /dev/null @@ -1,339 +0,0 @@ - /// - /// {{description}}{{^description}}{{classname}}{{/description}} - /// - [DataContract] - {{#discriminator}} - [JsonConverter(typeof(JsonSubtypes), "{{#lambda.camelcase_param}}{{{discriminatorName}}}{{/lambda.camelcase_param}}")]{{#children}} - [JsonSubtypes.KnownSubType(typeof({{classname}}), "{{^vendorExtensions.x-discriminator-value}}{{name}}{{/vendorExtensions.x-discriminator-value}}{{#vendorExtensions.x-discriminator-value}}{{{vendorExtensions.x-discriminator-value}}}{{/vendorExtensions.x-discriminator-value}}")]{{/children}} - {{/discriminator}} - {{#generatePropertyChanged}} - [ImplementPropertyChanged] - {{/generatePropertyChanged}} - {{>visibility}} partial class {{classname}} : {{#parent}}{{{.}}}, {{/parent}} IEquatable<{{classname}}>{{^netStandard}}{{#validatable}}, IValidatableObject{{/validatable}}{{/netStandard}} - { - {{#vars}} - {{#items.isEnum}} - {{#items}} - {{^complexType}} -{{>modelInnerEnum}} - {{/complexType}} - {{/items}} - {{/items.isEnum}} - {{#isEnum}} - {{^complexType}} -{{>modelInnerEnum}} - {{/complexType}} - {{/isEnum}} - {{#isEnum}} - /// - /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} - /// - {{#description}} - /// {{.}} - {{/description}} - [DataMember(Name="{{baseName}}", EmitDefaultValue={{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}{{#required}}true{{/required}}{{^required}}false{{/required}}{{/isNullable}}{{/vendorExtensions.x-emit-default-value}})] - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{complexType}}}{{^complexType}}{{{datatypeWithEnum}}}{{/complexType}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}} {{name}} { get; set; } - {{/isEnum}} - {{/vars}} - {{#hasRequired}} - {{^hasOnlyReadOnly}} - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected {{classname}}() { } - {{/hasOnlyReadOnly}} - {{/hasRequired}} - /// - /// Initializes a new instance of the class. - /// - {{#vars}} - {{^isReadOnly}} - /// {{description}}{{^description}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{/description}}{{#required}} (required){{/required}}{{#defaultValue}} (default to {{.}}){{/defaultValue}}. - {{/isReadOnly}} - {{/vars}} - {{#hasOnlyReadOnly}} - [JsonConstructorAttribute] - {{/hasOnlyReadOnly}} - public {{classname}}({{#readWriteVars}}{{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}} {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} = {{{defaultValue}}}{{^defaultValue}}default({{{datatypeWithEnum}}}{{#isEnum}}{{^isContainer}}{{^required}}?{{/required}}{{/isContainer}}{{/isEnum}}){{/defaultValue}}{{^-last}}, {{/-last}}{{/readWriteVars}}){{#parent}} : base({{#parentVars}}{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}{{^-last}}, {{/-last}}{{/parentVars}}){{/parent}} - { - {{#vars}} - {{^isInherited}} - {{^isReadOnly}} - {{#required}} - // to ensure "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" is required (not null) - if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) - { - throw new InvalidDataException("{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} is a required property for {{classname}} and cannot be null"); - } - else - { - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - } - - {{/required}} - {{#isNullable}} - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/isNullable}} - {{/isReadOnly}} - {{/isInherited}} - {{/vars}} - {{#vars}} - {{^isInherited}} - {{^isReadOnly}} - {{^required}} - {{#defaultValue}}// use default value if no "{{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}" provided - if ({{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}} == null) - { - this.{{name}} = {{{defaultValue}}}; - } - else - { - this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - } - {{/defaultValue}} - {{^defaultValue}} -this.{{name}} = {{#lambda.camelcase_param}}{{name}}{{/lambda.camelcase_param}}; - {{/defaultValue}} - {{/required}} - {{/isReadOnly}} - {{/isInherited}} - {{/vars}} - } - - {{#vars}} - {{^isInherited}} - {{^isEnum}} - /// - /// {{description}}{{^description}}Gets or Sets {{{name}}}{{/description}} - /// {{#description}} - /// {{.}}{{/description}} - [DataMember(Name="{{baseName}}", EmitDefaultValue={{#vendorExtensions.x-emit-default-value}}true{{/vendorExtensions.x-emit-default-value}}{{^vendorExtensions.x-emit-default-value}}{{#isNullable}}true{{/isNullable}}{{^isNullable}}{{#required}}true{{/required}}{{^required}}false{{/required}}{{/isNullable}}{{/vendorExtensions.x-emit-default-value}})]{{#isDate}} - [JsonConverter(typeof(OpenAPIDateConverter))]{{/isDate}} - {{#deprecated}} - [Obsolete] - {{/deprecated}} - public {{{dataType}}} {{name}} { get; {{#isReadOnly}}private {{/isReadOnly}}set; } - {{/isEnum}} - {{/isInherited}} - - {{/vars}} - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class {{classname}} {\n"); - {{#parent}} - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - {{/parent}} - {{#vars}} - sb.Append(" {{name}}: ").Append({{name}}).Append("\n"); - {{/vars}} - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public {{#parent}}{{^isArray}}{{^isMap}}override {{/isMap}}{{/isArray}}{{/parent}}{{^parent}}virtual {{/parent}}string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as {{classname}}); - } - - /// - /// Returns true if {{classname}} instances are equal - /// - /// Instance of {{classname}} to be compared - /// Boolean - public bool Equals({{classname}} input) - { - if (input == null) - return false; - - return {{#vars}}{{#parent}}base.Equals(input) && {{/parent}}{{^isContainer}} - ( - this.{{name}} == input.{{name}} || - (this.{{name}} != null && - this.{{name}}.Equals(input.{{name}})) - ){{^-last}} && {{/-last}}{{/isContainer}}{{#isContainer}} - ( - this.{{name}} == input.{{name}} || - this.{{name}} != null && - input.{{name}} != null && - this.{{name}}.SequenceEqual(input.{{name}}) - ){{^-last}} && {{/-last}}{{/isContainer}}{{/vars}}{{^vars}}{{#parent}}base.Equals(input){{/parent}}{{^parent}}false{{/parent}}{{/vars}}; - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - {{#parent}} - int hashCode = base.GetHashCode(); - {{/parent}} - {{^parent}} - int hashCode = 41; - {{/parent}} - {{#vars}} - if (this.{{name}} != null) - hashCode = hashCode * 59 + this.{{name}}.GetHashCode(); - {{/vars}} - return hashCode; - } - } -{{^netStandard}} - -{{#generatePropertyChanged}} - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - -{{/generatePropertyChanged}} -{{#validatable}} -{{#hasChildren}} - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { -{{/hasChildren}} -{{^hasChildren}} - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { -{{/hasChildren}} - {{#parent}} - {{^isArray}} - {{^isMap}} - foreach(var x in base.BaseValidate(validationContext)) yield return x; - {{/isMap}} - {{/isArray}} - {{/parent}} - {{#vars}} - {{#hasValidation}} - {{#isEnum}} - {{#maxLength}} - // {{{name}}} ({{{dataType}}}) maxLength - if(this.{{{name}}} != null && this.{{{name}}}.ToString().Length > {{maxLength}}) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be less than {{maxLength}}.", new [] { "{{{name}}}" }); - } - {{/maxLength}} - {{/isEnum}} - {{^isEnum}} - {{#maxLength}} - // {{{name}}} ({{{dataType}}}) maxLength - if(this.{{{name}}} != null && this.{{{name}}}.Length > {{maxLength}}) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be less than {{maxLength}}.", new [] { "{{{name}}}" }); - } - {{/maxLength}} - {{/isEnum}} - - {{#isEnum}} - {{#minLength}} - // {{{name}}} ({{{dataType}}}) minLength - if(this.{{{name}}} != null && this.{{{name}}}.ToString().Length < {{minLength}}) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be greater than {{minLength}}.", new [] { "{{{name}}}" }); - } - {{/minLength}} - {{/isEnum}} - {{^isEnum}} - {{#minLength}} - // {{{name}}} ({{{dataType}}}) minLength - if(this.{{{name}}} != null && this.{{{name}}}.Length < {{minLength}}) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, length must be greater than {{minLength}}.", new [] { "{{{name}}}" }); - } - {{/minLength}} - {{/isEnum}} - - {{#maximum}} - // {{{name}}} ({{{dataType}}}) maximum - if(this.{{{name}}} > ({{{dataType}}}){{maximum}}) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value less than or equal to {{maximum}}.", new [] { "{{{name}}}" }); - } - - {{/maximum}} - {{#minimum}} - // {{{name}}} ({{{dataType}}}) minimum - if(this.{{{name}}} < ({{{dataType}}}){{minimum}}) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must be a value greater than or equal to {{minimum}}.", new [] { "{{{name}}}" }); - } - - {{/minimum}} - {{#pattern}} - {{^isByteArray}} - // {{{name}}} ({{{dataType}}}) pattern - Regex regex{{{name}}} = new Regex(@"{{{vendorExtensions.x-regex}}}"{{#vendorExtensions.x-modifiers}}{{#-first}}, {{/-first}}RegexOptions.{{{.}}}{{^-last}} | {{/-last}}{{/vendorExtensions.x-modifiers}}); - if (false == regex{{{name}}}.Match(this.{{{name}}}{{#isUuid}}.ToString(){{/isUuid}}).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for {{{name}}}, must match a pattern of " + regex{{{name}}}, new [] { "{{{name}}}" }); - } - - {{/isByteArray}} - {{/pattern}} - {{/hasValidation}} - {{/vars}} - yield break; - } -{{/validatable}} -{{/netStandard}} - } diff --git a/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache b/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache deleted file mode 100644 index 26a9b36bd55..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/modelInnerEnum.mustache +++ /dev/null @@ -1,28 +0,0 @@ - {{^isContainer}} - /// - /// {{description}}{{^description}}Defines {{{name}}}{{/description}} - /// - {{#description}} - /// {{.}} - {{/description}} - {{#isString}} - {{^useGenericHost}} - [JsonConverter(typeof(StringEnumConverter))] - {{/useGenericHost}} - {{/isString}} - {{>visibility}} enum {{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}{{#vendorExtensions.x-enum-byte}}: byte{{/vendorExtensions.x-enum-byte}} - { - {{#allowableValues}} - {{#enumVars}} - /// - /// Enum {{name}} for value: {{{value}}} - /// - {{#isString}} - [EnumMember(Value = "{{{value}}}")] - {{/isString}} - {{name}}{{^isString}} = {{{value}}}{{/isString}}{{#isString}} = {{-index}}{{/isString}}{{^-last}},{{/-last}} - - {{/enumVars}} - {{/allowableValues}} - } - {{/isContainer}} diff --git a/modules/openapi-generator/src/main/resources/csharp/model_doc.mustache b/modules/openapi-generator/src/main/resources/csharp/model_doc.mustache deleted file mode 100644 index af42e32224f..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/model_doc.mustache +++ /dev/null @@ -1,23 +0,0 @@ -{{#models}} -{{#model}} - -# {{{packageName}}}.{{modelPackage}}.{{{classname}}} - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -{{#parent}} -{{#parentVars}} -**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} -{{/parentVars}} -{{/parent}} -{{#vars}}**{{name}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}} | {{description}} | {{^required}}[optional] {{/required}}{{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}}[default to {{{.}}}]{{/defaultValue}} -{{/vars}} - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - -{{/model}} -{{/models}} diff --git a/modules/openapi-generator/src/main/resources/csharp/model_test.mustache b/modules/openapi-generator/src/main/resources/csharp/model_test.mustache deleted file mode 100644 index 142737a6bb5..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/model_test.mustache +++ /dev/null @@ -1,89 +0,0 @@ -{{>partial_header}} - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using {{packageName}}.{{apiPackage}}; -using {{packageName}}.{{modelPackage}}; -using {{packageName}}.Client; -using System.Reflection; -using Newtonsoft.Json; - -{{#models}} -{{#model}} -namespace {{packageName}}.Test -{ - /// - /// Class for testing {{classname}} - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class {{classname}}Tests - { - // TODO uncomment below to declare an instance variable for {{classname}} - //private {{classname}} instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of {{classname}} - //instance = new {{classname}}(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of {{classname}} - /// - [Test] - public void {{classname}}InstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" {{classname}} - //Assert.IsInstanceOf(typeof({{classname}}), instance); - } - - {{#discriminator}} - {{#children}} - /// - /// Test deserialize a {{classname}} from type {{parent}} - /// - [Test] - public void {{classname}}DeserializeFrom{{parent}}Test() - { - // TODO uncomment below to test deserialize a {{classname}} from type {{parent}} - //Assert.IsInstanceOf(typeof({{parent}}), JsonConvert.DeserializeObject<{{parent}}>(new {{classname}}().ToJson())); - } - {{/children}} - {{/discriminator}} - - {{#vars}} - /// - /// Test the property '{{name}}' - /// - [Test] - public void {{name}}Test() - { - // TODO unit test for the property '{{name}}' - } - {{/vars}} - - } - -} -{{/model}} -{{/models}} diff --git a/modules/openapi-generator/src/main/resources/csharp/mono_nunit_test.mustache b/modules/openapi-generator/src/main/resources/csharp/mono_nunit_test.mustache deleted file mode 100644 index da9c06702cb..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/mono_nunit_test.mustache +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# -# Generated by: https://github.com/openapitools/openapi-generator.git -# - -wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -mozroots --import --sync - -echo "[INFO] remove bin/Debug/{{{packageName}}}.Test.dll" -rm src/{{{packageName}}}.Test/bin/Debug/{{{packageName}}}.Test.dll 2> /dev/null - -echo "[INFO] install NUnit runners via NuGet" -wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -mozroots --import --sync -mono nuget.exe install src/{{{packageName}}}.Test/packages.config -o packages - -echo "[INFO] Install NUnit Console 3.x runners via NuGet" -mono nuget.exe install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory packages - -echo "[INFO] Build the solution and run the unit test" -xbuild {{{packageName}}}.sln && \ - mono ./packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe src/{{{packageName}}}.Test/bin/Debug/{{{packageName}}}.Test.dll diff --git a/modules/openapi-generator/src/main/resources/csharp/netcore_project.mustache b/modules/openapi-generator/src/main/resources/csharp/netcore_project.mustache deleted file mode 100644 index fd4168d0d4c..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/netcore_project.mustache +++ /dev/null @@ -1,49 +0,0 @@ - - - - {{targetFrameworkNuget}} - {{packageName}} - {{packageName}} - Library - {{packageAuthors}} - {{packageCompany}} - {{packageTitle}} - {{packageDescription}} - {{packageCopyright}} - true - true - true - {{packageName}} - {{packageVersion}} - {{#nullableReferenceTypes}} - annotations - {{/nullableReferenceTypes}} - - - - {{#netStandard}} - - - {{/netStandard}} - {{^netStandard}} - - {{/netStandard}} - - - - - {{^netStandard}} - - - - - - - - - - - - {{/netStandard}} - - diff --git a/modules/openapi-generator/src/main/resources/csharp/netcore_testproject.mustache b/modules/openapi-generator/src/main/resources/csharp/netcore_testproject.mustache deleted file mode 100644 index bb052b0d705..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/netcore_testproject.mustache +++ /dev/null @@ -1,49 +0,0 @@ - - - - {{targetFrameworkNuget}} - {{testPackageName}} - {{testPackageName}} - Library - {{packageAuthors}} - {{packageCompany}} - {{packageTitle}} - {{packageDescription}} - {{packageCopyright}} - true - true - true - {{testPackageName}} - - - - - {{#netStandard}} - - {{/netStandard}} - {{^netStandard}} - - {{/netStandard}} - - - - - {{^netStandard}} - - - - - - - - - - - - {{/netStandard}} - - - - - - diff --git a/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache b/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache deleted file mode 100644 index 04599f39e08..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/nuspec.mustache +++ /dev/null @@ -1,53 +0,0 @@ - - - - - $id$ - {{packageTitle}} - - - $version$ - - - $author$ - - - $author$ - false - false - - - {{packageDescription}} - {{#termsOfService}} - {{.}} - {{/termsOfService}} - {{#licenseUrl}} - {{.}} - {{/licenseUrl}} - - - - - - - - {{#generatePropertyChanged}} - - - {{/generatePropertyChanged}} - - - - - - - - - {{#generatePropertyChanged}} - - {{/generatePropertyChanged}} - - - diff --git a/modules/openapi-generator/src/main/resources/csharp/packages.config.mustache b/modules/openapi-generator/src/main/resources/csharp/packages.config.mustache deleted file mode 100644 index 56c892427aa..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/packages.config.mustache +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - {{#generatePropertyChanged}} - - - {{/generatePropertyChanged}} - diff --git a/modules/openapi-generator/src/main/resources/csharp/packages_test.config.mustache b/modules/openapi-generator/src/main/resources/csharp/packages_test.config.mustache deleted file mode 100644 index b6b6e7d980f..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/packages_test.config.mustache +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/modules/openapi-generator/src/main/resources/csharp/partial_header.mustache b/modules/openapi-generator/src/main/resources/csharp/partial_header.mustache deleted file mode 100644 index 2c741c79595..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/partial_header.mustache +++ /dev/null @@ -1,13 +0,0 @@ -/* - {{#appName}} - * {{{.}}} - * - {{/appName}} - {{#appDescription}} - * {{{.}}} - * - {{/appDescription}} - * {{#version}}The version of the OpenAPI document: {{{.}}}{{/version}} - * {{#infoEmail}}Contact: {{{.}}}{{/infoEmail}} - * Generated by: https://github.com/openapitools/openapi-generator.git - */ diff --git a/modules/openapi-generator/src/main/resources/csharp/project.json.mustache b/modules/openapi-generator/src/main/resources/csharp/project.json.mustache deleted file mode 100644 index 9a85af07c5d..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/project.json.mustache +++ /dev/null @@ -1,12 +0,0 @@ -{ - "supports": {}, - "dependencies": { - "FubarCoder.RestSharp.Portable.Core": "4.0.7", - "FubarCoder.RestSharp.Portable.HttpClient": "4.0.7", - "Newtonsoft.Json": "{{newtonsoft-json.version}}", - "JsonSubTypes": "{{json-subtypes.version}}" - }, - "frameworks": { - "{{targetFrameworkNuget}}": {} - } -} diff --git a/modules/openapi-generator/src/main/resources/csharp/travis.mustache b/modules/openapi-generator/src/main/resources/csharp/travis.mustache deleted file mode 100644 index 645c72d06d6..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/travis.mustache +++ /dev/null @@ -1,9 +0,0 @@ -# -# Generated by: https://github.com/openapitools/openapi-generator.git -# -language: csharp -mono: - - latest -solution: {{{packageName}}}.sln -script: - - /bin/sh ./mono_nunit_test.sh diff --git a/modules/openapi-generator/src/main/resources/csharp/visibility.mustache b/modules/openapi-generator/src/main/resources/csharp/visibility.mustache deleted file mode 100644 index a1d1f4163d4..00000000000 --- a/modules/openapi-generator/src/main/resources/csharp/visibility.mustache +++ /dev/null @@ -1 +0,0 @@ -{{#nonPublicApi}}internal{{/nonPublicApi}}{{^nonPublicApi}}public{{/nonPublicApi}} \ No newline at end of file diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CSharpClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CSharpClientCodegenTest.java deleted file mode 100644 index 5529f6d611f..00000000000 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CSharpClientCodegenTest.java +++ /dev/null @@ -1,56 +0,0 @@ -/* - * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech) - * Copyright 2018 SmartBear Software - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.openapitools.codegen.csharp; - -import org.openapitools.codegen.CodegenConstants; -import org.openapitools.codegen.languages.CSharpClientCodegen; -import org.testng.Assert; -import org.testng.annotations.Test; - -public class CSharpClientCodegenTest { - - @Test - public void testInitialConfigValues() throws Exception { - final CSharpClientCodegen codegen = new CSharpClientCodegen(); - codegen.processOpts(); - - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.TRUE); - Assert.assertTrue(codegen.isHideGenerationTimestamp()); - } - - @Test - public void testSettersForConfigValues() throws Exception { - final CSharpClientCodegen codegen = new CSharpClientCodegen(); - codegen.setHideGenerationTimestamp(false); - codegen.processOpts(); - - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.FALSE); - Assert.assertFalse(codegen.isHideGenerationTimestamp()); - } - - @Test - public void testAdditionalPropertiesPutForConfigValues() throws Exception { - final CSharpClientCodegen codegen = new CSharpClientCodegen(); - codegen.additionalProperties().put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, false); - codegen.processOpts(); - - Assert.assertEquals(codegen.additionalProperties().get(CodegenConstants.HIDE_GENERATION_TIMESTAMP), Boolean.FALSE); - Assert.assertFalse(codegen.isHideGenerationTimestamp()); - } - -} diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CSharpModelTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java similarity index 96% rename from modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CSharpModelTest.java rename to modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java index 56738caef3f..416686e765b 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CSharpModelTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpModelTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.openapitools.codegen.csharp; +package org.openapitools.codegen.csharpnetcore; import com.google.common.collect.Sets; import io.swagger.v3.oas.models.OpenAPI; @@ -29,7 +29,6 @@ import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.languages.AbstractCSharpCodegen; import org.openapitools.codegen.languages.AspNetCoreServerCodegen; import org.openapitools.codegen.languages.CSharpNetCoreClientCodegen; -import org.openapitools.codegen.languages.CSharpClientCodegen; import org.testng.Assert; import org.testng.annotations.Test; @@ -66,7 +65,7 @@ public class CSharpModelTest { public void arrayPropertyTest() { final Schema schema = getArrayTestSchema(); - final DefaultCodegen codegen = new CSharpClientCodegen(); + final DefaultCodegen codegen = new CSharpNetCoreClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); codegen.setOpenAPI(openAPI); final CodegenModel generated = codegen.fromModel("sample", schema); @@ -93,7 +92,7 @@ public class CSharpModelTest { public void arrayPropertyCollectionOptionTest() { final Schema schema = getArrayTestSchema(); - final CSharpClientCodegen codegen = new CSharpClientCodegen(); + final CSharpNetCoreClientCodegen codegen = new CSharpNetCoreClientCodegen(); codegen.setUseCollection(true); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); @@ -118,7 +117,7 @@ public class CSharpModelTest { public void arrayPropertyICollectionOptionTest() { final Schema schema = getArrayTestSchema(); - final CSharpClientCodegen codegen = new CSharpClientCodegen(); + final CSharpNetCoreClientCodegen codegen = new CSharpNetCoreClientCodegen(); codegen.setUseCollection(true); codegen.setReturnICollection(true); @@ -159,7 +158,7 @@ public class CSharpModelTest { .addProperties("createdAt", new DateTimeSchema()) .addRequiredItem("id") .addRequiredItem("name"); - final DefaultCodegen codegen = new CSharpClientCodegen(); + final DefaultCodegen codegen = new CSharpNetCoreClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", model); @@ -205,7 +204,7 @@ public class CSharpModelTest { .items(new StringSchema())) .addProperties("name", new StringSchema().nullable(true)) .addRequiredItem("id"); - final DefaultCodegen codegen = new CSharpClientCodegen(); + final DefaultCodegen codegen = new CSharpNetCoreClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", model); @@ -254,7 +253,7 @@ public class CSharpModelTest { .items(new StringSchema())) .addProperties("name", new StringSchema().nullable(true)) .addRequiredItem("id"); - final DefaultCodegen codegen = new CSharpClientCodegen(); + final DefaultCodegen codegen = new CSharpNetCoreClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", model); @@ -422,7 +421,7 @@ public class CSharpModelTest { .addProperties("urls", new ArraySchema() .items(new StringSchema())) .addRequiredItem("id"); - final DefaultCodegen codegen = new CSharpClientCodegen(); + final DefaultCodegen codegen = new CSharpNetCoreClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", model); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", model); @@ -460,7 +459,7 @@ public class CSharpModelTest { .addProperties("translations", new MapSchema() .additionalProperties(new StringSchema())) .addRequiredItem("id"); - final DefaultCodegen codegen = new CSharpClientCodegen(); + final DefaultCodegen codegen = new CSharpNetCoreClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", schema); @@ -486,7 +485,7 @@ public class CSharpModelTest { final Schema schema = new Schema() .description("a sample model") .addProperties("children", new Schema().$ref("#/components/schemas/Children")); - final DefaultCodegen codegen = new CSharpClientCodegen(); + final DefaultCodegen codegen = new CSharpNetCoreClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", schema); @@ -511,7 +510,7 @@ public class CSharpModelTest { .description("a sample model") .addProperties("children", new ArraySchema() .items(new Schema().$ref("#/components/schemas/Children"))); - final DefaultCodegen codegen = new CSharpClientCodegen(); + final DefaultCodegen codegen = new CSharpNetCoreClientCodegen(); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", schema); @@ -537,7 +536,7 @@ public class CSharpModelTest { .description("a sample model") .addProperties("children", new MapSchema() .additionalProperties(new Schema().$ref("#/components/schemas/Children"))); - final DefaultCodegen codegen = new CSharpClientCodegen(); + final DefaultCodegen codegen = new CSharpNetCoreClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", schema); @@ -564,7 +563,7 @@ public class CSharpModelTest { final Schema schema = new ArraySchema() .items(new Schema().$ref("#/components/schemas/Children")) .description("an array model"); - final DefaultCodegen codegen = new CSharpClientCodegen(); + final DefaultCodegen codegen = new CSharpNetCoreClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", schema); @@ -583,7 +582,7 @@ public class CSharpModelTest { final Schema schema = new Schema() .description("a map model") .additionalProperties(new Schema().$ref("#/components/schemas/Children")); - final DefaultCodegen codegen = new CSharpClientCodegen(); + final DefaultCodegen codegen = new CSharpNetCoreClientCodegen(); OpenAPI openAPI = TestUtils.createOpenAPIWithOneSchema("sample", schema); codegen.setOpenAPI(openAPI); final CodegenModel cm = codegen.fromModel("sample", schema); diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CSharpOperationTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpOperationTest.java similarity index 98% rename from modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CSharpOperationTest.java rename to modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpOperationTest.java index b0054e9a6f2..a0d6fc0822b 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CSharpOperationTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CSharpOperationTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.openapitools.codegen.csharp; +package org.openapitools.codegen.csharpnetcore; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.Operation; diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpModelEnumTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CsharpModelEnumTest.java similarity index 97% rename from modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpModelEnumTest.java rename to modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CsharpModelEnumTest.java index aacdece2e4c..23440f4105e 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharp/CsharpModelEnumTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/csharpnetcore/CsharpModelEnumTest.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.openapitools.codegen.csharp; +package org.openapitools.codegen.csharpnetcore; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.media.Schema; @@ -25,7 +25,7 @@ import org.openapitools.codegen.CodegenProperty; import org.openapitools.codegen.DefaultCodegen; import org.openapitools.codegen.TestUtils; import org.openapitools.codegen.languages.AspNetCoreServerCodegen; -import org.openapitools.codegen.languages.CSharpClientCodegen; +import org.openapitools.codegen.languages.CSharpNetCoreClientCodegen; import org.testng.Assert; import org.testng.annotations.Test; @@ -69,7 +69,7 @@ public class CsharpModelEnumTest { .child(subModel) .interfaces(new ArrayList()); */ - final DefaultCodegen codegen = new CSharpClientCodegen(); + final DefaultCodegen codegen = new CSharpNetCoreClientCodegen(); final Map allModels = new HashMap<>(); allModels.put("ParentModel", parentModel); allModels.put("SubModel", subModel); diff --git a/samples/client/petstore/csharp/OpenAPIClient/.gitignore b/samples/client/petstore/csharp/OpenAPIClient/.gitignore deleted file mode 100644 index 1ee53850b84..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/.gitignore +++ /dev/null @@ -1,362 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator-ignore b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator-ignore deleted file mode 100644 index 677a9537e9e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator-ignore +++ /dev/null @@ -1,4 +0,0 @@ -# OpenAPI Generator Ignore -# The test project must embed linux-logo.png so it can be loaded as a stream. -src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj - diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/FILES b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/FILES deleted file mode 100644 index f55c7b183ce..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/FILES +++ /dev/null @@ -1,132 +0,0 @@ -.gitignore -.travis.yml -Org.OpenAPITools.sln -README.md -build.bat -build.sh -docs/AdditionalPropertiesClass.md -docs/AllOfWithSingleRef.md -docs/Animal.md -docs/AnotherFakeApi.md -docs/ApiResponse.md -docs/ArrayOfArrayOfNumberOnly.md -docs/ArrayOfNumberOnly.md -docs/ArrayTest.md -docs/Capitalization.md -docs/Cat.md -docs/CatAllOf.md -docs/Category.md -docs/ClassModel.md -docs/DefaultApi.md -docs/DeprecatedObject.md -docs/Dog.md -docs/DogAllOf.md -docs/EnumArrays.md -docs/EnumClass.md -docs/EnumTest.md -docs/FakeApi.md -docs/FakeClassnameTags123Api.md -docs/File.md -docs/FileSchemaTestClass.md -docs/Foo.md -docs/FooGetDefaultResponse.md -docs/FormatTest.md -docs/HasOnlyReadOnly.md -docs/HealthCheckResult.md -docs/List.md -docs/MapTest.md -docs/MixedPropertiesAndAdditionalPropertiesClass.md -docs/Model200Response.md -docs/ModelClient.md -docs/Name.md -docs/NullableClass.md -docs/NumberOnly.md -docs/ObjectWithDeprecatedFields.md -docs/Order.md -docs/OuterComposite.md -docs/OuterEnum.md -docs/OuterEnumDefaultValue.md -docs/OuterEnumInteger.md -docs/OuterEnumIntegerDefaultValue.md -docs/OuterObjectWithEnumProperty.md -docs/Pet.md -docs/PetApi.md -docs/ReadOnlyFirst.md -docs/Return.md -docs/SingleRefType.md -docs/SpecialModelName.md -docs/StoreApi.md -docs/Tag.md -docs/User.md -docs/UserApi.md -git_push.sh -mono_nunit_test.sh -src/Org.OpenAPITools.Test/packages.config -src/Org.OpenAPITools/Api/AnotherFakeApi.cs -src/Org.OpenAPITools/Api/DefaultApi.cs -src/Org.OpenAPITools/Api/FakeApi.cs -src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs -src/Org.OpenAPITools/Api/PetApi.cs -src/Org.OpenAPITools/Api/StoreApi.cs -src/Org.OpenAPITools/Api/UserApi.cs -src/Org.OpenAPITools/Client/ApiClient.cs -src/Org.OpenAPITools/Client/ApiException.cs -src/Org.OpenAPITools/Client/ApiResponse.cs -src/Org.OpenAPITools/Client/Configuration.cs -src/Org.OpenAPITools/Client/ExceptionFactory.cs -src/Org.OpenAPITools/Client/GlobalConfiguration.cs -src/Org.OpenAPITools/Client/IApiAccessor.cs -src/Org.OpenAPITools/Client/IReadableConfiguration.cs -src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs -src/Org.OpenAPITools/Model/AllOfWithSingleRef.cs -src/Org.OpenAPITools/Model/Animal.cs -src/Org.OpenAPITools/Model/ApiResponse.cs -src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs -src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs -src/Org.OpenAPITools/Model/ArrayTest.cs -src/Org.OpenAPITools/Model/Capitalization.cs -src/Org.OpenAPITools/Model/Cat.cs -src/Org.OpenAPITools/Model/CatAllOf.cs -src/Org.OpenAPITools/Model/Category.cs -src/Org.OpenAPITools/Model/ClassModel.cs -src/Org.OpenAPITools/Model/DeprecatedObject.cs -src/Org.OpenAPITools/Model/Dog.cs -src/Org.OpenAPITools/Model/DogAllOf.cs -src/Org.OpenAPITools/Model/EnumArrays.cs -src/Org.OpenAPITools/Model/EnumClass.cs -src/Org.OpenAPITools/Model/EnumTest.cs -src/Org.OpenAPITools/Model/File.cs -src/Org.OpenAPITools/Model/FileSchemaTestClass.cs -src/Org.OpenAPITools/Model/Foo.cs -src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs -src/Org.OpenAPITools/Model/FormatTest.cs -src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs -src/Org.OpenAPITools/Model/HealthCheckResult.cs -src/Org.OpenAPITools/Model/List.cs -src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs -src/Org.OpenAPITools/Model/Model200Response.cs -src/Org.OpenAPITools/Model/ModelClient.cs -src/Org.OpenAPITools/Model/Name.cs -src/Org.OpenAPITools/Model/NullableClass.cs -src/Org.OpenAPITools/Model/NumberOnly.cs -src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs -src/Org.OpenAPITools/Model/Order.cs -src/Org.OpenAPITools/Model/OuterComposite.cs -src/Org.OpenAPITools/Model/OuterEnum.cs -src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs -src/Org.OpenAPITools/Model/OuterEnumInteger.cs -src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs -src/Org.OpenAPITools/Model/OuterObjectWithEnumProperty.cs -src/Org.OpenAPITools/Model/Pet.cs -src/Org.OpenAPITools/Model/ReadOnlyFirst.cs -src/Org.OpenAPITools/Model/Return.cs -src/Org.OpenAPITools/Model/SingleRefType.cs -src/Org.OpenAPITools/Model/SpecialModelName.cs -src/Org.OpenAPITools/Model/Tag.cs -src/Org.OpenAPITools/Model/User.cs -src/Org.OpenAPITools/Org.OpenAPITools.csproj -src/Org.OpenAPITools/Org.OpenAPITools.nuspec -src/Org.OpenAPITools/Properties/AssemblyInfo.cs -src/Org.OpenAPITools/packages.config diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION deleted file mode 100644 index 757e6740040..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -7.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient/.travis.yml b/samples/client/petstore/csharp/OpenAPIClient/.travis.yml deleted file mode 100644 index e4965fc7e5c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -# -# Generated by: https://github.com/openapitools/openapi-generator.git -# -language: csharp -mono: - - latest -solution: Org.OpenAPITools.sln -script: - - /bin/sh ./mono_nunit_test.sh diff --git a/samples/client/petstore/csharp/OpenAPIClient/Org.OpenAPITools.sln b/samples/client/petstore/csharp/OpenAPIClient/Org.OpenAPITools.sln deleted file mode 100644 index 5b15451c9dc..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/Org.OpenAPITools.sln +++ /dev/null @@ -1,27 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -VisualStudioVersion = 12.0.0.0 -MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools.Test", "src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.Build.0 = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient/README.md b/samples/client/petstore/csharp/OpenAPIClient/README.md deleted file mode 100644 index 6b93424e647..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/README.md +++ /dev/null @@ -1,246 +0,0 @@ -# Org.OpenAPITools - the C# library for the 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: \" \\ - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- SDK version: 1.0.0 -- Build package: org.openapitools.codegen.languages.CSharpClientCodegen - -## Frameworks supported - - -- .NET 4.0 or later -- Windows Phone 7.1 (Mango) - -## Dependencies - - -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 105.1.0 or later -- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.2.0 or later - -The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages: - -``` -Install-Package RestSharp -Install-Package Newtonsoft.Json -Install-Package JsonSubTypes -``` - -NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742) - -## Installation - -Run the following command to generate the DLL - -- [Mac/Linux] `/bin/sh build.sh` -- [Windows] `build.bat` - -Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: - -```csharp -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -``` - - -## Packaging - -A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages. - -This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly: - -``` -nuget pack -Build -OutputDirectory out Org.OpenAPITools.csproj -``` - -Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual. - - -## Getting Started - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class Example - { - public static void Main() - { - - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); - var modelClient = new ModelClient(); // ModelClient | client model - - try - { - // To test special tags - ModelClient result = apiInstance.Call123TestSpecialTags(modelClient); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - - } - } -} -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*DefaultApi* | [**FooGet**](docs/DefaultApi.md#fooget) | **GET** /foo | -*FakeApi* | [**FakeHealthGet**](docs/FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint -*FakeApi* | [**FakeHttpSignatureTest**](docs/FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication -*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeApi* | [**FakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | -*FakeApi* | [**TestBodyWithBinary**](docs/FakeApi.md#testbodywithbinary) | **PUT** /fake/body-with-binary | -*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | -*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **POST** /user | Create user -*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation for Models - - - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [Model.AllOfWithSingleRef](docs/AllOfWithSingleRef.md) - - [Model.Animal](docs/Animal.md) - - [Model.ApiResponse](docs/ApiResponse.md) - - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - - [Model.ArrayTest](docs/ArrayTest.md) - - [Model.Capitalization](docs/Capitalization.md) - - [Model.Cat](docs/Cat.md) - - [Model.CatAllOf](docs/CatAllOf.md) - - [Model.Category](docs/Category.md) - - [Model.ClassModel](docs/ClassModel.md) - - [Model.DeprecatedObject](docs/DeprecatedObject.md) - - [Model.Dog](docs/Dog.md) - - [Model.DogAllOf](docs/DogAllOf.md) - - [Model.EnumArrays](docs/EnumArrays.md) - - [Model.EnumClass](docs/EnumClass.md) - - [Model.EnumTest](docs/EnumTest.md) - - [Model.File](docs/File.md) - - [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md) - - [Model.Foo](docs/Foo.md) - - [Model.FooGetDefaultResponse](docs/FooGetDefaultResponse.md) - - [Model.FormatTest](docs/FormatTest.md) - - [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - - [Model.HealthCheckResult](docs/HealthCheckResult.md) - - [Model.List](docs/List.md) - - [Model.MapTest](docs/MapTest.md) - - [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model.Model200Response](docs/Model200Response.md) - - [Model.ModelClient](docs/ModelClient.md) - - [Model.Name](docs/Name.md) - - [Model.NullableClass](docs/NullableClass.md) - - [Model.NumberOnly](docs/NumberOnly.md) - - [Model.ObjectWithDeprecatedFields](docs/ObjectWithDeprecatedFields.md) - - [Model.Order](docs/Order.md) - - [Model.OuterComposite](docs/OuterComposite.md) - - [Model.OuterEnum](docs/OuterEnum.md) - - [Model.OuterEnumDefaultValue](docs/OuterEnumDefaultValue.md) - - [Model.OuterEnumInteger](docs/OuterEnumInteger.md) - - [Model.OuterEnumIntegerDefaultValue](docs/OuterEnumIntegerDefaultValue.md) - - [Model.OuterObjectWithEnumProperty](docs/OuterObjectWithEnumProperty.md) - - [Model.Pet](docs/Pet.md) - - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - - [Model.Return](docs/Return.md) - - [Model.SingleRefType](docs/SingleRefType.md) - - [Model.SpecialModelName](docs/SpecialModelName.md) - - [Model.Tag](docs/Tag.md) - - [Model.User](docs/User.md) - - - -## Documentation for Authorization - - -Authentication schemes defined for the API: - -### petstore_auth - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - write:pets: modify pets in your account - - read:pets: read your pets - - -### api_key - -- **Type**: API key -- **API key parameter name**: api_key -- **Location**: HTTP header - - -### api_key_query - -- **Type**: API key -- **API key parameter name**: api_key_query -- **Location**: URL query string - - -### http_basic_test - -- **Type**: HTTP basic authentication - - -### bearer_test - -- **Type**: HTTP bearer authentication - - -### http_signature_test - -- **Type**: HTTP signature authentication - diff --git a/samples/client/petstore/csharp/OpenAPIClient/build.bat b/samples/client/petstore/csharp/OpenAPIClient/build.bat deleted file mode 100644 index e153457ad3e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/build.bat +++ /dev/null @@ -1,16 +0,0 @@ -:: Generated by: https://github.com/openapitools/openapi-generator.git -:: - -@echo off - -SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319 - -if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '.\nuget.exe')" -.\nuget.exe install src\Org.OpenAPITools\packages.config -o packages - -if not exist ".\bin" mkdir bin - -copy packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll -copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll -%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\Org.OpenAPITools.dll /recurse:src\Org.OpenAPITools\*.cs /doc:bin\Org.OpenAPITools.xml diff --git a/samples/client/petstore/csharp/OpenAPIClient/build.sh b/samples/client/petstore/csharp/OpenAPIClient/build.sh deleted file mode 100644 index ddb1644db09..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/build.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash -# -# Generated by: https://github.com/openapitools/openapi-generator.git -# - -frameworkVersion=net45 - -# sdk must match installed frameworks under PREFIX/lib/mono/[value] -sdk=4.5.2-api - -# langversion refers to C# language features. see man mcs for details. -langversion=${sdk} -nuget_cmd=nuget - -# Match against our known SDK possibilities -case "${sdk}" in - 4) - langversion=4 - ;; - 4.5*) - langversion=5 - ;; - 4.6*) - langversion=6 - ;; - 4.7*) - langversion=7 # ignoring 7.1 for now. - ;; - *) - langversion=6 - ;; -esac - -echo "[INFO] Target framework: ${frameworkVersion}" - -if ! type nuget &>/dev/null; then - echo "[INFO] Download nuget and packages" - wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe; - nuget_cmd="mono nuget.exe" -fi - -mozroots --import --sync -${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages; - -echo "[INFO] Copy DLLs to the 'bin' folder" -mkdir -p bin; -cp packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; -cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.1.6.0/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll - -echo "[INFO] Run 'mcs' to build bin/Org.OpenAPITools.dll" -mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\ -bin/RestSharp.dll,\ -System.ComponentModel.DataAnnotations.dll,\ -System.Runtime.Serialization.dll \ --target:library \ --out:bin/Org.OpenAPITools.dll \ --recurse:'src/Org.OpenAPITools/*.cs' \ --doc:bin/Org.OpenAPITools.xml \ --platform:anycpu - -if [ $? -ne 0 ] -then - echo "[ERROR] Compilation failed with exit code $?" - exit 1 -else - echo "[INFO] bin/Org.OpenAPITools.dll was created successfully" -fi diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesAnyType.md deleted file mode 100644 index fd118d3bfc5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesAnyType.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesAnyType - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesArray.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesArray.md deleted file mode 100644 index 3d0606cea5f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesArray.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesArray - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesBoolean.md deleted file mode 100644 index bb4b2498263..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesBoolean.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesBoolean - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesClass.md deleted file mode 100644 index 847bf120968..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesClass.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MapProperty** | **Dictionary<string, string>** | | [optional] -**MapOfMapProperty** | **Dictionary<string, Dictionary<string, string>>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesInteger.md deleted file mode 100644 index 86a6259ecc9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesInteger.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesInteger - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesNumber.md deleted file mode 100644 index 8dc46024e03..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesNumber.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesNumber - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesObject.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesObject.md deleted file mode 100644 index 455456fe6dd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesObject.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesString.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesString.md deleted file mode 100644 index 0f7cf804167..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/AdditionalPropertiesString.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesString - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AllOfWithSingleRef.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AllOfWithSingleRef.md deleted file mode 100644 index 308b1018e70..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/AllOfWithSingleRef.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.AllOfWithSingleRef - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Username** | **string** | | [optional] -**SingleRefType** | **SingleRefType** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/Animal.md b/samples/client/petstore/csharp/OpenAPIClient/docs/Animal.md deleted file mode 100644 index 0a05bcdf061..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/Animal.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Animal - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md deleted file mode 100644 index 4e201d824b2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/AnotherFakeApi.md +++ /dev/null @@ -1,85 +0,0 @@ -# Org.OpenAPITools.Api.AnotherFakeApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**Call123TestSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags - - - -## Call123TestSpecialTags - -> ModelClient Call123TestSpecialTags (ModelClient modelClient) - -To test special tags - -To test special tags and operation ID starting with number - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class Call123TestSpecialTagsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); - var modelClient = new ModelClient(); // ModelClient | client model - - try - { - // To test special tags - ModelClient result = apiInstance.Call123TestSpecialTags(modelClient); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/ApiResponse.md b/samples/client/petstore/csharp/OpenAPIClient/docs/ApiResponse.md deleted file mode 100644 index a3b916355fd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/ApiResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.ApiResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Code** | **int** | | [optional] -**Type** | **string** | | [optional] -**Message** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/csharp/OpenAPIClient/docs/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index e05ea7dc240..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayOfArrayOfNumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayArrayNumber** | **List<List<decimal>>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/ArrayOfNumberOnly.md b/samples/client/petstore/csharp/OpenAPIClient/docs/ArrayOfNumberOnly.md deleted file mode 100644 index 5f593d42929..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/ArrayOfNumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayOfNumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayNumber** | **List<decimal>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/ArrayTest.md b/samples/client/petstore/csharp/OpenAPIClient/docs/ArrayTest.md deleted file mode 100644 index 593bc2d7386..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/ArrayTest.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayOfString** | **List<string>** | | [optional] -**ArrayArrayOfInteger** | **List<List<long>>** | | [optional] -**ArrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/BigCat.md b/samples/client/petstore/csharp/OpenAPIClient/docs/BigCat.md deleted file mode 100644 index 6247107ab35..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/BigCat.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.BigCat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Declawed** | **bool** | | [optional] -**Kind** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/BigCatAllOf.md b/samples/client/petstore/csharp/OpenAPIClient/docs/BigCatAllOf.md deleted file mode 100644 index 864c2298e03..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/BigCatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.BigCatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Kind** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/Capitalization.md b/samples/client/petstore/csharp/OpenAPIClient/docs/Capitalization.md deleted file mode 100644 index 0c66f2d2d44..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/Capitalization.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Capitalization - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SmallCamel** | **string** | | [optional] -**CapitalCamel** | **string** | | [optional] -**SmallSnake** | **string** | | [optional] -**CapitalSnake** | **string** | | [optional] -**SCAETHFlowPoints** | **string** | | [optional] -**ATT_NAME** | **string** | Name 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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/Cat.md b/samples/client/petstore/csharp/OpenAPIClient/docs/Cat.md deleted file mode 100644 index 6609de8e12a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/Cat.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.Cat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] -**Declawed** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/CatAllOf.md b/samples/client/petstore/csharp/OpenAPIClient/docs/CatAllOf.md deleted file mode 100644 index d623d2a0a6e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.CatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Declawed** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/Category.md b/samples/client/petstore/csharp/OpenAPIClient/docs/Category.md deleted file mode 100644 index 42102d4e508..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/Category.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Category - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/ClassModel.md b/samples/client/petstore/csharp/OpenAPIClient/docs/ClassModel.md deleted file mode 100644 index 23100617146..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/ClassModel.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ClassModel - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**VarClass** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/DefaultApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/DefaultApi.md deleted file mode 100644 index 9056e73f389..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/DefaultApi.md +++ /dev/null @@ -1,78 +0,0 @@ -# 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 | - - - -## FooGet - -> FooGetDefaultResponse FooGet () - - - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FooGetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new DefaultApi(Configuration.Default); - - try - { - FooGetDefaultResponse result = apiInstance.FooGet(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling DefaultApi.FooGet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**FooGetDefaultResponse**](FooGetDefaultResponse.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | response | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/DeprecatedObject.md b/samples/client/petstore/csharp/OpenAPIClient/docs/DeprecatedObject.md deleted file mode 100644 index 2c0ffcb38d4..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/DeprecatedObject.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.DeprecatedObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/Dog.md b/samples/client/petstore/csharp/OpenAPIClient/docs/Dog.md deleted file mode 100644 index 1f39769d2b9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/Dog.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.Dog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] -**Breed** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/DogAllOf.md b/samples/client/petstore/csharp/OpenAPIClient/docs/DogAllOf.md deleted file mode 100644 index d72134a0f5f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.DogAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Breed** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/EnumArrays.md b/samples/client/petstore/csharp/OpenAPIClient/docs/EnumArrays.md deleted file mode 100644 index 880e2248c9d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/EnumArrays.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.EnumArrays - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JustSymbol** | **string** | | [optional] -**ArrayEnum** | **List<EnumArrays.ArrayEnumEnum>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/EnumClass.md b/samples/client/petstore/csharp/OpenAPIClient/docs/EnumClass.md deleted file mode 100644 index 16d21587b4c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/EnumClass.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.EnumClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/EnumTest.md b/samples/client/petstore/csharp/OpenAPIClient/docs/EnumTest.md deleted file mode 100644 index a8a888d4524..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/EnumTest.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Org.OpenAPITools.Model.EnumTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EnumString** | **string** | | [optional] -**EnumStringRequired** | **string** | | -**EnumInteger** | **int** | | [optional] -**EnumNumber** | **double** | | [optional] -**OuterEnum** | **OuterEnum** | | [optional] -**OuterEnumInteger** | **OuterEnumInteger** | | [optional] -**OuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional] -**OuterEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md deleted file mode 100644 index 375fa40f2ee..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeApi.md +++ /dev/null @@ -1,1366 +0,0 @@ -# Org.OpenAPITools.Api.FakeApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**FakeHealthGet**](FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint -[**FakeHttpSignatureTest**](FakeApi.md#fakehttpsignaturetest) | **GET** /fake/http-signature-test | test http signature authentication -[**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -[**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -[**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -[**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -[**FakePropertyEnumIntegerSerialize**](FakeApi.md#fakepropertyenumintegerserialize) | **POST** /fake/property/enum-int | -[**TestBodyWithBinary**](FakeApi.md#testbodywithbinary) | **PUT** /fake/body-with-binary | -[**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -[**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -[**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -[**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | - - - -## FakeHealthGet - -> HealthCheckResult FakeHealthGet () - -Health check endpoint - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeHealthGetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - - try - { - // Health check endpoint - HealthCheckResult result = apiInstance.FakeHealthGet(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeHealthGet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**HealthCheckResult**](HealthCheckResult.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The instance started successfully | - | - -[[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) - - -## FakeHttpSignatureTest - -> void FakeHttpSignatureTest (Pet pet, string query1 = null, string header1 = null) - -test http signature authentication - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeHttpSignatureTestExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - - var apiInstance = new FakeApi(Configuration.Default); - var pet = new Pet(); // Pet | Pet object that needs to be added to the store - var query1 = "query1_example"; // string | query parameter (optional) - var header1 = "header1_example"; // string | header parameter (optional) - - try - { - // test http signature authentication - apiInstance.FakeHttpSignatureTest(pet, query1, header1); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeHttpSignatureTest: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - **query1** | **string**| query parameter | [optional] - **header1** | **string**| header parameter | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[http_signature_test](../README.md#http_signature_test) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | The instance started successfully | - | - -[[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) - - -## FakeOuterBooleanSerialize - -> bool FakeOuterBooleanSerialize (bool? body = null) - - - -Test serialization of outer boolean types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterBooleanSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = true; // bool? | Input boolean as post body (optional) - - try - { - bool result = apiInstance.FakeOuterBooleanSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **bool?**| Input boolean as post body | [optional] - -### Return type - -**bool** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: */* - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output boolean | - | - -[[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) - - -## FakeOuterCompositeSerialize - -> OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null) - - - -Test serialization of object with outer number type - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterCompositeSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body (optional) - - try - { - OuterComposite result = apiInstance.FakeOuterCompositeSerialize(outerComposite); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **outerComposite** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: */* - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output composite | - | - -[[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) - - -## FakeOuterNumberSerialize - -> decimal FakeOuterNumberSerialize (decimal? body = null) - - - -Test serialization of outer number types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterNumberSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = 8.14D; // decimal? | Input number as post body (optional) - - try - { - decimal result = apiInstance.FakeOuterNumberSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **decimal?**| Input number as post body | [optional] - -### Return type - -**decimal** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: */* - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output number | - | - -[[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) - - -## FakeOuterStringSerialize - -> string FakeOuterStringSerialize (string body = null) - - - -Test serialization of outer string types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterStringSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = "body_example"; // string | Input string as post body (optional) - - try - { - string result = apiInstance.FakeOuterStringSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **string**| Input string as post body | [optional] - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: */* - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output string | - | - -[[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) - - -## FakePropertyEnumIntegerSerialize - -> OuterObjectWithEnumProperty FakePropertyEnumIntegerSerialize (OuterObjectWithEnumProperty outerObjectWithEnumProperty) - - - -Test serialization of enum (int) properties with examples - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakePropertyEnumIntegerSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var outerObjectWithEnumProperty = new OuterObjectWithEnumProperty(); // OuterObjectWithEnumProperty | Input enum (int) as post body - - try - { - OuterObjectWithEnumProperty result = apiInstance.FakePropertyEnumIntegerSerialize(outerObjectWithEnumProperty); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakePropertyEnumIntegerSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **outerObjectWithEnumProperty** | [**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md)| Input enum (int) as post body | - -### Return type - -[**OuterObjectWithEnumProperty**](OuterObjectWithEnumProperty.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: */* - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output enum (int) | - | - -[[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) - - -## TestBodyWithBinary - -> void TestBodyWithBinary (System.IO.Stream body) - - - -For this test, the body has to be a binary file. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestBodyWithBinaryExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | image to upload - - try - { - apiInstance.TestBodyWithBinary(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestBodyWithBinary: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **System.IO.Stream**| image to upload | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: image/png -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - - -## TestBodyWithFileSchema - -> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass) - - - -For this test, the body for this request must reference a schema named `File`. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestBodyWithFileSchemaExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass | - - try - { - apiInstance.TestBodyWithFileSchema(fileSchemaTestClass); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - - -## TestBodyWithQueryParams - -> void TestBodyWithQueryParams (string query, User user) - - - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestBodyWithQueryParamsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var query = "query_example"; // string | - var user = new User(); // User | - - try - { - apiInstance.TestBodyWithQueryParams(query, user); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **string**| | - **user** | [**User**](User.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - - -## TestClientModel - -> ModelClient TestClientModel (ModelClient modelClient) - -To test \"client\" model - -To test \"client\" model - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestClientModelExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var modelClient = new ModelClient(); // ModelClient | client model - - try - { - // To test \"client\" model - ModelClient result = apiInstance.TestClientModel(modelClient); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestEndpointParameters - -> void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = null, int? int32 = null, long? int64 = null, float? varFloat = null, string varString = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestEndpointParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure HTTP basic authorization: http_basic_test - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - - var apiInstance = new FakeApi(Configuration.Default); - var number = 8.14D; // decimal | None - var varDouble = 1.2D; // double | None - var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None - var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None - var integer = 56; // int? | None (optional) - var int32 = 56; // int? | None (optional) - var int64 = 789L; // long? | None (optional) - var varFloat = 3.4F; // float? | None (optional) - var varString = "string_example"; // string | None (optional) - var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional) - var date = DateTime.Parse("2013-10-20"); // DateTime? | None (optional) - var dateTime = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | None (optional) - var password = "password_example"; // string | None (optional) - var callback = "callback_example"; // string | None (optional) - - try - { - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **decimal**| None | - **varDouble** | **double**| None | - **patternWithoutDelimiter** | **string**| None | - **varByte** | **byte[]**| None | - **integer** | **int?**| None | [optional] - **int32** | **int?**| None | [optional] - **int64** | **long?**| None | [optional] - **varFloat** | **float?**| None | [optional] - **varString** | **string**| None | [optional] - **binary** | **System.IO.Stream**| None | [optional] - **date** | **DateTime?**| None | [optional] - **dateTime** | **DateTime?**| None | [optional] - **password** | **string**| None | [optional] - **callback** | **string**| None | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## TestEnumParameters - -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumQueryModelArray = null, List enumFormStringArray = null, string enumFormString = null) - -To test enum parameters - -To test enum parameters - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestEnumParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional) - var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional) - var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 1; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.1D; // double? | Query parameter enum test (double) (optional) - var enumQueryModelArray = new List(); // List | (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg) - - try - { - // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | [**List<string>**](string.md)| Header parameter enum test (string array) | [optional] - **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] - **enumQueryStringArray** | [**List<string>**](string.md)| Query parameter enum test (string array) | [optional] - **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] - **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] - **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumQueryModelArray** | [**List<EnumClass>**](EnumClass.md)| | [optional] - **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] - **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid request | - | -| **404** | Not found | - | - -[[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) - - -## TestGroupParameters - -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestGroupParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure HTTP bearer authorization: bearer_test - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new FakeApi(Configuration.Default); - var requiredStringGroup = 56; // int | Required String in group parameters - var requiredBooleanGroup = true; // bool | Required Boolean in group parameters - var requiredInt64Group = 789L; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) - var booleanGroup = true; // bool? | Boolean in group parameters (optional) - var int64Group = 789L; // long? | Integer in group parameters (optional) - - try - { - // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **int**| Required String in group parameters | - **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | - **requiredInt64Group** | **long**| Required Integer in group parameters | - **stringGroup** | **int?**| String in group parameters | [optional] - **booleanGroup** | **bool?**| Boolean in group parameters | [optional] - **int64Group** | **long?**| Integer in group parameters | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[bearer_test](../README.md#bearer_test) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Something wrong | - | - -[[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) - - -## TestInlineAdditionalProperties - -> void TestInlineAdditionalProperties (Dictionary requestBody) - -test inline additionalProperties - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestInlineAdditionalPropertiesExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var requestBody = new Dictionary(); // Dictionary | request body - - try - { - // test inline additionalProperties - apiInstance.TestInlineAdditionalProperties(requestBody); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestInlineAdditionalProperties: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requestBody** | [**Dictionary<string, string>**](string.md)| request body | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestJsonFormData - -> void TestJsonFormData (string param, string param2) - -test json serialization of form data - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestJsonFormDataExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var param = "param_example"; // string | field1 - var param2 = "param2_example"; // string | field2 - - try - { - // test json serialization of form data - apiInstance.TestJsonFormData(param, param2); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **string**| field1 | - **param2** | **string**| field2 | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestQueryParameterCollectionFormat - -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string allowEmpty, Dictionary language = null) - - - -To test the collection format in query parameters - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestQueryParameterCollectionFormatExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var pipe = new List(); // List | - var ioutil = new List(); // List | - var http = new List(); // List | - var url = new List(); // List | - var context = new List(); // List | - var allowEmpty = "allowEmpty_example"; // string | - var language = new Dictionary(); // Dictionary | (optional) - - try - { - apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, allowEmpty, language); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormat: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<string>**](string.md)| | - **ioutil** | [**List<string>**](string.md)| | - **http** | [**List<string>**](string.md)| | - **url** | [**List<string>**](string.md)| | - **context** | [**List<string>**](string.md)| | - **allowEmpty** | **string**| | - **language** | [**Dictionary<string, string>**](string.md)| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FakeClassnameTags123Api.md deleted file mode 100644 index c4d52011eca..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FakeClassnameTags123Api.md +++ /dev/null @@ -1,90 +0,0 @@ -# Org.OpenAPITools.Api.FakeClassnameTags123Api - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**TestClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case - - - -## TestClassname - -> ModelClient TestClassname (ModelClient modelClient) - -To test class name in snake case - -To test class name in snake case - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestClassnameExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key_query - Configuration.Default.AddApiKey("api_key_query", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key_query", "Bearer"); - - var apiInstance = new FakeClassnameTags123Api(Configuration.Default); - var modelClient = new ModelClient(); // ModelClient | client model - - try - { - // To test class name in snake case - ModelClient result = apiInstance.TestClassname(modelClient); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeClassnameTags123Api.TestClassname: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **modelClient** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/File.md b/samples/client/petstore/csharp/OpenAPIClient/docs/File.md deleted file mode 100644 index b7105102579..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/File.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.File - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SourceURI** | **string** | Test capitalization | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FileSchemaTestClass.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FileSchemaTestClass.md deleted file mode 100644 index df1453f686b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FileSchemaTestClass.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.FileSchemaTestClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**File** | [**File**](File.md) | | [optional] -**Files** | [**List<File>**](File.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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/Foo.md b/samples/client/petstore/csharp/OpenAPIClient/docs/Foo.md deleted file mode 100644 index ea6f4245da6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/Foo.md +++ /dev/null @@ -1,13 +0,0 @@ - -# 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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FooGetDefaultResponse.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FooGetDefaultResponse.md deleted file mode 100644 index bf8a8baf0b8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FooGetDefaultResponse.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.FooGetDefaultResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**VarString** | [**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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/FormatTest.md b/samples/client/petstore/csharp/OpenAPIClient/docs/FormatTest.md deleted file mode 100644 index b583aadb366..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/FormatTest.md +++ /dev/null @@ -1,28 +0,0 @@ - -# Org.OpenAPITools.Model.FormatTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Integer** | **int** | | [optional] -**Int32** | **int** | | [optional] -**Int64** | **long** | | [optional] -**Number** | **decimal** | | -**VarFloat** | **float** | | [optional] -**VarDouble** | **double** | | [optional] -**VarDecimal** | **decimal** | | [optional] -**VarString** | **string** | | [optional] -**VarByte** | **byte[]** | | -**Binary** | **System.IO.Stream** | | [optional] -**Date** | **DateTime** | | -**DateTime** | **DateTime** | | [optional] -**Uuid** | **Guid** | | [optional] -**Password** | **string** | | -**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional] -**PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp/OpenAPIClient/docs/HasOnlyReadOnly.md deleted file mode 100644 index 043d2442b4e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/HasOnlyReadOnly.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.HasOnlyReadOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] [readonly] -**Foo** | **string** | | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/HealthCheckResult.md b/samples/client/petstore/csharp/OpenAPIClient/docs/HealthCheckResult.md deleted file mode 100644 index 08e5992d20c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/HealthCheckResult.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.HealthCheckResult - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**NullableMessage** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject.md b/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject.md deleted file mode 100644 index 12ec90a8c69..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject.md +++ /dev/null @@ -1,14 +0,0 @@ - -# 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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject1.md b/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject1.md deleted file mode 100644 index 581fe20b1e2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject1.md +++ /dev/null @@ -1,14 +0,0 @@ - -# 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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject2.md b/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject2.md deleted file mode 100644 index 79abb7a467c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject2.md +++ /dev/null @@ -1,14 +0,0 @@ - -# 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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject3.md b/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject3.md deleted file mode 100644 index 684db7f7227..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject3.md +++ /dev/null @@ -1,26 +0,0 @@ - -# 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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject4.md b/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject4.md deleted file mode 100644 index 18e4a1f3ce5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject4.md +++ /dev/null @@ -1,14 +0,0 @@ - -# 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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject5.md b/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject5.md deleted file mode 100644 index 291c88623ee..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/InlineObject5.md +++ /dev/null @@ -1,14 +0,0 @@ - -# 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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/InlineResponseDefault.md b/samples/client/petstore/csharp/OpenAPIClient/docs/InlineResponseDefault.md deleted file mode 100644 index ecfb254001a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/InlineResponseDefault.md +++ /dev/null @@ -1,13 +0,0 @@ - -# 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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/List.md b/samples/client/petstore/csharp/OpenAPIClient/docs/List.md deleted file mode 100644 index aec4d2b865e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/List.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.List - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var123List** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/MapTest.md b/samples/client/petstore/csharp/OpenAPIClient/docs/MapTest.md deleted file mode 100644 index 654ac325839..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/MapTest.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Org.OpenAPITools.Model.MapTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**MapOfEnumString** | **Dictionary<string, MapTest.InnerEnum>** | | [optional] -**DirectMap** | **Dictionary<string, bool>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClient/docs/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index dd7b01e49fe..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.MixedPropertiesAndAdditionalPropertiesClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Uuid** | **Guid** | | [optional] -**DateTime** | **DateTime** | | [optional] -**Map** | [**Dictionary<string, Animal>**](Animal.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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/Model200Response.md b/samples/client/petstore/csharp/OpenAPIClient/docs/Model200Response.md deleted file mode 100644 index 168197795d6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/Model200Response.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Model200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **int** | | [optional] -**VarClass** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/ModelClient.md b/samples/client/petstore/csharp/OpenAPIClient/docs/ModelClient.md deleted file mode 100644 index 194b43f17bc..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/ModelClient.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ModelClient - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**varClient** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/Name.md b/samples/client/petstore/csharp/OpenAPIClient/docs/Name.md deleted file mode 100644 index fc1742256c2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/Name.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Org.OpenAPITools.Model.Name - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**VarName** | **int** | | -**SnakeCase** | **int** | | [optional] [readonly] -**Property** | **string** | | [optional] -**var123Number** | **int** | | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/NullableClass.md b/samples/client/petstore/csharp/OpenAPIClient/docs/NullableClass.md deleted file mode 100644 index 84dd092d8a3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/NullableClass.md +++ /dev/null @@ -1,24 +0,0 @@ - -# Org.OpenAPITools.Model.NullableClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**IntegerProp** | **int?** | | [optional] -**NumberProp** | **decimal?** | | [optional] -**BooleanProp** | **bool?** | | [optional] -**StringProp** | **string** | | [optional] -**DateProp** | **DateTime?** | | [optional] -**DatetimeProp** | **DateTime?** | | [optional] -**ArrayNullableProp** | **List<Object>** | | [optional] -**ArrayAndItemsNullableProp** | **List<Object>** | | [optional] -**ArrayItemsNullable** | **List<Object>** | | [optional] -**ObjectNullableProp** | **Dictionary<string, Object>** | | [optional] -**ObjectAndItemsNullableProp** | **Dictionary<string, Object>** | | [optional] -**ObjectItemsNullable** | **Dictionary<string, Object>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/NumberOnly.md b/samples/client/petstore/csharp/OpenAPIClient/docs/NumberOnly.md deleted file mode 100644 index e4b08467e08..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/NumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.NumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JustNumber** | **decimal** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/ObjectWithDeprecatedFields.md b/samples/client/petstore/csharp/OpenAPIClient/docs/ObjectWithDeprecatedFields.md deleted file mode 100644 index 55a473a9a4e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/ObjectWithDeprecatedFields.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Org.OpenAPITools.Model.ObjectWithDeprecatedFields - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Uuid** | **string** | | [optional] -**Id** | **decimal** | | [optional] -**DeprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional] -**Bars** | **List<string>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/Order.md b/samples/client/petstore/csharp/OpenAPIClient/docs/Order.md deleted file mode 100644 index 875f43a30e5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/Order.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Order - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**PetId** | **long** | | [optional] -**Quantity** | **int** | | [optional] -**ShipDate** | **DateTime** | | [optional] -**Status** | **string** | Order Status | [optional] -**Complete** | **bool** | | [optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/OuterComposite.md b/samples/client/petstore/csharp/OpenAPIClient/docs/OuterComposite.md deleted file mode 100644 index f381fb7fd28..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/OuterComposite.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.OuterComposite - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MyNumber** | **decimal** | | [optional] -**MyString** | **string** | | [optional] -**MyBoolean** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/OuterEnum.md b/samples/client/petstore/csharp/OpenAPIClient/docs/OuterEnum.md deleted file mode 100644 index edc2300684d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/OuterEnum.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.OuterEnum - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/OuterEnumDefaultValue.md b/samples/client/petstore/csharp/OpenAPIClient/docs/OuterEnumDefaultValue.md deleted file mode 100644 index 41474099f2e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/OuterEnumDefaultValue.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.OuterEnumDefaultValue - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/OuterEnumInteger.md b/samples/client/petstore/csharp/OpenAPIClient/docs/OuterEnumInteger.md deleted file mode 100644 index b82abc3adac..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/OuterEnumInteger.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.OuterEnumInteger - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/csharp/OpenAPIClient/docs/OuterEnumIntegerDefaultValue.md deleted file mode 100644 index 46939d01522..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/OuterEnumIntegerDefaultValue.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.OuterEnumIntegerDefaultValue - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/OuterObjectWithEnumProperty.md b/samples/client/petstore/csharp/OpenAPIClient/docs/OuterObjectWithEnumProperty.md deleted file mode 100644 index b97e65b97be..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/OuterObjectWithEnumProperty.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.OuterObjectWithEnumProperty - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Value** | **OuterEnumInteger** | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/Pet.md b/samples/client/petstore/csharp/OpenAPIClient/docs/Pet.md deleted file mode 100644 index 0bd5c40fc99..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/Pet.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Pet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Category** | [**Category**](Category.md) | | [optional] -**Name** | **string** | | -**PhotoUrls** | **List<string>** | | -**Tags** | [**List<Tag>**](Tag.md) | | [optional] -**Status** | **string** | pet status in the store | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md deleted file mode 100644 index b02d582adc1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/PetApi.md +++ /dev/null @@ -1,738 +0,0 @@ -# Org.OpenAPITools.Api.PetApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -[**DeletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -[**FindPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -[**FindPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -[**GetPetById**](PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -[**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -[**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) - - - -## AddPet - -> void AddPet (Pet pet) - -Add a new pet to the store - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class AddPetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var pet = new Pet(); // Pet | Pet object that needs to be added to the store - - try - { - // Add a new pet to the store - apiInstance.AddPet(pet); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.AddPet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful operation | - | -| **405** | Invalid input | - | - -[[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) - - -## DeletePet - -> void DeletePet (long petId, string apiKey = null) - -Deletes a pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeletePetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789L; // long | Pet id to delete - var apiKey = "apiKey_example"; // string | (optional) - - try - { - // Deletes a pet - apiInstance.DeletePet(petId, apiKey); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| Pet id to delete | - **apiKey** | **string**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful operation | - | -| **400** | Invalid pet value | - | - -[[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) - - -## FindPetsByStatus - -> List<Pet> FindPetsByStatus (List status) - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FindPetsByStatusExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var status = new List(); // List | Status values that need to be considered for filter - - try - { - // Finds Pets by status - List result = apiInstance.FindPetsByStatus(status); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | [**List<string>**](string.md)| Status values that need to be considered for filter | - -### Return type - -[**List<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid status value | - | - -[[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) - - -## FindPetsByTags - -> List<Pet> FindPetsByTags (List tags) - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FindPetsByTagsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var tags = new List(); // List | Tags to filter by - - try - { - // Finds Pets by tags - List result = apiInstance.FindPetsByTags(tags); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**List<string>**](string.md)| Tags to filter by | - -### Return type - -[**List<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid tag value | - | - -[[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) - - -## GetPetById - -> Pet GetPetById (long petId) - -Find pet by ID - -Returns a single pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetPetByIdExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789L; // long | ID of pet to return - - try - { - // Find pet by ID - Pet result = apiInstance.GetPetById(petId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to return | - -### Return type - -[**Pet**](Pet.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | - -[[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) - - -## UpdatePet - -> void UpdatePet (Pet pet) - -Update an existing pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdatePetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var pet = new Pet(); // Pet | Pet object that needs to be added to the store - - try - { - // Update an existing pet - apiInstance.UpdatePet(pet); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pet** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | -| **405** | Validation exception | - | - -[[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) - - -## UpdatePetWithForm - -> void UpdatePetWithForm (long petId, string name = null, string status = null) - -Updates a pet in the store with form data - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdatePetWithFormExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789L; // long | ID of pet that needs to be updated - var name = "name_example"; // string | Updated name of the pet (optional) - var status = "status_example"; // string | Updated status of the pet (optional) - - try - { - // Updates a pet in the store with form data - apiInstance.UpdatePetWithForm(petId, name, status); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet that needs to be updated | - **name** | **string**| Updated name of the pet | [optional] - **status** | **string**| Updated status of the pet | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful operation | - | -| **405** | Invalid input | - | - -[[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) - - -## UploadFile - -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) - -uploads an image - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789L; // long | ID of pet to update - var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) - var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload (optional) - - try - { - // uploads an image - ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to update | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - **file** | **System.IO.Stream**| file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UploadFileWithRequiredFile - -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) - -uploads an image (required) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileWithRequiredFileExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789L; // long | ID of pet to update - var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload - var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional) - - try - { - // uploads an image (required) - ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to update | - **requiredFile** | **System.IO.Stream**| file to upload | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp/OpenAPIClient/docs/ReadOnlyFirst.md deleted file mode 100644 index 8ea3b95919b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/ReadOnlyFirst.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.ReadOnlyFirst - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] [readonly] -**Baz** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/Return.md b/samples/client/petstore/csharp/OpenAPIClient/docs/Return.md deleted file mode 100644 index d06ac47bd79..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/Return.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.Return - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**VarReturn** | **int** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/SingleRefType.md b/samples/client/petstore/csharp/OpenAPIClient/docs/SingleRefType.md deleted file mode 100644 index 1feba3b93cf..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/SingleRefType.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.SingleRefType - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/SpecialModelName.md b/samples/client/petstore/csharp/OpenAPIClient/docs/SpecialModelName.md deleted file mode 100644 index ee6489524d0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/SpecialModelName.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.SpecialModelName - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SpecialPropertyName** | **long** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md deleted file mode 100644 index f38f7518673..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/StoreApi.md +++ /dev/null @@ -1,318 +0,0 @@ -# Org.OpenAPITools.Api.StoreApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**GetInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[**PlaceOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet - - - -## DeleteOrder - -> void DeleteOrder (string orderId) - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeleteOrderExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var orderId = "orderId_example"; // string | ID of the order that needs to be deleted - - try - { - // Delete purchase order by ID - apiInstance.DeleteOrder(orderId); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **string**| ID of the order that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - -[[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) - - -## GetInventory - -> Dictionary<string, int> GetInventory () - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetInventoryExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - - var apiInstance = new StoreApi(Configuration.Default); - - try - { - // Returns pet inventories by status - Dictionary result = apiInstance.GetInventory(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**Dictionary** - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetOrderById - -> Order GetOrderById (long orderId) - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetOrderByIdExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var orderId = 789L; // long | ID of pet that needs to be fetched - - try - { - // Find purchase order by ID - Order result = apiInstance.GetOrderById(orderId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **long**| ID of pet that needs to be fetched | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - -[[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) - - -## PlaceOrder - -> Order PlaceOrder (Order order) - -Place an order for a pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class PlaceOrderExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var order = new Order(); // Order | order placed for purchasing the pet - - try - { - // Place an order for a pet - Order result = apiInstance.PlaceOrder(order); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **order** | [**Order**](Order.md)| order placed for purchasing the pet | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/xml, application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid Order | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/Tag.md b/samples/client/petstore/csharp/OpenAPIClient/docs/Tag.md deleted file mode 100644 index f781c26f017..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/Tag.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Tag - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/TypeHolderDefault.md b/samples/client/petstore/csharp/OpenAPIClient/docs/TypeHolderDefault.md deleted file mode 100644 index 0945245b213..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/TypeHolderDefault.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Org.OpenAPITools.Model.TypeHolderDefault - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StringItem** | **string** | | [default to "what"] -**NumberItem** | **decimal** | | -**IntegerItem** | **int** | | -**BoolItem** | **bool** | | [default to true] -**ArrayItem** | **List<int>** | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/TypeHolderExample.md b/samples/client/petstore/csharp/OpenAPIClient/docs/TypeHolderExample.md deleted file mode 100644 index b9573673baf..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/TypeHolderExample.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.TypeHolderExample - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StringItem** | **string** | | -**NumberItem** | **decimal** | | -**FloatItem** | **float** | | -**IntegerItem** | **int** | | -**BoolItem** | **bool** | | -**ArrayItem** | **List<int>** | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/User.md b/samples/client/petstore/csharp/OpenAPIClient/docs/User.md deleted file mode 100644 index a25c25d1aa0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/User.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Org.OpenAPITools.Model.User - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Username** | **string** | | [optional] -**FirstName** | **string** | | [optional] -**LastName** | **string** | | [optional] -**Email** | **string** | | [optional] -**Password** | **string** | | [optional] -**Phone** | **string** | | [optional] -**UserStatus** | **int** | User Status | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md b/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md deleted file mode 100644 index 5bd0898eac1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/UserApi.md +++ /dev/null @@ -1,613 +0,0 @@ -# Org.OpenAPITools.Api.UserApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateUser**](UserApi.md#createuser) | **POST** /user | Create user -[**CreateUsersWithArrayInput**](UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -[**CreateUsersWithListInput**](UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -[**DeleteUser**](UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -[**GetUserByName**](UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -[**LoginUser**](UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -[**LogoutUser**](UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -[**UpdateUser**](UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - - -## CreateUser - -> void CreateUser (User user) - -Create user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var user = new User(); // User | Created user object - - try - { - // Create user - apiInstance.CreateUser(user); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**User**](User.md)| Created user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateUsersWithArrayInput - -> void CreateUsersWithArrayInput (List user) - -Creates list of users with given input array - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUsersWithArrayInputExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var user = new List(); // List | List of user object - - try - { - // Creates list of users with given input array - apiInstance.CreateUsersWithArrayInput(user); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**List<User>**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateUsersWithListInput - -> void CreateUsersWithListInput (List user) - -Creates list of users with given input array - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUsersWithListInputExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var user = new List(); // List | List of user object - - try - { - // Creates list of users with given input array - apiInstance.CreateUsersWithListInput(user); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **user** | [**List<User>**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteUser - -> void DeleteUser (string username) - -Delete user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeleteUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = "username_example"; // string | The name that needs to be deleted - - try - { - // Delete user - apiInstance.DeleteUser(username); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## GetUserByName - -> User GetUserByName (string username) - -Get user by user name - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetUserByNameExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing. - - try - { - // Get user by user name - User result = apiInstance.GetUserByName(username); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be fetched. Use user1 for testing. | - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## LoginUser - -> string LoginUser (string username, string password) - -Logs user into the system - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class LoginUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = "username_example"; // string | The user name for login - var password = "password_example"; // string | The password for login in clear text - - try - { - // Logs user into the system - string result = apiInstance.LoginUser(username, password); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The user name for login | - **password** | **string**| The password for login in clear text | - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| -| **400** | Invalid username/password supplied | - | - -[[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) - - -## LogoutUser - -> void LogoutUser () - -Logs out current logged in user session - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class LogoutUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - - try - { - // Logs out current logged in user session - apiInstance.LogoutUser(); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateUser - -> void UpdateUser (string username, User user) - -Updated user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdateUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = "username_example"; // string | name that need to be deleted - var user = new User(); // User | Updated user object - - try - { - // Updated user - apiInstance.UpdateUser(username, user); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| name that need to be deleted | - **user** | [**User**](User.md)| Updated user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid user supplied | - | -| **404** | User not found | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/docs/XmlItem.md b/samples/client/petstore/csharp/OpenAPIClient/docs/XmlItem.md deleted file mode 100644 index 0dca90c706f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/docs/XmlItem.md +++ /dev/null @@ -1,41 +0,0 @@ - -# Org.OpenAPITools.Model.XmlItem - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AttributeString** | **string** | | [optional] -**AttributeNumber** | **decimal** | | [optional] -**AttributeInteger** | **int** | | [optional] -**AttributeBoolean** | **bool** | | [optional] -**WrappedArray** | **List<int>** | | [optional] -**NameString** | **string** | | [optional] -**NameNumber** | **decimal** | | [optional] -**NameInteger** | **int** | | [optional] -**NameBoolean** | **bool** | | [optional] -**NameArray** | **List<int>** | | [optional] -**NameWrappedArray** | **List<int>** | | [optional] -**PrefixString** | **string** | | [optional] -**PrefixNumber** | **decimal** | | [optional] -**PrefixInteger** | **int** | | [optional] -**PrefixBoolean** | **bool** | | [optional] -**PrefixArray** | **List<int>** | | [optional] -**PrefixWrappedArray** | **List<int>** | | [optional] -**NamespaceString** | **string** | | [optional] -**NamespaceNumber** | **decimal** | | [optional] -**NamespaceInteger** | **int** | | [optional] -**NamespaceBoolean** | **bool** | | [optional] -**NamespaceArray** | **List<int>** | | [optional] -**NamespaceWrappedArray** | **List<int>** | | [optional] -**PrefixNsString** | **string** | | [optional] -**PrefixNsNumber** | **decimal** | | [optional] -**PrefixNsInteger** | **int** | | [optional] -**PrefixNsBoolean** | **bool** | | [optional] -**PrefixNsArray** | **List<int>** | | [optional] -**PrefixNsWrappedArray** | **List<int>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClient/git_push.sh b/samples/client/petstore/csharp/OpenAPIClient/git_push.sh deleted file mode 100644 index f53a75d4fab..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/git_push.sh +++ /dev/null @@ -1,57 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=$(git remote) -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' diff --git a/samples/client/petstore/csharp/OpenAPIClient/mono_nunit_test.sh b/samples/client/petstore/csharp/OpenAPIClient/mono_nunit_test.sh deleted file mode 100644 index ef4209de27b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/mono_nunit_test.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# -# Generated by: https://github.com/openapitools/openapi-generator.git -# - -wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -mozroots --import --sync - -echo "[INFO] remove bin/Debug/Org.OpenAPITools.Test.dll" -rm src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll 2> /dev/null - -echo "[INFO] install NUnit runners via NuGet" -wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -mozroots --import --sync -mono nuget.exe install src/Org.OpenAPITools.Test/packages.config -o packages - -echo "[INFO] Install NUnit Console 3.x runners via NuGet" -mono nuget.exe install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory packages - -echo "[INFO] Build the solution and run the unit test" -xbuild Org.OpenAPITools.sln && \ - mono ./packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs deleted file mode 100644 index 626c8e8329d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing AnotherFakeApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class AnotherFakeApiTests - { - private AnotherFakeApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new AnotherFakeApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AnotherFakeApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' AnotherFakeApi - //Assert.IsInstanceOf(typeof(AnotherFakeApi), instance); - } - - - /// - /// Test Call123TestSpecialTags - /// - [Test] - public void Call123TestSpecialTagsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //ModelClient body = null; - //var response = instance.Call123TestSpecialTags(body); - //Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs deleted file mode 100644 index 1335cf4310a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing DefaultApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class DefaultApiTests - { - private DefaultApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new DefaultApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of DefaultApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' DefaultApi - //Assert.IsInstanceOf(typeof(DefaultApi), instance); - } - - - /// - /// Test FooGet - /// - [Test] - public void FooGetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.FooGet(); - //Assert.IsInstanceOf(typeof(InlineResponseDefault), response, "response is InlineResponseDefault"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs deleted file mode 100644 index bdbcdb21efe..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ /dev/null @@ -1,267 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing FakeApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class FakeApiTests - { - private FakeApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new FakeApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FakeApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' FakeApi - //Assert.IsInstanceOf(typeof(FakeApi), instance); - } - - - /// - /// Test CreateXmlItem - /// - [Test] - public void CreateXmlItemTest() - { - // TODO uncomment below to test the method and replace null with proper value - //XmlItem xmlItem = null; - //instance.CreateXmlItem(xmlItem); - - } - - /// - /// Test FakeOuterBooleanSerialize - /// - [Test] - public void FakeOuterBooleanSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //bool? body = null; - //var response = instance.FakeOuterBooleanSerialize(body); - //Assert.IsInstanceOf(typeof(bool), response, "response is bool"); - } - - /// - /// Test FakeOuterCompositeSerialize - /// - [Test] - public void FakeOuterCompositeSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //OuterComposite body = null; - //var response = instance.FakeOuterCompositeSerialize(body); - //Assert.IsInstanceOf(typeof(OuterComposite), response, "response is OuterComposite"); - } - - /// - /// Test FakeOuterNumberSerialize - /// - [Test] - public void FakeOuterNumberSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //decimal? body = null; - //var response = instance.FakeOuterNumberSerialize(body); - //Assert.IsInstanceOf(typeof(decimal), response, "response is decimal"); - } - - /// - /// Test FakeOuterStringSerialize - /// - [Test] - public void FakeOuterStringSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string body = null; - //var response = instance.FakeOuterStringSerialize(body); - //Assert.IsInstanceOf(typeof(string), response, "response is string"); - } - - /// - /// Test TestBodyWithFileSchema - /// - [Test] - public void TestBodyWithFileSchemaTest() - { - // TODO uncomment below to test the method and replace null with proper value - //FileSchemaTestClass body = null; - //instance.TestBodyWithFileSchema(body); - - } - - /// - /// Test TestBodyWithQueryParams - /// - [Test] - public void TestBodyWithQueryParamsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string query = null; - //User body = null; - //instance.TestBodyWithQueryParams(query, body); - - } - - /// - /// Test TestClientModel - /// - [Test] - public void TestClientModelTest() - { - // TODO uncomment below to test the method and replace null with proper value - //ModelClient body = null; - //var response = instance.TestClientModel(body); - //Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient"); - } - - /// - /// Test TestEndpointParameters - /// - [Test] - public void TestEndpointParametersTest() - { - // TODO uncomment below to test the method and replace null with proper value - //decimal number = null; - //double _double = null; - //string patternWithoutDelimiter = null; - //byte[] _byte = null; - //int? integer = null; - //int? int32 = null; - //long? int64 = null; - //float? _float = null; - //string _string = null; - //System.IO.Stream binary = null; - //DateTime? date = null; - //DateTime? dateTime = null; - //string password = null; - //string callback = null; - //instance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); - - } - - /// - /// Test TestEnumParameters - /// - [Test] - public void TestEnumParametersTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List enumHeaderStringArray = null; - //string enumHeaderString = null; - //List enumQueryStringArray = null; - //string enumQueryString = null; - //int? enumQueryInteger = null; - //double? enumQueryDouble = null; - //List enumFormStringArray = null; - //string enumFormString = null; - //instance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - - } - - /// - /// Test TestGroupParameters - /// - [Test] - public void TestGroupParametersTest() - { - // TODO uncomment below to test the method and replace null with proper value - //int requiredStringGroup = null; - //bool requiredBooleanGroup = null; - //long requiredInt64Group = null; - //int? stringGroup = null; - //bool? booleanGroup = null; - //long? int64Group = null; - //instance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - - } - - /// - /// Test TestInlineAdditionalProperties - /// - [Test] - public void TestInlineAdditionalPropertiesTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Dictionary param = null; - //instance.TestInlineAdditionalProperties(param); - - } - - /// - /// Test TestJsonFormData - /// - [Test] - public void TestJsonFormDataTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string param = null; - //string param2 = null; - //instance.TestJsonFormData(param, param2); - - } - - /// - /// Test TestQueryParameterCollectionFormat - /// - [Test] - public void TestQueryParameterCollectionFormatTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List pipe = null; - //List ioutil = null; - //List http = null; - //List url = null; - //List context = null; - //instance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); - - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs deleted file mode 100644 index f73f71bc211..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing FakeClassnameTags123Api - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class FakeClassnameTags123ApiTests - { - private FakeClassnameTags123Api instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new FakeClassnameTags123Api(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FakeClassnameTags123Api - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' FakeClassnameTags123Api - //Assert.IsInstanceOf(typeof(FakeClassnameTags123Api), instance); - } - - - /// - /// Test TestClassname - /// - [Test] - public void TestClassnameTest() - { - // TODO uncomment below to test the method and replace null with proper value - //ModelClient body = null; - //var response = instance.TestClassname(body); - //Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs deleted file mode 100644 index ef563f71442..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/PetApiTests.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing PetApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class PetApiTests - { - private PetApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new PetApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of PetApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' PetApi - //Assert.IsInstanceOf(typeof(PetApi), instance); - } - - - /// - /// Test AddPet - /// - [Test] - public void AddPetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Pet body = null; - //instance.AddPet(body); - - } - - /// - /// Test DeletePet - /// - [Test] - public void DeletePetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //string apiKey = null; - //instance.DeletePet(petId, apiKey); - - } - - /// - /// Test FindPetsByStatus - /// - [Test] - public void FindPetsByStatusTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List status = null; - //var response = instance.FindPetsByStatus(status); - //Assert.IsInstanceOf(typeof(List), response, "response is List"); - } - - /// - /// Test FindPetsByTags - /// - [Test] - public void FindPetsByTagsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List tags = null; - //var response = instance.FindPetsByTags(tags); - //Assert.IsInstanceOf(typeof(List), response, "response is List"); - } - - /// - /// Test GetPetById - /// - [Test] - public void GetPetByIdTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //var response = instance.GetPetById(petId); - //Assert.IsInstanceOf(typeof(Pet), response, "response is Pet"); - } - - /// - /// Test UpdatePet - /// - [Test] - public void UpdatePetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Pet body = null; - //instance.UpdatePet(body); - - } - - /// - /// Test UpdatePetWithForm - /// - [Test] - public void UpdatePetWithFormTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //string name = null; - //string status = null; - //instance.UpdatePetWithForm(petId, name, status); - - } - - /// - /// Test UploadFile - /// - [Test] - public void UploadFileTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //string additionalMetadata = null; - //System.IO.Stream file = null; - //var response = instance.UploadFile(petId, additionalMetadata, file); - //Assert.IsInstanceOf(typeof(ApiResponse), response, "response is ApiResponse"); - } - - /// - /// Test UploadFileWithRequiredFile - /// - [Test] - public void UploadFileWithRequiredFileTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //System.IO.Stream requiredFile = null; - //string additionalMetadata = null; - //var response = instance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - //Assert.IsInstanceOf(typeof(ApiResponse), response, "response is ApiResponse"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs deleted file mode 100644 index 969eaa7a2ab..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs +++ /dev/null @@ -1,115 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing StoreApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class StoreApiTests - { - private StoreApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new StoreApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of StoreApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' StoreApi - //Assert.IsInstanceOf(typeof(StoreApi), instance); - } - - - /// - /// Test DeleteOrder - /// - [Test] - public void DeleteOrderTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string orderId = null; - //instance.DeleteOrder(orderId); - - } - - /// - /// Test GetInventory - /// - [Test] - public void GetInventoryTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.GetInventory(); - //Assert.IsInstanceOf(typeof(Dictionary), response, "response is Dictionary"); - } - - /// - /// Test GetOrderById - /// - [Test] - public void GetOrderByIdTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long orderId = null; - //var response = instance.GetOrderById(orderId); - //Assert.IsInstanceOf(typeof(Order), response, "response is Order"); - } - - /// - /// Test PlaceOrder - /// - [Test] - public void PlaceOrderTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Order body = null; - //var response = instance.PlaceOrder(body); - //Assert.IsInstanceOf(typeof(Order), response, "response is Order"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/UserApiTests.cs deleted file mode 100644 index a79cad43130..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing UserApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class UserApiTests - { - private UserApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new UserApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of UserApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' UserApi - //Assert.IsInstanceOf(typeof(UserApi), instance); - } - - - /// - /// Test CreateUser - /// - [Test] - public void CreateUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //User body = null; - //instance.CreateUser(body); - - } - - /// - /// Test CreateUsersWithArrayInput - /// - [Test] - public void CreateUsersWithArrayInputTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List body = null; - //instance.CreateUsersWithArrayInput(body); - - } - - /// - /// Test CreateUsersWithListInput - /// - [Test] - public void CreateUsersWithListInputTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List body = null; - //instance.CreateUsersWithListInput(body); - - } - - /// - /// Test DeleteUser - /// - [Test] - public void DeleteUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //instance.DeleteUser(username); - - } - - /// - /// Test GetUserByName - /// - [Test] - public void GetUserByNameTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //var response = instance.GetUserByName(username); - //Assert.IsInstanceOf(typeof(User), response, "response is User"); - } - - /// - /// Test LoginUser - /// - [Test] - public void LoginUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //string password = null; - //var response = instance.LoginUser(username, password); - //Assert.IsInstanceOf(typeof(string), response, "response is string"); - } - - /// - /// Test LogoutUser - /// - [Test] - public void LogoutUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //instance.LogoutUser(); - - } - - /// - /// Test UpdateUser - /// - [Test] - public void UpdateUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //User body = null; - //instance.UpdateUser(username, body); - - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs deleted file mode 100644 index 03151430729..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesAnyType - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesAnyTypeTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesAnyType - //private AdditionalPropertiesAnyType instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesAnyType - //instance = new AdditionalPropertiesAnyType(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesAnyType - /// - [Test] - public void AdditionalPropertiesAnyTypeInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesAnyType - //Assert.IsInstanceOf(typeof(AdditionalPropertiesAnyType), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs deleted file mode 100644 index e75114595b6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesArray - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesArrayTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesArray - //private AdditionalPropertiesArray instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesArray - //instance = new AdditionalPropertiesArray(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesArray - /// - [Test] - public void AdditionalPropertiesArrayInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesArray - //Assert.IsInstanceOf(typeof(AdditionalPropertiesArray), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs deleted file mode 100644 index c09b604fae8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesBoolean - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesBooleanTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesBoolean - //private AdditionalPropertiesBoolean instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesBoolean - //instance = new AdditionalPropertiesBoolean(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesBoolean - /// - [Test] - public void AdditionalPropertiesBooleanInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesBoolean - //Assert.IsInstanceOf(typeof(AdditionalPropertiesBoolean), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs deleted file mode 100644 index 4ee461b5ed0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesClassTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesClass - //private AdditionalPropertiesClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesClass - //instance = new AdditionalPropertiesClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesClass - /// - [Test] - public void AdditionalPropertiesClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesClass - //Assert.IsInstanceOf(typeof(AdditionalPropertiesClass), instance); - } - - - /// - /// Test the property 'MapString' - /// - [Test] - public void MapStringTest() - { - // TODO unit test for the property 'MapString' - } - /// - /// Test the property 'MapNumber' - /// - [Test] - public void MapNumberTest() - { - // TODO unit test for the property 'MapNumber' - } - /// - /// Test the property 'MapInteger' - /// - [Test] - public void MapIntegerTest() - { - // TODO unit test for the property 'MapInteger' - } - /// - /// Test the property 'MapBoolean' - /// - [Test] - public void MapBooleanTest() - { - // TODO unit test for the property 'MapBoolean' - } - /// - /// Test the property 'MapArrayInteger' - /// - [Test] - public void MapArrayIntegerTest() - { - // TODO unit test for the property 'MapArrayInteger' - } - /// - /// Test the property 'MapArrayAnytype' - /// - [Test] - public void MapArrayAnytypeTest() - { - // TODO unit test for the property 'MapArrayAnytype' - } - /// - /// Test the property 'MapMapString' - /// - [Test] - public void MapMapStringTest() - { - // TODO unit test for the property 'MapMapString' - } - /// - /// Test the property 'MapMapAnytype' - /// - [Test] - public void MapMapAnytypeTest() - { - // TODO unit test for the property 'MapMapAnytype' - } - /// - /// Test the property 'Anytype1' - /// - [Test] - public void Anytype1Test() - { - // TODO unit test for the property 'Anytype1' - } - /// - /// Test the property 'Anytype2' - /// - [Test] - public void Anytype2Test() - { - // TODO unit test for the property 'Anytype2' - } - /// - /// Test the property 'Anytype3' - /// - [Test] - public void Anytype3Test() - { - // TODO unit test for the property 'Anytype3' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs deleted file mode 100644 index 98e65b0e548..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesInteger - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesIntegerTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesInteger - //private AdditionalPropertiesInteger instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesInteger - //instance = new AdditionalPropertiesInteger(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesInteger - /// - [Test] - public void AdditionalPropertiesIntegerInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesInteger - //Assert.IsInstanceOf(typeof(AdditionalPropertiesInteger), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs deleted file mode 100644 index b20dac9314a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesNumber - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesNumberTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesNumber - //private AdditionalPropertiesNumber instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesNumber - //instance = new AdditionalPropertiesNumber(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesNumber - /// - [Test] - public void AdditionalPropertiesNumberInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesNumber - //Assert.IsInstanceOf(typeof(AdditionalPropertiesNumber), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs deleted file mode 100644 index 342cbd47075..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesObject - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesObjectTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesObject - //private AdditionalPropertiesObject instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesObject - //instance = new AdditionalPropertiesObject(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesObject - /// - [Test] - public void AdditionalPropertiesObjectInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesObject - //Assert.IsInstanceOf(typeof(AdditionalPropertiesObject), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs deleted file mode 100644 index 273ade918d8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesString - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesStringTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesString - //private AdditionalPropertiesString instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesString - //instance = new AdditionalPropertiesString(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesString - /// - [Test] - public void AdditionalPropertiesStringInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesString - //Assert.IsInstanceOf(typeof(AdditionalPropertiesString), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AllOfWithSingleRefTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AllOfWithSingleRefTests.cs deleted file mode 100644 index 71e6c77a642..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AllOfWithSingleRefTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AllOfWithSingleRef - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AllOfWithSingleRefTests - { - // TODO uncomment below to declare an instance variable for AllOfWithSingleRef - //private AllOfWithSingleRef instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AllOfWithSingleRef - //instance = new AllOfWithSingleRef(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AllOfWithSingleRef - /// - [Test] - public void AllOfWithSingleRefInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AllOfWithSingleRef - //Assert.IsInstanceOf(typeof(AllOfWithSingleRef), instance); - } - - - /// - /// Test the property 'Username' - /// - [Test] - public void UsernameTest() - { - // TODO unit test for the property 'Username' - } - /// - /// Test the property 'SingleRefType' - /// - [Test] - public void SingleRefTypeTest() - { - // TODO unit test for the property 'SingleRefType' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AnimalTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AnimalTests.cs deleted file mode 100644 index f404924f459..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/AnimalTests.cs +++ /dev/null @@ -1,114 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Animal - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AnimalTests - { - // TODO uncomment below to declare an instance variable for Animal - //private Animal instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Animal - //instance = new Animal(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Animal - /// - [Test] - public void AnimalInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Animal - //Assert.IsInstanceOf(typeof(Animal), instance); - } - - /// - /// Test deserialize a Dog from type Animal - /// - [Test] - public void DogDeserializeFromAnimalTest() - { - // TODO uncomment below to test deserialize a Dog from type Animal - //Assert.IsInstanceOf(typeof(Animal), JsonConvert.DeserializeObject(new Dog().ToJson())); - } - /// - /// Test deserialize a Cat from type Animal - /// - [Test] - public void CatDeserializeFromAnimalTest() - { - // TODO uncomment below to test deserialize a Cat from type Animal - //Assert.IsInstanceOf(typeof(Animal), JsonConvert.DeserializeObject(new Cat().ToJson())); - } - /// - /// Test deserialize a BigCat from type Cat - /// - [Test] - public void BigCatDeserializeFromCatTest() - { - // TODO uncomment below to test deserialize a BigCat from type Cat - //Assert.IsInstanceOf(typeof(Cat), JsonConvert.DeserializeObject(new BigCat().ToJson())); - } - - /// - /// Test the property 'ClassName' - /// - [Test] - public void ClassNameTest() - { - // TODO unit test for the property 'ClassName' - } - /// - /// Test the property 'Color' - /// - [Test] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs deleted file mode 100644 index 2442b4ef55d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ApiResponse - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ApiResponseTests - { - // TODO uncomment below to declare an instance variable for ApiResponse - //private ApiResponse instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ApiResponse - //instance = new ApiResponse(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ApiResponse - /// - [Test] - public void ApiResponseInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ApiResponse - //Assert.IsInstanceOf(typeof(ApiResponse), instance); - } - - - /// - /// Test the property 'Code' - /// - [Test] - public void CodeTest() - { - // TODO unit test for the property 'Code' - } - /// - /// Test the property 'Type' - /// - [Test] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } - /// - /// Test the property 'Message' - /// - [Test] - public void MessageTest() - { - // TODO unit test for the property 'Message' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs deleted file mode 100644 index 094432c3361..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ArrayOfArrayOfNumberOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ArrayOfArrayOfNumberOnlyTests - { - // TODO uncomment below to declare an instance variable for ArrayOfArrayOfNumberOnly - //private ArrayOfArrayOfNumberOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ArrayOfArrayOfNumberOnly - //instance = new ArrayOfArrayOfNumberOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ArrayOfArrayOfNumberOnly - /// - [Test] - public void ArrayOfArrayOfNumberOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ArrayOfArrayOfNumberOnly - //Assert.IsInstanceOf(typeof(ArrayOfArrayOfNumberOnly), instance); - } - - - /// - /// Test the property 'ArrayArrayNumber' - /// - [Test] - public void ArrayArrayNumberTest() - { - // TODO unit test for the property 'ArrayArrayNumber' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs deleted file mode 100644 index d95bf3883d9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ArrayOfNumberOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ArrayOfNumberOnlyTests - { - // TODO uncomment below to declare an instance variable for ArrayOfNumberOnly - //private ArrayOfNumberOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ArrayOfNumberOnly - //instance = new ArrayOfNumberOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ArrayOfNumberOnly - /// - [Test] - public void ArrayOfNumberOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ArrayOfNumberOnly - //Assert.IsInstanceOf(typeof(ArrayOfNumberOnly), instance); - } - - - /// - /// Test the property 'ArrayNumber' - /// - [Test] - public void ArrayNumberTest() - { - // TODO unit test for the property 'ArrayNumber' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs deleted file mode 100644 index af09220da3c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ArrayTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ArrayTestTests - { - // TODO uncomment below to declare an instance variable for ArrayTest - //private ArrayTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ArrayTest - //instance = new ArrayTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ArrayTest - /// - [Test] - public void ArrayTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ArrayTest - //Assert.IsInstanceOf(typeof(ArrayTest), instance); - } - - - /// - /// Test the property 'ArrayOfString' - /// - [Test] - public void ArrayOfStringTest() - { - // TODO unit test for the property 'ArrayOfString' - } - /// - /// Test the property 'ArrayArrayOfInteger' - /// - [Test] - public void ArrayArrayOfIntegerTest() - { - // TODO unit test for the property 'ArrayArrayOfInteger' - } - /// - /// Test the property 'ArrayArrayOfModel' - /// - [Test] - public void ArrayArrayOfModelTest() - { - // TODO unit test for the property 'ArrayArrayOfModel' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs deleted file mode 100644 index 4cbdb4b8a5e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing BigCatAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class BigCatAllOfTests - { - // TODO uncomment below to declare an instance variable for BigCatAllOf - //private BigCatAllOf instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of BigCatAllOf - //instance = new BigCatAllOf(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of BigCatAllOf - /// - [Test] - public void BigCatAllOfInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" BigCatAllOf - //Assert.IsInstanceOf(typeof(BigCatAllOf), instance); - } - - - /// - /// Test the property 'Kind' - /// - [Test] - public void KindTest() - { - // TODO unit test for the property 'Kind' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/BigCatTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/BigCatTests.cs deleted file mode 100644 index 1d78ea9f1e6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/BigCatTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing BigCat - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class BigCatTests - { - // TODO uncomment below to declare an instance variable for BigCat - //private BigCat instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of BigCat - //instance = new BigCat(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of BigCat - /// - [Test] - public void BigCatInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" BigCat - //Assert.IsInstanceOf(typeof(BigCat), instance); - } - - - /// - /// Test the property 'Kind' - /// - [Test] - public void KindTest() - { - // TODO unit test for the property 'Kind' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs deleted file mode 100644 index dd2156d3ba8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Capitalization - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CapitalizationTests - { - // TODO uncomment below to declare an instance variable for Capitalization - //private Capitalization instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Capitalization - //instance = new Capitalization(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Capitalization - /// - [Test] - public void CapitalizationInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Capitalization - //Assert.IsInstanceOf(typeof(Capitalization), instance); - } - - - /// - /// Test the property 'SmallCamel' - /// - [Test] - public void SmallCamelTest() - { - // TODO unit test for the property 'SmallCamel' - } - /// - /// Test the property 'CapitalCamel' - /// - [Test] - public void CapitalCamelTest() - { - // TODO unit test for the property 'CapitalCamel' - } - /// - /// Test the property 'SmallSnake' - /// - [Test] - public void SmallSnakeTest() - { - // TODO unit test for the property 'SmallSnake' - } - /// - /// Test the property 'CapitalSnake' - /// - [Test] - public void CapitalSnakeTest() - { - // TODO unit test for the property 'CapitalSnake' - } - /// - /// Test the property 'SCAETHFlowPoints' - /// - [Test] - public void SCAETHFlowPointsTest() - { - // TODO unit test for the property 'SCAETHFlowPoints' - } - /// - /// Test the property 'ATT_NAME' - /// - [Test] - public void ATT_NAMETest() - { - // TODO unit test for the property 'ATT_NAME' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs deleted file mode 100644 index d7afe6310fa..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing CatAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CatAllOfTests - { - // TODO uncomment below to declare an instance variable for CatAllOf - //private CatAllOf instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of CatAllOf - //instance = new CatAllOf(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of CatAllOf - /// - [Test] - public void CatAllOfInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" CatAllOf - //Assert.IsInstanceOf(typeof(CatAllOf), instance); - } - - - /// - /// Test the property 'Declawed' - /// - [Test] - public void DeclawedTest() - { - // TODO unit test for the property 'Declawed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatTests.cs deleted file mode 100644 index 8b89be0ec8d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CatTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Cat - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CatTests - { - // TODO uncomment below to declare an instance variable for Cat - //private Cat instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Cat - //instance = new Cat(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Cat - /// - [Test] - public void CatInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Cat - //Assert.IsInstanceOf(typeof(Cat), instance); - } - - - /// - /// Test the property 'Declawed' - /// - [Test] - public void DeclawedTest() - { - // TODO unit test for the property 'Declawed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CategoryTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CategoryTests.cs deleted file mode 100644 index e65b9ab1c01..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/CategoryTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Category - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CategoryTests - { - // TODO uncomment below to declare an instance variable for Category - //private Category instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Category - //instance = new Category(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Category - /// - [Test] - public void CategoryInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Category - //Assert.IsInstanceOf(typeof(Category), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs deleted file mode 100644 index 6302a4d8dd9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ClassModel - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ClassModelTests - { - // TODO uncomment below to declare an instance variable for ClassModel - //private ClassModel instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ClassModel - //instance = new ClassModel(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ClassModel - /// - [Test] - public void ClassModelInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ClassModel - //Assert.IsInstanceOf(typeof(ClassModel), instance); - } - - - /// - /// Test the property 'Class' - /// - [Test] - public void ClassTest() - { - // TODO unit test for the property 'Class' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DeprecatedObjectTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DeprecatedObjectTests.cs deleted file mode 100644 index 0f57e43111b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DeprecatedObjectTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing DeprecatedObject - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class DeprecatedObjectTests - { - // TODO uncomment below to declare an instance variable for DeprecatedObject - //private DeprecatedObject instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of DeprecatedObject - //instance = new DeprecatedObject(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of DeprecatedObject - /// - [Test] - public void DeprecatedObjectInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" DeprecatedObject - //Assert.IsInstanceOf(typeof(DeprecatedObject), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs deleted file mode 100644 index 30f5bed38e1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing DogAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class DogAllOfTests - { - // TODO uncomment below to declare an instance variable for DogAllOf - //private DogAllOf instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of DogAllOf - //instance = new DogAllOf(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of DogAllOf - /// - [Test] - public void DogAllOfInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" DogAllOf - //Assert.IsInstanceOf(typeof(DogAllOf), instance); - } - - - /// - /// Test the property 'Breed' - /// - [Test] - public void BreedTest() - { - // TODO unit test for the property 'Breed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogTests.cs deleted file mode 100644 index fba682a3f9e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/DogTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Dog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class DogTests - { - // TODO uncomment below to declare an instance variable for Dog - //private Dog instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Dog - //instance = new Dog(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Dog - /// - [Test] - public void DogInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Dog - //Assert.IsInstanceOf(typeof(Dog), instance); - } - - - /// - /// Test the property 'Breed' - /// - [Test] - public void BreedTest() - { - // TODO unit test for the property 'Breed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs deleted file mode 100644 index 065ae99b613..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing EnumArrays - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class EnumArraysTests - { - // TODO uncomment below to declare an instance variable for EnumArrays - //private EnumArrays instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of EnumArrays - //instance = new EnumArrays(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of EnumArrays - /// - [Test] - public void EnumArraysInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" EnumArrays - //Assert.IsInstanceOf(typeof(EnumArrays), instance); - } - - - /// - /// Test the property 'JustSymbol' - /// - [Test] - public void JustSymbolTest() - { - // TODO unit test for the property 'JustSymbol' - } - /// - /// Test the property 'ArrayEnum' - /// - [Test] - public void ArrayEnumTest() - { - // TODO unit test for the property 'ArrayEnum' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs deleted file mode 100644 index 2ff4f5ab8b0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing EnumClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class EnumClassTests - { - // TODO uncomment below to declare an instance variable for EnumClass - //private EnumClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of EnumClass - //instance = new EnumClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of EnumClass - /// - [Test] - public void EnumClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" EnumClass - //Assert.IsInstanceOf(typeof(EnumClass), instance); - } - - - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs deleted file mode 100644 index 0ea4d901d50..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs +++ /dev/null @@ -1,111 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing EnumTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class EnumTestTests - { - // TODO uncomment below to declare an instance variable for EnumTest - //private EnumTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of EnumTest - //instance = new EnumTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of EnumTest - /// - [Test] - public void EnumTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" EnumTest - //Assert.IsInstanceOf(typeof(EnumTest), instance); - } - - - /// - /// Test the property 'EnumString' - /// - [Test] - public void EnumStringTest() - { - // TODO unit test for the property 'EnumString' - } - /// - /// Test the property 'EnumStringRequired' - /// - [Test] - public void EnumStringRequiredTest() - { - // TODO unit test for the property 'EnumStringRequired' - } - /// - /// Test the property 'EnumInteger' - /// - [Test] - public void EnumIntegerTest() - { - // TODO unit test for the property 'EnumInteger' - } - /// - /// Test the property 'EnumNumber' - /// - [Test] - public void EnumNumberTest() - { - // TODO unit test for the property 'EnumNumber' - } - /// - /// Test the property 'OuterEnum' - /// - [Test] - public void OuterEnumTest() - { - // TODO unit test for the property 'OuterEnum' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs deleted file mode 100644 index 02ae51ce37e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing FileSchemaTestClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class FileSchemaTestClassTests - { - // TODO uncomment below to declare an instance variable for FileSchemaTestClass - //private FileSchemaTestClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of FileSchemaTestClass - //instance = new FileSchemaTestClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FileSchemaTestClass - /// - [Test] - public void FileSchemaTestClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" FileSchemaTestClass - //Assert.IsInstanceOf(typeof(FileSchemaTestClass), instance); - } - - - /// - /// Test the property 'File' - /// - [Test] - public void FileTest() - { - // TODO unit test for the property 'File' - } - /// - /// Test the property 'Files' - /// - [Test] - public void FilesTest() - { - // TODO unit test for the property 'Files' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs deleted file mode 100644 index b18213afe49..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FileTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing File - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class FileTests - { - // TODO uncomment below to declare an instance variable for File - //private File instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of File - //instance = new File(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of File - /// - [Test] - public void FileInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" File - //Assert.IsInstanceOf(typeof(File), instance); - } - - - /// - /// Test the property 'SourceURI' - /// - [Test] - public void SourceURITest() - { - // TODO unit test for the property 'SourceURI' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs deleted file mode 100644 index 70d142f0272..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FooGetDefaultResponseTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing FooGetDefaultResponse - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class FooGetDefaultResponseTests - { - // TODO uncomment below to declare an instance variable for FooGetDefaultResponse - //private FooGetDefaultResponse instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of FooGetDefaultResponse - //instance = new FooGetDefaultResponse(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FooGetDefaultResponse - /// - [Test] - public void FooGetDefaultResponseInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" FooGetDefaultResponse - //Assert.IsInstanceOf(typeof(FooGetDefaultResponse), instance); - } - - - /// - /// Test the property 'String' - /// - [Test] - public void StringTest() - { - // TODO unit test for the property 'String' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FooTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FooTests.cs deleted file mode 100644 index 2f1d212eac4..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FooTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Foo - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class FooTests - { - // TODO uncomment below to declare an instance variable for Foo - //private Foo instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Foo - //instance = new Foo(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Foo - /// - [Test] - public void FooInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Foo - //Assert.IsInstanceOf(typeof(Foo), instance); - } - - - /// - /// Test the property 'Bar' - /// - [Test] - public void BarTest() - { - // TODO unit test for the property 'Bar' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs deleted file mode 100644 index d5b7b0ba885..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing FormatTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class FormatTestTests - { - // TODO uncomment below to declare an instance variable for FormatTest - //private FormatTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of FormatTest - //instance = new FormatTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FormatTest - /// - [Test] - public void FormatTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" FormatTest - //Assert.IsInstanceOf(typeof(FormatTest), instance); - } - - - /// - /// Test the property 'Integer' - /// - [Test] - public void IntegerTest() - { - // TODO unit test for the property 'Integer' - } - /// - /// Test the property 'Int32' - /// - [Test] - public void Int32Test() - { - // TODO unit test for the property 'Int32' - } - /// - /// Test the property 'Int64' - /// - [Test] - public void Int64Test() - { - // TODO unit test for the property 'Int64' - } - /// - /// Test the property 'Number' - /// - [Test] - public void NumberTest() - { - // TODO unit test for the property 'Number' - } - /// - /// Test the property 'Float' - /// - [Test] - public void FloatTest() - { - // TODO unit test for the property 'Float' - } - /// - /// Test the property 'Double' - /// - [Test] - public void DoubleTest() - { - // TODO unit test for the property 'Double' - } - /// - /// Test the property 'String' - /// - [Test] - public void StringTest() - { - // TODO unit test for the property 'String' - } - /// - /// Test the property 'Byte' - /// - [Test] - public void ByteTest() - { - // TODO unit test for the property 'Byte' - } - /// - /// Test the property 'Binary' - /// - [Test] - public void BinaryTest() - { - // TODO unit test for the property 'Binary' - } - /// - /// Test the property 'Date' - /// - [Test] - public void DateTest() - { - // TODO unit test for the property 'Date' - } - /// - /// Test the property 'DateTime' - /// - [Test] - public void DateTimeTest() - { - // TODO unit test for the property 'DateTime' - } - /// - /// Test the property 'Uuid' - /// - [Test] - public void UuidTest() - { - // TODO unit test for the property 'Uuid' - } - /// - /// Test the property 'Password' - /// - [Test] - public void PasswordTest() - { - // TODO unit test for the property 'Password' - } - /// - /// Test the property 'BigDecimal' - /// - [Test] - public void BigDecimalTest() - { - // TODO unit test for the property 'BigDecimal' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs deleted file mode 100644 index 0c1ec60ef46..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing HasOnlyReadOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HasOnlyReadOnlyTests - { - // TODO uncomment below to declare an instance variable for HasOnlyReadOnly - //private HasOnlyReadOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of HasOnlyReadOnly - //instance = new HasOnlyReadOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of HasOnlyReadOnly - /// - [Test] - public void HasOnlyReadOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" HasOnlyReadOnly - //Assert.IsInstanceOf(typeof(HasOnlyReadOnly), instance); - } - - - /// - /// Test the property 'Bar' - /// - [Test] - public void BarTest() - { - // TODO unit test for the property 'Bar' - } - /// - /// Test the property 'Foo' - /// - [Test] - public void FooTest() - { - // TODO unit test for the property 'Foo' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs deleted file mode 100644 index 9c218fa0e68..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/HealthCheckResultTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing HealthCheckResult - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HealthCheckResultTests - { - // TODO uncomment below to declare an instance variable for HealthCheckResult - //private HealthCheckResult instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of HealthCheckResult - //instance = new HealthCheckResult(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of HealthCheckResult - /// - [Test] - public void HealthCheckResultInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" HealthCheckResult - //Assert.IsInstanceOf(typeof(HealthCheckResult), instance); - } - - - /// - /// Test the property 'NullableMessage' - /// - [Test] - public void NullableMessageTest() - { - // TODO unit test for the property 'NullableMessage' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObject1Tests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObject1Tests.cs deleted file mode 100644 index 8436abf782c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObject1Tests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing InlineObject1 - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class InlineObject1Tests - { - // TODO uncomment below to declare an instance variable for InlineObject1 - //private InlineObject1 instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of InlineObject1 - //instance = new InlineObject1(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of InlineObject1 - /// - [Test] - public void InlineObject1InstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" InlineObject1 - //Assert.IsInstanceOf(typeof(InlineObject1), instance); - } - - - /// - /// Test the property 'AdditionalMetadata' - /// - [Test] - public void AdditionalMetadataTest() - { - // TODO unit test for the property 'AdditionalMetadata' - } - /// - /// Test the property 'File' - /// - [Test] - public void FileTest() - { - // TODO unit test for the property 'File' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObject2Tests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObject2Tests.cs deleted file mode 100644 index 25b1e0b0bfd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObject2Tests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing InlineObject2 - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class InlineObject2Tests - { - // TODO uncomment below to declare an instance variable for InlineObject2 - //private InlineObject2 instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of InlineObject2 - //instance = new InlineObject2(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of InlineObject2 - /// - [Test] - public void InlineObject2InstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" InlineObject2 - //Assert.IsInstanceOf(typeof(InlineObject2), instance); - } - - - /// - /// Test the property 'EnumFormStringArray' - /// - [Test] - public void EnumFormStringArrayTest() - { - // TODO unit test for the property 'EnumFormStringArray' - } - /// - /// Test the property 'EnumFormString' - /// - [Test] - public void EnumFormStringTest() - { - // TODO unit test for the property 'EnumFormString' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObject3Tests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObject3Tests.cs deleted file mode 100644 index fd0a81b112a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObject3Tests.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing InlineObject3 - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class InlineObject3Tests - { - // TODO uncomment below to declare an instance variable for InlineObject3 - //private InlineObject3 instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of InlineObject3 - //instance = new InlineObject3(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of InlineObject3 - /// - [Test] - public void InlineObject3InstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" InlineObject3 - //Assert.IsInstanceOf(typeof(InlineObject3), instance); - } - - - /// - /// Test the property 'Integer' - /// - [Test] - public void IntegerTest() - { - // TODO unit test for the property 'Integer' - } - /// - /// Test the property 'Int32' - /// - [Test] - public void Int32Test() - { - // TODO unit test for the property 'Int32' - } - /// - /// Test the property 'Int64' - /// - [Test] - public void Int64Test() - { - // TODO unit test for the property 'Int64' - } - /// - /// Test the property 'Number' - /// - [Test] - public void NumberTest() - { - // TODO unit test for the property 'Number' - } - /// - /// Test the property 'Float' - /// - [Test] - public void FloatTest() - { - // TODO unit test for the property 'Float' - } - /// - /// Test the property 'Double' - /// - [Test] - public void DoubleTest() - { - // TODO unit test for the property 'Double' - } - /// - /// Test the property 'String' - /// - [Test] - public void StringTest() - { - // TODO unit test for the property 'String' - } - /// - /// Test the property 'PatternWithoutDelimiter' - /// - [Test] - public void PatternWithoutDelimiterTest() - { - // TODO unit test for the property 'PatternWithoutDelimiter' - } - /// - /// Test the property 'Byte' - /// - [Test] - public void ByteTest() - { - // TODO unit test for the property 'Byte' - } - /// - /// Test the property 'Binary' - /// - [Test] - public void BinaryTest() - { - // TODO unit test for the property 'Binary' - } - /// - /// Test the property 'Date' - /// - [Test] - public void DateTest() - { - // TODO unit test for the property 'Date' - } - /// - /// Test the property 'DateTime' - /// - [Test] - public void DateTimeTest() - { - // TODO unit test for the property 'DateTime' - } - /// - /// Test the property 'Password' - /// - [Test] - public void PasswordTest() - { - // TODO unit test for the property 'Password' - } - /// - /// Test the property 'Callback' - /// - [Test] - public void CallbackTest() - { - // TODO unit test for the property 'Callback' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObject4Tests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObject4Tests.cs deleted file mode 100644 index 73a639ee48c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObject4Tests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing InlineObject4 - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class InlineObject4Tests - { - // TODO uncomment below to declare an instance variable for InlineObject4 - //private InlineObject4 instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of InlineObject4 - //instance = new InlineObject4(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of InlineObject4 - /// - [Test] - public void InlineObject4InstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" InlineObject4 - //Assert.IsInstanceOf(typeof(InlineObject4), instance); - } - - - /// - /// Test the property 'Param' - /// - [Test] - public void ParamTest() - { - // TODO unit test for the property 'Param' - } - /// - /// Test the property 'Param2' - /// - [Test] - public void Param2Test() - { - // TODO unit test for the property 'Param2' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObject5Tests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObject5Tests.cs deleted file mode 100644 index 9a0a8801894..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObject5Tests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing InlineObject5 - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class InlineObject5Tests - { - // TODO uncomment below to declare an instance variable for InlineObject5 - //private InlineObject5 instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of InlineObject5 - //instance = new InlineObject5(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of InlineObject5 - /// - [Test] - public void InlineObject5InstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" InlineObject5 - //Assert.IsInstanceOf(typeof(InlineObject5), instance); - } - - - /// - /// Test the property 'AdditionalMetadata' - /// - [Test] - public void AdditionalMetadataTest() - { - // TODO unit test for the property 'AdditionalMetadata' - } - /// - /// Test the property 'RequiredFile' - /// - [Test] - public void RequiredFileTest() - { - // TODO unit test for the property 'RequiredFile' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObjectTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObjectTests.cs deleted file mode 100644 index 9ee36d32d8b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineObjectTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing InlineObject - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class InlineObjectTests - { - // TODO uncomment below to declare an instance variable for InlineObject - //private InlineObject instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of InlineObject - //instance = new InlineObject(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of InlineObject - /// - [Test] - public void InlineObjectInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" InlineObject - //Assert.IsInstanceOf(typeof(InlineObject), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'Status' - /// - [Test] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineResponseDefaultTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineResponseDefaultTests.cs deleted file mode 100644 index 531a80a06ba..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/InlineResponseDefaultTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing InlineResponseDefault - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class InlineResponseDefaultTests - { - // TODO uncomment below to declare an instance variable for InlineResponseDefault - //private InlineResponseDefault instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of InlineResponseDefault - //instance = new InlineResponseDefault(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of InlineResponseDefault - /// - [Test] - public void InlineResponseDefaultInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" InlineResponseDefault - //Assert.IsInstanceOf(typeof(InlineResponseDefault), instance); - } - - - /// - /// Test the property 'String' - /// - [Test] - public void StringTest() - { - // TODO unit test for the property 'String' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ListTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ListTests.cs deleted file mode 100644 index 57f55da25ed..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ListTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing List - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ListTests - { - // TODO uncomment below to declare an instance variable for List - //private List instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of List - //instance = new List(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of List - /// - [Test] - public void ListInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" List - //Assert.IsInstanceOf(typeof(List), instance); - } - - - /// - /// Test the property '_123List' - /// - [Test] - public void _123ListTest() - { - // TODO unit test for the property '_123List' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MapTestTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MapTestTests.cs deleted file mode 100644 index 53220cdd78a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MapTestTests.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing MapTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MapTestTests - { - // TODO uncomment below to declare an instance variable for MapTest - //private MapTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of MapTest - //instance = new MapTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of MapTest - /// - [Test] - public void MapTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" MapTest - //Assert.IsInstanceOf(typeof(MapTest), instance); - } - - - /// - /// Test the property 'MapMapOfString' - /// - [Test] - public void MapMapOfStringTest() - { - // TODO unit test for the property 'MapMapOfString' - } - /// - /// Test the property 'MapOfEnumString' - /// - [Test] - public void MapOfEnumStringTest() - { - // TODO unit test for the property 'MapOfEnumString' - } - /// - /// Test the property 'DirectMap' - /// - [Test] - public void DirectMapTest() - { - // TODO unit test for the property 'DirectMap' - } - /// - /// Test the property 'IndirectMap' - /// - [Test] - public void IndirectMapTest() - { - // TODO unit test for the property 'IndirectMap' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs deleted file mode 100644 index 792db793c52..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing MixedPropertiesAndAdditionalPropertiesClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixedPropertiesAndAdditionalPropertiesClassTests - { - // TODO uncomment below to declare an instance variable for MixedPropertiesAndAdditionalPropertiesClass - //private MixedPropertiesAndAdditionalPropertiesClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of MixedPropertiesAndAdditionalPropertiesClass - //instance = new MixedPropertiesAndAdditionalPropertiesClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of MixedPropertiesAndAdditionalPropertiesClass - /// - [Test] - public void MixedPropertiesAndAdditionalPropertiesClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" MixedPropertiesAndAdditionalPropertiesClass - //Assert.IsInstanceOf(typeof(MixedPropertiesAndAdditionalPropertiesClass), instance); - } - - - /// - /// Test the property 'Uuid' - /// - [Test] - public void UuidTest() - { - // TODO unit test for the property 'Uuid' - } - /// - /// Test the property 'DateTime' - /// - [Test] - public void DateTimeTest() - { - // TODO unit test for the property 'DateTime' - } - /// - /// Test the property 'Map' - /// - [Test] - public void MapTest() - { - // TODO unit test for the property 'Map' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs deleted file mode 100644 index 68ed58223de..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Model200Response - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class Model200ResponseTests - { - // TODO uncomment below to declare an instance variable for Model200Response - //private Model200Response instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Model200Response - //instance = new Model200Response(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Model200Response - /// - [Test] - public void Model200ResponseInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Model200Response - //Assert.IsInstanceOf(typeof(Model200Response), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'Class' - /// - [Test] - public void ClassTest() - { - // TODO unit test for the property 'Class' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs deleted file mode 100644 index 0313c8fd1a6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ModelClient - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ModelClientTests - { - // TODO uncomment below to declare an instance variable for ModelClient - //private ModelClient instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ModelClient - //instance = new ModelClient(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ModelClient - /// - [Test] - public void ModelClientInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ModelClient - //Assert.IsInstanceOf(typeof(ModelClient), instance); - } - - - /// - /// Test the property '__Client' - /// - [Test] - public void __ClientTest() - { - // TODO unit test for the property '__Client' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NameTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NameTests.cs deleted file mode 100644 index eb5fb91b0f5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NameTests.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Name - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class NameTests - { - // TODO uncomment below to declare an instance variable for Name - //private Name instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Name - //instance = new Name(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Name - /// - [Test] - public void NameInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Name - //Assert.IsInstanceOf(typeof(Name), instance); - } - - - /// - /// Test the property '_Name' - /// - [Test] - public void _NameTest() - { - // TODO unit test for the property '_Name' - } - /// - /// Test the property 'SnakeCase' - /// - [Test] - public void SnakeCaseTest() - { - // TODO unit test for the property 'SnakeCase' - } - /// - /// Test the property 'Property' - /// - [Test] - public void PropertyTest() - { - // TODO unit test for the property 'Property' - } - /// - /// Test the property '_123Number' - /// - [Test] - public void _123NumberTest() - { - // TODO unit test for the property '_123Number' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs deleted file mode 100644 index fbe4051304d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NullableClassTests.cs +++ /dev/null @@ -1,167 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing NullableClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class NullableClassTests - { - // TODO uncomment below to declare an instance variable for NullableClass - //private NullableClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of NullableClass - //instance = new NullableClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of NullableClass - /// - [Test] - public void NullableClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" NullableClass - //Assert.IsInstanceOf(typeof(NullableClass), instance); - } - - - /// - /// Test the property 'IntegerProp' - /// - [Test] - public void IntegerPropTest() - { - // TODO unit test for the property 'IntegerProp' - } - /// - /// Test the property 'NumberProp' - /// - [Test] - public void NumberPropTest() - { - // TODO unit test for the property 'NumberProp' - } - /// - /// Test the property 'BooleanProp' - /// - [Test] - public void BooleanPropTest() - { - // TODO unit test for the property 'BooleanProp' - } - /// - /// Test the property 'StringProp' - /// - [Test] - public void StringPropTest() - { - // TODO unit test for the property 'StringProp' - } - /// - /// Test the property 'DateProp' - /// - [Test] - public void DatePropTest() - { - // TODO unit test for the property 'DateProp' - } - /// - /// Test the property 'DatetimeProp' - /// - [Test] - public void DatetimePropTest() - { - // TODO unit test for the property 'DatetimeProp' - } - /// - /// Test the property 'ArrayNullableProp' - /// - [Test] - public void ArrayNullablePropTest() - { - // TODO unit test for the property 'ArrayNullableProp' - } - /// - /// Test the property 'ArrayAndItemsNullableProp' - /// - [Test] - public void ArrayAndItemsNullablePropTest() - { - // TODO unit test for the property 'ArrayAndItemsNullableProp' - } - /// - /// Test the property 'ArrayItemsNullable' - /// - [Test] - public void ArrayItemsNullableTest() - { - // TODO unit test for the property 'ArrayItemsNullable' - } - /// - /// Test the property 'ObjectNullableProp' - /// - [Test] - public void ObjectNullablePropTest() - { - // TODO unit test for the property 'ObjectNullableProp' - } - /// - /// Test the property 'ObjectAndItemsNullableProp' - /// - [Test] - public void ObjectAndItemsNullablePropTest() - { - // TODO unit test for the property 'ObjectAndItemsNullableProp' - } - /// - /// Test the property 'ObjectItemsNullable' - /// - [Test] - public void ObjectItemsNullableTest() - { - // TODO unit test for the property 'ObjectItemsNullable' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs deleted file mode 100644 index 5f90f85f79c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing NumberOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class NumberOnlyTests - { - // TODO uncomment below to declare an instance variable for NumberOnly - //private NumberOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of NumberOnly - //instance = new NumberOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of NumberOnly - /// - [Test] - public void NumberOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" NumberOnly - //Assert.IsInstanceOf(typeof(NumberOnly), instance); - } - - - /// - /// Test the property 'JustNumber' - /// - [Test] - public void JustNumberTest() - { - // TODO unit test for the property 'JustNumber' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ObjectWithDeprecatedFieldsTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ObjectWithDeprecatedFieldsTests.cs deleted file mode 100644 index 56212a13756..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ObjectWithDeprecatedFieldsTests.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ObjectWithDeprecatedFields - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ObjectWithDeprecatedFieldsTests - { - // TODO uncomment below to declare an instance variable for ObjectWithDeprecatedFields - //private ObjectWithDeprecatedFields instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ObjectWithDeprecatedFields - //instance = new ObjectWithDeprecatedFields(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ObjectWithDeprecatedFields - /// - [Test] - public void ObjectWithDeprecatedFieldsInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ObjectWithDeprecatedFields - //Assert.IsInstanceOf(typeof(ObjectWithDeprecatedFields), instance); - } - - - /// - /// Test the property 'Uuid' - /// - [Test] - public void UuidTest() - { - // TODO unit test for the property 'Uuid' - } - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'DeprecatedRef' - /// - [Test] - public void DeprecatedRefTest() - { - // TODO unit test for the property 'DeprecatedRef' - } - /// - /// Test the property 'Bars' - /// - [Test] - public void BarsTest() - { - // TODO unit test for the property 'Bars' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OrderTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OrderTests.cs deleted file mode 100644 index 7d155bb54cd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OrderTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Order - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OrderTests - { - // TODO uncomment below to declare an instance variable for Order - //private Order instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Order - //instance = new Order(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Order - /// - [Test] - public void OrderInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Order - //Assert.IsInstanceOf(typeof(Order), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'PetId' - /// - [Test] - public void PetIdTest() - { - // TODO unit test for the property 'PetId' - } - /// - /// Test the property 'Quantity' - /// - [Test] - public void QuantityTest() - { - // TODO unit test for the property 'Quantity' - } - /// - /// Test the property 'ShipDate' - /// - [Test] - public void ShipDateTest() - { - // TODO unit test for the property 'ShipDate' - } - /// - /// Test the property 'Status' - /// - [Test] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } - /// - /// Test the property 'Complete' - /// - [Test] - public void CompleteTest() - { - // TODO unit test for the property 'Complete' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs deleted file mode 100644 index 6dd51d6f49e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing OuterComposite - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OuterCompositeTests - { - // TODO uncomment below to declare an instance variable for OuterComposite - //private OuterComposite instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of OuterComposite - //instance = new OuterComposite(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of OuterComposite - /// - [Test] - public void OuterCompositeInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" OuterComposite - //Assert.IsInstanceOf(typeof(OuterComposite), instance); - } - - - /// - /// Test the property 'MyNumber' - /// - [Test] - public void MyNumberTest() - { - // TODO unit test for the property 'MyNumber' - } - /// - /// Test the property 'MyString' - /// - [Test] - public void MyStringTest() - { - // TODO unit test for the property 'MyString' - } - /// - /// Test the property 'MyBoolean' - /// - [Test] - public void MyBooleanTest() - { - // TODO unit test for the property 'MyBoolean' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs deleted file mode 100644 index 009e8e35e8d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumDefaultValueTests.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing OuterEnumDefaultValue - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OuterEnumDefaultValueTests - { - // TODO uncomment below to declare an instance variable for OuterEnumDefaultValue - //private OuterEnumDefaultValue instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of OuterEnumDefaultValue - //instance = new OuterEnumDefaultValue(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of OuterEnumDefaultValue - /// - [Test] - public void OuterEnumDefaultValueInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" OuterEnumDefaultValue - //Assert.IsInstanceOf(typeof(OuterEnumDefaultValue), instance); - } - - - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs deleted file mode 100644 index 18bbab9bd1e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerDefaultValueTests.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing OuterEnumIntegerDefaultValue - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OuterEnumIntegerDefaultValueTests - { - // TODO uncomment below to declare an instance variable for OuterEnumIntegerDefaultValue - //private OuterEnumIntegerDefaultValue instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of OuterEnumIntegerDefaultValue - //instance = new OuterEnumIntegerDefaultValue(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of OuterEnumIntegerDefaultValue - /// - [Test] - public void OuterEnumIntegerDefaultValueInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" OuterEnumIntegerDefaultValue - //Assert.IsInstanceOf(typeof(OuterEnumIntegerDefaultValue), instance); - } - - - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs deleted file mode 100644 index 061e2fc80e7..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumIntegerTests.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing OuterEnumInteger - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OuterEnumIntegerTests - { - // TODO uncomment below to declare an instance variable for OuterEnumInteger - //private OuterEnumInteger instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of OuterEnumInteger - //instance = new OuterEnumInteger(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of OuterEnumInteger - /// - [Test] - public void OuterEnumIntegerInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" OuterEnumInteger - //Assert.IsInstanceOf(typeof(OuterEnumInteger), instance); - } - - - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs deleted file mode 100644 index eb7688835a0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing OuterEnum - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OuterEnumTests - { - // TODO uncomment below to declare an instance variable for OuterEnum - //private OuterEnum instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of OuterEnum - //instance = new OuterEnum(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of OuterEnum - /// - [Test] - public void OuterEnumInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" OuterEnum - //Assert.IsInstanceOf(typeof(OuterEnum), instance); - } - - - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterObjectWithEnumPropertyTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterObjectWithEnumPropertyTests.cs deleted file mode 100644 index 1c683cd900b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/OuterObjectWithEnumPropertyTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing OuterObjectWithEnumProperty - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OuterObjectWithEnumPropertyTests - { - // TODO uncomment below to declare an instance variable for OuterObjectWithEnumProperty - //private OuterObjectWithEnumProperty instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of OuterObjectWithEnumProperty - //instance = new OuterObjectWithEnumProperty(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of OuterObjectWithEnumProperty - /// - [Test] - public void OuterObjectWithEnumPropertyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" OuterObjectWithEnumProperty - //Assert.IsInstanceOf(typeof(OuterObjectWithEnumProperty), instance); - } - - - /// - /// Test the property 'Value' - /// - [Test] - public void ValueTest() - { - // TODO unit test for the property 'Value' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs deleted file mode 100644 index 37f2c09d2d3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/PetTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Pet - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class PetTests - { - // TODO uncomment below to declare an instance variable for Pet - //private Pet instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Pet - //instance = new Pet(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Pet - /// - [Test] - public void PetInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Pet - //Assert.IsInstanceOf(typeof(Pet), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Category' - /// - [Test] - public void CategoryTest() - { - // TODO unit test for the property 'Category' - } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'PhotoUrls' - /// - [Test] - public void PhotoUrlsTest() - { - // TODO unit test for the property 'PhotoUrls' - } - /// - /// Test the property 'Tags' - /// - [Test] - public void TagsTest() - { - // TODO unit test for the property 'Tags' - } - /// - /// Test the property 'Status' - /// - [Test] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs deleted file mode 100644 index c870caf786c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ReadOnlyFirst - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ReadOnlyFirstTests - { - // TODO uncomment below to declare an instance variable for ReadOnlyFirst - //private ReadOnlyFirst instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ReadOnlyFirst - //instance = new ReadOnlyFirst(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ReadOnlyFirst - /// - [Test] - public void ReadOnlyFirstInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ReadOnlyFirst - //Assert.IsInstanceOf(typeof(ReadOnlyFirst), instance); - } - - - /// - /// Test the property 'Bar' - /// - [Test] - public void BarTest() - { - // TODO unit test for the property 'Bar' - } - /// - /// Test the property 'Baz' - /// - [Test] - public void BazTest() - { - // TODO unit test for the property 'Baz' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReturnTests.cs deleted file mode 100644 index e744ff4f711..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/ReturnTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Return - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ReturnTests - { - // TODO uncomment below to declare an instance variable for Return - //private Return instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Return - //instance = new Return(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Return - /// - [Test] - public void ReturnInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Return - //Assert.IsInstanceOf(typeof(Return), instance); - } - - - /// - /// Test the property '_Return' - /// - [Test] - public void _ReturnTest() - { - // TODO unit test for the property '_Return' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SingleRefTypeTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SingleRefTypeTests.cs deleted file mode 100644 index ed509fa075f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SingleRefTypeTests.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing SingleRefType - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SingleRefTypeTests - { - // TODO uncomment below to declare an instance variable for SingleRefType - //private SingleRefType instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of SingleRefType - //instance = new SingleRefType(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of SingleRefType - /// - [Test] - public void SingleRefTypeInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" SingleRefType - //Assert.IsInstanceOf(typeof(SingleRefType), instance); - } - - - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs deleted file mode 100644 index 274d9db265d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing SpecialModelName - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SpecialModelNameTests - { - // TODO uncomment below to declare an instance variable for SpecialModelName - //private SpecialModelName instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of SpecialModelName - //instance = new SpecialModelName(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of SpecialModelName - /// - [Test] - public void SpecialModelNameInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" SpecialModelName - //Assert.IsInstanceOf(typeof(SpecialModelName), instance); - } - - - /// - /// Test the property 'SpecialPropertyName' - /// - [Test] - public void SpecialPropertyNameTest() - { - // TODO unit test for the property 'SpecialPropertyName' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TagTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TagTests.cs deleted file mode 100644 index 22c9058e65d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TagTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Tag - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TagTests - { - // TODO uncomment below to declare an instance variable for Tag - //private Tag instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Tag - //instance = new Tag(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Tag - /// - [Test] - public void TagInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Tag - //Assert.IsInstanceOf(typeof(Tag), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs deleted file mode 100644 index 18c3dc5d60e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs +++ /dev/null @@ -1,111 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing TypeHolderDefault - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TypeHolderDefaultTests - { - // TODO uncomment below to declare an instance variable for TypeHolderDefault - //private TypeHolderDefault instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of TypeHolderDefault - //instance = new TypeHolderDefault(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of TypeHolderDefault - /// - [Test] - public void TypeHolderDefaultInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" TypeHolderDefault - //Assert.IsInstanceOf(typeof(TypeHolderDefault), instance); - } - - - /// - /// Test the property 'StringItem' - /// - [Test] - public void StringItemTest() - { - // TODO unit test for the property 'StringItem' - } - /// - /// Test the property 'NumberItem' - /// - [Test] - public void NumberItemTest() - { - // TODO unit test for the property 'NumberItem' - } - /// - /// Test the property 'IntegerItem' - /// - [Test] - public void IntegerItemTest() - { - // TODO unit test for the property 'IntegerItem' - } - /// - /// Test the property 'BoolItem' - /// - [Test] - public void BoolItemTest() - { - // TODO unit test for the property 'BoolItem' - } - /// - /// Test the property 'ArrayItem' - /// - [Test] - public void ArrayItemTest() - { - // TODO unit test for the property 'ArrayItem' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs deleted file mode 100644 index b1e63784346..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing TypeHolderExample - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TypeHolderExampleTests - { - // TODO uncomment below to declare an instance variable for TypeHolderExample - //private TypeHolderExample instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of TypeHolderExample - //instance = new TypeHolderExample(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of TypeHolderExample - /// - [Test] - public void TypeHolderExampleInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" TypeHolderExample - //Assert.IsInstanceOf(typeof(TypeHolderExample), instance); - } - - - /// - /// Test the property 'StringItem' - /// - [Test] - public void StringItemTest() - { - // TODO unit test for the property 'StringItem' - } - /// - /// Test the property 'NumberItem' - /// - [Test] - public void NumberItemTest() - { - // TODO unit test for the property 'NumberItem' - } - /// - /// Test the property 'FloatItem' - /// - [Test] - public void FloatItemTest() - { - // TODO unit test for the property 'FloatItem' - } - /// - /// Test the property 'IntegerItem' - /// - [Test] - public void IntegerItemTest() - { - // TODO unit test for the property 'IntegerItem' - } - /// - /// Test the property 'BoolItem' - /// - [Test] - public void BoolItemTest() - { - // TODO unit test for the property 'BoolItem' - } - /// - /// Test the property 'ArrayItem' - /// - [Test] - public void ArrayItemTest() - { - // TODO unit test for the property 'ArrayItem' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/UserTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/UserTests.cs deleted file mode 100644 index 0f37935e9a2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/UserTests.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing User - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class UserTests - { - // TODO uncomment below to declare an instance variable for User - //private User instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of User - //instance = new User(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of User - /// - [Test] - public void UserInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" User - //Assert.IsInstanceOf(typeof(User), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Username' - /// - [Test] - public void UsernameTest() - { - // TODO unit test for the property 'Username' - } - /// - /// Test the property 'FirstName' - /// - [Test] - public void FirstNameTest() - { - // TODO unit test for the property 'FirstName' - } - /// - /// Test the property 'LastName' - /// - [Test] - public void LastNameTest() - { - // TODO unit test for the property 'LastName' - } - /// - /// Test the property 'Email' - /// - [Test] - public void EmailTest() - { - // TODO unit test for the property 'Email' - } - /// - /// Test the property 'Password' - /// - [Test] - public void PasswordTest() - { - // TODO unit test for the property 'Password' - } - /// - /// Test the property 'Phone' - /// - [Test] - public void PhoneTest() - { - // TODO unit test for the property 'Phone' - } - /// - /// Test the property 'UserStatus' - /// - [Test] - public void UserStatusTest() - { - // TODO unit test for the property 'UserStatus' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs deleted file mode 100644 index 5ab42bab1c6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs +++ /dev/null @@ -1,303 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing XmlItem - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class XmlItemTests - { - // TODO uncomment below to declare an instance variable for XmlItem - //private XmlItem instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of XmlItem - //instance = new XmlItem(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of XmlItem - /// - [Test] - public void XmlItemInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" XmlItem - //Assert.IsInstanceOf(typeof(XmlItem), instance); - } - - - /// - /// Test the property 'AttributeString' - /// - [Test] - public void AttributeStringTest() - { - // TODO unit test for the property 'AttributeString' - } - /// - /// Test the property 'AttributeNumber' - /// - [Test] - public void AttributeNumberTest() - { - // TODO unit test for the property 'AttributeNumber' - } - /// - /// Test the property 'AttributeInteger' - /// - [Test] - public void AttributeIntegerTest() - { - // TODO unit test for the property 'AttributeInteger' - } - /// - /// Test the property 'AttributeBoolean' - /// - [Test] - public void AttributeBooleanTest() - { - // TODO unit test for the property 'AttributeBoolean' - } - /// - /// Test the property 'WrappedArray' - /// - [Test] - public void WrappedArrayTest() - { - // TODO unit test for the property 'WrappedArray' - } - /// - /// Test the property 'NameString' - /// - [Test] - public void NameStringTest() - { - // TODO unit test for the property 'NameString' - } - /// - /// Test the property 'NameNumber' - /// - [Test] - public void NameNumberTest() - { - // TODO unit test for the property 'NameNumber' - } - /// - /// Test the property 'NameInteger' - /// - [Test] - public void NameIntegerTest() - { - // TODO unit test for the property 'NameInteger' - } - /// - /// Test the property 'NameBoolean' - /// - [Test] - public void NameBooleanTest() - { - // TODO unit test for the property 'NameBoolean' - } - /// - /// Test the property 'NameArray' - /// - [Test] - public void NameArrayTest() - { - // TODO unit test for the property 'NameArray' - } - /// - /// Test the property 'NameWrappedArray' - /// - [Test] - public void NameWrappedArrayTest() - { - // TODO unit test for the property 'NameWrappedArray' - } - /// - /// Test the property 'PrefixString' - /// - [Test] - public void PrefixStringTest() - { - // TODO unit test for the property 'PrefixString' - } - /// - /// Test the property 'PrefixNumber' - /// - [Test] - public void PrefixNumberTest() - { - // TODO unit test for the property 'PrefixNumber' - } - /// - /// Test the property 'PrefixInteger' - /// - [Test] - public void PrefixIntegerTest() - { - // TODO unit test for the property 'PrefixInteger' - } - /// - /// Test the property 'PrefixBoolean' - /// - [Test] - public void PrefixBooleanTest() - { - // TODO unit test for the property 'PrefixBoolean' - } - /// - /// Test the property 'PrefixArray' - /// - [Test] - public void PrefixArrayTest() - { - // TODO unit test for the property 'PrefixArray' - } - /// - /// Test the property 'PrefixWrappedArray' - /// - [Test] - public void PrefixWrappedArrayTest() - { - // TODO unit test for the property 'PrefixWrappedArray' - } - /// - /// Test the property 'NamespaceString' - /// - [Test] - public void NamespaceStringTest() - { - // TODO unit test for the property 'NamespaceString' - } - /// - /// Test the property 'NamespaceNumber' - /// - [Test] - public void NamespaceNumberTest() - { - // TODO unit test for the property 'NamespaceNumber' - } - /// - /// Test the property 'NamespaceInteger' - /// - [Test] - public void NamespaceIntegerTest() - { - // TODO unit test for the property 'NamespaceInteger' - } - /// - /// Test the property 'NamespaceBoolean' - /// - [Test] - public void NamespaceBooleanTest() - { - // TODO unit test for the property 'NamespaceBoolean' - } - /// - /// Test the property 'NamespaceArray' - /// - [Test] - public void NamespaceArrayTest() - { - // TODO unit test for the property 'NamespaceArray' - } - /// - /// Test the property 'NamespaceWrappedArray' - /// - [Test] - public void NamespaceWrappedArrayTest() - { - // TODO unit test for the property 'NamespaceWrappedArray' - } - /// - /// Test the property 'PrefixNsString' - /// - [Test] - public void PrefixNsStringTest() - { - // TODO unit test for the property 'PrefixNsString' - } - /// - /// Test the property 'PrefixNsNumber' - /// - [Test] - public void PrefixNsNumberTest() - { - // TODO unit test for the property 'PrefixNsNumber' - } - /// - /// Test the property 'PrefixNsInteger' - /// - [Test] - public void PrefixNsIntegerTest() - { - // TODO unit test for the property 'PrefixNsInteger' - } - /// - /// Test the property 'PrefixNsBoolean' - /// - [Test] - public void PrefixNsBooleanTest() - { - // TODO unit test for the property 'PrefixNsBoolean' - } - /// - /// Test the property 'PrefixNsArray' - /// - [Test] - public void PrefixNsArrayTest() - { - // TODO unit test for the property 'PrefixNsArray' - } - /// - /// Test the property 'PrefixNsWrappedArray' - /// - [Test] - public void PrefixNsWrappedArrayTest() - { - // TODO unit test for the property 'PrefixNsWrappedArray' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj deleted file mode 100644 index 9b5a34202cb..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ /dev/null @@ -1,92 +0,0 @@ - - - - - Debug - AnyCPU - {19F1DEBC-DE5E-4517-8062-F000CD499087} - Library - Properties - Org.OpenAPITools.Test - Org.OpenAPITools.Test - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - - - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll - - - $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll - - - - - - - - - - - - {321C8C3F-0156-40C1-AE42-D59761FB9B6C} - Org.OpenAPITools - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/linux-logo.png b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/linux-logo.png deleted file mode 100644 index 8269538b1ac..00000000000 Binary files a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/linux-logo.png and /dev/null differ diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/packages.config deleted file mode 100644 index a3a1bab3510..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools.Test/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs deleted file mode 100644 index 339653354c8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ /dev/null @@ -1,337 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IAnotherFakeApi : IApiAccessor - { - #region Synchronous Operations - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient Call123TestSpecialTags (ModelClient modelClient); - - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse Call123TestSpecialTagsWithHttpInfo (ModelClient modelClient); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - System.Threading.Tasks.Task Call123TestSpecialTagsAsync (ModelClient modelClient, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync (ModelClient modelClient, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class AnotherFakeApi : IAnotherFakeApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public AnotherFakeApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public AnotherFakeApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public AnotherFakeApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient Call123TestSpecialTags (ModelClient modelClient) - { - ApiResponse localVarResponse = Call123TestSpecialTagsWithHttpInfo(modelClient); - return localVarResponse.Data; - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse Call123TestSpecialTagsWithHttpInfo (ModelClient modelClient) - { - // verify the required parameter 'modelClient' is set - if (modelClient == null) - throw new ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); - - var localVarPath = "/another-fake/dummy"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (modelClient != null && modelClient.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(modelClient); // http body (model) parameter - } - else - { - localVarPostBody = modelClient; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Call123TestSpecialTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync (ModelClient modelClient, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(modelClient, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync (ModelClient modelClient, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'modelClient' is set - if (modelClient == null) - throw new ApiException(400, "Missing required parameter 'modelClient' when calling AnotherFakeApi->Call123TestSpecialTags"); - - var localVarPath = "/another-fake/dummy"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (modelClient != null && modelClient.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(modelClient); // http body (model) parameter - } - else - { - localVarPostBody = modelClient; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Call123TestSpecialTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/DefaultApi.cs deleted file mode 100644 index 2d581727e8d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/DefaultApi.cs +++ /dev/null @@ -1,305 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IDefaultApi : IApiAccessor - { - #region Synchronous Operations - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// FooGetDefaultResponse - FooGetDefaultResponse FooGet (); - - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of FooGetDefaultResponse - ApiResponse FooGetWithHttpInfo (); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of FooGetDefaultResponse - System.Threading.Tasks.Task FooGetAsync (CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (FooGetDefaultResponse) - System.Threading.Tasks.Task> FooGetWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class DefaultApi : IDefaultApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public DefaultApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public DefaultApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - 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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// FooGetDefaultResponse - public FooGetDefaultResponse FooGet () - { - ApiResponse localVarResponse = FooGetWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of FooGetDefaultResponse - public ApiResponse FooGetWithHttpInfo () - { - - var localVarPath = "/foo"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (FooGetDefaultResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(FooGetDefaultResponse))); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of FooGetDefaultResponse - public async System.Threading.Tasks.Task FooGetAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FooGetWithHttpInfoAsync(cancellationToken); - return localVarResponse.Data; - - } - - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (FooGetDefaultResponse) - public async System.Threading.Tasks.Task> FooGetWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/foo"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FooGet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (FooGetDefaultResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(FooGetDefaultResponse))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs deleted file mode 100644 index dc7ffcc69cc..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeApi.cs +++ /dev/null @@ -1,3741 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IFakeApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Health check endpoint - /// - /// - /// - /// - /// Thrown when fails to make API call - /// HealthCheckResult - HealthCheckResult FakeHealthGet (); - - /// - /// Health check endpoint - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of HealthCheckResult - ApiResponse FakeHealthGetWithHttpInfo (); - /// - /// test http signature authentication - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// query parameter (optional) - /// header parameter (optional) - /// - void FakeHttpSignatureTest (Pet pet, string query1 = default(string), string header1 = default(string)); - - /// - /// test http signature authentication - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// query parameter (optional) - /// header parameter (optional) - /// ApiResponse of Object(void) - ApiResponse FakeHttpSignatureTestWithHttpInfo (Pet pet, string query1 = default(string), string header1 = default(string)); - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// bool - bool FakeOuterBooleanSerialize (bool? body = default(bool?)); - - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)); - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// OuterComposite - OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = default(OuterComposite)); - - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite outerComposite = default(OuterComposite)); - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// decimal - decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)); - - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)); - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// string - string FakeOuterStringSerialize (string body = default(string)); - - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)); - /// - /// - /// - /// - /// Test serialization of enum (int) properties with examples - /// - /// Thrown when fails to make API call - /// Input enum (int) as post body - /// OuterObjectWithEnumProperty - OuterObjectWithEnumProperty FakePropertyEnumIntegerSerialize (OuterObjectWithEnumProperty outerObjectWithEnumProperty); - - /// - /// - /// - /// - /// Test serialization of enum (int) properties with examples - /// - /// Thrown when fails to make API call - /// Input enum (int) as post body - /// ApiResponse of OuterObjectWithEnumProperty - ApiResponse FakePropertyEnumIntegerSerializeWithHttpInfo (OuterObjectWithEnumProperty outerObjectWithEnumProperty); - /// - /// - /// - /// - /// For this test, the body has to be a binary file. - /// - /// Thrown when fails to make API call - /// image to upload - /// - void TestBodyWithBinary (System.IO.Stream body); - - /// - /// - /// - /// - /// For this test, the body has to be a binary file. - /// - /// Thrown when fails to make API call - /// image to upload - /// ApiResponse of Object(void) - ApiResponse TestBodyWithBinaryWithHttpInfo (System.IO.Stream body); - /// - /// - /// - /// - /// For this test, the body for this request must reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// - void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass); - - /// - /// - /// - /// - /// For this test, the body for this request must reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass fileSchemaTestClass); - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void TestBodyWithQueryParams (string query, User user); - - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, User user); - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient TestClientModel (ModelClient modelClient); - - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse TestClientModelWithHttpInfo (ModelClient modelClient); - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// - void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), 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 test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// - void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string)); - - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string)); - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// - void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); - - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// - void TestInlineAdditionalProperties (Dictionary requestBody); - - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// ApiResponse of Object(void) - ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Dictionary requestBody); - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// - void TestJsonFormData (string param, string param2); - - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// ApiResponse of Object(void) - ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2); - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - /// (optional) - /// - void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string allowEmpty, Dictionary language = default(Dictionary)); - - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - /// (optional) - /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context, string allowEmpty, Dictionary language = default(Dictionary)); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Health check endpoint - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of HealthCheckResult - System.Threading.Tasks.Task FakeHealthGetAsync (CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Health check endpoint - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (HealthCheckResult) - System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)); - /// - /// test http signature authentication - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// query parameter (optional) - /// header parameter (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task FakeHttpSignatureTestAsync (Pet pet, string query1 = default(string), string header1 = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// test http signature authentication - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// query parameter (optional) - /// header parameter (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> FakeHttpSignatureTestWithHttpInfoAsync (Pet pet, string query1 = default(string), string header1 = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite outerComposite = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync (OuterComposite outerComposite = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of enum (int) properties with examples - /// - /// Thrown when fails to make API call - /// Input enum (int) as post body - /// Cancellation Token to cancel request (optional) - /// Task of OuterObjectWithEnumProperty - System.Threading.Tasks.Task FakePropertyEnumIntegerSerializeAsync (OuterObjectWithEnumProperty outerObjectWithEnumProperty, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of enum (int) properties with examples - /// - /// Thrown when fails to make API call - /// Input enum (int) as post body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (OuterObjectWithEnumProperty) - System.Threading.Tasks.Task> FakePropertyEnumIntegerSerializeWithHttpInfoAsync (OuterObjectWithEnumProperty outerObjectWithEnumProperty, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// For this test, the body has to be a binary file. - /// - /// Thrown when fails to make API call - /// image to upload - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestBodyWithBinaryAsync (System.IO.Stream body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// For this test, the body has to be a binary file. - /// - /// Thrown when fails to make API call - /// image to upload - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithBinaryWithHttpInfoAsync (System.IO.Stream body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// For this test, the body for this request must reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestBodyWithFileSchemaAsync (FileSchemaTestClass fileSchemaTestClass, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// For this test, the body for this request must reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync (FileSchemaTestClass fileSchemaTestClass, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestBodyWithQueryParamsAsync (string query, User user, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync (string query, User user, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - System.Threading.Tasks.Task TestClientModelAsync (ModelClient modelClient, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync (ModelClient modelClient, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync (Dictionary requestBody, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync (Dictionary requestBody, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestJsonFormDataAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List pipe, List ioutil, List http, List url, List context, string allowEmpty, Dictionary language = default(Dictionary), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync (List pipe, List ioutil, List http, List url, List context, string allowEmpty, Dictionary language = default(Dictionary), CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class FakeApi : IFakeApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public FakeApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public FakeApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public FakeApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Health check endpoint - /// - /// Thrown when fails to make API call - /// HealthCheckResult - public HealthCheckResult FakeHealthGet () - { - ApiResponse localVarResponse = FakeHealthGetWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Health check endpoint - /// - /// Thrown when fails to make API call - /// ApiResponse of HealthCheckResult - public ApiResponse FakeHealthGetWithHttpInfo () - { - - var localVarPath = "/fake/health"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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("FakeHealthGet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (HealthCheckResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(HealthCheckResult))); - } - - /// - /// Health check endpoint - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of HealthCheckResult - public async System.Threading.Tasks.Task FakeHealthGetAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeHealthGetWithHttpInfoAsync(cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Health check endpoint - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (HealthCheckResult) - public async System.Threading.Tasks.Task> FakeHealthGetWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/fake/health"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeHealthGet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (HealthCheckResult) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(HealthCheckResult))); - } - - /// - /// test http signature authentication - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// query parameter (optional) - /// header parameter (optional) - /// - public void FakeHttpSignatureTest (Pet pet, string query1 = default(string), string header1 = default(string)) - { - FakeHttpSignatureTestWithHttpInfo(pet, query1, header1); - } - - /// - /// test http signature authentication - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// query parameter (optional) - /// header parameter (optional) - /// ApiResponse of Object(void) - public ApiResponse FakeHttpSignatureTestWithHttpInfo (Pet pet, string query1 = default(string), string header1 = default(string)) - { - // verify the required parameter 'pet' is set - if (pet == null) - throw new ApiException(400, "Missing required parameter 'pet' when calling FakeApi->FakeHttpSignatureTest"); - - var localVarPath = "/fake/http-signature-test"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (query1 != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query_1", query1)); // query parameter - if (header1 != null) localVarHeaderParams.Add("header_1", this.Configuration.ApiClient.ParameterToString(header1)); // header parameter - if (pet != null && pet.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(pet); // http body (model) parameter - } - else - { - localVarPostBody = pet; // byte array - } - - // authentication (http_signature_test) required - - // 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("FakeHttpSignatureTest", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// test http signature authentication - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// query parameter (optional) - /// header parameter (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task FakeHttpSignatureTestAsync (Pet pet, string query1 = default(string), string header1 = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await FakeHttpSignatureTestWithHttpInfoAsync(pet, query1, header1, cancellationToken); - - } - - /// - /// test http signature authentication - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// query parameter (optional) - /// header parameter (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> FakeHttpSignatureTestWithHttpInfoAsync (Pet pet, string query1 = default(string), string header1 = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'pet' is set - if (pet == null) - throw new ApiException(400, "Missing required parameter 'pet' when calling FakeApi->FakeHttpSignatureTest"); - - var localVarPath = "/fake/http-signature-test"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (query1 != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query_1", query1)); // query parameter - if (header1 != null) localVarHeaderParams.Add("header_1", this.Configuration.ApiClient.ParameterToString(header1)); // header parameter - if (pet != null && pet.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(pet); // http body (model) parameter - } - else - { - localVarPostBody = pet; // byte array - } - - // authentication (http_signature_test) required - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeHttpSignatureTest", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// bool - public bool FakeOuterBooleanSerialize (bool? body = default(bool?)) - { - ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// ApiResponse of bool - public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)) - { - - var localVarPath = "/fake/outer/boolean"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (bool) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(bool))); - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/fake/outer/boolean"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (bool) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(bool))); - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = default(OuterComposite)) - { - ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(outerComposite); - return localVarResponse.Data; - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// ApiResponse of OuterComposite - public ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite outerComposite = default(OuterComposite)) - { - - var localVarPath = "/fake/outer/composite"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (outerComposite != null && outerComposite.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(outerComposite); // http body (model) parameter - } - else - { - localVarPostBody = outerComposite; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (OuterComposite) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite))); - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite outerComposite = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(outerComposite, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync (OuterComposite outerComposite = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/fake/outer/composite"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (outerComposite != null && outerComposite.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(outerComposite); // http body (model) parameter - } - else - { - localVarPostBody = outerComposite; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (OuterComposite) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite))); - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// decimal - public decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)) - { - ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// ApiResponse of decimal - public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)) - { - - var localVarPath = "/fake/outer/number"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (decimal) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(decimal))); - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/fake/outer/number"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (decimal) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(decimal))); - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// string - public string FakeOuterStringSerialize (string body = default(string)) - { - ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// ApiResponse of string - public ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)) - { - - var localVarPath = "/fake/outer/string"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/fake/outer/string"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Test serialization of enum (int) properties with examples - /// - /// Thrown when fails to make API call - /// Input enum (int) as post body - /// OuterObjectWithEnumProperty - public OuterObjectWithEnumProperty FakePropertyEnumIntegerSerialize (OuterObjectWithEnumProperty outerObjectWithEnumProperty) - { - ApiResponse localVarResponse = FakePropertyEnumIntegerSerializeWithHttpInfo(outerObjectWithEnumProperty); - return localVarResponse.Data; - } - - /// - /// Test serialization of enum (int) properties with examples - /// - /// Thrown when fails to make API call - /// Input enum (int) as post body - /// ApiResponse of OuterObjectWithEnumProperty - public ApiResponse FakePropertyEnumIntegerSerializeWithHttpInfo (OuterObjectWithEnumProperty outerObjectWithEnumProperty) - { - // verify the required parameter 'outerObjectWithEnumProperty' is set - if (outerObjectWithEnumProperty == null) - throw new ApiException(400, "Missing required parameter 'outerObjectWithEnumProperty' when calling FakeApi->FakePropertyEnumIntegerSerialize"); - - var localVarPath = "/fake/property/enum-int"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (outerObjectWithEnumProperty != null && outerObjectWithEnumProperty.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(outerObjectWithEnumProperty); // http body (model) parameter - } - else - { - localVarPostBody = outerObjectWithEnumProperty; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakePropertyEnumIntegerSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (OuterObjectWithEnumProperty) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterObjectWithEnumProperty))); - } - - /// - /// Test serialization of enum (int) properties with examples - /// - /// Thrown when fails to make API call - /// Input enum (int) as post body - /// Cancellation Token to cancel request (optional) - /// Task of OuterObjectWithEnumProperty - public async System.Threading.Tasks.Task FakePropertyEnumIntegerSerializeAsync (OuterObjectWithEnumProperty outerObjectWithEnumProperty, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakePropertyEnumIntegerSerializeWithHttpInfoAsync(outerObjectWithEnumProperty, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of enum (int) properties with examples - /// - /// Thrown when fails to make API call - /// Input enum (int) as post body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (OuterObjectWithEnumProperty) - public async System.Threading.Tasks.Task> FakePropertyEnumIntegerSerializeWithHttpInfoAsync (OuterObjectWithEnumProperty outerObjectWithEnumProperty, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'outerObjectWithEnumProperty' is set - if (outerObjectWithEnumProperty == null) - throw new ApiException(400, "Missing required parameter 'outerObjectWithEnumProperty' when calling FakeApi->FakePropertyEnumIntegerSerialize"); - - var localVarPath = "/fake/property/enum-int"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (outerObjectWithEnumProperty != null && outerObjectWithEnumProperty.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(outerObjectWithEnumProperty); // http body (model) parameter - } - else - { - localVarPostBody = outerObjectWithEnumProperty; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakePropertyEnumIntegerSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (OuterObjectWithEnumProperty) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterObjectWithEnumProperty))); - } - - /// - /// For this test, the body has to be a binary file. - /// - /// Thrown when fails to make API call - /// image to upload - /// - public void TestBodyWithBinary (System.IO.Stream body) - { - TestBodyWithBinaryWithHttpInfo(body); - } - - /// - /// For this test, the body has to be a binary file. - /// - /// Thrown when fails to make API call - /// image to upload - /// ApiResponse of Object(void) - public ApiResponse TestBodyWithBinaryWithHttpInfo (System.IO.Stream body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithBinary"); - - var localVarPath = "/fake/body-with-binary"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "image/png" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithBinary", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// For this test, the body has to be a binary file. - /// - /// Thrown when fails to make API call - /// image to upload - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestBodyWithBinaryAsync (System.IO.Stream body, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestBodyWithBinaryWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// For this test, the body has to be a binary file. - /// - /// Thrown when fails to make API call - /// image to upload - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithBinaryWithHttpInfoAsync (System.IO.Stream body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithBinary"); - - var localVarPath = "/fake/body-with-binary"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "image/png" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithBinary", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// For this test, the body for this request must reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// - public void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass) - { - TestBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass); - } - - /// - /// For this test, the body for this request must reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass fileSchemaTestClass) - { - // verify the required parameter 'fileSchemaTestClass' is set - if (fileSchemaTestClass == null) - throw new ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); - - var localVarPath = "/fake/body-with-file-schema"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (fileSchemaTestClass != null && fileSchemaTestClass.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(fileSchemaTestClass); // http body (model) parameter - } - else - { - localVarPostBody = fileSchemaTestClass; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithFileSchema", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// For this test, the body for this request must reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync (FileSchemaTestClass fileSchemaTestClass, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestBodyWithFileSchemaWithHttpInfoAsync(fileSchemaTestClass, cancellationToken); - - } - - /// - /// For this test, the body for this request must reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync (FileSchemaTestClass fileSchemaTestClass, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'fileSchemaTestClass' is set - if (fileSchemaTestClass == null) - throw new ApiException(400, "Missing required parameter 'fileSchemaTestClass' when calling FakeApi->TestBodyWithFileSchema"); - - var localVarPath = "/fake/body-with-file-schema"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (fileSchemaTestClass != null && fileSchemaTestClass.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(fileSchemaTestClass); // http body (model) parameter - } - else - { - localVarPostBody = fileSchemaTestClass; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithFileSchema", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - public void TestBodyWithQueryParams (string query, User user) - { - TestBodyWithQueryParamsWithHttpInfo(query, user); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - public ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, User user) - { - // verify the required parameter 'query' is set - if (query == null) - throw new ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - // verify the required parameter 'user' is set - if (user == null) - throw new ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); - - var localVarPath = "/fake/body-with-query-params"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - if (user != null && user.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter - } - else - { - localVarPostBody = user; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithQueryParams", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync (string query, User user, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestBodyWithQueryParamsWithHttpInfoAsync(query, user, cancellationToken); - - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync (string query, User user, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'query' is set - if (query == null) - throw new ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - // verify the required parameter 'user' is set - if (user == null) - throw new ApiException(400, "Missing required parameter 'user' when calling FakeApi->TestBodyWithQueryParams"); - - var localVarPath = "/fake/body-with-query-params"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - if (user != null && user.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter - } - else - { - localVarPostBody = user; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithQueryParams", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient TestClientModel (ModelClient modelClient) - { - ApiResponse localVarResponse = TestClientModelWithHttpInfo(modelClient); - return localVarResponse.Data; - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse TestClientModelWithHttpInfo (ModelClient modelClient) - { - // verify the required parameter 'modelClient' is set - if (modelClient == null) - throw new ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (modelClient != null && modelClient.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(modelClient); // http body (model) parameter - } - else - { - localVarPostBody = modelClient; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClientModel", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - public async System.Threading.Tasks.Task TestClientModelAsync (ModelClient modelClient, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(modelClient, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync (ModelClient modelClient, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'modelClient' is set - if (modelClient == null) - throw new ApiException(400, "Missing required parameter 'modelClient' when calling FakeApi->TestClientModel"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (modelClient != null && modelClient.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(modelClient); // http body (model) parameter - } - else - { - localVarPostBody = modelClient; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClientModel", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// - public void TestEndpointParameters (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) - { - TestEndpointParametersWithHttpInfo(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) - { - // verify the required parameter 'number' is set - if (number == null) - throw new ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'varDouble' is set - if (varDouble == null) - throw new ApiException(400, "Missing required parameter 'varDouble' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'patternWithoutDelimiter' is set - if (patternWithoutDelimiter == null) - throw new ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'varByte' is set - if (varByte == null) - throw new ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (integer != null) localVarFormParams.Add("integer", this.Configuration.ApiClient.ParameterToString(integer)); // form parameter - if (int32 != null) localVarFormParams.Add("int32", this.Configuration.ApiClient.ParameterToString(int32)); // form parameter - if (int64 != null) localVarFormParams.Add("int64", this.Configuration.ApiClient.ParameterToString(int64)); // form parameter - if (number != null) localVarFormParams.Add("number", this.Configuration.ApiClient.ParameterToString(number)); // form parameter - if (varFloat != null) localVarFormParams.Add("float", this.Configuration.ApiClient.ParameterToString(varFloat)); // form parameter - if (varDouble != null) localVarFormParams.Add("double", this.Configuration.ApiClient.ParameterToString(varDouble)); // form parameter - if (varString != null) localVarFormParams.Add("string", this.Configuration.ApiClient.ParameterToString(varString)); // form parameter - if (patternWithoutDelimiter != null) localVarFormParams.Add("pattern_without_delimiter", this.Configuration.ApiClient.ParameterToString(patternWithoutDelimiter)); // form parameter - if (varByte != null) localVarFormParams.Add("byte", this.Configuration.ApiClient.ParameterToString(varByte)); // form parameter - if (binary != null) localVarFileParams.Add("binary", this.Configuration.ApiClient.ParameterToFile("binary", binary)); - if (date != null) localVarFormParams.Add("date", this.Configuration.ApiClient.ParameterToString(date)); // form parameter - if (dateTime != null) localVarFormParams.Add("dateTime", this.Configuration.ApiClient.ParameterToString(dateTime)); // form parameter - if (password != null) localVarFormParams.Add("password", this.Configuration.ApiClient.ParameterToString(password)); // form parameter - if (callback != null) localVarFormParams.Add("callback", this.Configuration.ApiClient.ParameterToString(callback)); // form parameter - - // authentication (http_basic_test) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestEndpointParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await TestEndpointParametersWithHttpInfoAsync(number, varDouble, patternWithoutDelimiter, varByte, integer, int32, int64, varFloat, varString, binary, date, dateTime, password, callback, cancellationToken); - - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync (decimal number, double varDouble, string patternWithoutDelimiter, byte[] varByte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? varFloat = default(float?), string varString = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'number' is set - if (number == null) - throw new ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'varDouble' is set - if (varDouble == null) - throw new ApiException(400, "Missing required parameter 'varDouble' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'patternWithoutDelimiter' is set - if (patternWithoutDelimiter == null) - throw new ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'varByte' is set - if (varByte == null) - throw new ApiException(400, "Missing required parameter 'varByte' when calling FakeApi->TestEndpointParameters"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (integer != null) localVarFormParams.Add("integer", this.Configuration.ApiClient.ParameterToString(integer)); // form parameter - if (int32 != null) localVarFormParams.Add("int32", this.Configuration.ApiClient.ParameterToString(int32)); // form parameter - if (int64 != null) localVarFormParams.Add("int64", this.Configuration.ApiClient.ParameterToString(int64)); // form parameter - if (number != null) localVarFormParams.Add("number", this.Configuration.ApiClient.ParameterToString(number)); // form parameter - if (varFloat != null) localVarFormParams.Add("float", this.Configuration.ApiClient.ParameterToString(varFloat)); // form parameter - if (varDouble != null) localVarFormParams.Add("double", this.Configuration.ApiClient.ParameterToString(varDouble)); // form parameter - if (varString != null) localVarFormParams.Add("string", this.Configuration.ApiClient.ParameterToString(varString)); // form parameter - if (patternWithoutDelimiter != null) localVarFormParams.Add("pattern_without_delimiter", this.Configuration.ApiClient.ParameterToString(patternWithoutDelimiter)); // form parameter - if (varByte != null) localVarFormParams.Add("byte", this.Configuration.ApiClient.ParameterToString(varByte)); // form parameter - if (binary != null) localVarFileParams.Add("binary", this.Configuration.ApiClient.ParameterToFile("binary", binary)); - if (date != null) localVarFormParams.Add("date", this.Configuration.ApiClient.ParameterToString(date)); // form parameter - if (dateTime != null) localVarFormParams.Add("dateTime", this.Configuration.ApiClient.ParameterToString(dateTime)); // form parameter - if (password != null) localVarFormParams.Add("password", this.Configuration.ApiClient.ParameterToString(password)); // form parameter - if (callback != null) localVarFormParams.Add("callback", this.Configuration.ApiClient.ParameterToString(callback)); // form parameter - - // authentication (http_basic_test) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestEndpointParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// - public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string)) - { - TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// ApiResponse of Object(void) - public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string)) - { - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "enum_query_string_array", enumQueryStringArray)); // query parameter - if (enumQueryString != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_string", enumQueryString)); // query parameter - if (enumQueryInteger != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_integer", enumQueryInteger)); // query parameter - if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter - if (enumQueryModelArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "enum_query_model_array", enumQueryModelArray)); // query parameter - if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter - if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter - if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter - if (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter - - - // 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("TestEnumParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumQueryModelArray, enumFormStringArray, enumFormString, cancellationToken); - - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumQueryModelArray = default(List), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "enum_query_string_array", enumQueryStringArray)); // query parameter - if (enumQueryString != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_string", enumQueryString)); // query parameter - if (enumQueryInteger != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_integer", enumQueryInteger)); // query parameter - if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter - if (enumQueryModelArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "enum_query_model_array", enumQueryModelArray)); // query parameter - if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter - if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter - if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter - if (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestEnumParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// - public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) - { - TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// ApiResponse of Object(void) - public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) - { - // verify the required parameter 'requiredStringGroup' is set - if (requiredStringGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredBooleanGroup' is set - if (requiredBooleanGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredInt64Group' is set - if (requiredInt64Group == null) - throw new ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (requiredStringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_string_group", requiredStringGroup)); // query parameter - if (requiredInt64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_int64_group", requiredInt64Group)); // query parameter - if (stringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "string_group", stringGroup)); // query parameter - if (int64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "int64_group", int64Group)); // query parameter - if (requiredBooleanGroup != null) localVarHeaderParams.Add("required_boolean_group", this.Configuration.ApiClient.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) localVarHeaderParams.Add("boolean_group", this.Configuration.ApiClient.ParameterToString(booleanGroup)); // header parameter - - // authentication (bearer_test) required - // http bearer authentication required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestGroupParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)) - { - await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken); - - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'requiredStringGroup' is set - if (requiredStringGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredBooleanGroup' is set - if (requiredBooleanGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredInt64Group' is set - if (requiredInt64Group == null) - throw new ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (requiredStringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_string_group", requiredStringGroup)); // query parameter - if (requiredInt64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_int64_group", requiredInt64Group)); // query parameter - if (stringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "string_group", stringGroup)); // query parameter - if (int64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "int64_group", int64Group)); // query parameter - if (requiredBooleanGroup != null) localVarHeaderParams.Add("required_boolean_group", this.Configuration.ApiClient.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) localVarHeaderParams.Add("boolean_group", this.Configuration.ApiClient.ParameterToString(booleanGroup)); // header parameter - - // authentication (bearer_test) required - // http bearer authentication required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestGroupParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// - public void TestInlineAdditionalProperties (Dictionary requestBody) - { - TestInlineAdditionalPropertiesWithHttpInfo(requestBody); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// ApiResponse of Object(void) - public ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Dictionary requestBody) - { - // verify the required parameter 'requestBody' is set - if (requestBody == null) - throw new ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); - - var localVarPath = "/fake/inline-additionalProperties"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (requestBody != null && requestBody.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(requestBody); // http body (model) parameter - } - else - { - localVarPostBody = requestBody; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync (Dictionary requestBody, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestInlineAdditionalPropertiesWithHttpInfoAsync(requestBody, cancellationToken); - - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync (Dictionary requestBody, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'requestBody' is set - if (requestBody == null) - throw new ApiException(400, "Missing required parameter 'requestBody' when calling FakeApi->TestInlineAdditionalProperties"); - - var localVarPath = "/fake/inline-additionalProperties"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (requestBody != null && requestBody.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(requestBody); // http body (model) parameter - } - else - { - localVarPostBody = requestBody; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// - public void TestJsonFormData (string param, string param2) - { - TestJsonFormDataWithHttpInfo(param, param2); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// ApiResponse of Object(void) - public ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - // verify the required parameter 'param2' is set - if (param2 == null) - throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - - var localVarPath = "/fake/jsonFormData"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null) localVarFormParams.Add("param", this.Configuration.ApiClient.ParameterToString(param)); // form parameter - if (param2 != null) localVarFormParams.Add("param2", this.Configuration.ApiClient.ParameterToString(param2)); // form parameter - - - // 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("TestJsonFormData", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestJsonFormDataAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken); - - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - // verify the required parameter 'param2' is set - if (param2 == null) - throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - - var localVarPath = "/fake/jsonFormData"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null) localVarFormParams.Add("param", this.Configuration.ApiClient.ParameterToString(param)); // form parameter - if (param2 != null) localVarFormParams.Add("param2", this.Configuration.ApiClient.ParameterToString(param2)); // form parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestJsonFormData", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - /// (optional) - /// - public void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string allowEmpty, Dictionary language = default(Dictionary)) - { - TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, allowEmpty, language); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context, string allowEmpty, Dictionary language = default(Dictionary)) - { - // verify the required parameter 'pipe' is set - if (pipe == null) - throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'ioutil' is set - if (ioutil == null) - throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'http' is set - if (http == null) - throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'url' is set - if (url == null) - throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'context' is set - if (context == null) - throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'allowEmpty' is set - if (allowEmpty == null) - throw new ApiException(400, "Missing required parameter 'allowEmpty' when calling FakeApi->TestQueryParameterCollectionFormat"); - - var localVarPath = "/fake/test-query-parameters"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("pipes", "pipe", pipe)); // query parameter - if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter - if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("ssv", "http", http)); // query parameter - if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter - if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter - if (language != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "language", language)); // query parameter - if (allowEmpty != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "allowEmpty", allowEmpty)); // query parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List pipe, List ioutil, List http, List url, List context, string allowEmpty, Dictionary language = default(Dictionary), CancellationToken cancellationToken = default(CancellationToken)) - { - await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, allowEmpty, language, cancellationToken); - - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync (List pipe, List ioutil, List http, List url, List context, string allowEmpty, Dictionary language = default(Dictionary), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'pipe' is set - if (pipe == null) - throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'ioutil' is set - if (ioutil == null) - throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'http' is set - if (http == null) - throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'url' is set - if (url == null) - throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'context' is set - if (context == null) - throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'allowEmpty' is set - if (allowEmpty == null) - throw new ApiException(400, "Missing required parameter 'allowEmpty' when calling FakeApi->TestQueryParameterCollectionFormat"); - - var localVarPath = "/fake/test-query-parameters"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("pipes", "pipe", pipe)); // query parameter - if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter - if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("ssv", "http", http)); // query parameter - if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter - if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter - if (language != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "language", language)); // query parameter - if (allowEmpty != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "allowEmpty", allowEmpty)); // query parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs deleted file mode 100644 index 3ca0633bb54..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ /dev/null @@ -1,347 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IFakeClassnameTags123Api : IApiAccessor - { - #region Synchronous Operations - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient TestClassname (ModelClient modelClient); - - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse TestClassnameWithHttpInfo (ModelClient modelClient); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - System.Threading.Tasks.Task TestClassnameAsync (ModelClient modelClient, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync (ModelClient modelClient, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public FakeClassnameTags123Api(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public FakeClassnameTags123Api() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public FakeClassnameTags123Api(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient TestClassname (ModelClient modelClient) - { - ApiResponse localVarResponse = TestClassnameWithHttpInfo(modelClient); - return localVarResponse.Data; - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse TestClassnameWithHttpInfo (ModelClient modelClient) - { - // verify the required parameter 'modelClient' is set - if (modelClient == null) - throw new ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); - - var localVarPath = "/fake_classname_test"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (modelClient != null && modelClient.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(modelClient); // http body (model) parameter - } - else - { - localVarPostBody = modelClient; // byte array - } - - // authentication (api_key_query) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClassname", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - public async System.Threading.Tasks.Task TestClassnameAsync (ModelClient modelClient, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(modelClient, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync (ModelClient modelClient, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'modelClient' is set - if (modelClient == null) - throw new ApiException(400, "Missing required parameter 'modelClient' when calling FakeClassnameTags123Api->TestClassname"); - - var localVarPath = "/fake_classname_test"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (modelClient != null && modelClient.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(modelClient); // http body (model) parameter - } - else - { - localVarPostBody = modelClient; // byte array - } - - // authentication (api_key_query) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClassname", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs deleted file mode 100644 index e6183cf6212..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs +++ /dev/null @@ -1,1975 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IPetApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - void AddPet (Pet pet); - - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - ApiResponse AddPetWithHttpInfo (Pet pet); - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// - void DeletePet (long petId, string apiKey = default(string)); - - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)); - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter (deprecated) - /// List - List FindPetsByStatus (List status); - - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter (deprecated) - /// ApiResponse of List - ApiResponse> FindPetsByStatusWithHttpInfo (List status); - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// List - [Obsolete] - List FindPetsByTags (List tags); - - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// ApiResponse of List - [Obsolete] - ApiResponse> FindPetsByTagsWithHttpInfo (List tags); - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Pet - Pet GetPetById (long petId); - - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// ApiResponse of Pet - ApiResponse GetPetByIdWithHttpInfo (long petId); - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - void UpdatePet (Pet pet); - - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - ApiResponse UpdatePetWithHttpInfo (Pet pet); - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)); - - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); - - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task AddPetAsync (Pet pet, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> AddPetWithHttpInfoAsync (Pet pet, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter (deprecated) - /// Cancellation Token to cancel request (optional) - /// Task of List - System.Threading.Tasks.Task> FindPetsByStatusAsync (List status, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter (deprecated) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync (List status, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of List - [Obsolete] - System.Threading.Tasks.Task> FindPetsByTagsAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - [Obsolete] - System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of Pet - System.Threading.Tasks.Task GetPetByIdAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task UpdatePetAsync (Pet pet, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync (Pet pet, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class PetApi : IPetApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public PetApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public PetApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public PetApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - public void AddPet (Pet pet) - { - AddPetWithHttpInfo(pet); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - public ApiResponse AddPetWithHttpInfo (Pet pet) - { - // verify the required parameter 'pet' is set - if (pet == null) - throw new ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - - var localVarPath = "/pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (pet != null && pet.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(pet); // http body (model) parameter - } - else - { - localVarPostBody = pet; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("AddPet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task AddPetAsync (Pet pet, CancellationToken cancellationToken = default(CancellationToken)) - { - await AddPetWithHttpInfoAsync(pet, cancellationToken); - - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync (Pet pet, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'pet' is set - if (pet == null) - throw new ApiException(400, "Missing required parameter 'pet' when calling PetApi->AddPet"); - - var localVarPath = "/pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (pet != null && pet.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(pet); // http body (model) parameter - } - else - { - localVarPostBody = pet; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("AddPet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// - public void DeletePet (long petId, string apiKey = default(string)) - { - DeletePetWithHttpInfo(petId, apiKey); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (apiKey != null) localVarHeaderParams.Add("api_key", this.Configuration.ApiClient.ParameterToString(apiKey)); // header parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeletePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken); - - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (apiKey != null) localVarHeaderParams.Add("api_key", this.Configuration.ApiClient.ParameterToString(apiKey)); // header parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeletePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter (deprecated) - /// List - public List FindPetsByStatus (List status) - { - ApiResponse> localVarResponse = FindPetsByStatusWithHttpInfo(status); - return localVarResponse.Data; - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter (deprecated) - /// ApiResponse of List - public ApiResponse> FindPetsByStatusWithHttpInfo (List status) - { - // verify the required parameter 'status' is set - if (status == null) - throw new ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - - var localVarPath = "/pet/findByStatus"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "status", status)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // 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("FindPetsByStatus", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter (deprecated) - /// Cancellation Token to cancel request (optional) - /// Task of List - public async System.Threading.Tasks.Task> FindPetsByStatusAsync (List status, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter (deprecated) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync (List status, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'status' is set - if (status == null) - throw new ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - - var localVarPath = "/pet/findByStatus"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "status", status)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FindPetsByStatus", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// List - [Obsolete] - public List FindPetsByTags (List tags) - { - ApiResponse> localVarResponse = FindPetsByTagsWithHttpInfo(tags); - return localVarResponse.Data; - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// ApiResponse of List - [Obsolete] - public ApiResponse> FindPetsByTagsWithHttpInfo (List tags) - { - // verify the required parameter 'tags' is set - if (tags == null) - throw new ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - - var localVarPath = "/pet/findByTags"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (tags != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "tags", tags)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // 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("FindPetsByTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of List - [Obsolete] - public async System.Threading.Tasks.Task> FindPetsByTagsAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - [Obsolete] - public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'tags' is set - if (tags == null) - throw new ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - - var localVarPath = "/pet/findByTags"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (tags != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "tags", tags)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FindPetsByTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Pet - public Pet GetPetById (long petId) - { - ApiResponse localVarResponse = GetPetByIdWithHttpInfo(petId); - return localVarResponse.Data; - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// ApiResponse of Pet - public ApiResponse GetPetByIdWithHttpInfo (long petId) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // 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("GetPetById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Pet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet))); - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of Pet - public async System.Threading.Tasks.Task GetPetByIdAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetPetById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Pet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet))); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - public void UpdatePet (Pet pet) - { - UpdatePetWithHttpInfo(pet); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - public ApiResponse UpdatePetWithHttpInfo (Pet pet) - { - // verify the required parameter 'pet' is set - if (pet == null) - throw new ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - - var localVarPath = "/pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (pet != null && pet.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(pet); // http body (model) parameter - } - else - { - localVarPostBody = pet; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task UpdatePetAsync (Pet pet, CancellationToken cancellationToken = default(CancellationToken)) - { - await UpdatePetWithHttpInfoAsync(pet, cancellationToken); - - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync (Pet pet, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'pet' is set - if (pet == null) - throw new ApiException(400, "Missing required parameter 'pet' when calling PetApi->UpdatePet"); - - var localVarPath = "/pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (pet != null && pet.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(pet); // http body (model) parameter - } - else - { - localVarPostBody = pet; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - public void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)) - { - UpdatePetWithFormWithHttpInfo(petId, name, status); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// ApiResponse of Object(void) - public ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (name != null) localVarFormParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // form parameter - if (status != null) localVarFormParams.Add("status", this.Configuration.ApiClient.ParameterToString(status)); // form parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePetWithForm", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken); - - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (name != null) localVarFormParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // form parameter - if (status != null) localVarFormParams.Add("status", this.Configuration.ApiClient.ParameterToString(status)); // form parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePetWithForm", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - public ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) - { - ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); - return localVarResponse.Data; - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse of ApiResponse - public ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - - var localVarPath = "/pet/{petId}/uploadImage"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - - var localVarPath = "/pet/{petId}/uploadImage"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) - { - ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); - return localVarResponse.Data; - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - public ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'requiredFile' is set - if (requiredFile == null) - throw new ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (requiredFile != null) localVarFileParams.Add("requiredFile", this.Configuration.ApiClient.ParameterToFile("requiredFile", requiredFile)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'requiredFile' is set - if (requiredFile == null) - throw new ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (requiredFile != null) localVarFileParams.Add("requiredFile", this.Configuration.ApiClient.ParameterToFile("requiredFile", requiredFile)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs deleted file mode 100644 index 7450a0aa302..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/StoreApi.cs +++ /dev/null @@ -1,868 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IStoreApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// - void DeleteOrder (string orderId); - - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// ApiResponse of Object(void) - ApiResponse DeleteOrderWithHttpInfo (string orderId); - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Dictionary - Dictionary GetInventory (); - - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary - ApiResponse> GetInventoryWithHttpInfo (); - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Order - Order GetOrderById (long orderId); - - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// ApiResponse of Order - ApiResponse GetOrderByIdWithHttpInfo (long orderId); - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Order - Order PlaceOrder (Order order); - - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// ApiResponse of Order - ApiResponse PlaceOrderWithHttpInfo (Order order); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteOrderAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of Dictionary - System.Threading.Tasks.Task> GetInventoryAsync (CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Dictionary<string, int>) - System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of Order - System.Threading.Tasks.Task GetOrderByIdAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of Order - System.Threading.Tasks.Task PlaceOrderAsync (Order order, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync (Order order, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class StoreApi : IStoreApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public StoreApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public StoreApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public StoreApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// - public void DeleteOrder (string orderId) - { - DeleteOrderWithHttpInfo(orderId); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// ApiResponse of Object(void) - public ApiResponse DeleteOrderWithHttpInfo (string orderId) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - - var localVarPath = "/store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteOrderAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken); - - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - - var localVarPath = "/store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Dictionary - public Dictionary GetInventory () - { - ApiResponse> localVarResponse = GetInventoryWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary - public ApiResponse> GetInventoryWithHttpInfo () - { - - var localVarPath = "/store/inventory"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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); - - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // 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("GetInventory", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of Dictionary - public async System.Threading.Tasks.Task> GetInventoryAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Dictionary<string, int>) - public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/store/inventory"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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); - - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetInventory", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Order - public Order GetOrderById (long orderId) - { - ApiResponse localVarResponse = GetOrderByIdWithHttpInfo(orderId); - return localVarResponse.Data; - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// ApiResponse of Order - public ApiResponse GetOrderByIdWithHttpInfo (long orderId) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - - var localVarPath = "/store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // 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("GetOrderById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of Order - public async System.Threading.Tasks.Task GetOrderByIdAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - - var localVarPath = "/store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetOrderById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Order - public Order PlaceOrder (Order order) - { - ApiResponse localVarResponse = PlaceOrderWithHttpInfo(order); - return localVarResponse.Data; - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// ApiResponse of Order - public ApiResponse PlaceOrderWithHttpInfo (Order order) - { - // verify the required parameter 'order' is set - if (order == null) - throw new ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - - var localVarPath = "/store/order"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (order != null && order.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(order); // http body (model) parameter - } - else - { - localVarPostBody = order; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("PlaceOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of Order - public async System.Threading.Tasks.Task PlaceOrderAsync (Order order, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(order, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync (Order order, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'order' is set - if (order == null) - throw new ApiException(400, "Missing required parameter 'order' when calling StoreApi->PlaceOrder"); - - var localVarPath = "/store/order"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - "application/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (order != null && order.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(order); // http body (model) parameter - } - else - { - localVarPostBody = order; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("PlaceOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs deleted file mode 100644 index 91323d5e33d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Api/UserApi.cs +++ /dev/null @@ -1,1634 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IUserApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// - void CreateUser (User user); - - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// ApiResponse of Object(void) - ApiResponse CreateUserWithHttpInfo (User user); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// - void CreateUsersWithArrayInput (List user); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - ApiResponse CreateUsersWithArrayInputWithHttpInfo (List user); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// - void CreateUsersWithListInput (List user); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - ApiResponse CreateUsersWithListInputWithHttpInfo (List user); - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// - void DeleteUser (string username); - - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// ApiResponse of Object(void) - ApiResponse DeleteUserWithHttpInfo (string username); - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// User - User GetUserByName (string username); - - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// ApiResponse of User - ApiResponse GetUserByNameWithHttpInfo (string username); - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// string - string LoginUser (string username, string password); - - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// ApiResponse of string - ApiResponse LoginUserWithHttpInfo (string username, string password); - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - void LogoutUser (); - - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - ApiResponse LogoutUserWithHttpInfo (); - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// - void UpdateUser (string username, User user); - - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// ApiResponse of Object(void) - ApiResponse UpdateUserWithHttpInfo (string username, User user); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task CreateUserAsync (User user, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync (User user, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List user, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync (List user, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task CreateUsersWithListInputAsync (List user, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync (List user, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteUserAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of User - System.Threading.Tasks.Task GetUserByNameAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (User) - System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of string - System.Threading.Tasks.Task LoginUserAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task LogoutUserAsync (CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task UpdateUserAsync (string username, User user, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync (string username, User user, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class UserApi : IUserApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public UserApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public UserApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public UserApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// - public void CreateUser (User user) - { - CreateUserWithHttpInfo(user); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// ApiResponse of Object(void) - public ApiResponse CreateUserWithHttpInfo (User user) - { - // verify the required parameter 'user' is set - if (user == null) - throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - - var localVarPath = "/user"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (user != null && user.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter - } - else - { - localVarPostBody = user; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateUserAsync (User user, CancellationToken cancellationToken = default(CancellationToken)) - { - await CreateUserWithHttpInfoAsync(user, cancellationToken); - - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync (User user, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'user' is set - if (user == null) - throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUser"); - - var localVarPath = "/user"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (user != null && user.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter - } - else - { - localVarPostBody = user; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// - public void CreateUsersWithArrayInput (List user) - { - CreateUsersWithArrayInputWithHttpInfo(user); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - public ApiResponse CreateUsersWithArrayInputWithHttpInfo (List user) - { - // verify the required parameter 'user' is set - if (user == null) - throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - - var localVarPath = "/user/createWithArray"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (user != null && user.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter - } - else - { - localVarPostBody = user; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithArrayInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List user, CancellationToken cancellationToken = default(CancellationToken)) - { - await CreateUsersWithArrayInputWithHttpInfoAsync(user, cancellationToken); - - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync (List user, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'user' is set - if (user == null) - throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithArrayInput"); - - var localVarPath = "/user/createWithArray"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (user != null && user.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter - } - else - { - localVarPostBody = user; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithArrayInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// - public void CreateUsersWithListInput (List user) - { - CreateUsersWithListInputWithHttpInfo(user); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - public ApiResponse CreateUsersWithListInputWithHttpInfo (List user) - { - // verify the required parameter 'user' is set - if (user == null) - throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - - var localVarPath = "/user/createWithList"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (user != null && user.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter - } - else - { - localVarPostBody = user; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithListInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List user, CancellationToken cancellationToken = default(CancellationToken)) - { - await CreateUsersWithListInputWithHttpInfoAsync(user, cancellationToken); - - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync (List user, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'user' is set - if (user == null) - throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->CreateUsersWithListInput"); - - var localVarPath = "/user/createWithList"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (user != null && user.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter - } - else - { - localVarPostBody = user; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithListInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// - public void DeleteUser (string username) - { - DeleteUserWithHttpInfo(username); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// ApiResponse of Object(void) - public ApiResponse DeleteUserWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteUserAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteUserWithHttpInfoAsync(username, cancellationToken); - - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// User - public User GetUserByName (string username) - { - ApiResponse localVarResponse = GetUserByNameWithHttpInfo(username); - return localVarResponse.Data; - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// ApiResponse of User - public ApiResponse GetUserByNameWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // 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("GetUserByName", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User))); - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of User - public async System.Threading.Tasks.Task GetUserByNameAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (User) - public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetUserByName", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User))); - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// string - public string LoginUser (string username, string password) - { - ApiResponse localVarResponse = LoginUserWithHttpInfo(username, password); - return localVarResponse.Data; - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// ApiResponse of string - public ApiResponse LoginUserWithHttpInfo (string username, string password) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - // verify the required parameter 'password' is set - if (password == null) - throw new ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - - var localVarPath = "/user/login"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "username", username)); // query parameter - if (password != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "password", password)); // query parameter - - - // 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("LoginUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of string - public async System.Threading.Tasks.Task LoginUserAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - // verify the required parameter 'password' is set - if (password == null) - throw new ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - - var localVarPath = "/user/login"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "username", username)); // query parameter - if (password != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "password", password)); // query parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("LoginUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// - public void LogoutUser () - { - LogoutUserWithHttpInfo(); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - public ApiResponse LogoutUserWithHttpInfo () - { - - var localVarPath = "/user/logout"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - 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("LogoutUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task LogoutUserAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - await LogoutUserWithHttpInfoAsync(cancellationToken); - - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/user/logout"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - 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, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("LogoutUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// - public void UpdateUser (string username, User user) - { - UpdateUserWithHttpInfo(username, user); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// ApiResponse of Object(void) - public ApiResponse UpdateUserWithHttpInfo (string username, User user) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - // verify the required parameter 'user' is set - if (user == null) - throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (user != null && user.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter - } - else - { - localVarPostBody = user; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task UpdateUserAsync (string username, User user, CancellationToken cancellationToken = default(CancellationToken)) - { - await UpdateUserWithHttpInfoAsync(username, user, cancellationToken); - - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync (string username, User user, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - // verify the required parameter 'user' is set - if (user == null) - throw new ApiException(400, "Missing required parameter 'user' when calling UserApi->UpdateUser"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (user != null && user.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(user); // http body (model) parameter - } - else - { - localVarPostBody = user; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs deleted file mode 100644 index 998325f50d8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiClient.cs +++ /dev/null @@ -1,536 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Text.RegularExpressions; -using System.IO; -using System.Threading; -using System.Web; -using System.Linq; -using System.Net; -using System.Text; -using Newtonsoft.Json; -using RestSharp; - -namespace Org.OpenAPITools.Client -{ - /// - /// API client is mainly responsible for making the HTTP call to the API backend. - /// - public partial class ApiClient - { - public JsonSerializerSettings serializerSettings = new JsonSerializerSettings - { - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor - }; - - /// - /// Allows for extending request processing for generated code. - /// - /// The RestSharp request object - partial void InterceptRequest(IRestRequest request); - - /// - /// Allows for extending response processing for generated code. - /// - /// The RestSharp request object - /// The RestSharp response object - partial void InterceptResponse(IRestRequest request, IRestResponse response); - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - public ApiClient() - { - Configuration = Org.OpenAPITools.Client.Configuration.Default; - RestClient = new RestClient("http://petstore.swagger.io:80/v2"); - } - - /// - /// Initializes a new instance of the class - /// with default base path (http://petstore.swagger.io:80/v2). - /// - /// An instance of Configuration. - public ApiClient(Configuration config) - { - Configuration = config ?? Org.OpenAPITools.Client.Configuration.Default; - - RestClient = new RestClient(Configuration.BasePath); - } - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - /// The base path. - public ApiClient(String basePath = "http://petstore.swagger.io:80/v2") - { - if (String.IsNullOrEmpty(basePath)) - throw new ArgumentException("basePath cannot be empty"); - - RestClient = new RestClient(basePath); - Configuration = Client.Configuration.Default; - } - - /// - /// Gets or sets the default API client for making HTTP calls. - /// - /// The default API client. - [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] - public static ApiClient Default; - - /// - /// Gets or sets an instance of the IReadableConfiguration. - /// - /// An instance of the IReadableConfiguration. - /// - /// helps us to avoid modifying possibly global - /// configuration values from within a given client. It does not guarantee thread-safety - /// of the instance in any way. - /// - public IReadableConfiguration Configuration { get; set; } - - /// - /// Gets or sets the RestClient. - /// - /// An instance of the RestClient - public RestClient RestClient { get; set; } - - // Creates and sets up a RestRequest prior to a call. - private RestRequest PrepareRequest( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = new RestRequest(path, method); - - // add path parameter, if any - foreach(var param in pathParams) - request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); - - // add header parameter, if any - foreach(var param in headerParams) - request.AddHeader(param.Key, param.Value); - - // add query parameter, if any - foreach(var param in queryParams) - request.AddQueryParameter(param.Key, param.Value); - - // add form parameter, if any - foreach(var param in formParams) - request.AddParameter(param.Key, param.Value); - - // add file parameter, if any - foreach(var param in fileParams) - { - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); - } - - if (postBody != null) // http body (model or byte[]) parameter - { - request.AddParameter(contentType, postBody, ParameterType.RequestBody); - } - - return request; - } - - /// - /// Makes the HTTP request (Sync). - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content Type of the request - /// Object - public Object CallApi( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - - // set timeout - - RestClient.Timeout = Configuration.Timeout; - // set user agent - RestClient.UserAgent = Configuration.UserAgent; - - InterceptRequest(request); - var response = RestClient.Execute(request); - InterceptResponse(request, response); - - return (Object) response; - } - /// - /// Makes the asynchronous HTTP request. - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content type. - /// Cancellation Token. - /// The Task instance. - public async System.Threading.Tasks.Task CallApiAsync( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType, CancellationToken cancellationToken) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - RestClient.UserAgent = Configuration.UserAgent; - InterceptRequest(request); - var response = await RestClient.ExecuteTaskAsync(request, cancellationToken); - InterceptResponse(request, response); - return (Object)response; - } - - /// - /// Escape string (url-encoded). - /// - /// String to be escaped. - /// Escaped string. - public string EscapeString(string str) - { - return UrlEncode(str); - } - - /// - /// Create FileParameter based on Stream. - /// - /// Parameter name. - /// Input stream. - /// FileParameter. - public FileParameter ParameterToFile(string name, Stream stream) - { - if (stream is FileStream) - return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); - else - return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// Formatted string. - public string ParameterToString(object obj) - { - if (obj is DateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTime)obj).ToString (Configuration.DateTimeFormat); - else if (obj is DateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); - else if (obj is bool) - return (bool)obj ? "true" : "false"; - else if (obj is IList) - { - var flattenedString = new StringBuilder(); - foreach (var param in (IList)obj) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } - else - return Convert.ToString (obj); - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The HTTP response. - /// Object type. - /// Object representation of the JSON string. - public object Deserialize(IRestResponse response, Type type) - { - IList headers = response.Headers; - if (type == typeof(byte[])) // return byte array - { - return response.RawBytes; - } - - // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) - if (type == typeof(Stream)) - { - if (headers != null) - { - var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) - ? Path.GetTempPath() - : Configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); - foreach (var header in headers) - { - var match = regex.Match(header.ToString()); - if (match.Success) - { - string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); - } - } - } - var stream = new MemoryStream(response.RawBytes); - return stream; - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return ConvertType(response.Content, type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Serialize an input (model) into JSON string - /// - /// Object. - /// JSON string. - public String Serialize(object obj) - { - try - { - return obj != null ? JsonConvert.SerializeObject(obj) : null; - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - ///Check if the given MIME is a JSON MIME. - ///JSON MIME examples: - /// application/json - /// application/json; charset=UTF8 - /// APPLICATION/JSON - /// application/vnd.company+json - /// - /// MIME - /// Returns True if MIME type is json. - public bool IsJsonMime(String mime) - { - var jsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); - return mime != null && (jsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json")); - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON type exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public String SelectHeaderContentType(String[] contentTypes) - { - if (contentTypes.Length == 0) - return "application/json"; - - foreach (var contentType in contentTypes) - { - if (IsJsonMime(contentType.ToLower())) - return contentType; - } - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public String SelectHeaderAccept(String[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return String.Join(",", accepts); - } - - /// - /// Encode string in base64 format. - /// - /// String to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Dynamically cast the object into target type. - /// - /// Object to be casted - /// Target type - /// Casted object - public static dynamic ConvertType(dynamic fromObject, Type toObject) - { - return Convert.ChangeType(fromObject, toObject); - } - - /// - /// Convert stream to byte array - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream inputStream) - { - byte[] buf = new byte[16*1024]; - using (MemoryStream ms = new MemoryStream()) - { - int count; - while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) - { - ms.Write(buf, 0, count); - } - return ms.ToArray(); - } - } - - /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 - /// - /// String to be URL encoded - /// Byte array - public static string UrlEncode(string input) - { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); - } - - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - - if (match.Success) - { - return match.Groups[1].Value; - } - else - { - return filename; - } - } - - /// - /// Convert params to key/value pairs. - /// Use collectionFormat to properly format lists and collections. - /// - /// Collection format. - /// Key name. - /// Value object. - /// A list of KeyValuePairs - public IEnumerable> ParameterToKeyValuePairs(string collectionFormat, string name, object value) - { - var parameters = new List>(); - - if (IsCollection(value) && collectionFormat == "multi") - { - var valueCollection = value as IEnumerable; - parameters.AddRange(from object item in valueCollection select new KeyValuePair(name, ParameterToString(item))); - } - else - { - parameters.Add(new KeyValuePair(name, ParameterToString(value))); - } - - return parameters; - } - - /// - /// Check if generic object is a collection. - /// - /// - /// True if object is a collection type - private static bool IsCollection(object value) - { - return value is IList || value is ICollection; - } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiException.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiException.cs deleted file mode 100644 index a5b64c4a01b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiException.cs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; - -namespace Org.OpenAPITools.Client -{ - /// - /// API Exception - /// - public class ApiException : Exception - { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public dynamic ErrorContent { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() {} - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) - { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) - { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiResponse.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiResponse.cs deleted file mode 100644 index fb94571ff88..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ApiResponse.cs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; - -namespace Org.OpenAPITools.Client -{ - /// - /// API Response - /// - public class ApiResponse - { - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - public int StatusCode { get; private set; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public IDictionary Headers { get; private set; } - - /// - /// Gets or sets the data (parsed HTTP body) - /// - /// The data. - public T Data { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - public ApiResponse(int statusCode, IDictionary headers, T data) - { - this.StatusCode= statusCode; - this.Headers = headers; - this.Data = data; - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/Configuration.cs deleted file mode 100644 index 1e8f6e69dbd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/Configuration.cs +++ /dev/null @@ -1,452 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Reflection; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents a set of configuration settings - /// - public class Configuration : IReadableConfiguration - { - #region Constants - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "1.0.0"; - - /// - /// Identifier for ISO 8601 DateTime Format - /// - /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. - // ReSharper disable once InconsistentNaming - public const string ISO8601_DATETIME_FORMAT = "o"; - - #endregion Constants - - #region Static Members - - private static readonly object GlobalConfigSync = new { }; - private static Configuration _globalConfiguration; - - /// - /// Default creation of exceptions for a given method name and response object - /// - public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => - { - var status = (int)response.StatusCode; - if (status >= 400) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.Content), - response.Content); - } - if (status == 0) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage); - } - return null; - }; - - /// - /// Gets or sets the default Configuration. - /// - /// Configuration. - public static Configuration Default - { - get { return _globalConfiguration; } - set - { - lock (GlobalConfigSync) - { - _globalConfiguration = value; - } - } - } - - #endregion Static Members - - #region Private Members - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - private IDictionary _apiKey = null; - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - private IDictionary _apiKeyPrefix = null; - - private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - private string _tempFolderPath = Path.GetTempPath(); - - #endregion Private Members - - #region Constructors - - static Configuration() - { - _globalConfiguration = new GlobalConfiguration(); - } - - /// - /// Initializes a new instance of the class - /// - public Configuration() - { - UserAgent = "OpenAPI-Generator/1.0.0/csharp"; - BasePath = "http://petstore.swagger.io:80/v2"; - DefaultHeader = new ConcurrentDictionary(); - ApiKey = new ConcurrentDictionary(); - ApiKeyPrefix = new ConcurrentDictionary(); - - // Setting Timeout has side effects (forces ApiClient creation). - Timeout = 100000; - } - - /// - /// Initializes a new instance of the class - /// - public Configuration( - IDictionary defaultHeader, - IDictionary apiKey, - IDictionary apiKeyPrefix, - string basePath = "http://petstore.swagger.io:80/v2") : this() - { - if (string.IsNullOrWhiteSpace(basePath)) - throw new ArgumentException("The provided basePath is invalid.", "basePath"); - if (defaultHeader == null) - throw new ArgumentNullException("defaultHeader"); - if (apiKey == null) - throw new ArgumentNullException("apiKey"); - if (apiKeyPrefix == null) - throw new ArgumentNullException("apiKeyPrefix"); - - BasePath = basePath; - - foreach (var keyValuePair in defaultHeader) - { - DefaultHeader.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKey) - { - ApiKey.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKeyPrefix) - { - ApiKeyPrefix.Add(keyValuePair); - } - } - - /// - /// Initializes a new instance of the class with different settings - /// - /// Api client - /// Dictionary of default HTTP header - /// Username - /// Password - /// accessToken - /// Dictionary of API key - /// Dictionary of API key prefix - /// Temp folder path - /// DateTime format string - /// HTTP connection timeout (in milliseconds) - /// HTTP user agent - [Obsolete("Use explicit object construction and setting of properties.", true)] - public Configuration( - // ReSharper disable UnusedParameter.Local - ApiClient apiClient = null, - IDictionary defaultHeader = null, - string username = null, - string password = null, - string accessToken = null, - IDictionary apiKey = null, - IDictionary apiKeyPrefix = null, - string tempFolderPath = null, - string dateTimeFormat = null, - int timeout = 100000, - string userAgent = "OpenAPI-Generator/1.0.0/csharp" - // ReSharper restore UnusedParameter.Local - ) - { - - } - - /// - /// Initializes a new instance of the Configuration class. - /// - /// Api client. - [Obsolete("This constructor caused unexpected sharing of static data. It is no longer supported.", true)] - // ReSharper disable once UnusedParameter.Local - public Configuration(ApiClient apiClient) - { - - } - - #endregion Constructors - - - #region Properties - - private ApiClient _apiClient = null; - /// - /// Gets an instance of an ApiClient for this configuration - /// - public virtual ApiClient ApiClient - { - get - { - if (_apiClient == null) _apiClient = CreateApiClient(); - return _apiClient; - } - } - - private String _basePath = null; - /// - /// Gets or sets the base path for API access. - /// - public virtual string BasePath { - get { return _basePath; } - set { - _basePath = value; - // pass-through to ApiClient if it's set. - if(_apiClient != null) { - _apiClient.RestClient.BaseUrl = new Uri(_basePath); - } - } - } - - /// - /// Gets or sets the default header. - /// - public virtual IDictionary DefaultHeader { get; set; } - - /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. - /// - public virtual int Timeout - { - - get { return ApiClient.RestClient.Timeout; } - set { ApiClient.RestClient.Timeout = value; } - } - - /// - /// Gets or sets the HTTP user agent. - /// - /// Http user agent. - public virtual string UserAgent { get; set; } - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public virtual string Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public virtual string Password { get; set; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix(string apiKeyIdentifier) - { - var apiKeyValue = ""; - ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); - var apiKeyPrefix = ""; - if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) - return apiKeyPrefix + " " + apiKeyValue; - else - return apiKeyValue; - } - - /// - /// Gets or sets the access token for OAuth2 authentication. - /// - /// The access token. - public virtual string AccessToken { get; set; } - - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public virtual string TempFolderPath - { - get { return _tempFolderPath; } - - set - { - if (string.IsNullOrEmpty(value)) - { - _tempFolderPath = Path.GetTempPath(); - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - { - Directory.CreateDirectory(value); - } - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - { - _tempFolderPath = value; - } - else - { - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - } - - /// - /// Gets or sets the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public virtual string DateTimeFormat - { - get { return _dateTimeFormat; } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - public virtual IDictionary ApiKeyPrefix - { - get { return _apiKeyPrefix; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); - } - _apiKeyPrefix = value; - } - } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public virtual IDictionary ApiKey - { - get { return _apiKey; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKey collection may not be null."); - } - _apiKey = value; - } - } - - #endregion Properties - - #region Methods - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - public void AddDefaultHeader(string key, string value) - { - DefaultHeader[key] = value; - } - - /// - /// Creates a new based on this instance. - /// - /// - public ApiClient CreateApiClient() - { - return new ApiClient(BasePath) { Configuration = this }; - } - - - /// - /// Returns a string with essential information for debugging. - /// - public static String ToDebugReport() - { - String report = "C# SDK (Org.OpenAPITools) Debug Report:\n"; - report += " OS: " + System.Environment.OSVersion + "\n"; - report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 1.0.0\n"; - report += " SDK Package Version: 1.0.0\n"; - - return report; - } - - /// - /// Add Api Key Header. - /// - /// Api Key name. - /// Api Key value. - /// - public void AddApiKey(string key, string value) - { - ApiKey[key] = value; - } - - /// - /// Sets the API key prefix. - /// - /// Api Key name. - /// Api Key value. - public void AddApiKeyPrefix(string key, string value) - { - ApiKeyPrefix[key] = value; - } - - #endregion Methods - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ExceptionFactory.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ExceptionFactory.cs deleted file mode 100644 index d6568601447..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/ExceptionFactory.cs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using RestSharp; - -namespace Org.OpenAPITools.Client -{ - /// - /// A delegate to ExceptionFactory method - /// - /// Method name - /// Response - /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/GlobalConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/GlobalConfiguration.cs deleted file mode 100644 index c6e89f899eb..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/GlobalConfiguration.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Reflection; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; - -namespace Org.OpenAPITools.Client -{ - /// - /// provides a compile-time extension point for globally configuring - /// API Clients. - /// - /// - /// A customized implementation via partial class may reside in another file and may - /// be excluded from automatic generation via a .openapi-generator-ignore file. - /// - public partial class GlobalConfiguration : Configuration - { - - } -} \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/IApiAccessor.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/IApiAccessor.cs deleted file mode 100644 index d90054abb90..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/IApiAccessor.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents configuration aspects required to interact with the API endpoints. - /// - public interface IApiAccessor - { - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - Configuration Configuration {get; set;} - - /// - /// Gets the base path of the API client. - /// - /// The base path - String GetBasePath(); - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - ExceptionFactory ExceptionFactory { get; set; } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/IReadableConfiguration.cs deleted file mode 100644 index 592c7ba3a09..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System.Collections.Generic; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents a readable-only configuration contract. - /// - public interface IReadableConfiguration - { - /// - /// Gets the access token. - /// - /// Access token. - string AccessToken { get; } - - /// - /// Gets the API key. - /// - /// API key. - IDictionary ApiKey { get; } - - /// - /// Gets the API key prefix. - /// - /// API key prefix. - IDictionary ApiKeyPrefix { get; } - - /// - /// Gets the base path. - /// - /// Base path. - string BasePath { get; } - - /// - /// Gets the date time format. - /// - /// Date time format. - string DateTimeFormat { get; } - - /// - /// Gets the default header. - /// - /// Default header. - IDictionary DefaultHeader { get; } - - /// - /// Gets the temp folder path. - /// - /// Temp folder path. - string TempFolderPath { get; } - - /// - /// Gets the HTTP connection timeout (in milliseconds) - /// - /// HTTP connection timeout. - int Timeout { get; } - - /// - /// Gets the user agent. - /// - /// User agent. - string UserAgent { get; } - - /// - /// Gets the username. - /// - /// Username. - string Username { get; } - - /// - /// Gets the password. - /// - /// Password. - string Password { get; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - string GetApiKeyWithPrefix(string apiKeyIdentifier); - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs deleted file mode 100644 index 980c7b7e51b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using Newtonsoft.Json.Converters; - -namespace Org.OpenAPITools.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public OpenAPIDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs deleted file mode 100644 index acdc11b54b7..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesAnyType - /// - [DataContract] - public partial class AdditionalPropertiesAnyType : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesAnyType(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesAnyType {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesAnyType); - } - - /// - /// Returns true if AdditionalPropertiesAnyType instances are equal - /// - /// Instance of AdditionalPropertiesAnyType to be compared - /// Boolean - public bool Equals(AdditionalPropertiesAnyType input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs deleted file mode 100644 index f317c15537a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesArray - /// - [DataContract] - public partial class AdditionalPropertiesArray : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesArray(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesArray {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesArray); - } - - /// - /// Returns true if AdditionalPropertiesArray instances are equal - /// - /// Instance of AdditionalPropertiesArray to be compared - /// Boolean - public bool Equals(AdditionalPropertiesArray input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs deleted file mode 100644 index 239289ffaba..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesBoolean - /// - [DataContract] - public partial class AdditionalPropertiesBoolean : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesBoolean(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesBoolean {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesBoolean); - } - - /// - /// Returns true if AdditionalPropertiesBoolean instances are equal - /// - /// Instance of AdditionalPropertiesBoolean to be compared - /// Boolean - public bool Equals(AdditionalPropertiesBoolean input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs deleted file mode 100644 index 2d16dc15d37..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ /dev/null @@ -1,142 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesClass - /// - [DataContract] - public partial class AdditionalPropertiesClass : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// mapProperty. - /// mapOfMapProperty. - public AdditionalPropertiesClass(Dictionary mapProperty = default(Dictionary), Dictionary> mapOfMapProperty = default(Dictionary>)) - { - this.MapProperty = mapProperty; - this.MapOfMapProperty = mapOfMapProperty; - } - - /// - /// Gets or Sets MapProperty - /// - [DataMember(Name="map_property", EmitDefaultValue=false)] - public Dictionary MapProperty { get; set; } - - /// - /// Gets or Sets MapOfMapProperty - /// - [DataMember(Name="map_of_map_property", EmitDefaultValue=false)] - public Dictionary> MapOfMapProperty { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapProperty: ").Append(MapProperty).Append("\n"); - sb.Append(" MapOfMapProperty: ").Append(MapOfMapProperty).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesClass); - } - - /// - /// Returns true if AdditionalPropertiesClass instances are equal - /// - /// Instance of AdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(AdditionalPropertiesClass input) - { - if (input == null) - return false; - - return - ( - this.MapProperty == input.MapProperty || - this.MapProperty != null && - input.MapProperty != null && - this.MapProperty.SequenceEqual(input.MapProperty) - ) && - ( - this.MapOfMapProperty == input.MapOfMapProperty || - this.MapOfMapProperty != null && - input.MapOfMapProperty != null && - this.MapOfMapProperty.SequenceEqual(input.MapOfMapProperty) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapProperty != null) - hashCode = hashCode * 59 + this.MapProperty.GetHashCode(); - if (this.MapOfMapProperty != null) - hashCode = hashCode * 59 + this.MapOfMapProperty.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs deleted file mode 100644 index c714e994e26..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesInteger - /// - [DataContract] - public partial class AdditionalPropertiesInteger : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesInteger(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesInteger {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesInteger); - } - - /// - /// Returns true if AdditionalPropertiesInteger instances are equal - /// - /// Instance of AdditionalPropertiesInteger to be compared - /// Boolean - public bool Equals(AdditionalPropertiesInteger input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs deleted file mode 100644 index d727b2f68f1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesNumber - /// - [DataContract] - public partial class AdditionalPropertiesNumber : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesNumber(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesNumber {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesNumber); - } - - /// - /// Returns true if AdditionalPropertiesNumber instances are equal - /// - /// Instance of AdditionalPropertiesNumber to be compared - /// Boolean - public bool Equals(AdditionalPropertiesNumber input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs deleted file mode 100644 index cb6e05daeb5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesObject - /// - [DataContract] - public partial class AdditionalPropertiesObject : Dictionary>, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesObject(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesObject {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesObject); - } - - /// - /// Returns true if AdditionalPropertiesObject instances are equal - /// - /// Instance of AdditionalPropertiesObject to be compared - /// Boolean - public bool Equals(AdditionalPropertiesObject input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs deleted file mode 100644 index 677c32fde05..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesString - /// - [DataContract] - public partial class AdditionalPropertiesString : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesString(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesString {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesString); - } - - /// - /// Returns true if AdditionalPropertiesString instances are equal - /// - /// Instance of AdditionalPropertiesString to be compared - /// Boolean - public bool Equals(AdditionalPropertiesString input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AllOfWithSingleRef.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AllOfWithSingleRef.cs deleted file mode 100644 index 1cce653b433..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/AllOfWithSingleRef.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AllOfWithSingleRef - /// - [DataContract] - public partial class AllOfWithSingleRef : IEquatable, IValidatableObject - { - /// - /// Gets or Sets SingleRefType - /// - [DataMember(Name="SingleRefType", EmitDefaultValue=false)] - public SingleRefType? SingleRefType { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// username. - /// singleRefType. - public AllOfWithSingleRef(string username = default(string), SingleRefType? singleRefType = default(SingleRefType?)) - { - this.Username = username; - this.SingleRefType = singleRefType; - } - - /// - /// Gets or Sets Username - /// - [DataMember(Name="username", EmitDefaultValue=false)] - public string Username { get; set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AllOfWithSingleRef {\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" SingleRefType: ").Append(SingleRefType).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AllOfWithSingleRef); - } - - /// - /// Returns true if AllOfWithSingleRef instances are equal - /// - /// Instance of AllOfWithSingleRef to be compared - /// Boolean - public bool Equals(AllOfWithSingleRef input) - { - if (input == null) - return false; - - return - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ) && - ( - this.SingleRefType == input.SingleRefType || - (this.SingleRefType != null && - this.SingleRefType.Equals(input.SingleRefType)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Username != null) - hashCode = hashCode * 59 + this.Username.GetHashCode(); - if (this.SingleRefType != null) - hashCode = hashCode * 59 + this.SingleRefType.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs deleted file mode 100644 index d06c695fa6a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Animal.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Animal - /// - [DataContract] - [JsonConverter(typeof(JsonSubtypes), "className")] - [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] - [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] - public partial class Animal : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Animal() { } - /// - /// Initializes a new instance of the class. - /// - /// className (required). - /// color (default to "red"). - public Animal(string className = default(string), string color = "red") - { - // to ensure "className" is required (not null) - if (className == null) - { - throw new InvalidDataException("className is a required property for Animal and cannot be null"); - } - else - { - this.ClassName = className; - } - - // use default value if no "color" provided - if (color == null) - { - this.Color = "red"; - } - else - { - this.Color = color; - } - } - - /// - /// Gets or Sets ClassName - /// - [DataMember(Name="className", EmitDefaultValue=true)] - public string ClassName { get; set; } - - /// - /// Gets or Sets Color - /// - [DataMember(Name="color", EmitDefaultValue=false)] - public string Color { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Animal {\n"); - sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Animal); - } - - /// - /// Returns true if Animal instances are equal - /// - /// Instance of Animal to be compared - /// Boolean - public bool Equals(Animal input) - { - if (input == null) - return false; - - return - ( - this.ClassName == input.ClassName || - (this.ClassName != null && - this.ClassName.Equals(input.ClassName)) - ) && - ( - this.Color == input.Color || - (this.Color != null && - this.Color.Equals(input.Color)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - hashCode = hashCode * 59 + this.ClassName.GetHashCode(); - if (this.Color != null) - hashCode = hashCode * 59 + this.Color.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ApiResponse.cs deleted file mode 100644 index 005bd4a02e4..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ApiResponse.cs +++ /dev/null @@ -1,156 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ApiResponse - /// - [DataContract] - public partial class ApiResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// code. - /// type. - /// message. - public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) - { - this.Code = code; - this.Type = type; - this.Message = message; - } - - /// - /// Gets or Sets Code - /// - [DataMember(Name="code", EmitDefaultValue=false)] - public int Code { get; set; } - - /// - /// Gets or Sets Type - /// - [DataMember(Name="type", EmitDefaultValue=false)] - public string Type { get; set; } - - /// - /// Gets or Sets Message - /// - [DataMember(Name="message", EmitDefaultValue=false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ApiResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApiResponse); - } - - /// - /// Returns true if ApiResponse instances are equal - /// - /// Instance of ApiResponse to be compared - /// Boolean - public bool Equals(ApiResponse input) - { - if (input == null) - return false; - - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - hashCode = hashCode * 59 + this.Code.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs deleted file mode 100644 index 813816bfd4e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ArrayOfArrayOfNumberOnly - /// - [DataContract] - public partial class ArrayOfArrayOfNumberOnly : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// arrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) - { - this.ArrayArrayNumber = arrayArrayNumber; - } - - /// - /// Gets or Sets ArrayArrayNumber - /// - [DataMember(Name="ArrayArrayNumber", EmitDefaultValue=false)] - public List> ArrayArrayNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayOfArrayOfNumberOnly {\n"); - sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayOfArrayOfNumberOnly); - } - - /// - /// Returns true if ArrayOfArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfArrayOfNumberOnly input) - { - if (input == null) - return false; - - return - ( - this.ArrayArrayNumber == input.ArrayArrayNumber || - this.ArrayArrayNumber != null && - input.ArrayArrayNumber != null && - this.ArrayArrayNumber.SequenceEqual(input.ArrayArrayNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayArrayNumber != null) - hashCode = hashCode * 59 + this.ArrayArrayNumber.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs deleted file mode 100644 index 82f394b79d3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ArrayOfNumberOnly - /// - [DataContract] - public partial class ArrayOfNumberOnly : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// arrayNumber. - public ArrayOfNumberOnly(List arrayNumber = default(List)) - { - this.ArrayNumber = arrayNumber; - } - - /// - /// Gets or Sets ArrayNumber - /// - [DataMember(Name="ArrayNumber", EmitDefaultValue=false)] - public List ArrayNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayOfNumberOnly {\n"); - sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayOfNumberOnly); - } - - /// - /// Returns true if ArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfNumberOnly input) - { - if (input == null) - return false; - - return - ( - this.ArrayNumber == input.ArrayNumber || - this.ArrayNumber != null && - input.ArrayNumber != null && - this.ArrayNumber.SequenceEqual(input.ArrayNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayNumber != null) - hashCode = hashCode * 59 + this.ArrayNumber.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs deleted file mode 100644 index 3c47853b69b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ArrayTest.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ArrayTest - /// - [DataContract] - public partial class ArrayTest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// arrayOfString. - /// arrayArrayOfInteger. - /// arrayArrayOfModel. - public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) - { - this.ArrayOfString = arrayOfString; - this.ArrayArrayOfInteger = arrayArrayOfInteger; - this.ArrayArrayOfModel = arrayArrayOfModel; - } - - /// - /// Gets or Sets ArrayOfString - /// - [DataMember(Name="array_of_string", EmitDefaultValue=false)] - public List ArrayOfString { get; set; } - - /// - /// Gets or Sets ArrayArrayOfInteger - /// - [DataMember(Name="array_array_of_integer", EmitDefaultValue=false)] - public List> ArrayArrayOfInteger { get; set; } - - /// - /// Gets or Sets ArrayArrayOfModel - /// - [DataMember(Name="array_array_of_model", EmitDefaultValue=false)] - public List> ArrayArrayOfModel { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); - sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); - sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayTest); - } - - /// - /// Returns true if ArrayTest instances are equal - /// - /// Instance of ArrayTest to be compared - /// Boolean - public bool Equals(ArrayTest input) - { - if (input == null) - return false; - - return - ( - this.ArrayOfString == input.ArrayOfString || - this.ArrayOfString != null && - input.ArrayOfString != null && - this.ArrayOfString.SequenceEqual(input.ArrayOfString) - ) && - ( - this.ArrayArrayOfInteger == input.ArrayArrayOfInteger || - this.ArrayArrayOfInteger != null && - input.ArrayArrayOfInteger != null && - this.ArrayArrayOfInteger.SequenceEqual(input.ArrayArrayOfInteger) - ) && - ( - this.ArrayArrayOfModel == input.ArrayArrayOfModel || - this.ArrayArrayOfModel != null && - input.ArrayArrayOfModel != null && - this.ArrayArrayOfModel.SequenceEqual(input.ArrayArrayOfModel) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayOfString != null) - hashCode = hashCode * 59 + this.ArrayOfString.GetHashCode(); - if (this.ArrayArrayOfInteger != null) - hashCode = hashCode * 59 + this.ArrayArrayOfInteger.GetHashCode(); - if (this.ArrayArrayOfModel != null) - hashCode = hashCode * 59 + this.ArrayArrayOfModel.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - - - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/BigCat.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/BigCat.cs deleted file mode 100644 index ffdab926c34..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/BigCat.cs +++ /dev/null @@ -1,163 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// BigCat - /// - [DataContract] - public partial class BigCat : Cat, IEquatable, IValidatableObject - { - /// - /// Defines Kind - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum KindEnum - { - /// - /// Enum Lions for value: lions - /// - [EnumMember(Value = "lions")] - Lions = 1, - - /// - /// Enum Tigers for value: tigers - /// - [EnumMember(Value = "tigers")] - Tigers = 2, - - /// - /// Enum Leopards for value: leopards - /// - [EnumMember(Value = "leopards")] - Leopards = 3, - - /// - /// Enum Jaguars for value: jaguars - /// - [EnumMember(Value = "jaguars")] - Jaguars = 4 - - } - - /// - /// Gets or Sets Kind - /// - [DataMember(Name="kind", EmitDefaultValue=false)] - public KindEnum? Kind { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BigCat() { } - /// - /// Initializes a new instance of the class. - /// - /// kind. - public BigCat(KindEnum? kind = default(KindEnum?), string className = default(string), string color = "red", bool declawed = default(bool)) : base(declawed) - { - this.Kind = kind; - } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BigCat {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Kind: ").Append(Kind).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BigCat); - } - - /// - /// Returns true if BigCat instances are equal - /// - /// Instance of BigCat to be compared - /// Boolean - public bool Equals(BigCat input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Kind == input.Kind || - (this.Kind != null && - this.Kind.Equals(input.Kind)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Kind != null) - hashCode = hashCode * 59 + this.Kind.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/BigCatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/BigCatAllOf.cs deleted file mode 100644 index 79871b557ba..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/BigCatAllOf.cs +++ /dev/null @@ -1,156 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// BigCatAllOf - /// - [DataContract] - public partial class BigCatAllOf : IEquatable, IValidatableObject - { - /// - /// Defines Kind - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum KindEnum - { - /// - /// Enum Lions for value: lions - /// - [EnumMember(Value = "lions")] - Lions = 1, - - /// - /// Enum Tigers for value: tigers - /// - [EnumMember(Value = "tigers")] - Tigers = 2, - - /// - /// Enum Leopards for value: leopards - /// - [EnumMember(Value = "leopards")] - Leopards = 3, - - /// - /// Enum Jaguars for value: jaguars - /// - [EnumMember(Value = "jaguars")] - Jaguars = 4 - - } - - /// - /// Gets or Sets Kind - /// - [DataMember(Name="kind", EmitDefaultValue=false)] - public KindEnum? Kind { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// kind. - public BigCatAllOf(KindEnum? kind = default(KindEnum?)) - { - this.Kind = kind; - } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BigCatAllOf {\n"); - sb.Append(" Kind: ").Append(Kind).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BigCatAllOf); - } - - /// - /// Returns true if BigCatAllOf instances are equal - /// - /// Instance of BigCatAllOf to be compared - /// Boolean - public bool Equals(BigCatAllOf input) - { - if (input == null) - return false; - - return - ( - this.Kind == input.Kind || - (this.Kind != null && - this.Kind.Equals(input.Kind)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Kind != null) - hashCode = hashCode * 59 + this.Kind.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Capitalization.cs deleted file mode 100644 index 36d66776d94..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Capitalization.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Capitalization - /// - [DataContract] - public partial class Capitalization : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// smallCamel. - /// capitalCamel. - /// smallSnake. - /// capitalSnake. - /// sCAETHFlowPoints. - /// Name of the pet . - public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) - { - this.SmallCamel = smallCamel; - this.CapitalCamel = capitalCamel; - this.SmallSnake = smallSnake; - this.CapitalSnake = capitalSnake; - this.SCAETHFlowPoints = sCAETHFlowPoints; - this.ATT_NAME = aTTNAME; - } - - /// - /// Gets or Sets SmallCamel - /// - [DataMember(Name="smallCamel", EmitDefaultValue=false)] - public string SmallCamel { get; set; } - - /// - /// Gets or Sets CapitalCamel - /// - [DataMember(Name="CapitalCamel", EmitDefaultValue=false)] - public string CapitalCamel { get; set; } - - /// - /// Gets or Sets SmallSnake - /// - [DataMember(Name="small_Snake", EmitDefaultValue=false)] - public string SmallSnake { get; set; } - - /// - /// Gets or Sets CapitalSnake - /// - [DataMember(Name="Capital_Snake", EmitDefaultValue=false)] - public string CapitalSnake { get; set; } - - /// - /// Gets or Sets SCAETHFlowPoints - /// - [DataMember(Name="SCA_ETH_Flow_Points", EmitDefaultValue=false)] - public string SCAETHFlowPoints { get; set; } - - /// - /// Name of the pet - /// - /// Name of the pet - [DataMember(Name="ATT_NAME", EmitDefaultValue=false)] - public string ATT_NAME { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); - sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); - sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); - sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Capitalization); - } - - /// - /// Returns true if Capitalization instances are equal - /// - /// Instance of Capitalization to be compared - /// Boolean - public bool Equals(Capitalization input) - { - if (input == null) - return false; - - return - ( - this.SmallCamel == input.SmallCamel || - (this.SmallCamel != null && - this.SmallCamel.Equals(input.SmallCamel)) - ) && - ( - this.CapitalCamel == input.CapitalCamel || - (this.CapitalCamel != null && - this.CapitalCamel.Equals(input.CapitalCamel)) - ) && - ( - this.SmallSnake == input.SmallSnake || - (this.SmallSnake != null && - this.SmallSnake.Equals(input.SmallSnake)) - ) && - ( - this.CapitalSnake == input.CapitalSnake || - (this.CapitalSnake != null && - this.CapitalSnake.Equals(input.CapitalSnake)) - ) && - ( - this.SCAETHFlowPoints == input.SCAETHFlowPoints || - (this.SCAETHFlowPoints != null && - this.SCAETHFlowPoints.Equals(input.SCAETHFlowPoints)) - ) && - ( - this.ATT_NAME == input.ATT_NAME || - (this.ATT_NAME != null && - this.ATT_NAME.Equals(input.ATT_NAME)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SmallCamel != null) - hashCode = hashCode * 59 + this.SmallCamel.GetHashCode(); - if (this.CapitalCamel != null) - hashCode = hashCode * 59 + this.CapitalCamel.GetHashCode(); - if (this.SmallSnake != null) - hashCode = hashCode * 59 + this.SmallSnake.GetHashCode(); - if (this.CapitalSnake != null) - hashCode = hashCode * 59 + this.CapitalSnake.GetHashCode(); - if (this.SCAETHFlowPoints != null) - hashCode = hashCode * 59 + this.SCAETHFlowPoints.GetHashCode(); - if (this.ATT_NAME != null) - hashCode = hashCode * 59 + this.ATT_NAME.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Cat.cs deleted file mode 100644 index 3110e4e5fe0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Cat.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Cat - /// - [DataContract] - public partial class Cat : Animal, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Cat() { } - /// - /// Initializes a new instance of the class. - /// - /// declawed. - public Cat(bool declawed = default(bool), string className = "Cat", string color = "red") : base(className, color) - { - this.Declawed = declawed; - } - - /// - /// Gets or Sets Declawed - /// - [DataMember(Name="declawed", EmitDefaultValue=false)] - public bool Declawed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Cat {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Cat); - } - - /// - /// Returns true if Cat instances are equal - /// - /// Instance of Cat to be compared - /// Boolean - public bool Equals(Cat input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Declawed == input.Declawed || - (this.Declawed != null && - this.Declawed.Equals(input.Declawed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Declawed != null) - hashCode = hashCode * 59 + this.Declawed.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/CatAllOf.cs deleted file mode 100644 index c3fe1492598..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/CatAllOf.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// CatAllOf - /// - [DataContract] - public partial class CatAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// declawed. - public CatAllOf(bool declawed = default(bool)) - { - this.Declawed = declawed; - } - - /// - /// Gets or Sets Declawed - /// - [DataMember(Name="declawed", EmitDefaultValue=false)] - public bool Declawed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class CatAllOf {\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CatAllOf); - } - - /// - /// Returns true if CatAllOf instances are equal - /// - /// Instance of CatAllOf to be compared - /// Boolean - public bool Equals(CatAllOf input) - { - if (input == null) - return false; - - return - ( - this.Declawed == input.Declawed || - (this.Declawed != null && - this.Declawed.Equals(input.Declawed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Declawed != null) - hashCode = hashCode * 59 + this.Declawed.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs deleted file mode 100644 index c3a932a3d33..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Category.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Category - /// - [DataContract] - public partial class Category : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Category() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required) (default to "default-name"). - 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; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Category); - } - - /// - /// Returns true if Category instances are equal - /// - /// Instance of Category to be compared - /// Boolean - public bool Equals(Category input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ClassModel.cs deleted file mode 100644 index 0d92bb7de97..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ClassModel.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing model with \"_class\" property - /// - [DataContract] - public partial class ClassModel : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// varClass. - public ClassModel(string varClass = default(string)) - { - this.VarClass = varClass; - } - - /// - /// Gets or Sets VarClass - /// - [DataMember(Name="_class", EmitDefaultValue=false)] - public string VarClass { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ClassModel {\n"); - sb.Append(" VarClass: ").Append(VarClass).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ClassModel); - } - - /// - /// Returns true if ClassModel instances are equal - /// - /// Instance of ClassModel to be compared - /// Boolean - public bool Equals(ClassModel input) - { - if (input == null) - return false; - - return - ( - this.VarClass == input.VarClass || - (this.VarClass != null && - this.VarClass.Equals(input.VarClass)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarClass != null) - hashCode = hashCode * 59 + this.VarClass.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/DeprecatedObject.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/DeprecatedObject.cs deleted file mode 100644 index c87a1aa3007..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/DeprecatedObject.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// DeprecatedObject - /// - [DataContract] - public partial class DeprecatedObject : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public DeprecatedObject(string name = default(string)) - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class DeprecatedObject {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DeprecatedObject); - } - - /// - /// Returns true if DeprecatedObject instances are equal - /// - /// Instance of DeprecatedObject to be compared - /// Boolean - public bool Equals(DeprecatedObject input) - { - if (input == null) - return false; - - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Dog.cs deleted file mode 100644 index 9abd21610ac..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Dog.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Dog - /// - [DataContract] - public partial class Dog : Animal, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Dog() { } - /// - /// Initializes a new instance of the class. - /// - /// breed. - public Dog(string breed = default(string), string className = "Dog", string color = "red") : base(className, color) - { - this.Breed = breed; - } - - /// - /// Gets or Sets Breed - /// - [DataMember(Name="breed", EmitDefaultValue=false)] - public string Breed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Dog {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Dog); - } - - /// - /// Returns true if Dog instances are equal - /// - /// Instance of Dog to be compared - /// Boolean - public bool Equals(Dog input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Breed == input.Breed || - (this.Breed != null && - this.Breed.Equals(input.Breed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Breed != null) - hashCode = hashCode * 59 + this.Breed.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/DogAllOf.cs deleted file mode 100644 index 739a369b5c3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/DogAllOf.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// DogAllOf - /// - [DataContract] - public partial class DogAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// breed. - public DogAllOf(string breed = default(string)) - { - this.Breed = breed; - } - - /// - /// Gets or Sets Breed - /// - [DataMember(Name="breed", EmitDefaultValue=false)] - public string Breed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class DogAllOf {\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DogAllOf); - } - - /// - /// Returns true if DogAllOf instances are equal - /// - /// Instance of DogAllOf to be compared - /// Boolean - public bool Equals(DogAllOf input) - { - if (input == null) - return false; - - return - ( - this.Breed == input.Breed || - (this.Breed != null && - this.Breed.Equals(input.Breed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Breed != null) - hashCode = hashCode * 59 + this.Breed.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumArrays.cs deleted file mode 100644 index a7d37ba157d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumArrays.cs +++ /dev/null @@ -1,181 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// EnumArrays - /// - [DataContract] - public partial class EnumArrays : IEquatable, IValidatableObject - { - /// - /// Defines JustSymbol - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum JustSymbolEnum - { - /// - /// Enum GreaterThanOrEqualTo for value: >= - /// - [EnumMember(Value = ">=")] - GreaterThanOrEqualTo = 1, - - /// - /// Enum Dollar for value: $ - /// - [EnumMember(Value = "$")] - Dollar = 2 - - } - - /// - /// Gets or Sets JustSymbol - /// - [DataMember(Name="just_symbol", EmitDefaultValue=false)] - public JustSymbolEnum? JustSymbol { get; set; } - /// - /// Defines ArrayEnum - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ArrayEnumEnum - { - /// - /// Enum Fish for value: fish - /// - [EnumMember(Value = "fish")] - Fish = 1, - - /// - /// Enum Crab for value: crab - /// - [EnumMember(Value = "crab")] - Crab = 2 - - } - - /// - /// Initializes a new instance of the class. - /// - /// justSymbol. - /// arrayEnum. - public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) - { - this.JustSymbol = justSymbol; - this.ArrayEnum = arrayEnum; - } - - - /// - /// Gets or Sets ArrayEnum - /// - [DataMember(Name="array_enum", EmitDefaultValue=false)] - public List ArrayEnum { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); - sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EnumArrays); - } - - /// - /// Returns true if EnumArrays instances are equal - /// - /// Instance of EnumArrays to be compared - /// Boolean - public bool Equals(EnumArrays input) - { - if (input == null) - return false; - - return - ( - this.JustSymbol == input.JustSymbol || - (this.JustSymbol != null && - this.JustSymbol.Equals(input.JustSymbol)) - ) && - ( - this.ArrayEnum == input.ArrayEnum || - this.ArrayEnum != null && - input.ArrayEnum != null && - this.ArrayEnum.SequenceEqual(input.ArrayEnum) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.JustSymbol != null) - hashCode = hashCode * 59 + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) - hashCode = hashCode * 59 + this.ArrayEnum.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumClass.cs deleted file mode 100644 index ad200741d0e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumClass.cs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Defines EnumClass - /// - - [JsonConverter(typeof(StringEnumConverter))] - - public enum EnumClass - { - /// - /// Enum Abc for value: _abc - /// - [EnumMember(Value = "_abc")] - Abc = 1, - - /// - /// Enum Efg for value: -efg - /// - [EnumMember(Value = "-efg")] - Efg = 2, - - /// - /// Enum Xyz for value: (xyz) - /// - [EnumMember(Value = "(xyz)")] - Xyz = 3 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs deleted file mode 100644 index 01653fc97a6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/EnumTest.cs +++ /dev/null @@ -1,340 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// EnumTest - /// - [DataContract] - public partial class EnumTest : IEquatable, IValidatableObject - { - /// - /// Defines EnumString - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumStringEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumString - /// - [DataMember(Name="enum_string", EmitDefaultValue=false)] - public EnumStringEnum? EnumString { get; set; } - /// - /// Defines EnumStringRequired - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumStringRequiredEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumStringRequired - /// - [DataMember(Name="enum_string_required", EmitDefaultValue=true)] - public EnumStringRequiredEnum EnumStringRequired { get; set; } - /// - /// Defines EnumInteger - /// - public enum EnumIntegerEnum - { - /// - /// Enum NUMBER_1 for value: 1 - /// - NUMBER_1 = 1, - - /// - /// Enum NUMBER_MINUS_1 for value: -1 - /// - NUMBER_MINUS_1 = -1 - - } - - /// - /// Gets or Sets EnumInteger - /// - [DataMember(Name="enum_integer", EmitDefaultValue=false)] - public EnumIntegerEnum? EnumInteger { get; set; } - /// - /// Defines EnumNumber - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumNumberEnum - { - /// - /// Enum NUMBER_1_DOT_1 for value: 1.1 - /// - [EnumMember(Value = "1.1")] - NUMBER_1_DOT_1 = 1, - - /// - /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2 - /// - [EnumMember(Value = "-1.2")] - NUMBER_MINUS_1_DOT_2 = 2 - - } - - /// - /// Gets or Sets EnumNumber - /// - [DataMember(Name="enum_number", EmitDefaultValue=false)] - public EnumNumberEnum? EnumNumber { get; set; } - /// - /// Gets or Sets OuterEnum - /// - [DataMember(Name="outerEnum", EmitDefaultValue=true)] - public OuterEnum? OuterEnum { get; set; } - /// - /// Gets or Sets OuterEnumInteger - /// - [DataMember(Name="outerEnumInteger", EmitDefaultValue=false)] - public OuterEnumInteger? OuterEnumInteger { get; set; } - /// - /// Gets or Sets OuterEnumDefaultValue - /// - [DataMember(Name="outerEnumDefaultValue", EmitDefaultValue=false)] - public OuterEnumDefaultValue? OuterEnumDefaultValue { get; set; } - /// - /// Gets or Sets OuterEnumIntegerDefaultValue - /// - [DataMember(Name="outerEnumIntegerDefaultValue", EmitDefaultValue=false)] - public OuterEnumIntegerDefaultValue? OuterEnumIntegerDefaultValue { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EnumTest() { } - /// - /// Initializes a new instance of the class. - /// - /// enumString. - /// enumStringRequired (required). - /// enumInteger. - /// enumNumber. - /// outerEnum. - /// outerEnumInteger. - /// outerEnumDefaultValue. - /// outerEnumIntegerDefaultValue. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?), OuterEnumInteger? outerEnumInteger = default(OuterEnumInteger?), OuterEnumDefaultValue? outerEnumDefaultValue = default(OuterEnumDefaultValue?), OuterEnumIntegerDefaultValue? outerEnumIntegerDefaultValue = default(OuterEnumIntegerDefaultValue?)) - { - // to ensure "enumStringRequired" is required (not null) - if (enumStringRequired == null) - { - throw new InvalidDataException("enumStringRequired is a required property for EnumTest and cannot be null"); - } - else - { - this.EnumStringRequired = enumStringRequired; - } - - this.OuterEnum = outerEnum; - this.EnumString = enumString; - this.EnumInteger = enumInteger; - this.EnumNumber = enumNumber; - this.OuterEnum = outerEnum; - this.OuterEnumInteger = outerEnumInteger; - this.OuterEnumDefaultValue = outerEnumDefaultValue; - this.OuterEnumIntegerDefaultValue = outerEnumIntegerDefaultValue; - } - - - - - - - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class EnumTest {\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); - sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); - sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append(" OuterEnumInteger: ").Append(OuterEnumInteger).Append("\n"); - sb.Append(" OuterEnumDefaultValue: ").Append(OuterEnumDefaultValue).Append("\n"); - sb.Append(" OuterEnumIntegerDefaultValue: ").Append(OuterEnumIntegerDefaultValue).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EnumTest); - } - - /// - /// Returns true if EnumTest instances are equal - /// - /// Instance of EnumTest to be compared - /// Boolean - public bool Equals(EnumTest input) - { - if (input == null) - return false; - - return - ( - this.EnumString == input.EnumString || - (this.EnumString != null && - this.EnumString.Equals(input.EnumString)) - ) && - ( - this.EnumStringRequired == input.EnumStringRequired || - (this.EnumStringRequired != null && - this.EnumStringRequired.Equals(input.EnumStringRequired)) - ) && - ( - this.EnumInteger == input.EnumInteger || - (this.EnumInteger != null && - this.EnumInteger.Equals(input.EnumInteger)) - ) && - ( - this.EnumNumber == input.EnumNumber || - (this.EnumNumber != null && - this.EnumNumber.Equals(input.EnumNumber)) - ) && - ( - this.OuterEnum == input.OuterEnum || - (this.OuterEnum != null && - this.OuterEnum.Equals(input.OuterEnum)) - ) && - ( - this.OuterEnumInteger == input.OuterEnumInteger || - (this.OuterEnumInteger != null && - this.OuterEnumInteger.Equals(input.OuterEnumInteger)) - ) && - ( - this.OuterEnumDefaultValue == input.OuterEnumDefaultValue || - (this.OuterEnumDefaultValue != null && - this.OuterEnumDefaultValue.Equals(input.OuterEnumDefaultValue)) - ) && - ( - this.OuterEnumIntegerDefaultValue == input.OuterEnumIntegerDefaultValue || - (this.OuterEnumIntegerDefaultValue != null && - this.OuterEnumIntegerDefaultValue.Equals(input.OuterEnumIntegerDefaultValue)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EnumString != null) - hashCode = hashCode * 59 + this.EnumString.GetHashCode(); - if (this.EnumStringRequired != null) - hashCode = hashCode * 59 + this.EnumStringRequired.GetHashCode(); - if (this.EnumInteger != null) - hashCode = hashCode * 59 + this.EnumInteger.GetHashCode(); - if (this.EnumNumber != null) - hashCode = hashCode * 59 + this.EnumNumber.GetHashCode(); - if (this.OuterEnum != null) - hashCode = hashCode * 59 + this.OuterEnum.GetHashCode(); - if (this.OuterEnumInteger != null) - hashCode = hashCode * 59 + this.OuterEnumInteger.GetHashCode(); - if (this.OuterEnumDefaultValue != null) - hashCode = hashCode * 59 + this.OuterEnumDefaultValue.GetHashCode(); - if (this.OuterEnumIntegerDefaultValue != null) - hashCode = hashCode * 59 + this.OuterEnumIntegerDefaultValue.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/File.cs deleted file mode 100644 index 26ddc51b06f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/File.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Must be named `File` for test. - /// - [DataContract] - public partial class File : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Test capitalization. - public File(string sourceURI = default(string)) - { - this.SourceURI = sourceURI; - } - - /// - /// Test capitalization - /// - /// Test capitalization - [DataMember(Name="sourceURI", EmitDefaultValue=false)] - public string SourceURI { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class File {\n"); - sb.Append(" SourceURI: ").Append(SourceURI).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as File); - } - - /// - /// Returns true if File instances are equal - /// - /// Instance of File to be compared - /// Boolean - public bool Equals(File input) - { - if (input == null) - return false; - - return - ( - this.SourceURI == input.SourceURI || - (this.SourceURI != null && - this.SourceURI.Equals(input.SourceURI)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SourceURI != null) - hashCode = hashCode * 59 + this.SourceURI.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs deleted file mode 100644 index 497cc80fa11..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ /dev/null @@ -1,141 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// FileSchemaTestClass - /// - [DataContract] - public partial class FileSchemaTestClass : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// file. - /// files. - public FileSchemaTestClass(File file = default(File), List files = default(List)) - { - this.File = file; - this.Files = files; - } - - /// - /// Gets or Sets File - /// - [DataMember(Name="file", EmitDefaultValue=false)] - public File File { get; set; } - - /// - /// Gets or Sets Files - /// - [DataMember(Name="files", EmitDefaultValue=false)] - public List Files { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class FileSchemaTestClass {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FileSchemaTestClass); - } - - /// - /// Returns true if FileSchemaTestClass instances are equal - /// - /// Instance of FileSchemaTestClass to be compared - /// Boolean - public bool Equals(FileSchemaTestClass input) - { - if (input == null) - return false; - - return - ( - this.File == input.File || - (this.File != null && - this.File.Equals(input.File)) - ) && - ( - this.Files == input.Files || - this.Files != null && - input.Files != null && - this.Files.SequenceEqual(input.Files) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.File != null) - hashCode = hashCode * 59 + this.File.GetHashCode(); - if (this.Files != null) - hashCode = hashCode * 59 + this.Files.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Foo.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Foo.cs deleted file mode 100644 index 004767f70a9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Foo.cs +++ /dev/null @@ -1,132 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Foo - /// - [DataContract] - public partial class Foo : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// bar (default to "bar"). - public Foo(string bar = "bar") - { - // use default value if no "bar" provided - if (bar == null) - { - this.Bar = "bar"; - } - else - { - this.Bar = bar; - } - } - - /// - /// Gets or Sets Bar - /// - [DataMember(Name="bar", EmitDefaultValue=false)] - public string Bar { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - 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(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Foo); - } - - /// - /// Returns true if Foo instances are equal - /// - /// Instance of Foo to be compared - /// Boolean - public bool Equals(Foo input) - { - if (input == null) - return false; - - return - ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs deleted file mode 100644 index ec8fde4dd06..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FooGetDefaultResponse.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// FooGetDefaultResponse - /// - [DataContract] - public partial class FooGetDefaultResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// varString. - public FooGetDefaultResponse(Foo varString = default(Foo)) - { - this.VarString = varString; - } - - /// - /// Gets or Sets VarString - /// - [DataMember(Name="string", EmitDefaultValue=false)] - public Foo VarString { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class FooGetDefaultResponse {\n"); - sb.Append(" VarString: ").Append(VarString).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FooGetDefaultResponse); - } - - /// - /// Returns true if FooGetDefaultResponse instances are equal - /// - /// Instance of FooGetDefaultResponse to be compared - /// Boolean - public bool Equals(FooGetDefaultResponse input) - { - if (input == null) - return false; - - return - ( - this.VarString == input.VarString || - (this.VarString != null && - this.VarString.Equals(input.VarString)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarString != null) - hashCode = hashCode * 59 + this.VarString.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs deleted file mode 100644 index 96c1a46372d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/FormatTest.cs +++ /dev/null @@ -1,517 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// FormatTest - /// - [DataContract] - public partial class FormatTest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FormatTest() { } - /// - /// Initializes a new instance of the class. - /// - /// integer. - /// int32. - /// int64. - /// number (required). - /// varFloat. - /// varDouble. - /// varDecimal. - /// varString. - /// varByte (required). - /// binary. - /// date (required). - /// dateTime. - /// uuid. - /// password (required). - /// A string that is a 10 digit number. Can have leading zeros.. - /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01.. - public FormatTest(int integer = default(int), int int32 = default(int), long int64 = default(long), decimal number = default(decimal), float varFloat = default(float), double varDouble = default(double), decimal varDecimal = default(decimal), string varString = default(string), byte[] varByte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), string patternWithDigits = default(string), string patternWithDigitsAndDelimiter = default(string)) - { - // to ensure "number" is required (not null) - if (number == null) - { - throw new InvalidDataException("number is a required property for FormatTest and cannot be null"); - } - else - { - this.Number = number; - } - - // to ensure "varByte" is required (not null) - if (varByte == null) - { - throw new InvalidDataException("varByte is a required property for FormatTest and cannot be null"); - } - else - { - this.VarByte = varByte; - } - - // to ensure "date" is required (not null) - if (date == null) - { - throw new InvalidDataException("date is a required property for FormatTest and cannot be null"); - } - else - { - this.Date = date; - } - - // to ensure "password" is required (not null) - if (password == null) - { - throw new InvalidDataException("password is a required property for FormatTest and cannot be null"); - } - else - { - this.Password = password; - } - - this.Integer = integer; - this.Int32 = int32; - this.Int64 = int64; - this.VarFloat = varFloat; - this.VarDouble = varDouble; - this.VarDecimal = varDecimal; - this.VarString = varString; - this.Binary = binary; - this.DateTime = dateTime; - this.Uuid = uuid; - this.PatternWithDigits = patternWithDigits; - this.PatternWithDigitsAndDelimiter = patternWithDigitsAndDelimiter; - } - - /// - /// Gets or Sets Integer - /// - [DataMember(Name="integer", EmitDefaultValue=false)] - public int Integer { get; set; } - - /// - /// Gets or Sets Int32 - /// - [DataMember(Name="int32", EmitDefaultValue=false)] - public int Int32 { get; set; } - - /// - /// Gets or Sets Int64 - /// - [DataMember(Name="int64", EmitDefaultValue=false)] - public long Int64 { get; set; } - - /// - /// Gets or Sets Number - /// - [DataMember(Name="number", EmitDefaultValue=true)] - public decimal Number { get; set; } - - /// - /// Gets or Sets VarFloat - /// - [DataMember(Name="float", EmitDefaultValue=false)] - public float VarFloat { get; set; } - - /// - /// Gets or Sets VarDouble - /// - [DataMember(Name="double", EmitDefaultValue=false)] - public double VarDouble { get; set; } - - /// - /// Gets or Sets VarDecimal - /// - [DataMember(Name="decimal", EmitDefaultValue=false)] - public decimal VarDecimal { get; set; } - - /// - /// Gets or Sets VarString - /// - [DataMember(Name="string", EmitDefaultValue=false)] - public string VarString { get; set; } - - /// - /// Gets or Sets VarByte - /// - [DataMember(Name="byte", EmitDefaultValue=true)] - public byte[] VarByte { get; set; } - - /// - /// Gets or Sets Binary - /// - [DataMember(Name="binary", EmitDefaultValue=false)] - public System.IO.Stream Binary { get; set; } - - /// - /// Gets or Sets Date - /// - [DataMember(Name="date", EmitDefaultValue=true)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime Date { get; set; } - - /// - /// Gets or Sets DateTime - /// - [DataMember(Name="dateTime", EmitDefaultValue=false)] - public DateTime DateTime { get; set; } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name="uuid", EmitDefaultValue=false)] - public Guid Uuid { get; set; } - - /// - /// Gets or Sets Password - /// - [DataMember(Name="password", EmitDefaultValue=true)] - public string Password { get; set; } - - /// - /// A string that is a 10 digit number. Can have leading zeros. - /// - /// A string that is a 10 digit number. Can have leading zeros. - [DataMember(Name="pattern_with_digits", EmitDefaultValue=false)] - public string PatternWithDigits { get; set; } - - /// - /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - /// - /// A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. - [DataMember(Name="pattern_with_digits_and_delimiter", EmitDefaultValue=false)] - public string PatternWithDigitsAndDelimiter { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class FormatTest {\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(" VarFloat: ").Append(VarFloat).Append("\n"); - sb.Append(" VarDouble: ").Append(VarDouble).Append("\n"); - sb.Append(" VarDecimal: ").Append(VarDecimal).Append("\n"); - sb.Append(" VarString: ").Append(VarString).Append("\n"); - sb.Append(" VarByte: ").Append(VarByte).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(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" PatternWithDigits: ").Append(PatternWithDigits).Append("\n"); - sb.Append(" PatternWithDigitsAndDelimiter: ").Append(PatternWithDigitsAndDelimiter).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FormatTest); - } - - /// - /// Returns true if FormatTest instances are equal - /// - /// Instance of FormatTest to be compared - /// Boolean - public bool Equals(FormatTest 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.VarFloat == input.VarFloat || - (this.VarFloat != null && - this.VarFloat.Equals(input.VarFloat)) - ) && - ( - this.VarDouble == input.VarDouble || - (this.VarDouble != null && - this.VarDouble.Equals(input.VarDouble)) - ) && - ( - this.VarDecimal == input.VarDecimal || - (this.VarDecimal != null && - this.VarDecimal.Equals(input.VarDecimal)) - ) && - ( - this.VarString == input.VarString || - (this.VarString != null && - this.VarString.Equals(input.VarString)) - ) && - ( - this.VarByte == input.VarByte || - (this.VarByte != null && - this.VarByte.Equals(input.VarByte)) - ) && - ( - 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.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.PatternWithDigits == input.PatternWithDigits || - (this.PatternWithDigits != null && - this.PatternWithDigits.Equals(input.PatternWithDigits)) - ) && - ( - this.PatternWithDigitsAndDelimiter == input.PatternWithDigitsAndDelimiter || - (this.PatternWithDigitsAndDelimiter != null && - this.PatternWithDigitsAndDelimiter.Equals(input.PatternWithDigitsAndDelimiter)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.VarFloat != null) - hashCode = hashCode * 59 + this.VarFloat.GetHashCode(); - if (this.VarDouble != null) - hashCode = hashCode * 59 + this.VarDouble.GetHashCode(); - if (this.VarDecimal != null) - hashCode = hashCode * 59 + this.VarDecimal.GetHashCode(); - if (this.VarString != null) - hashCode = hashCode * 59 + this.VarString.GetHashCode(); - if (this.VarByte != null) - hashCode = hashCode * 59 + this.VarByte.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.Uuid != null) - hashCode = hashCode * 59 + this.Uuid.GetHashCode(); - if (this.Password != null) - hashCode = hashCode * 59 + this.Password.GetHashCode(); - if (this.PatternWithDigits != null) - hashCode = hashCode * 59 + this.PatternWithDigits.GetHashCode(); - if (this.PatternWithDigitsAndDelimiter != null) - hashCode = hashCode * 59 + this.PatternWithDigitsAndDelimiter.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable 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" }); - } - - - - // VarFloat (float) maximum - if(this.VarFloat > (float)987.6) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarFloat, must be a value less than or equal to 987.6.", new [] { "VarFloat" }); - } - - // VarFloat (float) minimum - if(this.VarFloat < (float)54.3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarFloat, must be a value greater than or equal to 54.3.", new [] { "VarFloat" }); - } - - - - // VarDouble (double) maximum - if(this.VarDouble > (double)123.4) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarDouble, must be a value less than or equal to 123.4.", new [] { "VarDouble" }); - } - - // VarDouble (double) minimum - if(this.VarDouble < (double)67.8) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarDouble, must be a value greater than or equal to 67.8.", new [] { "VarDouble" }); - } - - - - // VarString (string) pattern - Regex regexVarString = new Regex(@"[a-z]", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); - if (false == regexVarString.Match(this.VarString).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for VarString, must match a pattern of " + regexVarString, new [] { "VarString" }); - } - - // 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" }); - } - - - - // PatternWithDigits (string) pattern - Regex regexPatternWithDigits = new Regex(@"^\d{10}$", RegexOptions.CultureInvariant); - if (false == regexPatternWithDigits.Match(this.PatternWithDigits).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigits, must match a pattern of " + regexPatternWithDigits, new [] { "PatternWithDigits" }); - } - - - - // PatternWithDigitsAndDelimiter (string) pattern - Regex regexPatternWithDigitsAndDelimiter = new Regex(@"^image_\d{1,3}$", RegexOptions.CultureInvariant | RegexOptions.IgnoreCase); - if (false == regexPatternWithDigitsAndDelimiter.Match(this.PatternWithDigitsAndDelimiter).Success) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for PatternWithDigitsAndDelimiter, must match a pattern of " + regexPatternWithDigitsAndDelimiter, new [] { "PatternWithDigitsAndDelimiter" }); - } - - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs deleted file mode 100644 index 7d2a2c6c406..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ /dev/null @@ -1,137 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// HasOnlyReadOnly - /// - [DataContract] - public partial class HasOnlyReadOnly : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - public HasOnlyReadOnly() - { - } - - /// - /// Gets or Sets Bar - /// - [DataMember(Name="bar", EmitDefaultValue=false)] - public string Bar { get; private set; } - - /// - /// Gets or Sets Foo - /// - [DataMember(Name="foo", EmitDefaultValue=false)] - public string Foo { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class HasOnlyReadOnly {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Foo: ").Append(Foo).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HasOnlyReadOnly); - } - - /// - /// Returns true if HasOnlyReadOnly instances are equal - /// - /// Instance of HasOnlyReadOnly to be compared - /// Boolean - public bool Equals(HasOnlyReadOnly input) - { - if (input == null) - return false; - - return - ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) - ) && - ( - this.Foo == input.Foo || - (this.Foo != null && - this.Foo.Equals(input.Foo)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bar != null) - hashCode = hashCode * 59 + this.Bar.GetHashCode(); - if (this.Foo != null) - hashCode = hashCode * 59 + this.Foo.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/HealthCheckResult.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/HealthCheckResult.cs deleted file mode 100644 index 15ce4e8d0bb..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/HealthCheckResult.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model. - /// - [DataContract] - public partial class HealthCheckResult : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// nullableMessage. - public HealthCheckResult(string nullableMessage = default(string)) - { - this.NullableMessage = nullableMessage; - this.NullableMessage = nullableMessage; - } - - /// - /// Gets or Sets NullableMessage - /// - [DataMember(Name="NullableMessage", EmitDefaultValue=true)] - public string NullableMessage { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class HealthCheckResult {\n"); - sb.Append(" NullableMessage: ").Append(NullableMessage).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HealthCheckResult); - } - - /// - /// Returns true if HealthCheckResult instances are equal - /// - /// Instance of HealthCheckResult to be compared - /// Boolean - public bool Equals(HealthCheckResult input) - { - if (input == null) - return false; - - return - ( - this.NullableMessage == input.NullableMessage || - (this.NullableMessage != null && - this.NullableMessage.Equals(input.NullableMessage)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.NullableMessage != null) - hashCode = hashCode * 59 + this.NullableMessage.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject.cs deleted file mode 100644 index f3c713e9ee6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject.cs +++ /dev/null @@ -1,142 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// InlineObject - /// - [DataContract] - public partial class InlineObject : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Updated name of the pet. - /// Updated status of the pet. - public InlineObject(string name = default(string), string status = default(string)) - { - this.Name = name; - this.Status = status; - } - - /// - /// Updated name of the pet - /// - /// Updated name of the pet - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Updated status of the pet - /// - /// Updated status of the pet - [DataMember(Name="status", EmitDefaultValue=false)] - public string Status { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - 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(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InlineObject); - } - - /// - /// Returns true if InlineObject instances are equal - /// - /// Instance of InlineObject to be compared - /// Boolean - 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)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject1.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject1.cs deleted file mode 100644 index 07ddd25ac03..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject1.cs +++ /dev/null @@ -1,142 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// InlineObject1 - /// - [DataContract] - public partial class InlineObject1 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Additional data to pass to server. - /// file to upload. - public InlineObject1(string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) - { - this.AdditionalMetadata = additionalMetadata; - this.File = file; - } - - /// - /// Additional data to pass to server - /// - /// Additional data to pass to server - [DataMember(Name="additionalMetadata", EmitDefaultValue=false)] - public string AdditionalMetadata { get; set; } - - /// - /// file to upload - /// - /// file to upload - [DataMember(Name="file", EmitDefaultValue=false)] - public System.IO.Stream File { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - 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(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InlineObject1); - } - - /// - /// Returns true if InlineObject1 instances are equal - /// - /// Instance of InlineObject1 to be compared - /// Boolean - 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)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject2.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject2.cs deleted file mode 100644 index 9dde0588267..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject2.cs +++ /dev/null @@ -1,199 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// InlineObject2 - /// - [DataContract] - public partial class InlineObject2 : IEquatable, IValidatableObject - { - /// - /// Defines EnumFormStringArray - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumFormStringArrayEnum - { - /// - /// Enum GreaterThan for value: > - /// - [EnumMember(Value = ">")] - GreaterThan = 1, - - /// - /// Enum Dollar for value: $ - /// - [EnumMember(Value = "$")] - Dollar = 2 - - } - - - /// - /// Form parameter enum test (string array) - /// - /// Form parameter enum test (string array) - [DataMember(Name="enum_form_string_array", EmitDefaultValue=false)] - public List EnumFormStringArray { get; set; } - /// - /// Form parameter enum test (string) - /// - /// Form parameter enum test (string) - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumFormStringEnum - { - /// - /// Enum Abc for value: _abc - /// - [EnumMember(Value = "_abc")] - Abc = 1, - - /// - /// Enum Efg for value: -efg - /// - [EnumMember(Value = "-efg")] - Efg = 2, - - /// - /// Enum Xyz for value: (xyz) - /// - [EnumMember(Value = "(xyz)")] - Xyz = 3 - - } - - /// - /// Form parameter enum test (string) - /// - /// Form parameter enum test (string) - [DataMember(Name="enum_form_string", EmitDefaultValue=false)] - public EnumFormStringEnum? EnumFormString { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// Form parameter enum test (string array). - /// Form parameter enum test (string) (default to EnumFormStringEnum.Efg). - public InlineObject2(List enumFormStringArray = default(List), 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; - } - } - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - 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(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InlineObject2); - } - - /// - /// Returns true if InlineObject2 instances are equal - /// - /// Instance of InlineObject2 to be compared - /// Boolean - public bool Equals(InlineObject2 input) - { - if (input == null) - return false; - - return - ( - this.EnumFormStringArray == input.EnumFormStringArray || - this.EnumFormStringArray != null && - input.EnumFormStringArray != null && - this.EnumFormStringArray.SequenceEqual(input.EnumFormStringArray) - ) && - ( - this.EnumFormString == input.EnumFormString || - (this.EnumFormString != null && - this.EnumFormString.Equals(input.EnumFormString)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject3.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject3.cs deleted file mode 100644 index 8d268cbdd13..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject3.cs +++ /dev/null @@ -1,482 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// InlineObject3 - /// - [DataContract] - public partial class InlineObject3 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected InlineObject3() { } - /// - /// Initializes a new instance of the class. - /// - /// None. - /// None. - /// None. - /// None (required). - /// None. - /// None (required). - /// None. - /// None (required). - /// None (required). - /// None. - /// None. - /// None. - /// None. - /// None. - 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; - } - - /// - /// None - /// - /// None - [DataMember(Name="integer", EmitDefaultValue=false)] - public int Integer { get; set; } - - /// - /// None - /// - /// None - [DataMember(Name="int32", EmitDefaultValue=false)] - public int Int32 { get; set; } - - /// - /// None - /// - /// None - [DataMember(Name="int64", EmitDefaultValue=false)] - public long Int64 { get; set; } - - /// - /// None - /// - /// None - [DataMember(Name="number", EmitDefaultValue=true)] - public decimal Number { get; set; } - - /// - /// None - /// - /// None - [DataMember(Name="float", EmitDefaultValue=false)] - public float Float { get; set; } - - /// - /// None - /// - /// None - [DataMember(Name="double", EmitDefaultValue=true)] - public double Double { get; set; } - - /// - /// None - /// - /// None - [DataMember(Name="string", EmitDefaultValue=false)] - public string String { get; set; } - - /// - /// None - /// - /// None - [DataMember(Name="pattern_without_delimiter", EmitDefaultValue=true)] - public string PatternWithoutDelimiter { get; set; } - - /// - /// None - /// - /// None - [DataMember(Name="byte", EmitDefaultValue=true)] - public byte[] Byte { get; set; } - - /// - /// None - /// - /// None - [DataMember(Name="binary", EmitDefaultValue=false)] - public System.IO.Stream Binary { get; set; } - - /// - /// None - /// - /// None - [DataMember(Name="date", EmitDefaultValue=false)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime Date { get; set; } - - /// - /// None - /// - /// None - [DataMember(Name="dateTime", EmitDefaultValue=false)] - public DateTime DateTime { get; set; } - - /// - /// None - /// - /// None - [DataMember(Name="password", EmitDefaultValue=false)] - public string Password { get; set; } - - /// - /// None - /// - /// None - [DataMember(Name="callback", EmitDefaultValue=false)] - public string Callback { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - 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(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InlineObject3); - } - - /// - /// Returns true if InlineObject3 instances are equal - /// - /// Instance of InlineObject3 to be compared - /// Boolean - 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)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable 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; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject4.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject4.cs deleted file mode 100644 index 21f028e7550..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject4.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// InlineObject4 - /// - [DataContract] - public partial class InlineObject4 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected InlineObject4() { } - /// - /// Initializes a new instance of the class. - /// - /// field1 (required). - /// field2 (required). - 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; - } - - } - - /// - /// field1 - /// - /// field1 - [DataMember(Name="param", EmitDefaultValue=true)] - public string Param { get; set; } - - /// - /// field2 - /// - /// field2 - [DataMember(Name="param2", EmitDefaultValue=true)] - public string Param2 { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - 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(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InlineObject4); - } - - /// - /// Returns true if InlineObject4 instances are equal - /// - /// Instance of InlineObject4 to be compared - /// Boolean - 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)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject5.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject5.cs deleted file mode 100644 index d41ded64360..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineObject5.cs +++ /dev/null @@ -1,156 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// InlineObject5 - /// - [DataContract] - public partial class InlineObject5 : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected InlineObject5() { } - /// - /// Initializes a new instance of the class. - /// - /// Additional data to pass to server. - /// file to upload (required). - 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; - } - - /// - /// Additional data to pass to server - /// - /// Additional data to pass to server - [DataMember(Name="additionalMetadata", EmitDefaultValue=false)] - public string AdditionalMetadata { get; set; } - - /// - /// file to upload - /// - /// file to upload - [DataMember(Name="requiredFile", EmitDefaultValue=true)] - public System.IO.Stream RequiredFile { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - 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(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InlineObject5); - } - - /// - /// Returns true if InlineObject5 instances are equal - /// - /// Instance of InlineObject5 to be compared - /// Boolean - 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)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineResponseDefault.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineResponseDefault.cs deleted file mode 100644 index 4fcaeadf79d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/InlineResponseDefault.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// InlineResponseDefault - /// - [DataContract] - public partial class InlineResponseDefault : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// _string. - public InlineResponseDefault(Foo _string = default(Foo)) - { - this.String = _string; - } - - /// - /// Gets or Sets String - /// - [DataMember(Name="string", EmitDefaultValue=false)] - public Foo String { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - 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(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as InlineResponseDefault); - } - - /// - /// Returns true if InlineResponseDefault instances are equal - /// - /// Instance of InlineResponseDefault to be compared - /// Boolean - public bool Equals(InlineResponseDefault input) - { - if (input == null) - return false; - - return - ( - this.String == input.String || - (this.String != null && - this.String.Equals(input.String)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/List.cs deleted file mode 100644 index a5890e4ab01..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/List.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// List - /// - [DataContract] - public partial class List : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// var123List. - public List(string var123List = default(string)) - { - this.var123List = var123List; - } - - /// - /// Gets or Sets var123List - /// - [DataMember(Name="123-list", EmitDefaultValue=false)] - public string var123List { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class List {\n"); - sb.Append(" var123List: ").Append(var123List).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as List); - } - - /// - /// Returns true if List instances are equal - /// - /// Instance of List to be compared - /// Boolean - public bool Equals(List input) - { - if (input == null) - return false; - - return - ( - this.var123List == input.var123List || - (this.var123List != null && - this.var123List.Equals(input.var123List)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.var123List != null) - hashCode = hashCode * 59 + this.var123List.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs deleted file mode 100644 index b84ccd0e27e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/MapTest.cs +++ /dev/null @@ -1,196 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// MapTest - /// - [DataContract] - public partial class MapTest : IEquatable, IValidatableObject - { - /// - /// Defines Inner - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum InnerEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2 - - } - - /// - /// Initializes a new instance of the class. - /// - /// mapMapOfString. - /// mapOfEnumString. - /// directMap. - /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) - { - this.MapMapOfString = mapMapOfString; - this.MapOfEnumString = mapOfEnumString; - this.DirectMap = directMap; - this.IndirectMap = indirectMap; - } - - /// - /// Gets or Sets MapMapOfString - /// - [DataMember(Name="map_map_of_string", EmitDefaultValue=false)] - public Dictionary> MapMapOfString { get; set; } - - /// - /// Gets or Sets MapOfEnumString - /// - [DataMember(Name="map_of_enum_string", EmitDefaultValue=false)] - public Dictionary MapOfEnumString { get; set; } - - /// - /// Gets or Sets DirectMap - /// - [DataMember(Name="direct_map", EmitDefaultValue=false)] - public Dictionary DirectMap { get; set; } - - /// - /// Gets or Sets IndirectMap - /// - [DataMember(Name="indirect_map", EmitDefaultValue=false)] - public Dictionary IndirectMap { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); - sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); - sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MapTest); - } - - /// - /// Returns true if MapTest instances are equal - /// - /// Instance of MapTest to be compared - /// Boolean - public bool Equals(MapTest input) - { - if (input == null) - return false; - - return - ( - this.MapMapOfString == input.MapMapOfString || - this.MapMapOfString != null && - input.MapMapOfString != null && - this.MapMapOfString.SequenceEqual(input.MapMapOfString) - ) && - ( - this.MapOfEnumString == input.MapOfEnumString || - this.MapOfEnumString != null && - input.MapOfEnumString != null && - this.MapOfEnumString.SequenceEqual(input.MapOfEnumString) - ) && - ( - this.DirectMap == input.DirectMap || - this.DirectMap != null && - input.DirectMap != null && - this.DirectMap.SequenceEqual(input.DirectMap) - ) && - ( - this.IndirectMap == input.IndirectMap || - this.IndirectMap != null && - input.IndirectMap != null && - this.IndirectMap.SequenceEqual(input.IndirectMap) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapMapOfString != null) - hashCode = hashCode * 59 + this.MapMapOfString.GetHashCode(); - if (this.MapOfEnumString != null) - hashCode = hashCode * 59 + this.MapOfEnumString.GetHashCode(); - if (this.DirectMap != null) - hashCode = hashCode * 59 + this.DirectMap.GetHashCode(); - if (this.IndirectMap != null) - hashCode = hashCode * 59 + this.IndirectMap.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs deleted file mode 100644 index 30e2ca44d65..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ /dev/null @@ -1,157 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixedPropertiesAndAdditionalPropertiesClass - /// - [DataContract] - public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// uuid. - /// dateTime. - /// map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) - { - this.Uuid = uuid; - this.DateTime = dateTime; - this.Map = map; - } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name="uuid", EmitDefaultValue=false)] - public Guid Uuid { get; set; } - - /// - /// Gets or Sets DateTime - /// - [DataMember(Name="dateTime", EmitDefaultValue=false)] - public DateTime DateTime { get; set; } - - /// - /// Gets or Sets Map - /// - [DataMember(Name="map", EmitDefaultValue=false)] - public Dictionary Map { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Map: ").Append(Map).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MixedPropertiesAndAdditionalPropertiesClass); - } - - /// - /// Returns true if MixedPropertiesAndAdditionalPropertiesClass instances are equal - /// - /// Instance of MixedPropertiesAndAdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(MixedPropertiesAndAdditionalPropertiesClass input) - { - if (input == null) - return false; - - return - ( - this.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) - ) && - ( - this.DateTime == input.DateTime || - (this.DateTime != null && - this.DateTime.Equals(input.DateTime)) - ) && - ( - this.Map == input.Map || - this.Map != null && - input.Map != null && - this.Map.SequenceEqual(input.Map) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uuid != null) - hashCode = hashCode * 59 + this.Uuid.GetHashCode(); - if (this.DateTime != null) - hashCode = hashCode * 59 + this.DateTime.GetHashCode(); - if (this.Map != null) - hashCode = hashCode * 59 + this.Map.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Model200Response.cs deleted file mode 100644 index 1ea16db40f7..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Model200Response.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing model name starting with number - /// - [DataContract] - public partial class Model200Response : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - /// varClass. - public Model200Response(int name = default(int), string varClass = default(string)) - { - this.Name = name; - this.VarClass = varClass; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public int Name { get; set; } - - /// - /// Gets or Sets VarClass - /// - [DataMember(Name="class", EmitDefaultValue=false)] - public string VarClass { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Model200Response {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" VarClass: ").Append(VarClass).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Model200Response); - } - - /// - /// Returns true if Model200Response instances are equal - /// - /// Instance of Model200Response to be compared - /// Boolean - public bool Equals(Model200Response input) - { - if (input == null) - return false; - - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.VarClass == input.VarClass || - (this.VarClass != null && - this.VarClass.Equals(input.VarClass)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.VarClass != null) - hashCode = hashCode * 59 + this.VarClass.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ModelClient.cs deleted file mode 100644 index 60b98795f9b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ModelClient.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ModelClient - /// - [DataContract] - public partial class ModelClient : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// varClient. - public ModelClient(string varClient = default(string)) - { - this.varClient = varClient; - } - - /// - /// Gets or Sets varClient - /// - [DataMember(Name="client", EmitDefaultValue=false)] - public string varClient { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ModelClient {\n"); - sb.Append(" varClient: ").Append(varClient).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ModelClient); - } - - /// - /// Returns true if ModelClient instances are equal - /// - /// Instance of ModelClient to be compared - /// Boolean - public bool Equals(ModelClient input) - { - if (input == null) - return false; - - return - ( - this.varClient == input.varClient || - (this.varClient != null && - this.varClient.Equals(input.varClient)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.varClient != null) - hashCode = hashCode * 59 + this.varClient.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs deleted file mode 100644 index c6d4dc92434..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Name.cs +++ /dev/null @@ -1,182 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing model name same as property name - /// - [DataContract] - public partial class Name : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Name() { } - /// - /// Initializes a new instance of the class. - /// - /// varName (required). - /// property. - public Name(int varName = default(int), string property = default(string)) - { - // to ensure "varName" is required (not null) - if (varName == null) - { - throw new InvalidDataException("varName is a required property for Name and cannot be null"); - } - else - { - this.VarName = varName; - } - - this.Property = property; - } - - /// - /// Gets or Sets VarName - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public int VarName { get; set; } - - /// - /// Gets or Sets SnakeCase - /// - [DataMember(Name="snake_case", EmitDefaultValue=false)] - public int SnakeCase { get; private set; } - - /// - /// Gets or Sets Property - /// - [DataMember(Name="property", EmitDefaultValue=false)] - public string Property { get; set; } - - /// - /// Gets or Sets var123Number - /// - [DataMember(Name="123Number", EmitDefaultValue=false)] - public int var123Number { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Name {\n"); - sb.Append(" VarName: ").Append(VarName).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); - sb.Append(" Property: ").Append(Property).Append("\n"); - sb.Append(" var123Number: ").Append(var123Number).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Name); - } - - /// - /// Returns true if Name instances are equal - /// - /// Instance of Name to be compared - /// Boolean - public bool Equals(Name input) - { - if (input == null) - return false; - - return - ( - this.VarName == input.VarName || - (this.VarName != null && - this.VarName.Equals(input.VarName)) - ) && - ( - this.SnakeCase == input.SnakeCase || - (this.SnakeCase != null && - this.SnakeCase.Equals(input.SnakeCase)) - ) && - ( - this.Property == input.Property || - (this.Property != null && - this.Property.Equals(input.Property)) - ) && - ( - this.var123Number == input.var123Number || - (this.var123Number != null && - this.var123Number.Equals(input.var123Number)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarName != null) - hashCode = hashCode * 59 + this.VarName.GetHashCode(); - if (this.SnakeCase != null) - hashCode = hashCode * 59 + this.SnakeCase.GetHashCode(); - if (this.Property != null) - hashCode = hashCode * 59 + this.Property.GetHashCode(); - if (this.var123Number != null) - hashCode = hashCode * 59 + this.var123Number.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/NullableClass.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/NullableClass.cs deleted file mode 100644 index fdd960363da..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/NullableClass.cs +++ /dev/null @@ -1,318 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// NullableClass - /// - [DataContract] - public partial class NullableClass : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// integerProp. - /// numberProp. - /// booleanProp. - /// stringProp. - /// dateProp. - /// datetimeProp. - /// arrayNullableProp. - /// arrayAndItemsNullableProp. - /// arrayItemsNullable. - /// objectNullableProp. - /// objectAndItemsNullableProp. - /// objectItemsNullable. - public NullableClass(int? integerProp = default(int?), decimal? numberProp = default(decimal?), bool? booleanProp = default(bool?), string stringProp = default(string), DateTime? dateProp = default(DateTime?), DateTime? datetimeProp = default(DateTime?), List arrayNullableProp = default(List), List arrayAndItemsNullableProp = default(List), List arrayItemsNullable = default(List), Dictionary objectNullableProp = default(Dictionary), Dictionary objectAndItemsNullableProp = default(Dictionary), Dictionary objectItemsNullable = default(Dictionary)) : base() - { - this.IntegerProp = integerProp; - this.NumberProp = numberProp; - this.BooleanProp = booleanProp; - this.StringProp = stringProp; - this.DateProp = dateProp; - this.DatetimeProp = datetimeProp; - this.ArrayNullableProp = arrayNullableProp; - this.ArrayAndItemsNullableProp = arrayAndItemsNullableProp; - this.ObjectNullableProp = objectNullableProp; - this.ObjectAndItemsNullableProp = objectAndItemsNullableProp; - this.IntegerProp = integerProp; - this.NumberProp = numberProp; - this.BooleanProp = booleanProp; - this.StringProp = stringProp; - this.DateProp = dateProp; - this.DatetimeProp = datetimeProp; - this.ArrayNullableProp = arrayNullableProp; - this.ArrayAndItemsNullableProp = arrayAndItemsNullableProp; - this.ArrayItemsNullable = arrayItemsNullable; - this.ObjectNullableProp = objectNullableProp; - this.ObjectAndItemsNullableProp = objectAndItemsNullableProp; - this.ObjectItemsNullable = objectItemsNullable; - } - - /// - /// Gets or Sets IntegerProp - /// - [DataMember(Name="integer_prop", EmitDefaultValue=true)] - public int? IntegerProp { get; set; } - - /// - /// Gets or Sets NumberProp - /// - [DataMember(Name="number_prop", EmitDefaultValue=true)] - public decimal? NumberProp { get; set; } - - /// - /// Gets or Sets BooleanProp - /// - [DataMember(Name="boolean_prop", EmitDefaultValue=true)] - public bool? BooleanProp { get; set; } - - /// - /// Gets or Sets StringProp - /// - [DataMember(Name="string_prop", EmitDefaultValue=true)] - public string StringProp { get; set; } - - /// - /// Gets or Sets DateProp - /// - [DataMember(Name="date_prop", EmitDefaultValue=true)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime? DateProp { get; set; } - - /// - /// Gets or Sets DatetimeProp - /// - [DataMember(Name="datetime_prop", EmitDefaultValue=true)] - public DateTime? DatetimeProp { get; set; } - - /// - /// Gets or Sets ArrayNullableProp - /// - [DataMember(Name="array_nullable_prop", EmitDefaultValue=true)] - public List ArrayNullableProp { get; set; } - - /// - /// Gets or Sets ArrayAndItemsNullableProp - /// - [DataMember(Name="array_and_items_nullable_prop", EmitDefaultValue=true)] - public List ArrayAndItemsNullableProp { get; set; } - - /// - /// Gets or Sets ArrayItemsNullable - /// - [DataMember(Name="array_items_nullable", EmitDefaultValue=false)] - public List ArrayItemsNullable { get; set; } - - /// - /// Gets or Sets ObjectNullableProp - /// - [DataMember(Name="object_nullable_prop", EmitDefaultValue=true)] - public Dictionary ObjectNullableProp { get; set; } - - /// - /// Gets or Sets ObjectAndItemsNullableProp - /// - [DataMember(Name="object_and_items_nullable_prop", EmitDefaultValue=true)] - public Dictionary ObjectAndItemsNullableProp { get; set; } - - /// - /// Gets or Sets ObjectItemsNullable - /// - [DataMember(Name="object_items_nullable", EmitDefaultValue=false)] - public Dictionary ObjectItemsNullable { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class NullableClass {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" IntegerProp: ").Append(IntegerProp).Append("\n"); - sb.Append(" NumberProp: ").Append(NumberProp).Append("\n"); - sb.Append(" BooleanProp: ").Append(BooleanProp).Append("\n"); - sb.Append(" StringProp: ").Append(StringProp).Append("\n"); - sb.Append(" DateProp: ").Append(DateProp).Append("\n"); - sb.Append(" DatetimeProp: ").Append(DatetimeProp).Append("\n"); - sb.Append(" ArrayNullableProp: ").Append(ArrayNullableProp).Append("\n"); - sb.Append(" ArrayAndItemsNullableProp: ").Append(ArrayAndItemsNullableProp).Append("\n"); - sb.Append(" ArrayItemsNullable: ").Append(ArrayItemsNullable).Append("\n"); - sb.Append(" ObjectNullableProp: ").Append(ObjectNullableProp).Append("\n"); - sb.Append(" ObjectAndItemsNullableProp: ").Append(ObjectAndItemsNullableProp).Append("\n"); - sb.Append(" ObjectItemsNullable: ").Append(ObjectItemsNullable).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NullableClass); - } - - /// - /// Returns true if NullableClass instances are equal - /// - /// Instance of NullableClass to be compared - /// Boolean - public bool Equals(NullableClass input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.IntegerProp == input.IntegerProp || - (this.IntegerProp != null && - this.IntegerProp.Equals(input.IntegerProp)) - ) && base.Equals(input) && - ( - this.NumberProp == input.NumberProp || - (this.NumberProp != null && - this.NumberProp.Equals(input.NumberProp)) - ) && base.Equals(input) && - ( - this.BooleanProp == input.BooleanProp || - (this.BooleanProp != null && - this.BooleanProp.Equals(input.BooleanProp)) - ) && base.Equals(input) && - ( - this.StringProp == input.StringProp || - (this.StringProp != null && - this.StringProp.Equals(input.StringProp)) - ) && base.Equals(input) && - ( - this.DateProp == input.DateProp || - (this.DateProp != null && - this.DateProp.Equals(input.DateProp)) - ) && base.Equals(input) && - ( - this.DatetimeProp == input.DatetimeProp || - (this.DatetimeProp != null && - this.DatetimeProp.Equals(input.DatetimeProp)) - ) && base.Equals(input) && - ( - this.ArrayNullableProp == input.ArrayNullableProp || - this.ArrayNullableProp != null && - input.ArrayNullableProp != null && - this.ArrayNullableProp.SequenceEqual(input.ArrayNullableProp) - ) && base.Equals(input) && - ( - this.ArrayAndItemsNullableProp == input.ArrayAndItemsNullableProp || - this.ArrayAndItemsNullableProp != null && - input.ArrayAndItemsNullableProp != null && - this.ArrayAndItemsNullableProp.SequenceEqual(input.ArrayAndItemsNullableProp) - ) && base.Equals(input) && - ( - this.ArrayItemsNullable == input.ArrayItemsNullable || - this.ArrayItemsNullable != null && - input.ArrayItemsNullable != null && - this.ArrayItemsNullable.SequenceEqual(input.ArrayItemsNullable) - ) && base.Equals(input) && - ( - this.ObjectNullableProp == input.ObjectNullableProp || - this.ObjectNullableProp != null && - input.ObjectNullableProp != null && - this.ObjectNullableProp.SequenceEqual(input.ObjectNullableProp) - ) && base.Equals(input) && - ( - this.ObjectAndItemsNullableProp == input.ObjectAndItemsNullableProp || - this.ObjectAndItemsNullableProp != null && - input.ObjectAndItemsNullableProp != null && - this.ObjectAndItemsNullableProp.SequenceEqual(input.ObjectAndItemsNullableProp) - ) && base.Equals(input) && - ( - this.ObjectItemsNullable == input.ObjectItemsNullable || - this.ObjectItemsNullable != null && - input.ObjectItemsNullable != null && - this.ObjectItemsNullable.SequenceEqual(input.ObjectItemsNullable) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.IntegerProp != null) - hashCode = hashCode * 59 + this.IntegerProp.GetHashCode(); - if (this.NumberProp != null) - hashCode = hashCode * 59 + this.NumberProp.GetHashCode(); - if (this.BooleanProp != null) - hashCode = hashCode * 59 + this.BooleanProp.GetHashCode(); - if (this.StringProp != null) - hashCode = hashCode * 59 + this.StringProp.GetHashCode(); - if (this.DateProp != null) - hashCode = hashCode * 59 + this.DateProp.GetHashCode(); - if (this.DatetimeProp != null) - hashCode = hashCode * 59 + this.DatetimeProp.GetHashCode(); - if (this.ArrayNullableProp != null) - hashCode = hashCode * 59 + this.ArrayNullableProp.GetHashCode(); - if (this.ArrayAndItemsNullableProp != null) - hashCode = hashCode * 59 + this.ArrayAndItemsNullableProp.GetHashCode(); - if (this.ArrayItemsNullable != null) - hashCode = hashCode * 59 + this.ArrayItemsNullable.GetHashCode(); - if (this.ObjectNullableProp != null) - hashCode = hashCode * 59 + this.ObjectNullableProp.GetHashCode(); - if (this.ObjectAndItemsNullableProp != null) - hashCode = hashCode * 59 + this.ObjectAndItemsNullableProp.GetHashCode(); - if (this.ObjectItemsNullable != null) - hashCode = hashCode * 59 + this.ObjectItemsNullable.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/NumberOnly.cs deleted file mode 100644 index 23dfb6f5c53..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/NumberOnly.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// NumberOnly - /// - [DataContract] - public partial class NumberOnly : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// justNumber. - public NumberOnly(decimal justNumber = default(decimal)) - { - this.JustNumber = justNumber; - } - - /// - /// Gets or Sets JustNumber - /// - [DataMember(Name="JustNumber", EmitDefaultValue=false)] - public decimal JustNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class NumberOnly {\n"); - sb.Append(" JustNumber: ").Append(JustNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NumberOnly); - } - - /// - /// Returns true if NumberOnly instances are equal - /// - /// Instance of NumberOnly to be compared - /// Boolean - public bool Equals(NumberOnly input) - { - if (input == null) - return false; - - return - ( - this.JustNumber == input.JustNumber || - (this.JustNumber != null && - this.JustNumber.Equals(input.JustNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.JustNumber != null) - hashCode = hashCode * 59 + this.JustNumber.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs deleted file mode 100644 index 259253c2f72..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ObjectWithDeprecatedFields.cs +++ /dev/null @@ -1,176 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ObjectWithDeprecatedFields - /// - [DataContract] - public partial class ObjectWithDeprecatedFields : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// uuid. - /// id. - /// deprecatedRef. - /// bars. - public ObjectWithDeprecatedFields(string uuid = default(string), decimal id = default(decimal), DeprecatedObject deprecatedRef = default(DeprecatedObject), List bars = default(List)) - { - this.Uuid = uuid; - this.Id = id; - this.DeprecatedRef = deprecatedRef; - this.Bars = bars; - } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name="uuid", EmitDefaultValue=false)] - public string Uuid { get; set; } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - [Obsolete] - public decimal Id { get; set; } - - /// - /// Gets or Sets DeprecatedRef - /// - [DataMember(Name="deprecatedRef", EmitDefaultValue=false)] - [Obsolete] - public DeprecatedObject DeprecatedRef { get; set; } - - /// - /// Gets or Sets Bars - /// - [DataMember(Name="bars", EmitDefaultValue=false)] - [Obsolete] - public List Bars { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ObjectWithDeprecatedFields {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" DeprecatedRef: ").Append(DeprecatedRef).Append("\n"); - sb.Append(" Bars: ").Append(Bars).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ObjectWithDeprecatedFields); - } - - /// - /// Returns true if ObjectWithDeprecatedFields instances are equal - /// - /// Instance of ObjectWithDeprecatedFields to be compared - /// Boolean - public bool Equals(ObjectWithDeprecatedFields input) - { - if (input == null) - return false; - - return - ( - this.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) - ) && - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.DeprecatedRef == input.DeprecatedRef || - (this.DeprecatedRef != null && - this.DeprecatedRef.Equals(input.DeprecatedRef)) - ) && - ( - this.Bars == input.Bars || - this.Bars != null && - input.Bars != null && - this.Bars.SequenceEqual(input.Bars) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uuid != null) - hashCode = hashCode * 59 + this.Uuid.GetHashCode(); - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.DeprecatedRef != null) - hashCode = hashCode * 59 + this.DeprecatedRef.GetHashCode(); - if (this.Bars != null) - hashCode = hashCode * 59 + this.Bars.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs deleted file mode 100644 index 2651c80dab9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Order.cs +++ /dev/null @@ -1,240 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Order - /// - [DataContract] - public partial class Order : IEquatable, IValidatableObject - { - /// - /// Order Status - /// - /// Order Status - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Placed for value: placed - /// - [EnumMember(Value = "placed")] - Placed = 1, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 2, - - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 3 - - } - - /// - /// Order Status - /// - /// Order Status - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// petId. - /// quantity. - /// shipDate. - /// Order Status. - /// complete (default to false). - public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) - { - this.Id = id; - this.PetId = petId; - this.Quantity = quantity; - this.ShipDate = shipDate; - this.Status = status; - // use default value if no "complete" provided - if (complete == null) - { - this.Complete = false; - } - else - { - this.Complete = complete; - } - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets PetId - /// - [DataMember(Name="petId", EmitDefaultValue=false)] - public long PetId { get; set; } - - /// - /// Gets or Sets Quantity - /// - [DataMember(Name="quantity", EmitDefaultValue=false)] - public int Quantity { get; set; } - - /// - /// Gets or Sets ShipDate - /// - [DataMember(Name="shipDate", EmitDefaultValue=false)] - public DateTime ShipDate { get; set; } - - - /// - /// Gets or Sets Complete - /// - [DataMember(Name="complete", EmitDefaultValue=false)] - public bool Complete { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Order {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Order); - } - - /// - /// Returns true if Order instances are equal - /// - /// Instance of Order to be compared - /// Boolean - public bool Equals(Order input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PetId == input.PetId || - (this.PetId != null && - this.PetId.Equals(input.PetId)) - ) && - ( - this.Quantity == input.Quantity || - (this.Quantity != null && - this.Quantity.Equals(input.Quantity)) - ) && - ( - this.ShipDate == input.ShipDate || - (this.ShipDate != null && - this.ShipDate.Equals(input.ShipDate)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.Complete == input.Complete || - (this.Complete != null && - this.Complete.Equals(input.Complete)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.PetId != null) - hashCode = hashCode * 59 + this.PetId.GetHashCode(); - if (this.Quantity != null) - hashCode = hashCode * 59 + this.Quantity.GetHashCode(); - if (this.ShipDate != null) - hashCode = hashCode * 59 + this.ShipDate.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - if (this.Complete != null) - hashCode = hashCode * 59 + this.Complete.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterComposite.cs deleted file mode 100644 index 346f0d1feaf..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterComposite.cs +++ /dev/null @@ -1,156 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// OuterComposite - /// - [DataContract] - public partial class OuterComposite : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// myNumber. - /// myString. - /// myBoolean. - public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) - { - this.MyNumber = myNumber; - this.MyString = myString; - this.MyBoolean = myBoolean; - } - - /// - /// Gets or Sets MyNumber - /// - [DataMember(Name="my_number", EmitDefaultValue=false)] - public decimal MyNumber { get; set; } - - /// - /// Gets or Sets MyString - /// - [DataMember(Name="my_string", EmitDefaultValue=false)] - public string MyString { get; set; } - - /// - /// Gets or Sets MyBoolean - /// - [DataMember(Name="my_boolean", EmitDefaultValue=false)] - public bool MyBoolean { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class OuterComposite {\n"); - sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); - sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OuterComposite); - } - - /// - /// Returns true if OuterComposite instances are equal - /// - /// Instance of OuterComposite to be compared - /// Boolean - public bool Equals(OuterComposite input) - { - if (input == null) - return false; - - return - ( - this.MyNumber == input.MyNumber || - (this.MyNumber != null && - this.MyNumber.Equals(input.MyNumber)) - ) && - ( - this.MyString == input.MyString || - (this.MyString != null && - this.MyString.Equals(input.MyString)) - ) && - ( - this.MyBoolean == input.MyBoolean || - (this.MyBoolean != null && - this.MyBoolean.Equals(input.MyBoolean)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MyNumber != null) - hashCode = hashCode * 59 + this.MyNumber.GetHashCode(); - if (this.MyString != null) - hashCode = hashCode * 59 + this.MyString.GetHashCode(); - if (this.MyBoolean != null) - hashCode = hashCode * 59 + this.MyBoolean.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnum.cs deleted file mode 100644 index 874f2487f8c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnum.cs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Defines OuterEnum - /// - - [JsonConverter(typeof(StringEnumConverter))] - - public enum OuterEnum - { - /// - /// Enum Placed for value: placed - /// - [EnumMember(Value = "placed")] - Placed = 1, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 2, - - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 3 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs deleted file mode 100644 index d8720011610..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnumDefaultValue.cs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Defines OuterEnumDefaultValue - /// - - [JsonConverter(typeof(StringEnumConverter))] - - public enum OuterEnumDefaultValue - { - /// - /// Enum Placed for value: placed - /// - [EnumMember(Value = "placed")] - Placed = 1, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 2, - - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 3 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnumInteger.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnumInteger.cs deleted file mode 100644 index 58b3eac73b1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnumInteger.cs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Defines OuterEnumInteger - /// - - public enum OuterEnumInteger - { - /// - /// Enum NUMBER_0 for value: 0 - /// - NUMBER_0 = 0, - - /// - /// Enum NUMBER_1 for value: 1 - /// - NUMBER_1 = 1, - - /// - /// Enum NUMBER_2 for value: 2 - /// - NUMBER_2 = 2 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs deleted file mode 100644 index d45f40bbbe8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterEnumIntegerDefaultValue.cs +++ /dev/null @@ -1,50 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Defines OuterEnumIntegerDefaultValue - /// - - public enum OuterEnumIntegerDefaultValue - { - /// - /// Enum NUMBER_0 for value: 0 - /// - NUMBER_0 = 0, - - /// - /// Enum NUMBER_1 for value: 1 - /// - NUMBER_1 = 1, - - /// - /// Enum NUMBER_2 for value: 2 - /// - NUMBER_2 = 2 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterObjectWithEnumProperty.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterObjectWithEnumProperty.cs deleted file mode 100644 index a7db86a7ba2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/OuterObjectWithEnumProperty.cs +++ /dev/null @@ -1,138 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// OuterObjectWithEnumProperty - /// - [DataContract] - public partial class OuterObjectWithEnumProperty : IEquatable, IValidatableObject - { - /// - /// Gets or Sets Value - /// - [DataMember(Name="value", EmitDefaultValue=true)] - public OuterEnumInteger Value { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected OuterObjectWithEnumProperty() { } - /// - /// Initializes a new instance of the class. - /// - /// value (required). - public OuterObjectWithEnumProperty(OuterEnumInteger value = default(OuterEnumInteger)) - { - // to ensure "value" is required (not null) - if (value == null) - { - throw new InvalidDataException("value is a required property for OuterObjectWithEnumProperty and cannot be null"); - } - else - { - this.Value = value; - } - - } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class OuterObjectWithEnumProperty {\n"); - sb.Append(" Value: ").Append(Value).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OuterObjectWithEnumProperty); - } - - /// - /// Returns true if OuterObjectWithEnumProperty instances are equal - /// - /// Instance of OuterObjectWithEnumProperty to be compared - /// Boolean - public bool Equals(OuterObjectWithEnumProperty input) - { - if (input == null) - return false; - - return - ( - this.Value == input.Value || - (this.Value != null && - this.Value.Equals(input.Value)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Value != null) - hashCode = hashCode * 59 + this.Value.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs deleted file mode 100644 index 16fa2ab775f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Pet.cs +++ /dev/null @@ -1,259 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Pet - /// - [DataContract] - public partial class Pet : IEquatable, IValidatableObject - { - /// - /// pet status in the store - /// - /// pet status in the store - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Available for value: available - /// - [EnumMember(Value = "available")] - Available = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2, - - /// - /// Enum Sold for value: sold - /// - [EnumMember(Value = "sold")] - Sold = 3 - - } - - /// - /// pet status in the store - /// - /// pet status in the store - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Pet() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// category. - /// name (required). - /// photoUrls (required). - /// tags. - /// pet status in the store. - public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Pet and cannot be null"); - } - else - { - this.Name = name; - } - - // to ensure "photoUrls" is required (not null) - if (photoUrls == null) - { - throw new InvalidDataException("photoUrls is a required property for Pet and cannot be null"); - } - else - { - this.PhotoUrls = photoUrls; - } - - this.Id = id; - this.Category = category; - this.Tags = tags; - this.Status = status; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Category - /// - [DataMember(Name="category", EmitDefaultValue=false)] - public Category Category { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Gets or Sets PhotoUrls - /// - [DataMember(Name="photoUrls", EmitDefaultValue=true)] - public List PhotoUrls { get; set; } - - /// - /// Gets or Sets Tags - /// - [DataMember(Name="tags", EmitDefaultValue=false)] - public List Tags { get; set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Pet); - } - - /// - /// Returns true if Pet instances are equal - /// - /// Instance of Pet to be compared - /// Boolean - public bool Equals(Pet input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Category == input.Category || - (this.Category != null && - this.Category.Equals(input.Category)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PhotoUrls == input.PhotoUrls || - this.PhotoUrls != null && - input.PhotoUrls != null && - this.PhotoUrls.SequenceEqual(input.PhotoUrls) - ) && - ( - this.Tags == input.Tags || - this.Tags != null && - input.Tags != null && - this.Tags.SequenceEqual(input.Tags) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Category != null) - hashCode = hashCode * 59 + this.Category.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.PhotoUrls != null) - hashCode = hashCode * 59 + this.PhotoUrls.GetHashCode(); - if (this.Tags != null) - hashCode = hashCode * 59 + this.Tags.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - - - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs deleted file mode 100644 index edceeb2c169..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ /dev/null @@ -1,138 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ReadOnlyFirst - /// - [DataContract] - public partial class ReadOnlyFirst : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// baz. - public ReadOnlyFirst(string baz = default(string)) - { - this.Baz = baz; - } - - /// - /// Gets or Sets Bar - /// - [DataMember(Name="bar", EmitDefaultValue=false)] - public string Bar { get; private set; } - - /// - /// Gets or Sets Baz - /// - [DataMember(Name="baz", EmitDefaultValue=false)] - public string Baz { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ReadOnlyFirst {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Baz: ").Append(Baz).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReadOnlyFirst); - } - - /// - /// Returns true if ReadOnlyFirst instances are equal - /// - /// Instance of ReadOnlyFirst to be compared - /// Boolean - public bool Equals(ReadOnlyFirst input) - { - if (input == null) - return false; - - return - ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) - ) && - ( - this.Baz == input.Baz || - (this.Baz != null && - this.Baz.Equals(input.Baz)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bar != null) - hashCode = hashCode * 59 + this.Bar.GetHashCode(); - if (this.Baz != null) - hashCode = hashCode * 59 + this.Baz.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Return.cs deleted file mode 100644 index def31e1770e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Return.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing reserved words - /// - [DataContract] - public partial class Return : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// varReturn. - public Return(int varReturn = default(int)) - { - this.VarReturn = varReturn; - } - - /// - /// Gets or Sets VarReturn - /// - [DataMember(Name="return", EmitDefaultValue=false)] - public int VarReturn { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Return {\n"); - sb.Append(" VarReturn: ").Append(VarReturn).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Return); - } - - /// - /// Returns true if Return instances are equal - /// - /// Instance of Return to be compared - /// Boolean - public bool Equals(Return input) - { - if (input == null) - return false; - - return - ( - this.VarReturn == input.VarReturn || - (this.VarReturn != null && - this.VarReturn.Equals(input.VarReturn)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.VarReturn != null) - hashCode = hashCode * 59 + this.VarReturn.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/SingleRefType.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/SingleRefType.cs deleted file mode 100644 index 1c907fc1c0d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/SingleRefType.cs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Defines SingleRefType - /// - - [JsonConverter(typeof(StringEnumConverter))] - - public enum SingleRefType - { - /// - /// Enum Admin for value: admin - /// - [EnumMember(Value = "admin")] - Admin = 1, - - /// - /// Enum User for value: user - /// - [EnumMember(Value = "user")] - User = 2 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/SpecialModelName.cs deleted file mode 100644 index 328eb14a9cd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// SpecialModelName - /// - [DataContract] - public partial class SpecialModelName : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// specialPropertyName. - public SpecialModelName(long specialPropertyName = default(long)) - { - this.SpecialPropertyName = specialPropertyName; - } - - /// - /// Gets or Sets SpecialPropertyName - /// - [DataMember(Name="$special[property.name]", EmitDefaultValue=false)] - public long SpecialPropertyName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SpecialModelName); - } - - /// - /// Returns true if SpecialModelName instances are equal - /// - /// Instance of SpecialModelName to be compared - /// Boolean - public bool Equals(SpecialModelName input) - { - if (input == null) - return false; - - return - ( - this.SpecialPropertyName == input.SpecialPropertyName || - (this.SpecialPropertyName != null && - this.SpecialPropertyName.Equals(input.SpecialPropertyName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SpecialPropertyName != null) - hashCode = hashCode * 59 + this.SpecialPropertyName.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Tag.cs deleted file mode 100644 index a06ce345b25..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/Tag.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Tag - /// - [DataContract] - public partial class Tag : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - public Tag(long id = default(long), string name = default(string)) - { - this.Id = id; - this.Name = name; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Tag); - } - - /// - /// Returns true if Tag instances are equal - /// - /// Instance of Tag to be compared - /// Boolean - public bool Equals(Tag input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs deleted file mode 100644 index dbcea03c41e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderDefault.cs +++ /dev/null @@ -1,239 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// TypeHolderDefault - /// - [DataContract] - public partial class TypeHolderDefault : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TypeHolderDefault() { } - /// - /// Initializes a new instance of the class. - /// - /// stringItem (required) (default to "what"). - /// numberItem (required). - /// integerItem (required). - /// boolItem (required) (default to true). - /// arrayItem (required). - public TypeHolderDefault(string stringItem = "what", decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = true, List arrayItem = default(List)) - { - // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - - // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - - } - - /// - /// Gets or Sets StringItem - /// - [DataMember(Name="string_item", EmitDefaultValue=true)] - public string StringItem { get; set; } - - /// - /// Gets or Sets NumberItem - /// - [DataMember(Name="number_item", EmitDefaultValue=true)] - public decimal NumberItem { get; set; } - - /// - /// Gets or Sets IntegerItem - /// - [DataMember(Name="integer_item", EmitDefaultValue=true)] - public int IntegerItem { get; set; } - - /// - /// Gets or Sets BoolItem - /// - [DataMember(Name="bool_item", EmitDefaultValue=true)] - public bool BoolItem { get; set; } - - /// - /// Gets or Sets ArrayItem - /// - [DataMember(Name="array_item", EmitDefaultValue=true)] - public List ArrayItem { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TypeHolderDefault {\n"); - sb.Append(" StringItem: ").Append(StringItem).Append("\n"); - sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); - sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); - sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); - sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TypeHolderDefault); - } - - /// - /// Returns true if TypeHolderDefault instances are equal - /// - /// Instance of TypeHolderDefault to be compared - /// Boolean - public bool Equals(TypeHolderDefault input) - { - if (input == null) - return false; - - return - ( - this.StringItem == input.StringItem || - (this.StringItem != null && - this.StringItem.Equals(input.StringItem)) - ) && - ( - this.NumberItem == input.NumberItem || - (this.NumberItem != null && - this.NumberItem.Equals(input.NumberItem)) - ) && - ( - this.IntegerItem == input.IntegerItem || - (this.IntegerItem != null && - this.IntegerItem.Equals(input.IntegerItem)) - ) && - ( - this.BoolItem == input.BoolItem || - (this.BoolItem != null && - this.BoolItem.Equals(input.BoolItem)) - ) && - ( - this.ArrayItem == input.ArrayItem || - this.ArrayItem != null && - input.ArrayItem != null && - this.ArrayItem.SequenceEqual(input.ArrayItem) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.StringItem != null) - hashCode = hashCode * 59 + this.StringItem.GetHashCode(); - if (this.NumberItem != null) - hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); - if (this.IntegerItem != null) - hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); - if (this.BoolItem != null) - hashCode = hashCode * 59 + this.BoolItem.GetHashCode(); - if (this.ArrayItem != null) - hashCode = hashCode * 59 + this.ArrayItem.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs deleted file mode 100644 index 0a71dbe00b8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ /dev/null @@ -1,264 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// TypeHolderExample - /// - [DataContract] - public partial class TypeHolderExample : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TypeHolderExample() { } - /// - /// Initializes a new instance of the class. - /// - /// stringItem (required). - /// numberItem (required). - /// floatItem (required). - /// integerItem (required). - /// boolItem (required). - /// arrayItem (required). - public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) - { - // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "floatItem" is required (not null) - if (floatItem == null) - { - throw new InvalidDataException("floatItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.FloatItem = floatItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - - // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - - } - - /// - /// Gets or Sets StringItem - /// - [DataMember(Name="string_item", EmitDefaultValue=true)] - public string StringItem { get; set; } - - /// - /// Gets or Sets NumberItem - /// - [DataMember(Name="number_item", EmitDefaultValue=true)] - public decimal NumberItem { get; set; } - - /// - /// Gets or Sets FloatItem - /// - [DataMember(Name="float_item", EmitDefaultValue=true)] - public float FloatItem { get; set; } - - /// - /// Gets or Sets IntegerItem - /// - [DataMember(Name="integer_item", EmitDefaultValue=true)] - public int IntegerItem { get; set; } - - /// - /// Gets or Sets BoolItem - /// - [DataMember(Name="bool_item", EmitDefaultValue=true)] - public bool BoolItem { get; set; } - - /// - /// Gets or Sets ArrayItem - /// - [DataMember(Name="array_item", EmitDefaultValue=true)] - public List ArrayItem { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TypeHolderExample {\n"); - sb.Append(" StringItem: ").Append(StringItem).Append("\n"); - sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); - sb.Append(" FloatItem: ").Append(FloatItem).Append("\n"); - sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); - sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); - sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TypeHolderExample); - } - - /// - /// Returns true if TypeHolderExample instances are equal - /// - /// Instance of TypeHolderExample to be compared - /// Boolean - public bool Equals(TypeHolderExample input) - { - if (input == null) - return false; - - return - ( - this.StringItem == input.StringItem || - (this.StringItem != null && - this.StringItem.Equals(input.StringItem)) - ) && - ( - this.NumberItem == input.NumberItem || - (this.NumberItem != null && - this.NumberItem.Equals(input.NumberItem)) - ) && - ( - this.FloatItem == input.FloatItem || - (this.FloatItem != null && - this.FloatItem.Equals(input.FloatItem)) - ) && - ( - this.IntegerItem == input.IntegerItem || - (this.IntegerItem != null && - this.IntegerItem.Equals(input.IntegerItem)) - ) && - ( - this.BoolItem == input.BoolItem || - (this.BoolItem != null && - this.BoolItem.Equals(input.BoolItem)) - ) && - ( - this.ArrayItem == input.ArrayItem || - this.ArrayItem != null && - input.ArrayItem != null && - this.ArrayItem.SequenceEqual(input.ArrayItem) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.StringItem != null) - hashCode = hashCode * 59 + this.StringItem.GetHashCode(); - if (this.NumberItem != null) - hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); - if (this.FloatItem != null) - hashCode = hashCode * 59 + this.FloatItem.GetHashCode(); - if (this.IntegerItem != null) - hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); - if (this.BoolItem != null) - hashCode = hashCode * 59 + this.BoolItem.GetHashCode(); - if (this.ArrayItem != null) - hashCode = hashCode * 59 + this.ArrayItem.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/User.cs deleted file mode 100644 index 913098aaab6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/User.cs +++ /dev/null @@ -1,237 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// User - /// - [DataContract] - public partial class User : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// username. - /// firstName. - /// lastName. - /// email. - /// password. - /// phone. - /// User Status. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int)) - { - this.Id = id; - this.Username = username; - this.FirstName = firstName; - this.LastName = lastName; - this.Email = email; - this.Password = password; - this.Phone = phone; - this.UserStatus = userStatus; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Username - /// - [DataMember(Name="username", EmitDefaultValue=false)] - public string Username { get; set; } - - /// - /// Gets or Sets FirstName - /// - [DataMember(Name="firstName", EmitDefaultValue=false)] - public string FirstName { get; set; } - - /// - /// Gets or Sets LastName - /// - [DataMember(Name="lastName", EmitDefaultValue=false)] - public string LastName { get; set; } - - /// - /// Gets or Sets Email - /// - [DataMember(Name="email", EmitDefaultValue=false)] - public string Email { get; set; } - - /// - /// Gets or Sets Password - /// - [DataMember(Name="password", EmitDefaultValue=false)] - public string Password { get; set; } - - /// - /// Gets or Sets Phone - /// - [DataMember(Name="phone", EmitDefaultValue=false)] - public string Phone { get; set; } - - /// - /// User Status - /// - /// User Status - [DataMember(Name="userStatus", EmitDefaultValue=false)] - public int UserStatus { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return Newtonsoft.Json.JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as User); - } - - /// - /// Returns true if User instances are equal - /// - /// Instance of User to be compared - /// Boolean - public bool Equals(User input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.UserStatus == input.UserStatus || - (this.UserStatus != null && - this.UserStatus.Equals(input.UserStatus)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Username != null) - hashCode = hashCode * 59 + this.Username.GetHashCode(); - if (this.FirstName != null) - hashCode = hashCode * 59 + this.FirstName.GetHashCode(); - if (this.LastName != null) - hashCode = hashCode * 59 + this.LastName.GetHashCode(); - if (this.Email != null) - hashCode = hashCode * 59 + this.Email.GetHashCode(); - if (this.Password != null) - hashCode = hashCode * 59 + this.Password.GetHashCode(); - if (this.Phone != null) - hashCode = hashCode * 59 + this.Phone.GetHashCode(); - if (this.UserStatus != null) - hashCode = hashCode * 59 + this.UserStatus.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/XmlItem.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/XmlItem.cs deleted file mode 100644 index 5cebfb5f5a2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Model/XmlItem.cs +++ /dev/null @@ -1,581 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// XmlItem - /// - [DataContract] - public partial class XmlItem : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// attributeString. - /// attributeNumber. - /// attributeInteger. - /// attributeBoolean. - /// wrappedArray. - /// nameString. - /// nameNumber. - /// nameInteger. - /// nameBoolean. - /// nameArray. - /// nameWrappedArray. - /// prefixString. - /// prefixNumber. - /// prefixInteger. - /// prefixBoolean. - /// prefixArray. - /// prefixWrappedArray. - /// namespaceString. - /// namespaceNumber. - /// namespaceInteger. - /// namespaceBoolean. - /// namespaceArray. - /// namespaceWrappedArray. - /// prefixNsString. - /// prefixNsNumber. - /// prefixNsInteger. - /// prefixNsBoolean. - /// prefixNsArray. - /// prefixNsWrappedArray. - public XmlItem(string attributeString = default(string), decimal attributeNumber = default(decimal), int attributeInteger = default(int), bool attributeBoolean = default(bool), List wrappedArray = default(List), string nameString = default(string), decimal nameNumber = default(decimal), int nameInteger = default(int), bool nameBoolean = default(bool), List nameArray = default(List), List nameWrappedArray = default(List), string prefixString = default(string), decimal prefixNumber = default(decimal), int prefixInteger = default(int), bool prefixBoolean = default(bool), List prefixArray = default(List), List prefixWrappedArray = default(List), string namespaceString = default(string), decimal namespaceNumber = default(decimal), int namespaceInteger = default(int), bool namespaceBoolean = default(bool), List namespaceArray = default(List), List namespaceWrappedArray = default(List), string prefixNsString = default(string), decimal prefixNsNumber = default(decimal), int prefixNsInteger = default(int), bool prefixNsBoolean = default(bool), List prefixNsArray = default(List), List prefixNsWrappedArray = default(List)) - { - this.AttributeString = attributeString; - this.AttributeNumber = attributeNumber; - this.AttributeInteger = attributeInteger; - this.AttributeBoolean = attributeBoolean; - this.WrappedArray = wrappedArray; - this.NameString = nameString; - this.NameNumber = nameNumber; - this.NameInteger = nameInteger; - this.NameBoolean = nameBoolean; - this.NameArray = nameArray; - this.NameWrappedArray = nameWrappedArray; - this.PrefixString = prefixString; - this.PrefixNumber = prefixNumber; - this.PrefixInteger = prefixInteger; - this.PrefixBoolean = prefixBoolean; - this.PrefixArray = prefixArray; - this.PrefixWrappedArray = prefixWrappedArray; - this.NamespaceString = namespaceString; - this.NamespaceNumber = namespaceNumber; - this.NamespaceInteger = namespaceInteger; - this.NamespaceBoolean = namespaceBoolean; - this.NamespaceArray = namespaceArray; - this.NamespaceWrappedArray = namespaceWrappedArray; - this.PrefixNsString = prefixNsString; - this.PrefixNsNumber = prefixNsNumber; - this.PrefixNsInteger = prefixNsInteger; - this.PrefixNsBoolean = prefixNsBoolean; - this.PrefixNsArray = prefixNsArray; - this.PrefixNsWrappedArray = prefixNsWrappedArray; - } - - /// - /// Gets or Sets AttributeString - /// - [DataMember(Name="attribute_string", EmitDefaultValue=false)] - public string AttributeString { get; set; } - - /// - /// Gets or Sets AttributeNumber - /// - [DataMember(Name="attribute_number", EmitDefaultValue=false)] - public decimal AttributeNumber { get; set; } - - /// - /// Gets or Sets AttributeInteger - /// - [DataMember(Name="attribute_integer", EmitDefaultValue=false)] - public int AttributeInteger { get; set; } - - /// - /// Gets or Sets AttributeBoolean - /// - [DataMember(Name="attribute_boolean", EmitDefaultValue=false)] - public bool AttributeBoolean { get; set; } - - /// - /// Gets or Sets WrappedArray - /// - [DataMember(Name="wrapped_array", EmitDefaultValue=false)] - public List WrappedArray { get; set; } - - /// - /// Gets or Sets NameString - /// - [DataMember(Name="name_string", EmitDefaultValue=false)] - public string NameString { get; set; } - - /// - /// Gets or Sets NameNumber - /// - [DataMember(Name="name_number", EmitDefaultValue=false)] - public decimal NameNumber { get; set; } - - /// - /// Gets or Sets NameInteger - /// - [DataMember(Name="name_integer", EmitDefaultValue=false)] - public int NameInteger { get; set; } - - /// - /// Gets or Sets NameBoolean - /// - [DataMember(Name="name_boolean", EmitDefaultValue=false)] - public bool NameBoolean { get; set; } - - /// - /// Gets or Sets NameArray - /// - [DataMember(Name="name_array", EmitDefaultValue=false)] - public List NameArray { get; set; } - - /// - /// Gets or Sets NameWrappedArray - /// - [DataMember(Name="name_wrapped_array", EmitDefaultValue=false)] - public List NameWrappedArray { get; set; } - - /// - /// Gets or Sets PrefixString - /// - [DataMember(Name="prefix_string", EmitDefaultValue=false)] - public string PrefixString { get; set; } - - /// - /// Gets or Sets PrefixNumber - /// - [DataMember(Name="prefix_number", EmitDefaultValue=false)] - public decimal PrefixNumber { get; set; } - - /// - /// Gets or Sets PrefixInteger - /// - [DataMember(Name="prefix_integer", EmitDefaultValue=false)] - public int PrefixInteger { get; set; } - - /// - /// Gets or Sets PrefixBoolean - /// - [DataMember(Name="prefix_boolean", EmitDefaultValue=false)] - public bool PrefixBoolean { get; set; } - - /// - /// Gets or Sets PrefixArray - /// - [DataMember(Name="prefix_array", EmitDefaultValue=false)] - public List PrefixArray { get; set; } - - /// - /// Gets or Sets PrefixWrappedArray - /// - [DataMember(Name="prefix_wrapped_array", EmitDefaultValue=false)] - public List PrefixWrappedArray { get; set; } - - /// - /// Gets or Sets NamespaceString - /// - [DataMember(Name="namespace_string", EmitDefaultValue=false)] - public string NamespaceString { get; set; } - - /// - /// Gets or Sets NamespaceNumber - /// - [DataMember(Name="namespace_number", EmitDefaultValue=false)] - public decimal NamespaceNumber { get; set; } - - /// - /// Gets or Sets NamespaceInteger - /// - [DataMember(Name="namespace_integer", EmitDefaultValue=false)] - public int NamespaceInteger { get; set; } - - /// - /// Gets or Sets NamespaceBoolean - /// - [DataMember(Name="namespace_boolean", EmitDefaultValue=false)] - public bool NamespaceBoolean { get; set; } - - /// - /// Gets or Sets NamespaceArray - /// - [DataMember(Name="namespace_array", EmitDefaultValue=false)] - public List NamespaceArray { get; set; } - - /// - /// Gets or Sets NamespaceWrappedArray - /// - [DataMember(Name="namespace_wrapped_array", EmitDefaultValue=false)] - public List NamespaceWrappedArray { get; set; } - - /// - /// Gets or Sets PrefixNsString - /// - [DataMember(Name="prefix_ns_string", EmitDefaultValue=false)] - public string PrefixNsString { get; set; } - - /// - /// Gets or Sets PrefixNsNumber - /// - [DataMember(Name="prefix_ns_number", EmitDefaultValue=false)] - public decimal PrefixNsNumber { get; set; } - - /// - /// Gets or Sets PrefixNsInteger - /// - [DataMember(Name="prefix_ns_integer", EmitDefaultValue=false)] - public int PrefixNsInteger { get; set; } - - /// - /// Gets or Sets PrefixNsBoolean - /// - [DataMember(Name="prefix_ns_boolean", EmitDefaultValue=false)] - public bool PrefixNsBoolean { get; set; } - - /// - /// Gets or Sets PrefixNsArray - /// - [DataMember(Name="prefix_ns_array", EmitDefaultValue=false)] - public List PrefixNsArray { get; set; } - - /// - /// Gets or Sets PrefixNsWrappedArray - /// - [DataMember(Name="prefix_ns_wrapped_array", EmitDefaultValue=false)] - public List PrefixNsWrappedArray { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class XmlItem {\n"); - sb.Append(" AttributeString: ").Append(AttributeString).Append("\n"); - sb.Append(" AttributeNumber: ").Append(AttributeNumber).Append("\n"); - sb.Append(" AttributeInteger: ").Append(AttributeInteger).Append("\n"); - sb.Append(" AttributeBoolean: ").Append(AttributeBoolean).Append("\n"); - sb.Append(" WrappedArray: ").Append(WrappedArray).Append("\n"); - sb.Append(" NameString: ").Append(NameString).Append("\n"); - sb.Append(" NameNumber: ").Append(NameNumber).Append("\n"); - sb.Append(" NameInteger: ").Append(NameInteger).Append("\n"); - sb.Append(" NameBoolean: ").Append(NameBoolean).Append("\n"); - sb.Append(" NameArray: ").Append(NameArray).Append("\n"); - sb.Append(" NameWrappedArray: ").Append(NameWrappedArray).Append("\n"); - sb.Append(" PrefixString: ").Append(PrefixString).Append("\n"); - sb.Append(" PrefixNumber: ").Append(PrefixNumber).Append("\n"); - sb.Append(" PrefixInteger: ").Append(PrefixInteger).Append("\n"); - sb.Append(" PrefixBoolean: ").Append(PrefixBoolean).Append("\n"); - sb.Append(" PrefixArray: ").Append(PrefixArray).Append("\n"); - sb.Append(" PrefixWrappedArray: ").Append(PrefixWrappedArray).Append("\n"); - sb.Append(" NamespaceString: ").Append(NamespaceString).Append("\n"); - sb.Append(" NamespaceNumber: ").Append(NamespaceNumber).Append("\n"); - sb.Append(" NamespaceInteger: ").Append(NamespaceInteger).Append("\n"); - sb.Append(" NamespaceBoolean: ").Append(NamespaceBoolean).Append("\n"); - sb.Append(" NamespaceArray: ").Append(NamespaceArray).Append("\n"); - sb.Append(" NamespaceWrappedArray: ").Append(NamespaceWrappedArray).Append("\n"); - sb.Append(" PrefixNsString: ").Append(PrefixNsString).Append("\n"); - sb.Append(" PrefixNsNumber: ").Append(PrefixNsNumber).Append("\n"); - sb.Append(" PrefixNsInteger: ").Append(PrefixNsInteger).Append("\n"); - sb.Append(" PrefixNsBoolean: ").Append(PrefixNsBoolean).Append("\n"); - sb.Append(" PrefixNsArray: ").Append(PrefixNsArray).Append("\n"); - sb.Append(" PrefixNsWrappedArray: ").Append(PrefixNsWrappedArray).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as XmlItem); - } - - /// - /// Returns true if XmlItem instances are equal - /// - /// Instance of XmlItem to be compared - /// Boolean - public bool Equals(XmlItem input) - { - if (input == null) - return false; - - return - ( - this.AttributeString == input.AttributeString || - (this.AttributeString != null && - this.AttributeString.Equals(input.AttributeString)) - ) && - ( - this.AttributeNumber == input.AttributeNumber || - (this.AttributeNumber != null && - this.AttributeNumber.Equals(input.AttributeNumber)) - ) && - ( - this.AttributeInteger == input.AttributeInteger || - (this.AttributeInteger != null && - this.AttributeInteger.Equals(input.AttributeInteger)) - ) && - ( - this.AttributeBoolean == input.AttributeBoolean || - (this.AttributeBoolean != null && - this.AttributeBoolean.Equals(input.AttributeBoolean)) - ) && - ( - this.WrappedArray == input.WrappedArray || - this.WrappedArray != null && - input.WrappedArray != null && - this.WrappedArray.SequenceEqual(input.WrappedArray) - ) && - ( - this.NameString == input.NameString || - (this.NameString != null && - this.NameString.Equals(input.NameString)) - ) && - ( - this.NameNumber == input.NameNumber || - (this.NameNumber != null && - this.NameNumber.Equals(input.NameNumber)) - ) && - ( - this.NameInteger == input.NameInteger || - (this.NameInteger != null && - this.NameInteger.Equals(input.NameInteger)) - ) && - ( - this.NameBoolean == input.NameBoolean || - (this.NameBoolean != null && - this.NameBoolean.Equals(input.NameBoolean)) - ) && - ( - this.NameArray == input.NameArray || - this.NameArray != null && - input.NameArray != null && - this.NameArray.SequenceEqual(input.NameArray) - ) && - ( - this.NameWrappedArray == input.NameWrappedArray || - this.NameWrappedArray != null && - input.NameWrappedArray != null && - this.NameWrappedArray.SequenceEqual(input.NameWrappedArray) - ) && - ( - this.PrefixString == input.PrefixString || - (this.PrefixString != null && - this.PrefixString.Equals(input.PrefixString)) - ) && - ( - this.PrefixNumber == input.PrefixNumber || - (this.PrefixNumber != null && - this.PrefixNumber.Equals(input.PrefixNumber)) - ) && - ( - this.PrefixInteger == input.PrefixInteger || - (this.PrefixInteger != null && - this.PrefixInteger.Equals(input.PrefixInteger)) - ) && - ( - this.PrefixBoolean == input.PrefixBoolean || - (this.PrefixBoolean != null && - this.PrefixBoolean.Equals(input.PrefixBoolean)) - ) && - ( - this.PrefixArray == input.PrefixArray || - this.PrefixArray != null && - input.PrefixArray != null && - this.PrefixArray.SequenceEqual(input.PrefixArray) - ) && - ( - this.PrefixWrappedArray == input.PrefixWrappedArray || - this.PrefixWrappedArray != null && - input.PrefixWrappedArray != null && - this.PrefixWrappedArray.SequenceEqual(input.PrefixWrappedArray) - ) && - ( - this.NamespaceString == input.NamespaceString || - (this.NamespaceString != null && - this.NamespaceString.Equals(input.NamespaceString)) - ) && - ( - this.NamespaceNumber == input.NamespaceNumber || - (this.NamespaceNumber != null && - this.NamespaceNumber.Equals(input.NamespaceNumber)) - ) && - ( - this.NamespaceInteger == input.NamespaceInteger || - (this.NamespaceInteger != null && - this.NamespaceInteger.Equals(input.NamespaceInteger)) - ) && - ( - this.NamespaceBoolean == input.NamespaceBoolean || - (this.NamespaceBoolean != null && - this.NamespaceBoolean.Equals(input.NamespaceBoolean)) - ) && - ( - this.NamespaceArray == input.NamespaceArray || - this.NamespaceArray != null && - input.NamespaceArray != null && - this.NamespaceArray.SequenceEqual(input.NamespaceArray) - ) && - ( - this.NamespaceWrappedArray == input.NamespaceWrappedArray || - this.NamespaceWrappedArray != null && - input.NamespaceWrappedArray != null && - this.NamespaceWrappedArray.SequenceEqual(input.NamespaceWrappedArray) - ) && - ( - this.PrefixNsString == input.PrefixNsString || - (this.PrefixNsString != null && - this.PrefixNsString.Equals(input.PrefixNsString)) - ) && - ( - this.PrefixNsNumber == input.PrefixNsNumber || - (this.PrefixNsNumber != null && - this.PrefixNsNumber.Equals(input.PrefixNsNumber)) - ) && - ( - this.PrefixNsInteger == input.PrefixNsInteger || - (this.PrefixNsInteger != null && - this.PrefixNsInteger.Equals(input.PrefixNsInteger)) - ) && - ( - this.PrefixNsBoolean == input.PrefixNsBoolean || - (this.PrefixNsBoolean != null && - this.PrefixNsBoolean.Equals(input.PrefixNsBoolean)) - ) && - ( - this.PrefixNsArray == input.PrefixNsArray || - this.PrefixNsArray != null && - input.PrefixNsArray != null && - this.PrefixNsArray.SequenceEqual(input.PrefixNsArray) - ) && - ( - this.PrefixNsWrappedArray == input.PrefixNsWrappedArray || - this.PrefixNsWrappedArray != null && - input.PrefixNsWrappedArray != null && - this.PrefixNsWrappedArray.SequenceEqual(input.PrefixNsWrappedArray) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AttributeString != null) - hashCode = hashCode * 59 + this.AttributeString.GetHashCode(); - if (this.AttributeNumber != null) - hashCode = hashCode * 59 + this.AttributeNumber.GetHashCode(); - if (this.AttributeInteger != null) - hashCode = hashCode * 59 + this.AttributeInteger.GetHashCode(); - if (this.AttributeBoolean != null) - hashCode = hashCode * 59 + this.AttributeBoolean.GetHashCode(); - if (this.WrappedArray != null) - hashCode = hashCode * 59 + this.WrappedArray.GetHashCode(); - if (this.NameString != null) - hashCode = hashCode * 59 + this.NameString.GetHashCode(); - if (this.NameNumber != null) - hashCode = hashCode * 59 + this.NameNumber.GetHashCode(); - if (this.NameInteger != null) - hashCode = hashCode * 59 + this.NameInteger.GetHashCode(); - if (this.NameBoolean != null) - hashCode = hashCode * 59 + this.NameBoolean.GetHashCode(); - if (this.NameArray != null) - hashCode = hashCode * 59 + this.NameArray.GetHashCode(); - if (this.NameWrappedArray != null) - hashCode = hashCode * 59 + this.NameWrappedArray.GetHashCode(); - if (this.PrefixString != null) - hashCode = hashCode * 59 + this.PrefixString.GetHashCode(); - if (this.PrefixNumber != null) - hashCode = hashCode * 59 + this.PrefixNumber.GetHashCode(); - if (this.PrefixInteger != null) - hashCode = hashCode * 59 + this.PrefixInteger.GetHashCode(); - if (this.PrefixBoolean != null) - hashCode = hashCode * 59 + this.PrefixBoolean.GetHashCode(); - if (this.PrefixArray != null) - hashCode = hashCode * 59 + this.PrefixArray.GetHashCode(); - if (this.PrefixWrappedArray != null) - hashCode = hashCode * 59 + this.PrefixWrappedArray.GetHashCode(); - if (this.NamespaceString != null) - hashCode = hashCode * 59 + this.NamespaceString.GetHashCode(); - if (this.NamespaceNumber != null) - hashCode = hashCode * 59 + this.NamespaceNumber.GetHashCode(); - if (this.NamespaceInteger != null) - hashCode = hashCode * 59 + this.NamespaceInteger.GetHashCode(); - if (this.NamespaceBoolean != null) - hashCode = hashCode * 59 + this.NamespaceBoolean.GetHashCode(); - if (this.NamespaceArray != null) - hashCode = hashCode * 59 + this.NamespaceArray.GetHashCode(); - if (this.NamespaceWrappedArray != null) - hashCode = hashCode * 59 + this.NamespaceWrappedArray.GetHashCode(); - if (this.PrefixNsString != null) - hashCode = hashCode * 59 + this.PrefixNsString.GetHashCode(); - if (this.PrefixNsNumber != null) - hashCode = hashCode * 59 + this.PrefixNsNumber.GetHashCode(); - if (this.PrefixNsInteger != null) - hashCode = hashCode * 59 + this.PrefixNsInteger.GetHashCode(); - if (this.PrefixNsBoolean != null) - hashCode = hashCode * 59 + this.PrefixNsBoolean.GetHashCode(); - if (this.PrefixNsArray != null) - hashCode = hashCode * 59 + this.PrefixNsArray.GetHashCode(); - if (this.PrefixNsWrappedArray != null) - hashCode = hashCode * 59 + this.PrefixNsWrappedArray.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj deleted file mode 100644 index ff0dacc12c8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - Debug - AnyCPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C} - Library - Properties - Org.OpenAPITools - Org.OpenAPITools - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Org.OpenAPITools.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Org.OpenAPITools.xml - - - - - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - - - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll - - - - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec deleted file mode 100644 index c2528caadb9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ /dev/null @@ -1,41 +0,0 @@ - - - - - $id$ - OpenAPI Library - - - $version$ - - - $author$ - - - $author$ - false - false - - - A library generated from a OpenAPI doc - https://www.apache.org/licenses/LICENSE-2.0.html - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Properties/AssemblyInfo.cs b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Properties/AssemblyInfo.cs deleted file mode 100644 index d1abdf7936a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenAPI Library")] -[assembly: AssemblyDescription("A library generated from a OpenAPI doc")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("OpenAPI")] -[assembly: AssemblyProduct("OpenAPILibrary")] -[assembly: AssemblyCopyright("No Copyright")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0")] -[assembly: AssemblyFileVersion("1.0.0")] diff --git a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/packages.config deleted file mode 100644 index a3a1bab3510..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClient/src/Org.OpenAPITools/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/.gitignore b/samples/client/petstore/csharp/OpenAPIClientNet35/.gitignore deleted file mode 100644 index 1ee53850b84..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/.gitignore +++ /dev/null @@ -1,362 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator-ignore b/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/FILES b/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/FILES deleted file mode 100644 index 22b0c1f3da5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/FILES +++ /dev/null @@ -1,131 +0,0 @@ -.gitignore -.travis.yml -Org.OpenAPITools.sln -README.md -build.bat -build.sh -docs/AdditionalPropertiesAnyType.md -docs/AdditionalPropertiesArray.md -docs/AdditionalPropertiesBoolean.md -docs/AdditionalPropertiesClass.md -docs/AdditionalPropertiesInteger.md -docs/AdditionalPropertiesNumber.md -docs/AdditionalPropertiesObject.md -docs/AdditionalPropertiesString.md -docs/Animal.md -docs/AnotherFakeApi.md -docs/ApiResponse.md -docs/ArrayOfArrayOfNumberOnly.md -docs/ArrayOfNumberOnly.md -docs/ArrayTest.md -docs/BigCat.md -docs/BigCatAllOf.md -docs/Capitalization.md -docs/Cat.md -docs/CatAllOf.md -docs/Category.md -docs/ClassModel.md -docs/Dog.md -docs/DogAllOf.md -docs/EnumArrays.md -docs/EnumClass.md -docs/EnumTest.md -docs/FakeApi.md -docs/FakeClassnameTags123Api.md -docs/File.md -docs/FileSchemaTestClass.md -docs/FormatTest.md -docs/HasOnlyReadOnly.md -docs/List.md -docs/MapTest.md -docs/MixedPropertiesAndAdditionalPropertiesClass.md -docs/Model200Response.md -docs/ModelClient.md -docs/Name.md -docs/NumberOnly.md -docs/Order.md -docs/OuterComposite.md -docs/OuterEnum.md -docs/Pet.md -docs/PetApi.md -docs/ReadOnlyFirst.md -docs/Return.md -docs/SpecialModelName.md -docs/StoreApi.md -docs/Tag.md -docs/TypeHolderDefault.md -docs/TypeHolderExample.md -docs/User.md -docs/UserApi.md -docs/XmlItem.md -git_push.sh -mono_nunit_test.sh -src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj -src/Org.OpenAPITools.Test/packages.config -src/Org.OpenAPITools/Api/AnotherFakeApi.cs -src/Org.OpenAPITools/Api/FakeApi.cs -src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs -src/Org.OpenAPITools/Api/PetApi.cs -src/Org.OpenAPITools/Api/StoreApi.cs -src/Org.OpenAPITools/Api/UserApi.cs -src/Org.OpenAPITools/Client/ApiClient.cs -src/Org.OpenAPITools/Client/ApiException.cs -src/Org.OpenAPITools/Client/ApiResponse.cs -src/Org.OpenAPITools/Client/Configuration.cs -src/Org.OpenAPITools/Client/ExceptionFactory.cs -src/Org.OpenAPITools/Client/GlobalConfiguration.cs -src/Org.OpenAPITools/Client/IApiAccessor.cs -src/Org.OpenAPITools/Client/IReadableConfiguration.cs -src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs -src/Org.OpenAPITools/Model/Animal.cs -src/Org.OpenAPITools/Model/ApiResponse.cs -src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs -src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs -src/Org.OpenAPITools/Model/ArrayTest.cs -src/Org.OpenAPITools/Model/BigCat.cs -src/Org.OpenAPITools/Model/BigCatAllOf.cs -src/Org.OpenAPITools/Model/Capitalization.cs -src/Org.OpenAPITools/Model/Cat.cs -src/Org.OpenAPITools/Model/CatAllOf.cs -src/Org.OpenAPITools/Model/Category.cs -src/Org.OpenAPITools/Model/ClassModel.cs -src/Org.OpenAPITools/Model/Dog.cs -src/Org.OpenAPITools/Model/DogAllOf.cs -src/Org.OpenAPITools/Model/EnumArrays.cs -src/Org.OpenAPITools/Model/EnumClass.cs -src/Org.OpenAPITools/Model/EnumTest.cs -src/Org.OpenAPITools/Model/File.cs -src/Org.OpenAPITools/Model/FileSchemaTestClass.cs -src/Org.OpenAPITools/Model/FormatTest.cs -src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs -src/Org.OpenAPITools/Model/List.cs -src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs -src/Org.OpenAPITools/Model/Model200Response.cs -src/Org.OpenAPITools/Model/ModelClient.cs -src/Org.OpenAPITools/Model/Name.cs -src/Org.OpenAPITools/Model/NumberOnly.cs -src/Org.OpenAPITools/Model/Order.cs -src/Org.OpenAPITools/Model/OuterComposite.cs -src/Org.OpenAPITools/Model/OuterEnum.cs -src/Org.OpenAPITools/Model/Pet.cs -src/Org.OpenAPITools/Model/ReadOnlyFirst.cs -src/Org.OpenAPITools/Model/Return.cs -src/Org.OpenAPITools/Model/SpecialModelName.cs -src/Org.OpenAPITools/Model/Tag.cs -src/Org.OpenAPITools/Model/TypeHolderDefault.cs -src/Org.OpenAPITools/Model/TypeHolderExample.cs -src/Org.OpenAPITools/Model/User.cs -src/Org.OpenAPITools/Model/XmlItem.cs -src/Org.OpenAPITools/Org.OpenAPITools.csproj -src/Org.OpenAPITools/Org.OpenAPITools.nuspec -src/Org.OpenAPITools/Properties/AssemblyInfo.cs -src/Org.OpenAPITools/packages.config diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/.travis.yml b/samples/client/petstore/csharp/OpenAPIClientNet35/.travis.yml deleted file mode 100644 index e4965fc7e5c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -# -# Generated by: https://github.com/openapitools/openapi-generator.git -# -language: csharp -mono: - - latest -solution: Org.OpenAPITools.sln -script: - - /bin/sh ./mono_nunit_test.sh diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/Org.OpenAPITools.sln b/samples/client/petstore/csharp/OpenAPIClientNet35/Org.OpenAPITools.sln deleted file mode 100644 index 5b15451c9dc..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/Org.OpenAPITools.sln +++ /dev/null @@ -1,27 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -VisualStudioVersion = 12.0.0.0 -MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools.Test", "src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.Build.0 = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/README.md b/samples/client/petstore/csharp/OpenAPIClientNet35/README.md deleted file mode 100644 index 4a48304fa4b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/README.md +++ /dev/null @@ -1,233 +0,0 @@ -# Org.OpenAPITools - the C# library for the 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: \" \\ - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- SDK version: 1.0.0 -- Build package: org.openapitools.codegen.languages.CSharpClientCodegen - -## Frameworks supported - - -- .NET 4.0 or later -- Windows Phone 7.1 (Mango) - -## Dependencies - - -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 105.1.0 or later -- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.2.0 or later - -The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages: - -``` -Install-Package RestSharp -Install-Package Newtonsoft.Json -Install-Package JsonSubTypes -``` - -NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742) - -## Installation - -Run the following command to generate the DLL - -- [Mac/Linux] `/bin/sh build.sh` -- [Windows] `build.bat` - -Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: - -```csharp -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -``` - - -## Packaging - -A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages. - -This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly: - -``` -nuget pack -Build -OutputDirectory out Org.OpenAPITools.csproj -``` - -Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual. - - -## Getting Started - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class Example - { - public static void Main() - { - - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test special tags - ModelClient result = apiInstance.Call123TestSpecialTags(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - - } - } -} -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*FakeApi* | [**CreateXmlItem**](docs/FakeApi.md#createxmlitem) | **POST** /fake/create_xml_item | creates an XmlItem -*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | -*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **POST** /user | Create user -*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation for Models - - - [Model.AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - - [Model.AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - - [Model.AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) - - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [Model.AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md) - - [Model.AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md) - - [Model.AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - - [Model.AdditionalPropertiesString](docs/AdditionalPropertiesString.md) - - [Model.Animal](docs/Animal.md) - - [Model.ApiResponse](docs/ApiResponse.md) - - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - - [Model.ArrayTest](docs/ArrayTest.md) - - [Model.BigCat](docs/BigCat.md) - - [Model.BigCatAllOf](docs/BigCatAllOf.md) - - [Model.Capitalization](docs/Capitalization.md) - - [Model.Cat](docs/Cat.md) - - [Model.CatAllOf](docs/CatAllOf.md) - - [Model.Category](docs/Category.md) - - [Model.ClassModel](docs/ClassModel.md) - - [Model.Dog](docs/Dog.md) - - [Model.DogAllOf](docs/DogAllOf.md) - - [Model.EnumArrays](docs/EnumArrays.md) - - [Model.EnumClass](docs/EnumClass.md) - - [Model.EnumTest](docs/EnumTest.md) - - [Model.File](docs/File.md) - - [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md) - - [Model.FormatTest](docs/FormatTest.md) - - [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - - [Model.List](docs/List.md) - - [Model.MapTest](docs/MapTest.md) - - [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model.Model200Response](docs/Model200Response.md) - - [Model.ModelClient](docs/ModelClient.md) - - [Model.Name](docs/Name.md) - - [Model.NumberOnly](docs/NumberOnly.md) - - [Model.Order](docs/Order.md) - - [Model.OuterComposite](docs/OuterComposite.md) - - [Model.OuterEnum](docs/OuterEnum.md) - - [Model.Pet](docs/Pet.md) - - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - - [Model.Return](docs/Return.md) - - [Model.SpecialModelName](docs/SpecialModelName.md) - - [Model.Tag](docs/Tag.md) - - [Model.TypeHolderDefault](docs/TypeHolderDefault.md) - - [Model.TypeHolderExample](docs/TypeHolderExample.md) - - [Model.User](docs/User.md) - - [Model.XmlItem](docs/XmlItem.md) - - -## Documentation for Authorization - - -### api_key - -- **Type**: API key - -- **API key parameter name**: api_key -- **Location**: HTTP header - - -### api_key_query - -- **Type**: API key - -- **API key parameter name**: api_key_query -- **Location**: URL query string - - -### http_basic_test - - -- **Type**: HTTP basic authentication - - -### petstore_auth - - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - write:pets: modify pets in your account - - read:pets: read your pets - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/build.bat b/samples/client/petstore/csharp/OpenAPIClientNet35/build.bat deleted file mode 100644 index 2f83a5a8d18..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/build.bat +++ /dev/null @@ -1,17 +0,0 @@ -:: Generated by: https://github.com/openapitools/openapi-generator.git -:: - -@echo off - -SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v3.5 - -if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '.\nuget.exe')" -.\nuget.exe install src\Org.OpenAPITools\packages.config -o packages - -if not exist ".\bin" mkdir bin - -copy packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.1.6.0\lib\net35\JsonSubTypes.dll bin\JsonSubTypes.dll -copy packages\RestSharp.105.1.0\lib\net35\RestSharp.dll bin\RestSharp.dll -%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\Org.OpenAPITools.dll /recurse:src\Org.OpenAPITools\*.cs /doc:bin\Org.OpenAPITools.xml - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh b/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh deleted file mode 100644 index 62b1cd3f497..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/build.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash -# -# Generated by: https://github.com/openapitools/openapi-generator.git -# - -frameworkVersion=net35 - -# sdk must match installed frameworks under PREFIX/lib/mono/[value] -sdk=4 - -# langversion refers to C# language features. see man mcs for details. -langversion=${sdk} -nuget_cmd=nuget - -# Match against our known SDK possibilities -case "${sdk}" in - 4) - langversion=4 - ;; - 4.5*) - langversion=5 - ;; - 4.6*) - langversion=6 - ;; - 4.7*) - langversion=7 # ignoring 7.1 for now. - ;; - *) - langversion=6 - ;; -esac - -echo "[INFO] Target framework: ${frameworkVersion}" - -if ! type nuget &>/dev/null; then - echo "[INFO] Download nuget and packages" - wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe; - nuget_cmd="mono nuget.exe" -fi - -mozroots --import --sync -${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages; - -echo "[INFO] Copy DLLs to the 'bin' folder" -mkdir -p bin; -cp packages/Newtonsoft.Json.12.0.3/lib/net35/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; -cp packages/RestSharp.105.1.0/lib/net35/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.1.6.0/lib/net35/JsonSubTypes.dll bin/JsonSubTypes.dll - -echo "[INFO] Run 'mcs' to build bin/Org.OpenAPITools.dll" -mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\ -bin/RestSharp.dll,\ -System.ComponentModel.DataAnnotations.dll,\ -System.Runtime.Serialization.dll \ --target:library \ --out:bin/Org.OpenAPITools.dll \ --recurse:'src/Org.OpenAPITools/*.cs' \ --doc:bin/Org.OpenAPITools.xml \ --platform:anycpu - -if [ $? -ne 0 ] -then - echo "[ERROR] Compilation failed with exit code $?" - exit 1 -else - echo "[INFO] bin/Org.OpenAPITools.dll was created successfully" -fi diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesAnyType.md deleted file mode 100644 index fd118d3bfc5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesAnyType.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesAnyType - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesArray.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesArray.md deleted file mode 100644 index 3d0606cea5f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesArray.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesArray - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesBoolean.md deleted file mode 100644 index bb4b2498263..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesBoolean.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesBoolean - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesClass.md deleted file mode 100644 index 12f3292db0b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesClass.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MapString** | **Dictionary<string, string>** | | [optional] -**MapNumber** | **Dictionary<string, decimal>** | | [optional] -**MapInteger** | **Dictionary<string, int>** | | [optional] -**MapBoolean** | **Dictionary<string, bool>** | | [optional] -**MapArrayInteger** | **Dictionary<string, List<int>>** | | [optional] -**MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] -**MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**Anytype1** | **Object** | | [optional] -**Anytype2** | **Object** | | [optional] -**Anytype3** | **Object** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesInteger.md deleted file mode 100644 index 86a6259ecc9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesInteger.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesInteger - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesNumber.md deleted file mode 100644 index 8dc46024e03..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesNumber.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesNumber - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesObject.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesObject.md deleted file mode 100644 index 455456fe6dd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesObject.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesString.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesString.md deleted file mode 100644 index 0f7cf804167..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AdditionalPropertiesString.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesString - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Animal.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Animal.md deleted file mode 100644 index 0a05bcdf061..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Animal.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Animal - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AnotherFakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AnotherFakeApi.md deleted file mode 100644 index 5af41a1862c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/AnotherFakeApi.md +++ /dev/null @@ -1,84 +0,0 @@ -# Org.OpenAPITools.Api.AnotherFakeApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**Call123TestSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags - - - -## Call123TestSpecialTags - -> ModelClient Call123TestSpecialTags (ModelClient body) - -To test special tags - -To test special tags and operation ID starting with number - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class Call123TestSpecialTagsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test special tags - ModelClient result = apiInstance.Call123TestSpecialTags(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ApiResponse.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ApiResponse.md deleted file mode 100644 index a3b916355fd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ApiResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.ApiResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Code** | **int** | | [optional] -**Type** | **string** | | [optional] -**Message** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index e05ea7dc240..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayOfArrayOfNumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayArrayNumber** | **List<List<decimal>>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ArrayOfNumberOnly.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ArrayOfNumberOnly.md deleted file mode 100644 index 5f593d42929..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ArrayOfNumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayOfNumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayNumber** | **List<decimal>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ArrayTest.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ArrayTest.md deleted file mode 100644 index 593bc2d7386..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ArrayTest.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayOfString** | **List<string>** | | [optional] -**ArrayArrayOfInteger** | **List<List<long>>** | | [optional] -**ArrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/BigCat.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/BigCat.md deleted file mode 100644 index 6247107ab35..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/BigCat.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.BigCat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Declawed** | **bool** | | [optional] -**Kind** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/BigCatAllOf.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/BigCatAllOf.md deleted file mode 100644 index 864c2298e03..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/BigCatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.BigCatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Kind** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Capitalization.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Capitalization.md deleted file mode 100644 index 0c66f2d2d44..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Capitalization.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Capitalization - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SmallCamel** | **string** | | [optional] -**CapitalCamel** | **string** | | [optional] -**SmallSnake** | **string** | | [optional] -**CapitalSnake** | **string** | | [optional] -**SCAETHFlowPoints** | **string** | | [optional] -**ATT_NAME** | **string** | Name 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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Cat.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Cat.md deleted file mode 100644 index 6609de8e12a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Cat.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.Cat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] -**Declawed** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/CatAllOf.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/CatAllOf.md deleted file mode 100644 index d623d2a0a6e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.CatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Declawed** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Category.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Category.md deleted file mode 100644 index 42102d4e508..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Category.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Category - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ClassModel.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ClassModel.md deleted file mode 100644 index b2b42407d2b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ClassModel.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ClassModel - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Class** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Dog.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Dog.md deleted file mode 100644 index 1f39769d2b9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Dog.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.Dog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] -**Breed** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/DogAllOf.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/DogAllOf.md deleted file mode 100644 index d72134a0f5f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.DogAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Breed** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/EnumArrays.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/EnumArrays.md deleted file mode 100644 index 9d58d25f972..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/EnumArrays.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.EnumArrays - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JustSymbol** | **string** | | [optional] -**ArrayEnum** | **List<string>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/EnumClass.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/EnumClass.md deleted file mode 100644 index 16d21587b4c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/EnumClass.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.EnumClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/EnumTest.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/EnumTest.md deleted file mode 100644 index f8bc67baa6a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/EnumTest.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Org.OpenAPITools.Model.EnumTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EnumString** | **string** | | [optional] -**EnumStringRequired** | **string** | | -**EnumInteger** | **int** | | [optional] -**EnumNumber** | **double** | | [optional] -**OuterEnum** | **OuterEnum** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md deleted file mode 100644 index 47853770985..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeApi.md +++ /dev/null @@ -1,1118 +0,0 @@ -# Org.OpenAPITools.Api.FakeApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateXmlItem**](FakeApi.md#createxmlitem) | **POST** /fake/create_xml_item | creates an XmlItem -[**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -[**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -[**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -[**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -[**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -[**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -[**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -[**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | - - - -## CreateXmlItem - -> void CreateXmlItem (XmlItem xmlItem) - -creates an XmlItem - -this route creates an XmlItem - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateXmlItemExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var xmlItem = new XmlItem(); // XmlItem | XmlItem Body - - try - { - // creates an XmlItem - apiInstance.CreateXmlItem(xmlItem); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.CreateXmlItem: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## FakeOuterBooleanSerialize - -> bool FakeOuterBooleanSerialize (bool? body = null) - - - -Test serialization of outer boolean types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterBooleanSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = true; // bool? | Input boolean as post body (optional) - - try - { - bool result = apiInstance.FakeOuterBooleanSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **bool?**| Input boolean as post body | [optional] - -### Return type - -**bool** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output boolean | - | - -[[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) - - -## FakeOuterCompositeSerialize - -> OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null) - - - -Test serialization of object with outer number type - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterCompositeSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional) - - try - { - OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output composite | - | - -[[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) - - -## FakeOuterNumberSerialize - -> decimal FakeOuterNumberSerialize (decimal? body = null) - - - -Test serialization of outer number types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterNumberSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = 8.14; // decimal? | Input number as post body (optional) - - try - { - decimal result = apiInstance.FakeOuterNumberSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **decimal?**| Input number as post body | [optional] - -### Return type - -**decimal** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output number | - | - -[[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) - - -## FakeOuterStringSerialize - -> string FakeOuterStringSerialize (string body = null) - - - -Test serialization of outer string types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterStringSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = body_example; // string | Input string as post body (optional) - - try - { - string result = apiInstance.FakeOuterStringSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **string**| Input string as post body | [optional] - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output string | - | - -[[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) - - -## TestBodyWithFileSchema - -> void TestBodyWithFileSchema (FileSchemaTestClass body) - - - -For this test, the body for this request much reference a schema named `File`. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestBodyWithFileSchemaExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new FileSchemaTestClass(); // FileSchemaTestClass | - - try - { - apiInstance.TestBodyWithFileSchema(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - - -## TestBodyWithQueryParams - -> void TestBodyWithQueryParams (string query, User body) - - - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestBodyWithQueryParamsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var query = query_example; // string | - var body = new User(); // User | - - try - { - apiInstance.TestBodyWithQueryParams(query, body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **string**| | - **body** | [**User**](User.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - - -## TestClientModel - -> ModelClient TestClientModel (ModelClient body) - -To test \"client\" model - -To test \"client\" model - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestClientModelExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test \"client\" model - ModelClient result = apiInstance.TestClientModel(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestEndpointParameters - -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestEndpointParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure HTTP basic authorization: http_basic_test - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - - var apiInstance = new FakeApi(Configuration.Default); - var number = 8.14; // decimal | None - var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None - var integer = 56; // int? | None (optional) - var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) - var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) - var password = password_example; // string | None (optional) - var callback = callback_example; // string | None (optional) - - try - { - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **decimal**| None | - **_double** | **double**| None | - **patternWithoutDelimiter** | **string**| None | - **_byte** | **byte[]**| None | - **integer** | **int?**| None | [optional] - **int32** | **int?**| None | [optional] - **int64** | **long?**| None | [optional] - **_float** | **float?**| None | [optional] - **_string** | **string**| None | [optional] - **binary** | **System.IO.Stream**| None | [optional] - **date** | **DateTime?**| None | [optional] - **dateTime** | **DateTime?**| None | [optional] - **password** | **string**| None | [optional] - **callback** | **string**| None | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## TestEnumParameters - -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) - -To test enum parameters - -To test enum parameters - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestEnumParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) - var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) - var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) - - try - { - // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional] - **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] - **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] - **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] - **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] - **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] - **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid request | - | -| **404** | Not found | - | - -[[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) - - -## TestGroupParameters - -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestGroupParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var requiredStringGroup = 56; // int | Required String in group parameters - var requiredBooleanGroup = true; // bool | Required Boolean in group parameters - var requiredInt64Group = 789; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) - var booleanGroup = true; // bool? | Boolean in group parameters (optional) - var int64Group = 789; // long? | Integer in group parameters (optional) - - try - { - // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **int**| Required String in group parameters | - **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | - **requiredInt64Group** | **long**| Required Integer in group parameters | - **stringGroup** | **int?**| String in group parameters | [optional] - **booleanGroup** | **bool?**| Boolean in group parameters | [optional] - **int64Group** | **long?**| Integer in group parameters | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Something wrong | - | - -[[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) - - -## TestInlineAdditionalProperties - -> void TestInlineAdditionalProperties (Dictionary param) - -test inline additionalProperties - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestInlineAdditionalPropertiesExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var param = new Dictionary(); // Dictionary | request body - - try - { - // test inline additionalProperties - apiInstance.TestInlineAdditionalProperties(param); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestInlineAdditionalProperties: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Dictionary<string, string>**](string.md)| request body | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestJsonFormData - -> void TestJsonFormData (string param, string param2) - -test json serialization of form data - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestJsonFormDataExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 - - try - { - // test json serialization of form data - apiInstance.TestJsonFormData(param, param2); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **string**| field1 | - **param2** | **string**| field2 | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestQueryParameterCollectionFormat - -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) - - - -To test the collection format in query parameters - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestQueryParameterCollectionFormatExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var pipe = new List(); // List | - var ioutil = new List(); // List | - var http = new List(); // List | - var url = new List(); // List | - var context = new List(); // List | - - try - { - apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormat: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<string>**](string.md)| | - **ioutil** | [**List<string>**](string.md)| | - **http** | [**List<string>**](string.md)| | - **url** | [**List<string>**](string.md)| | - **context** | [**List<string>**](string.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeClassnameTags123Api.md deleted file mode 100644 index deb97a27697..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FakeClassnameTags123Api.md +++ /dev/null @@ -1,89 +0,0 @@ -# Org.OpenAPITools.Api.FakeClassnameTags123Api - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**TestClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case - - - -## TestClassname - -> ModelClient TestClassname (ModelClient body) - -To test class name in snake case - -To test class name in snake case - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestClassnameExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key_query - Configuration.Default.AddApiKey("api_key_query", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key_query", "Bearer"); - - var apiInstance = new FakeClassnameTags123Api(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test class name in snake case - ModelClient result = apiInstance.TestClassname(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeClassnameTags123Api.TestClassname: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/File.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/File.md deleted file mode 100644 index b7105102579..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/File.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.File - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SourceURI** | **string** | Test capitalization | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FileSchemaTestClass.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FileSchemaTestClass.md deleted file mode 100644 index df1453f686b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FileSchemaTestClass.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.FileSchemaTestClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**File** | [**File**](File.md) | | [optional] -**Files** | [**List<File>**](File.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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FormatTest.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FormatTest.md deleted file mode 100644 index 92d7d1e0104..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/FormatTest.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Org.OpenAPITools.Model.FormatTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Integer** | **int** | | [optional] -**Int32** | **int** | | [optional] -**Int64** | **long** | | [optional] -**Number** | **decimal** | | -**Float** | **float** | | [optional] -**Double** | **double** | | [optional] -**String** | **string** | | [optional] -**Byte** | **byte[]** | | -**Binary** | **System.IO.Stream** | | [optional] -**Date** | **DateTime** | | -**DateTime** | **DateTime** | | [optional] -**Uuid** | **Guid** | | [optional] -**Password** | **string** | | -**BigDecimal** | **decimal** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/HasOnlyReadOnly.md deleted file mode 100644 index 043d2442b4e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/HasOnlyReadOnly.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.HasOnlyReadOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] [readonly] -**Foo** | **string** | | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/List.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/List.md deleted file mode 100644 index cb41193b43e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/List.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.List - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123List** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/MapTest.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/MapTest.md deleted file mode 100644 index 79d499e2cf9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/MapTest.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Org.OpenAPITools.Model.MapTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**MapOfEnumString** | **Dictionary<string, string>** | | [optional] -**DirectMap** | **Dictionary<string, bool>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index dd7b01e49fe..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.MixedPropertiesAndAdditionalPropertiesClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Uuid** | **Guid** | | [optional] -**DateTime** | **DateTime** | | [optional] -**Map** | [**Dictionary<string, Animal>**](Animal.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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Model200Response.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Model200Response.md deleted file mode 100644 index 7d826bca1ec..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Model200Response.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Model200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **int** | | [optional] -**Class** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ModelClient.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ModelClient.md deleted file mode 100644 index e36e1fad802..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ModelClient.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ModelClient - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**__Client** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Name.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Name.md deleted file mode 100644 index bfd7955e5b4..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Name.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Org.OpenAPITools.Model.Name - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_Name** | **int** | | -**SnakeCase** | **int** | | [optional] [readonly] -**Property** | **string** | | [optional] -**_123Number** | **int** | | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/NumberOnly.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/NumberOnly.md deleted file mode 100644 index e4b08467e08..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/NumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.NumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JustNumber** | **decimal** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Order.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Order.md deleted file mode 100644 index 875f43a30e5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Order.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Order - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**PetId** | **long** | | [optional] -**Quantity** | **int** | | [optional] -**ShipDate** | **DateTime** | | [optional] -**Status** | **string** | Order Status | [optional] -**Complete** | **bool** | | [optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/OuterComposite.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/OuterComposite.md deleted file mode 100644 index f381fb7fd28..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/OuterComposite.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.OuterComposite - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MyNumber** | **decimal** | | [optional] -**MyString** | **string** | | [optional] -**MyBoolean** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/OuterEnum.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/OuterEnum.md deleted file mode 100644 index edc2300684d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/OuterEnum.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.OuterEnum - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Pet.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Pet.md deleted file mode 100644 index 0bd5c40fc99..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Pet.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Pet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Category** | [**Category**](Category.md) | | [optional] -**Name** | **string** | | -**PhotoUrls** | **List<string>** | | -**Tags** | [**List<Tag>**](Tag.md) | | [optional] -**Status** | **string** | pet status in the store | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/PetApi.md deleted file mode 100644 index 1a9eba14868..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/PetApi.md +++ /dev/null @@ -1,728 +0,0 @@ -# Org.OpenAPITools.Api.PetApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -[**DeletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -[**FindPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -[**FindPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -[**GetPetById**](PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -[**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -[**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) - - - -## AddPet - -> void AddPet (Pet body) - -Add a new pet to the store - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class AddPetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var body = new Pet(); // Pet | Pet object that needs to be added to the store - - try - { - // Add a new pet to the store - apiInstance.AddPet(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.AddPet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **405** | Invalid input | - | - -[[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) - - -## DeletePet - -> void DeletePet (long petId, string apiKey = null) - -Deletes a pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeletePetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) - - try - { - // Deletes a pet - apiInstance.DeletePet(petId, apiKey); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| Pet id to delete | - **apiKey** | **string**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid pet value | - | - -[[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) - - -## FindPetsByStatus - -> List<Pet> FindPetsByStatus (List status) - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FindPetsByStatusExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var status = status_example; // List | Status values that need to be considered for filter - - try - { - // Finds Pets by status - List result = apiInstance.FindPetsByStatus(status); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **List<string>**| Status values that need to be considered for filter | - -### Return type - -[**List<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid status value | - | - -[[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) - - -## FindPetsByTags - -> List<Pet> FindPetsByTags (List tags) - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FindPetsByTagsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var tags = new List(); // List | Tags to filter by - - try - { - // Finds Pets by tags - List result = apiInstance.FindPetsByTags(tags); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**List<string>**](string.md)| Tags to filter by | - -### Return type - -[**List<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid tag value | - | - -[[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) - - -## GetPetById - -> Pet GetPetById (long petId) - -Find pet by ID - -Returns a single pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetPetByIdExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to return - - try - { - // Find pet by ID - Pet result = apiInstance.GetPetById(petId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to return | - -### Return type - -[**Pet**](Pet.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | - -[[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) - - -## UpdatePet - -> void UpdatePet (Pet body) - -Update an existing pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdatePetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var body = new Pet(); // Pet | Pet object that needs to be added to the store - - try - { - // Update an existing pet - apiInstance.UpdatePet(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | -| **405** | Validation exception | - | - -[[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) - - -## UpdatePetWithForm - -> void UpdatePetWithForm (long petId, string name = null, string status = null) - -Updates a pet in the store with form data - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdatePetWithFormExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet that needs to be updated - var name = name_example; // string | Updated name of the pet (optional) - var status = status_example; // string | Updated status of the pet (optional) - - try - { - // Updates a pet in the store with form data - apiInstance.UpdatePetWithForm(petId, name, status); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet that needs to be updated | - **name** | **string**| Updated name of the pet | [optional] - **status** | **string**| Updated status of the pet | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **405** | Invalid input | - | - -[[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) - - -## UploadFile - -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) - -uploads an image - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to update - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) - - try - { - // uploads an image - ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to update | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - **file** | **System.IO.Stream**| file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UploadFileWithRequiredFile - -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) - -uploads an image (required) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileWithRequiredFileExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to update - var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - - try - { - // uploads an image (required) - ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to update | - **requiredFile** | **System.IO.Stream**| file to upload | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ReadOnlyFirst.md deleted file mode 100644 index 8ea3b95919b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/ReadOnlyFirst.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.ReadOnlyFirst - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] [readonly] -**Baz** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Return.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Return.md deleted file mode 100644 index 4761c70748e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Return.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.Return - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_Return** | **int** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/SpecialModelName.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/SpecialModelName.md deleted file mode 100644 index ee6489524d0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/SpecialModelName.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.SpecialModelName - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SpecialPropertyName** | **long** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/StoreApi.md deleted file mode 100644 index ae123168a11..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/StoreApi.md +++ /dev/null @@ -1,314 +0,0 @@ -# Org.OpenAPITools.Api.StoreApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**GetInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[**PlaceOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet - - - -## DeleteOrder - -> void DeleteOrder (string orderId) - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeleteOrderExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var orderId = orderId_example; // string | ID of the order that needs to be deleted - - try - { - // Delete purchase order by ID - apiInstance.DeleteOrder(orderId); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **string**| ID of the order that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - -[[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) - - -## GetInventory - -> Dictionary<string, int> GetInventory () - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetInventoryExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - - var apiInstance = new StoreApi(Configuration.Default); - - try - { - // Returns pet inventories by status - Dictionary result = apiInstance.GetInventory(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**Dictionary** - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetOrderById - -> Order GetOrderById (long orderId) - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetOrderByIdExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var orderId = 789; // long | ID of pet that needs to be fetched - - try - { - // Find purchase order by ID - Order result = apiInstance.GetOrderById(orderId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **long**| ID of pet that needs to be fetched | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - -[[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) - - -## PlaceOrder - -> Order PlaceOrder (Order body) - -Place an order for a pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class PlaceOrderExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var body = new Order(); // Order | order placed for purchasing the pet - - try - { - // Place an order for a pet - Order result = apiInstance.PlaceOrder(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid Order | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Tag.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Tag.md deleted file mode 100644 index f781c26f017..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/Tag.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Tag - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/TypeHolderDefault.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/TypeHolderDefault.md deleted file mode 100644 index 0945245b213..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/TypeHolderDefault.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Org.OpenAPITools.Model.TypeHolderDefault - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StringItem** | **string** | | [default to "what"] -**NumberItem** | **decimal** | | -**IntegerItem** | **int** | | -**BoolItem** | **bool** | | [default to true] -**ArrayItem** | **List<int>** | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/TypeHolderExample.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/TypeHolderExample.md deleted file mode 100644 index b9573673baf..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/TypeHolderExample.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.TypeHolderExample - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StringItem** | **string** | | -**NumberItem** | **decimal** | | -**FloatItem** | **float** | | -**IntegerItem** | **int** | | -**BoolItem** | **bool** | | -**ArrayItem** | **List<int>** | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/User.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/User.md deleted file mode 100644 index a25c25d1aa0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/User.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Org.OpenAPITools.Model.User - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Username** | **string** | | [optional] -**FirstName** | **string** | | [optional] -**LastName** | **string** | | [optional] -**Email** | **string** | | [optional] -**Password** | **string** | | [optional] -**Phone** | **string** | | [optional] -**UserStatus** | **int** | User Status | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/UserApi.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/UserApi.md deleted file mode 100644 index 1385d840413..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/UserApi.md +++ /dev/null @@ -1,605 +0,0 @@ -# Org.OpenAPITools.Api.UserApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateUser**](UserApi.md#createuser) | **POST** /user | Create user -[**CreateUsersWithArrayInput**](UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -[**CreateUsersWithListInput**](UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -[**DeleteUser**](UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -[**GetUserByName**](UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -[**LoginUser**](UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -[**LogoutUser**](UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -[**UpdateUser**](UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - - -## CreateUser - -> void CreateUser (User body) - -Create user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var body = new User(); // User | Created user object - - try - { - // Create user - apiInstance.CreateUser(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateUsersWithArrayInput - -> void CreateUsersWithArrayInput (List body) - -Creates list of users with given input array - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUsersWithArrayInputExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var body = new List(); // List | List of user object - - try - { - // Creates list of users with given input array - apiInstance.CreateUsersWithArrayInput(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateUsersWithListInput - -> void CreateUsersWithListInput (List body) - -Creates list of users with given input array - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUsersWithListInputExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var body = new List(); // List | List of user object - - try - { - // Creates list of users with given input array - apiInstance.CreateUsersWithListInput(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteUser - -> void DeleteUser (string username) - -Delete user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeleteUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The name that needs to be deleted - - try - { - // Delete user - apiInstance.DeleteUser(username); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## GetUserByName - -> User GetUserByName (string username) - -Get user by user name - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetUserByNameExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. - - try - { - // Get user by user name - User result = apiInstance.GetUserByName(username); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be fetched. Use user1 for testing. | - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## LoginUser - -> string LoginUser (string username, string password) - -Logs user into the system - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class LoginUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text - - try - { - // Logs user into the system - string result = apiInstance.LoginUser(username, password); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The user name for login | - **password** | **string**| The password for login in clear text | - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| -| **400** | Invalid username/password supplied | - | - -[[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) - - -## LogoutUser - -> void LogoutUser () - -Logs out current logged in user session - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class LogoutUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - - try - { - // Logs out current logged in user session - apiInstance.LogoutUser(); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateUser - -> void UpdateUser (string username, User body) - -Updated user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdateUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | name that need to be deleted - var body = new User(); // User | Updated user object - - try - { - // Updated user - apiInstance.UpdateUser(username, body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid user supplied | - | -| **404** | User not found | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/XmlItem.md b/samples/client/petstore/csharp/OpenAPIClientNet35/docs/XmlItem.md deleted file mode 100644 index 0dca90c706f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/docs/XmlItem.md +++ /dev/null @@ -1,41 +0,0 @@ - -# Org.OpenAPITools.Model.XmlItem - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AttributeString** | **string** | | [optional] -**AttributeNumber** | **decimal** | | [optional] -**AttributeInteger** | **int** | | [optional] -**AttributeBoolean** | **bool** | | [optional] -**WrappedArray** | **List<int>** | | [optional] -**NameString** | **string** | | [optional] -**NameNumber** | **decimal** | | [optional] -**NameInteger** | **int** | | [optional] -**NameBoolean** | **bool** | | [optional] -**NameArray** | **List<int>** | | [optional] -**NameWrappedArray** | **List<int>** | | [optional] -**PrefixString** | **string** | | [optional] -**PrefixNumber** | **decimal** | | [optional] -**PrefixInteger** | **int** | | [optional] -**PrefixBoolean** | **bool** | | [optional] -**PrefixArray** | **List<int>** | | [optional] -**PrefixWrappedArray** | **List<int>** | | [optional] -**NamespaceString** | **string** | | [optional] -**NamespaceNumber** | **decimal** | | [optional] -**NamespaceInteger** | **int** | | [optional] -**NamespaceBoolean** | **bool** | | [optional] -**NamespaceArray** | **List<int>** | | [optional] -**NamespaceWrappedArray** | **List<int>** | | [optional] -**PrefixNsString** | **string** | | [optional] -**PrefixNsNumber** | **decimal** | | [optional] -**PrefixNsInteger** | **int** | | [optional] -**PrefixNsBoolean** | **bool** | | [optional] -**PrefixNsArray** | **List<int>** | | [optional] -**PrefixNsWrappedArray** | **List<int>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/git_push.sh b/samples/client/petstore/csharp/OpenAPIClientNet35/git_push.sh deleted file mode 100644 index 200e975d212..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/mono_nunit_test.sh b/samples/client/petstore/csharp/OpenAPIClientNet35/mono_nunit_test.sh deleted file mode 100644 index ef4209de27b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/mono_nunit_test.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# -# Generated by: https://github.com/openapitools/openapi-generator.git -# - -wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -mozroots --import --sync - -echo "[INFO] remove bin/Debug/Org.OpenAPITools.Test.dll" -rm src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll 2> /dev/null - -echo "[INFO] install NUnit runners via NuGet" -wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -mozroots --import --sync -mono nuget.exe install src/Org.OpenAPITools.Test/packages.config -o packages - -echo "[INFO] Install NUnit Console 3.x runners via NuGet" -mono nuget.exe install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory packages - -echo "[INFO] Build the solution and run the unit test" -xbuild Org.OpenAPITools.sln && \ - mono ./packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs deleted file mode 100644 index 626c8e8329d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing AnotherFakeApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class AnotherFakeApiTests - { - private AnotherFakeApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new AnotherFakeApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AnotherFakeApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' AnotherFakeApi - //Assert.IsInstanceOf(typeof(AnotherFakeApi), instance); - } - - - /// - /// Test Call123TestSpecialTags - /// - [Test] - public void Call123TestSpecialTagsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //ModelClient body = null; - //var response = instance.Call123TestSpecialTags(body); - //Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs deleted file mode 100644 index bdbcdb21efe..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ /dev/null @@ -1,267 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing FakeApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class FakeApiTests - { - private FakeApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new FakeApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FakeApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' FakeApi - //Assert.IsInstanceOf(typeof(FakeApi), instance); - } - - - /// - /// Test CreateXmlItem - /// - [Test] - public void CreateXmlItemTest() - { - // TODO uncomment below to test the method and replace null with proper value - //XmlItem xmlItem = null; - //instance.CreateXmlItem(xmlItem); - - } - - /// - /// Test FakeOuterBooleanSerialize - /// - [Test] - public void FakeOuterBooleanSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //bool? body = null; - //var response = instance.FakeOuterBooleanSerialize(body); - //Assert.IsInstanceOf(typeof(bool), response, "response is bool"); - } - - /// - /// Test FakeOuterCompositeSerialize - /// - [Test] - public void FakeOuterCompositeSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //OuterComposite body = null; - //var response = instance.FakeOuterCompositeSerialize(body); - //Assert.IsInstanceOf(typeof(OuterComposite), response, "response is OuterComposite"); - } - - /// - /// Test FakeOuterNumberSerialize - /// - [Test] - public void FakeOuterNumberSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //decimal? body = null; - //var response = instance.FakeOuterNumberSerialize(body); - //Assert.IsInstanceOf(typeof(decimal), response, "response is decimal"); - } - - /// - /// Test FakeOuterStringSerialize - /// - [Test] - public void FakeOuterStringSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string body = null; - //var response = instance.FakeOuterStringSerialize(body); - //Assert.IsInstanceOf(typeof(string), response, "response is string"); - } - - /// - /// Test TestBodyWithFileSchema - /// - [Test] - public void TestBodyWithFileSchemaTest() - { - // TODO uncomment below to test the method and replace null with proper value - //FileSchemaTestClass body = null; - //instance.TestBodyWithFileSchema(body); - - } - - /// - /// Test TestBodyWithQueryParams - /// - [Test] - public void TestBodyWithQueryParamsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string query = null; - //User body = null; - //instance.TestBodyWithQueryParams(query, body); - - } - - /// - /// Test TestClientModel - /// - [Test] - public void TestClientModelTest() - { - // TODO uncomment below to test the method and replace null with proper value - //ModelClient body = null; - //var response = instance.TestClientModel(body); - //Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient"); - } - - /// - /// Test TestEndpointParameters - /// - [Test] - public void TestEndpointParametersTest() - { - // TODO uncomment below to test the method and replace null with proper value - //decimal number = null; - //double _double = null; - //string patternWithoutDelimiter = null; - //byte[] _byte = null; - //int? integer = null; - //int? int32 = null; - //long? int64 = null; - //float? _float = null; - //string _string = null; - //System.IO.Stream binary = null; - //DateTime? date = null; - //DateTime? dateTime = null; - //string password = null; - //string callback = null; - //instance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); - - } - - /// - /// Test TestEnumParameters - /// - [Test] - public void TestEnumParametersTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List enumHeaderStringArray = null; - //string enumHeaderString = null; - //List enumQueryStringArray = null; - //string enumQueryString = null; - //int? enumQueryInteger = null; - //double? enumQueryDouble = null; - //List enumFormStringArray = null; - //string enumFormString = null; - //instance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - - } - - /// - /// Test TestGroupParameters - /// - [Test] - public void TestGroupParametersTest() - { - // TODO uncomment below to test the method and replace null with proper value - //int requiredStringGroup = null; - //bool requiredBooleanGroup = null; - //long requiredInt64Group = null; - //int? stringGroup = null; - //bool? booleanGroup = null; - //long? int64Group = null; - //instance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - - } - - /// - /// Test TestInlineAdditionalProperties - /// - [Test] - public void TestInlineAdditionalPropertiesTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Dictionary param = null; - //instance.TestInlineAdditionalProperties(param); - - } - - /// - /// Test TestJsonFormData - /// - [Test] - public void TestJsonFormDataTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string param = null; - //string param2 = null; - //instance.TestJsonFormData(param, param2); - - } - - /// - /// Test TestQueryParameterCollectionFormat - /// - [Test] - public void TestQueryParameterCollectionFormatTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List pipe = null; - //List ioutil = null; - //List http = null; - //List url = null; - //List context = null; - //instance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); - - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs deleted file mode 100644 index f73f71bc211..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing FakeClassnameTags123Api - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class FakeClassnameTags123ApiTests - { - private FakeClassnameTags123Api instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new FakeClassnameTags123Api(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FakeClassnameTags123Api - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' FakeClassnameTags123Api - //Assert.IsInstanceOf(typeof(FakeClassnameTags123Api), instance); - } - - - /// - /// Test TestClassname - /// - [Test] - public void TestClassnameTest() - { - // TODO uncomment below to test the method and replace null with proper value - //ModelClient body = null; - //var response = instance.TestClassname(body); - //Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/PetApiTests.cs deleted file mode 100644 index ef563f71442..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/PetApiTests.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing PetApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class PetApiTests - { - private PetApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new PetApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of PetApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' PetApi - //Assert.IsInstanceOf(typeof(PetApi), instance); - } - - - /// - /// Test AddPet - /// - [Test] - public void AddPetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Pet body = null; - //instance.AddPet(body); - - } - - /// - /// Test DeletePet - /// - [Test] - public void DeletePetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //string apiKey = null; - //instance.DeletePet(petId, apiKey); - - } - - /// - /// Test FindPetsByStatus - /// - [Test] - public void FindPetsByStatusTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List status = null; - //var response = instance.FindPetsByStatus(status); - //Assert.IsInstanceOf(typeof(List), response, "response is List"); - } - - /// - /// Test FindPetsByTags - /// - [Test] - public void FindPetsByTagsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List tags = null; - //var response = instance.FindPetsByTags(tags); - //Assert.IsInstanceOf(typeof(List), response, "response is List"); - } - - /// - /// Test GetPetById - /// - [Test] - public void GetPetByIdTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //var response = instance.GetPetById(petId); - //Assert.IsInstanceOf(typeof(Pet), response, "response is Pet"); - } - - /// - /// Test UpdatePet - /// - [Test] - public void UpdatePetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Pet body = null; - //instance.UpdatePet(body); - - } - - /// - /// Test UpdatePetWithForm - /// - [Test] - public void UpdatePetWithFormTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //string name = null; - //string status = null; - //instance.UpdatePetWithForm(petId, name, status); - - } - - /// - /// Test UploadFile - /// - [Test] - public void UploadFileTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //string additionalMetadata = null; - //System.IO.Stream file = null; - //var response = instance.UploadFile(petId, additionalMetadata, file); - //Assert.IsInstanceOf(typeof(ApiResponse), response, "response is ApiResponse"); - } - - /// - /// Test UploadFileWithRequiredFile - /// - [Test] - public void UploadFileWithRequiredFileTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //System.IO.Stream requiredFile = null; - //string additionalMetadata = null; - //var response = instance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - //Assert.IsInstanceOf(typeof(ApiResponse), response, "response is ApiResponse"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs deleted file mode 100644 index 969eaa7a2ab..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs +++ /dev/null @@ -1,115 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing StoreApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class StoreApiTests - { - private StoreApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new StoreApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of StoreApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' StoreApi - //Assert.IsInstanceOf(typeof(StoreApi), instance); - } - - - /// - /// Test DeleteOrder - /// - [Test] - public void DeleteOrderTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string orderId = null; - //instance.DeleteOrder(orderId); - - } - - /// - /// Test GetInventory - /// - [Test] - public void GetInventoryTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.GetInventory(); - //Assert.IsInstanceOf(typeof(Dictionary), response, "response is Dictionary"); - } - - /// - /// Test GetOrderById - /// - [Test] - public void GetOrderByIdTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long orderId = null; - //var response = instance.GetOrderById(orderId); - //Assert.IsInstanceOf(typeof(Order), response, "response is Order"); - } - - /// - /// Test PlaceOrder - /// - [Test] - public void PlaceOrderTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Order body = null; - //var response = instance.PlaceOrder(body); - //Assert.IsInstanceOf(typeof(Order), response, "response is Order"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/UserApiTests.cs deleted file mode 100644 index a79cad43130..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing UserApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class UserApiTests - { - private UserApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new UserApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of UserApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' UserApi - //Assert.IsInstanceOf(typeof(UserApi), instance); - } - - - /// - /// Test CreateUser - /// - [Test] - public void CreateUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //User body = null; - //instance.CreateUser(body); - - } - - /// - /// Test CreateUsersWithArrayInput - /// - [Test] - public void CreateUsersWithArrayInputTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List body = null; - //instance.CreateUsersWithArrayInput(body); - - } - - /// - /// Test CreateUsersWithListInput - /// - [Test] - public void CreateUsersWithListInputTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List body = null; - //instance.CreateUsersWithListInput(body); - - } - - /// - /// Test DeleteUser - /// - [Test] - public void DeleteUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //instance.DeleteUser(username); - - } - - /// - /// Test GetUserByName - /// - [Test] - public void GetUserByNameTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //var response = instance.GetUserByName(username); - //Assert.IsInstanceOf(typeof(User), response, "response is User"); - } - - /// - /// Test LoginUser - /// - [Test] - public void LoginUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //string password = null; - //var response = instance.LoginUser(username, password); - //Assert.IsInstanceOf(typeof(string), response, "response is string"); - } - - /// - /// Test LogoutUser - /// - [Test] - public void LogoutUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //instance.LogoutUser(); - - } - - /// - /// Test UpdateUser - /// - [Test] - public void UpdateUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //User body = null; - //instance.UpdateUser(username, body); - - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs deleted file mode 100644 index 03151430729..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesAnyType - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesAnyTypeTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesAnyType - //private AdditionalPropertiesAnyType instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesAnyType - //instance = new AdditionalPropertiesAnyType(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesAnyType - /// - [Test] - public void AdditionalPropertiesAnyTypeInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesAnyType - //Assert.IsInstanceOf(typeof(AdditionalPropertiesAnyType), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs deleted file mode 100644 index e75114595b6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesArray - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesArrayTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesArray - //private AdditionalPropertiesArray instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesArray - //instance = new AdditionalPropertiesArray(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesArray - /// - [Test] - public void AdditionalPropertiesArrayInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesArray - //Assert.IsInstanceOf(typeof(AdditionalPropertiesArray), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs deleted file mode 100644 index c09b604fae8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesBoolean - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesBooleanTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesBoolean - //private AdditionalPropertiesBoolean instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesBoolean - //instance = new AdditionalPropertiesBoolean(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesBoolean - /// - [Test] - public void AdditionalPropertiesBooleanInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesBoolean - //Assert.IsInstanceOf(typeof(AdditionalPropertiesBoolean), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs deleted file mode 100644 index 4ee461b5ed0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesClassTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesClass - //private AdditionalPropertiesClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesClass - //instance = new AdditionalPropertiesClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesClass - /// - [Test] - public void AdditionalPropertiesClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesClass - //Assert.IsInstanceOf(typeof(AdditionalPropertiesClass), instance); - } - - - /// - /// Test the property 'MapString' - /// - [Test] - public void MapStringTest() - { - // TODO unit test for the property 'MapString' - } - /// - /// Test the property 'MapNumber' - /// - [Test] - public void MapNumberTest() - { - // TODO unit test for the property 'MapNumber' - } - /// - /// Test the property 'MapInteger' - /// - [Test] - public void MapIntegerTest() - { - // TODO unit test for the property 'MapInteger' - } - /// - /// Test the property 'MapBoolean' - /// - [Test] - public void MapBooleanTest() - { - // TODO unit test for the property 'MapBoolean' - } - /// - /// Test the property 'MapArrayInteger' - /// - [Test] - public void MapArrayIntegerTest() - { - // TODO unit test for the property 'MapArrayInteger' - } - /// - /// Test the property 'MapArrayAnytype' - /// - [Test] - public void MapArrayAnytypeTest() - { - // TODO unit test for the property 'MapArrayAnytype' - } - /// - /// Test the property 'MapMapString' - /// - [Test] - public void MapMapStringTest() - { - // TODO unit test for the property 'MapMapString' - } - /// - /// Test the property 'MapMapAnytype' - /// - [Test] - public void MapMapAnytypeTest() - { - // TODO unit test for the property 'MapMapAnytype' - } - /// - /// Test the property 'Anytype1' - /// - [Test] - public void Anytype1Test() - { - // TODO unit test for the property 'Anytype1' - } - /// - /// Test the property 'Anytype2' - /// - [Test] - public void Anytype2Test() - { - // TODO unit test for the property 'Anytype2' - } - /// - /// Test the property 'Anytype3' - /// - [Test] - public void Anytype3Test() - { - // TODO unit test for the property 'Anytype3' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs deleted file mode 100644 index 98e65b0e548..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesInteger - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesIntegerTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesInteger - //private AdditionalPropertiesInteger instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesInteger - //instance = new AdditionalPropertiesInteger(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesInteger - /// - [Test] - public void AdditionalPropertiesIntegerInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesInteger - //Assert.IsInstanceOf(typeof(AdditionalPropertiesInteger), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs deleted file mode 100644 index b20dac9314a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesNumber - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesNumberTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesNumber - //private AdditionalPropertiesNumber instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesNumber - //instance = new AdditionalPropertiesNumber(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesNumber - /// - [Test] - public void AdditionalPropertiesNumberInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesNumber - //Assert.IsInstanceOf(typeof(AdditionalPropertiesNumber), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs deleted file mode 100644 index 342cbd47075..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesObject - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesObjectTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesObject - //private AdditionalPropertiesObject instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesObject - //instance = new AdditionalPropertiesObject(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesObject - /// - [Test] - public void AdditionalPropertiesObjectInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesObject - //Assert.IsInstanceOf(typeof(AdditionalPropertiesObject), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs deleted file mode 100644 index 273ade918d8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesString - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesStringTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesString - //private AdditionalPropertiesString instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesString - //instance = new AdditionalPropertiesString(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesString - /// - [Test] - public void AdditionalPropertiesStringInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesString - //Assert.IsInstanceOf(typeof(AdditionalPropertiesString), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AnimalTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AnimalTests.cs deleted file mode 100644 index f404924f459..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/AnimalTests.cs +++ /dev/null @@ -1,114 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Animal - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AnimalTests - { - // TODO uncomment below to declare an instance variable for Animal - //private Animal instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Animal - //instance = new Animal(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Animal - /// - [Test] - public void AnimalInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Animal - //Assert.IsInstanceOf(typeof(Animal), instance); - } - - /// - /// Test deserialize a Dog from type Animal - /// - [Test] - public void DogDeserializeFromAnimalTest() - { - // TODO uncomment below to test deserialize a Dog from type Animal - //Assert.IsInstanceOf(typeof(Animal), JsonConvert.DeserializeObject(new Dog().ToJson())); - } - /// - /// Test deserialize a Cat from type Animal - /// - [Test] - public void CatDeserializeFromAnimalTest() - { - // TODO uncomment below to test deserialize a Cat from type Animal - //Assert.IsInstanceOf(typeof(Animal), JsonConvert.DeserializeObject(new Cat().ToJson())); - } - /// - /// Test deserialize a BigCat from type Cat - /// - [Test] - public void BigCatDeserializeFromCatTest() - { - // TODO uncomment below to test deserialize a BigCat from type Cat - //Assert.IsInstanceOf(typeof(Cat), JsonConvert.DeserializeObject(new BigCat().ToJson())); - } - - /// - /// Test the property 'ClassName' - /// - [Test] - public void ClassNameTest() - { - // TODO unit test for the property 'ClassName' - } - /// - /// Test the property 'Color' - /// - [Test] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs deleted file mode 100644 index 2442b4ef55d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ApiResponse - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ApiResponseTests - { - // TODO uncomment below to declare an instance variable for ApiResponse - //private ApiResponse instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ApiResponse - //instance = new ApiResponse(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ApiResponse - /// - [Test] - public void ApiResponseInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ApiResponse - //Assert.IsInstanceOf(typeof(ApiResponse), instance); - } - - - /// - /// Test the property 'Code' - /// - [Test] - public void CodeTest() - { - // TODO unit test for the property 'Code' - } - /// - /// Test the property 'Type' - /// - [Test] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } - /// - /// Test the property 'Message' - /// - [Test] - public void MessageTest() - { - // TODO unit test for the property 'Message' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs deleted file mode 100644 index 094432c3361..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ArrayOfArrayOfNumberOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ArrayOfArrayOfNumberOnlyTests - { - // TODO uncomment below to declare an instance variable for ArrayOfArrayOfNumberOnly - //private ArrayOfArrayOfNumberOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ArrayOfArrayOfNumberOnly - //instance = new ArrayOfArrayOfNumberOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ArrayOfArrayOfNumberOnly - /// - [Test] - public void ArrayOfArrayOfNumberOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ArrayOfArrayOfNumberOnly - //Assert.IsInstanceOf(typeof(ArrayOfArrayOfNumberOnly), instance); - } - - - /// - /// Test the property 'ArrayArrayNumber' - /// - [Test] - public void ArrayArrayNumberTest() - { - // TODO unit test for the property 'ArrayArrayNumber' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs deleted file mode 100644 index d95bf3883d9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ArrayOfNumberOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ArrayOfNumberOnlyTests - { - // TODO uncomment below to declare an instance variable for ArrayOfNumberOnly - //private ArrayOfNumberOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ArrayOfNumberOnly - //instance = new ArrayOfNumberOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ArrayOfNumberOnly - /// - [Test] - public void ArrayOfNumberOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ArrayOfNumberOnly - //Assert.IsInstanceOf(typeof(ArrayOfNumberOnly), instance); - } - - - /// - /// Test the property 'ArrayNumber' - /// - [Test] - public void ArrayNumberTest() - { - // TODO unit test for the property 'ArrayNumber' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs deleted file mode 100644 index af09220da3c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ArrayTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ArrayTestTests - { - // TODO uncomment below to declare an instance variable for ArrayTest - //private ArrayTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ArrayTest - //instance = new ArrayTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ArrayTest - /// - [Test] - public void ArrayTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ArrayTest - //Assert.IsInstanceOf(typeof(ArrayTest), instance); - } - - - /// - /// Test the property 'ArrayOfString' - /// - [Test] - public void ArrayOfStringTest() - { - // TODO unit test for the property 'ArrayOfString' - } - /// - /// Test the property 'ArrayArrayOfInteger' - /// - [Test] - public void ArrayArrayOfIntegerTest() - { - // TODO unit test for the property 'ArrayArrayOfInteger' - } - /// - /// Test the property 'ArrayArrayOfModel' - /// - [Test] - public void ArrayArrayOfModelTest() - { - // TODO unit test for the property 'ArrayArrayOfModel' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs deleted file mode 100644 index 4cbdb4b8a5e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing BigCatAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class BigCatAllOfTests - { - // TODO uncomment below to declare an instance variable for BigCatAllOf - //private BigCatAllOf instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of BigCatAllOf - //instance = new BigCatAllOf(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of BigCatAllOf - /// - [Test] - public void BigCatAllOfInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" BigCatAllOf - //Assert.IsInstanceOf(typeof(BigCatAllOf), instance); - } - - - /// - /// Test the property 'Kind' - /// - [Test] - public void KindTest() - { - // TODO unit test for the property 'Kind' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/BigCatTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/BigCatTests.cs deleted file mode 100644 index 1d78ea9f1e6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/BigCatTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing BigCat - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class BigCatTests - { - // TODO uncomment below to declare an instance variable for BigCat - //private BigCat instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of BigCat - //instance = new BigCat(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of BigCat - /// - [Test] - public void BigCatInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" BigCat - //Assert.IsInstanceOf(typeof(BigCat), instance); - } - - - /// - /// Test the property 'Kind' - /// - [Test] - public void KindTest() - { - // TODO unit test for the property 'Kind' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs deleted file mode 100644 index dd2156d3ba8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Capitalization - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CapitalizationTests - { - // TODO uncomment below to declare an instance variable for Capitalization - //private Capitalization instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Capitalization - //instance = new Capitalization(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Capitalization - /// - [Test] - public void CapitalizationInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Capitalization - //Assert.IsInstanceOf(typeof(Capitalization), instance); - } - - - /// - /// Test the property 'SmallCamel' - /// - [Test] - public void SmallCamelTest() - { - // TODO unit test for the property 'SmallCamel' - } - /// - /// Test the property 'CapitalCamel' - /// - [Test] - public void CapitalCamelTest() - { - // TODO unit test for the property 'CapitalCamel' - } - /// - /// Test the property 'SmallSnake' - /// - [Test] - public void SmallSnakeTest() - { - // TODO unit test for the property 'SmallSnake' - } - /// - /// Test the property 'CapitalSnake' - /// - [Test] - public void CapitalSnakeTest() - { - // TODO unit test for the property 'CapitalSnake' - } - /// - /// Test the property 'SCAETHFlowPoints' - /// - [Test] - public void SCAETHFlowPointsTest() - { - // TODO unit test for the property 'SCAETHFlowPoints' - } - /// - /// Test the property 'ATT_NAME' - /// - [Test] - public void ATT_NAMETest() - { - // TODO unit test for the property 'ATT_NAME' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs deleted file mode 100644 index d7afe6310fa..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing CatAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CatAllOfTests - { - // TODO uncomment below to declare an instance variable for CatAllOf - //private CatAllOf instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of CatAllOf - //instance = new CatAllOf(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of CatAllOf - /// - [Test] - public void CatAllOfInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" CatAllOf - //Assert.IsInstanceOf(typeof(CatAllOf), instance); - } - - - /// - /// Test the property 'Declawed' - /// - [Test] - public void DeclawedTest() - { - // TODO unit test for the property 'Declawed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/CatTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/CatTests.cs deleted file mode 100644 index 8b89be0ec8d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/CatTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Cat - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CatTests - { - // TODO uncomment below to declare an instance variable for Cat - //private Cat instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Cat - //instance = new Cat(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Cat - /// - [Test] - public void CatInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Cat - //Assert.IsInstanceOf(typeof(Cat), instance); - } - - - /// - /// Test the property 'Declawed' - /// - [Test] - public void DeclawedTest() - { - // TODO unit test for the property 'Declawed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/CategoryTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/CategoryTests.cs deleted file mode 100644 index e65b9ab1c01..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/CategoryTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Category - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CategoryTests - { - // TODO uncomment below to declare an instance variable for Category - //private Category instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Category - //instance = new Category(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Category - /// - [Test] - public void CategoryInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Category - //Assert.IsInstanceOf(typeof(Category), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs deleted file mode 100644 index 6302a4d8dd9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ClassModel - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ClassModelTests - { - // TODO uncomment below to declare an instance variable for ClassModel - //private ClassModel instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ClassModel - //instance = new ClassModel(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ClassModel - /// - [Test] - public void ClassModelInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ClassModel - //Assert.IsInstanceOf(typeof(ClassModel), instance); - } - - - /// - /// Test the property 'Class' - /// - [Test] - public void ClassTest() - { - // TODO unit test for the property 'Class' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs deleted file mode 100644 index 30f5bed38e1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing DogAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class DogAllOfTests - { - // TODO uncomment below to declare an instance variable for DogAllOf - //private DogAllOf instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of DogAllOf - //instance = new DogAllOf(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of DogAllOf - /// - [Test] - public void DogAllOfInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" DogAllOf - //Assert.IsInstanceOf(typeof(DogAllOf), instance); - } - - - /// - /// Test the property 'Breed' - /// - [Test] - public void BreedTest() - { - // TODO unit test for the property 'Breed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/DogTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/DogTests.cs deleted file mode 100644 index fba682a3f9e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/DogTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Dog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class DogTests - { - // TODO uncomment below to declare an instance variable for Dog - //private Dog instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Dog - //instance = new Dog(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Dog - /// - [Test] - public void DogInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Dog - //Assert.IsInstanceOf(typeof(Dog), instance); - } - - - /// - /// Test the property 'Breed' - /// - [Test] - public void BreedTest() - { - // TODO unit test for the property 'Breed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs deleted file mode 100644 index 065ae99b613..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing EnumArrays - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class EnumArraysTests - { - // TODO uncomment below to declare an instance variable for EnumArrays - //private EnumArrays instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of EnumArrays - //instance = new EnumArrays(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of EnumArrays - /// - [Test] - public void EnumArraysInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" EnumArrays - //Assert.IsInstanceOf(typeof(EnumArrays), instance); - } - - - /// - /// Test the property 'JustSymbol' - /// - [Test] - public void JustSymbolTest() - { - // TODO unit test for the property 'JustSymbol' - } - /// - /// Test the property 'ArrayEnum' - /// - [Test] - public void ArrayEnumTest() - { - // TODO unit test for the property 'ArrayEnum' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs deleted file mode 100644 index 2ff4f5ab8b0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing EnumClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class EnumClassTests - { - // TODO uncomment below to declare an instance variable for EnumClass - //private EnumClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of EnumClass - //instance = new EnumClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of EnumClass - /// - [Test] - public void EnumClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" EnumClass - //Assert.IsInstanceOf(typeof(EnumClass), instance); - } - - - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs deleted file mode 100644 index 0ea4d901d50..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs +++ /dev/null @@ -1,111 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing EnumTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class EnumTestTests - { - // TODO uncomment below to declare an instance variable for EnumTest - //private EnumTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of EnumTest - //instance = new EnumTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of EnumTest - /// - [Test] - public void EnumTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" EnumTest - //Assert.IsInstanceOf(typeof(EnumTest), instance); - } - - - /// - /// Test the property 'EnumString' - /// - [Test] - public void EnumStringTest() - { - // TODO unit test for the property 'EnumString' - } - /// - /// Test the property 'EnumStringRequired' - /// - [Test] - public void EnumStringRequiredTest() - { - // TODO unit test for the property 'EnumStringRequired' - } - /// - /// Test the property 'EnumInteger' - /// - [Test] - public void EnumIntegerTest() - { - // TODO unit test for the property 'EnumInteger' - } - /// - /// Test the property 'EnumNumber' - /// - [Test] - public void EnumNumberTest() - { - // TODO unit test for the property 'EnumNumber' - } - /// - /// Test the property 'OuterEnum' - /// - [Test] - public void OuterEnumTest() - { - // TODO unit test for the property 'OuterEnum' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs deleted file mode 100644 index 02ae51ce37e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing FileSchemaTestClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class FileSchemaTestClassTests - { - // TODO uncomment below to declare an instance variable for FileSchemaTestClass - //private FileSchemaTestClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of FileSchemaTestClass - //instance = new FileSchemaTestClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FileSchemaTestClass - /// - [Test] - public void FileSchemaTestClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" FileSchemaTestClass - //Assert.IsInstanceOf(typeof(FileSchemaTestClass), instance); - } - - - /// - /// Test the property 'File' - /// - [Test] - public void FileTest() - { - // TODO unit test for the property 'File' - } - /// - /// Test the property 'Files' - /// - [Test] - public void FilesTest() - { - // TODO unit test for the property 'Files' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/FileTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/FileTests.cs deleted file mode 100644 index b18213afe49..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/FileTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing File - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class FileTests - { - // TODO uncomment below to declare an instance variable for File - //private File instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of File - //instance = new File(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of File - /// - [Test] - public void FileInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" File - //Assert.IsInstanceOf(typeof(File), instance); - } - - - /// - /// Test the property 'SourceURI' - /// - [Test] - public void SourceURITest() - { - // TODO unit test for the property 'SourceURI' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs deleted file mode 100644 index d5b7b0ba885..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing FormatTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class FormatTestTests - { - // TODO uncomment below to declare an instance variable for FormatTest - //private FormatTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of FormatTest - //instance = new FormatTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FormatTest - /// - [Test] - public void FormatTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" FormatTest - //Assert.IsInstanceOf(typeof(FormatTest), instance); - } - - - /// - /// Test the property 'Integer' - /// - [Test] - public void IntegerTest() - { - // TODO unit test for the property 'Integer' - } - /// - /// Test the property 'Int32' - /// - [Test] - public void Int32Test() - { - // TODO unit test for the property 'Int32' - } - /// - /// Test the property 'Int64' - /// - [Test] - public void Int64Test() - { - // TODO unit test for the property 'Int64' - } - /// - /// Test the property 'Number' - /// - [Test] - public void NumberTest() - { - // TODO unit test for the property 'Number' - } - /// - /// Test the property 'Float' - /// - [Test] - public void FloatTest() - { - // TODO unit test for the property 'Float' - } - /// - /// Test the property 'Double' - /// - [Test] - public void DoubleTest() - { - // TODO unit test for the property 'Double' - } - /// - /// Test the property 'String' - /// - [Test] - public void StringTest() - { - // TODO unit test for the property 'String' - } - /// - /// Test the property 'Byte' - /// - [Test] - public void ByteTest() - { - // TODO unit test for the property 'Byte' - } - /// - /// Test the property 'Binary' - /// - [Test] - public void BinaryTest() - { - // TODO unit test for the property 'Binary' - } - /// - /// Test the property 'Date' - /// - [Test] - public void DateTest() - { - // TODO unit test for the property 'Date' - } - /// - /// Test the property 'DateTime' - /// - [Test] - public void DateTimeTest() - { - // TODO unit test for the property 'DateTime' - } - /// - /// Test the property 'Uuid' - /// - [Test] - public void UuidTest() - { - // TODO unit test for the property 'Uuid' - } - /// - /// Test the property 'Password' - /// - [Test] - public void PasswordTest() - { - // TODO unit test for the property 'Password' - } - /// - /// Test the property 'BigDecimal' - /// - [Test] - public void BigDecimalTest() - { - // TODO unit test for the property 'BigDecimal' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs deleted file mode 100644 index 0c1ec60ef46..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing HasOnlyReadOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HasOnlyReadOnlyTests - { - // TODO uncomment below to declare an instance variable for HasOnlyReadOnly - //private HasOnlyReadOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of HasOnlyReadOnly - //instance = new HasOnlyReadOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of HasOnlyReadOnly - /// - [Test] - public void HasOnlyReadOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" HasOnlyReadOnly - //Assert.IsInstanceOf(typeof(HasOnlyReadOnly), instance); - } - - - /// - /// Test the property 'Bar' - /// - [Test] - public void BarTest() - { - // TODO unit test for the property 'Bar' - } - /// - /// Test the property 'Foo' - /// - [Test] - public void FooTest() - { - // TODO unit test for the property 'Foo' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ListTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ListTests.cs deleted file mode 100644 index 57f55da25ed..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ListTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing List - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ListTests - { - // TODO uncomment below to declare an instance variable for List - //private List instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of List - //instance = new List(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of List - /// - [Test] - public void ListInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" List - //Assert.IsInstanceOf(typeof(List), instance); - } - - - /// - /// Test the property '_123List' - /// - [Test] - public void _123ListTest() - { - // TODO unit test for the property '_123List' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/MapTestTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/MapTestTests.cs deleted file mode 100644 index 53220cdd78a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/MapTestTests.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing MapTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MapTestTests - { - // TODO uncomment below to declare an instance variable for MapTest - //private MapTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of MapTest - //instance = new MapTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of MapTest - /// - [Test] - public void MapTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" MapTest - //Assert.IsInstanceOf(typeof(MapTest), instance); - } - - - /// - /// Test the property 'MapMapOfString' - /// - [Test] - public void MapMapOfStringTest() - { - // TODO unit test for the property 'MapMapOfString' - } - /// - /// Test the property 'MapOfEnumString' - /// - [Test] - public void MapOfEnumStringTest() - { - // TODO unit test for the property 'MapOfEnumString' - } - /// - /// Test the property 'DirectMap' - /// - [Test] - public void DirectMapTest() - { - // TODO unit test for the property 'DirectMap' - } - /// - /// Test the property 'IndirectMap' - /// - [Test] - public void IndirectMapTest() - { - // TODO unit test for the property 'IndirectMap' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs deleted file mode 100644 index 792db793c52..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing MixedPropertiesAndAdditionalPropertiesClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixedPropertiesAndAdditionalPropertiesClassTests - { - // TODO uncomment below to declare an instance variable for MixedPropertiesAndAdditionalPropertiesClass - //private MixedPropertiesAndAdditionalPropertiesClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of MixedPropertiesAndAdditionalPropertiesClass - //instance = new MixedPropertiesAndAdditionalPropertiesClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of MixedPropertiesAndAdditionalPropertiesClass - /// - [Test] - public void MixedPropertiesAndAdditionalPropertiesClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" MixedPropertiesAndAdditionalPropertiesClass - //Assert.IsInstanceOf(typeof(MixedPropertiesAndAdditionalPropertiesClass), instance); - } - - - /// - /// Test the property 'Uuid' - /// - [Test] - public void UuidTest() - { - // TODO unit test for the property 'Uuid' - } - /// - /// Test the property 'DateTime' - /// - [Test] - public void DateTimeTest() - { - // TODO unit test for the property 'DateTime' - } - /// - /// Test the property 'Map' - /// - [Test] - public void MapTest() - { - // TODO unit test for the property 'Map' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs deleted file mode 100644 index 68ed58223de..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Model200Response - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class Model200ResponseTests - { - // TODO uncomment below to declare an instance variable for Model200Response - //private Model200Response instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Model200Response - //instance = new Model200Response(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Model200Response - /// - [Test] - public void Model200ResponseInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Model200Response - //Assert.IsInstanceOf(typeof(Model200Response), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'Class' - /// - [Test] - public void ClassTest() - { - // TODO unit test for the property 'Class' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs deleted file mode 100644 index 0313c8fd1a6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ModelClient - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ModelClientTests - { - // TODO uncomment below to declare an instance variable for ModelClient - //private ModelClient instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ModelClient - //instance = new ModelClient(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ModelClient - /// - [Test] - public void ModelClientInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ModelClient - //Assert.IsInstanceOf(typeof(ModelClient), instance); - } - - - /// - /// Test the property '__Client' - /// - [Test] - public void __ClientTest() - { - // TODO unit test for the property '__Client' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/NameTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/NameTests.cs deleted file mode 100644 index eb5fb91b0f5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/NameTests.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Name - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class NameTests - { - // TODO uncomment below to declare an instance variable for Name - //private Name instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Name - //instance = new Name(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Name - /// - [Test] - public void NameInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Name - //Assert.IsInstanceOf(typeof(Name), instance); - } - - - /// - /// Test the property '_Name' - /// - [Test] - public void _NameTest() - { - // TODO unit test for the property '_Name' - } - /// - /// Test the property 'SnakeCase' - /// - [Test] - public void SnakeCaseTest() - { - // TODO unit test for the property 'SnakeCase' - } - /// - /// Test the property 'Property' - /// - [Test] - public void PropertyTest() - { - // TODO unit test for the property 'Property' - } - /// - /// Test the property '_123Number' - /// - [Test] - public void _123NumberTest() - { - // TODO unit test for the property '_123Number' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs deleted file mode 100644 index 5f90f85f79c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing NumberOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class NumberOnlyTests - { - // TODO uncomment below to declare an instance variable for NumberOnly - //private NumberOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of NumberOnly - //instance = new NumberOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of NumberOnly - /// - [Test] - public void NumberOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" NumberOnly - //Assert.IsInstanceOf(typeof(NumberOnly), instance); - } - - - /// - /// Test the property 'JustNumber' - /// - [Test] - public void JustNumberTest() - { - // TODO unit test for the property 'JustNumber' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/OrderTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/OrderTests.cs deleted file mode 100644 index 7d155bb54cd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/OrderTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Order - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OrderTests - { - // TODO uncomment below to declare an instance variable for Order - //private Order instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Order - //instance = new Order(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Order - /// - [Test] - public void OrderInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Order - //Assert.IsInstanceOf(typeof(Order), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'PetId' - /// - [Test] - public void PetIdTest() - { - // TODO unit test for the property 'PetId' - } - /// - /// Test the property 'Quantity' - /// - [Test] - public void QuantityTest() - { - // TODO unit test for the property 'Quantity' - } - /// - /// Test the property 'ShipDate' - /// - [Test] - public void ShipDateTest() - { - // TODO unit test for the property 'ShipDate' - } - /// - /// Test the property 'Status' - /// - [Test] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } - /// - /// Test the property 'Complete' - /// - [Test] - public void CompleteTest() - { - // TODO unit test for the property 'Complete' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs deleted file mode 100644 index 6dd51d6f49e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing OuterComposite - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OuterCompositeTests - { - // TODO uncomment below to declare an instance variable for OuterComposite - //private OuterComposite instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of OuterComposite - //instance = new OuterComposite(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of OuterComposite - /// - [Test] - public void OuterCompositeInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" OuterComposite - //Assert.IsInstanceOf(typeof(OuterComposite), instance); - } - - - /// - /// Test the property 'MyNumber' - /// - [Test] - public void MyNumberTest() - { - // TODO unit test for the property 'MyNumber' - } - /// - /// Test the property 'MyString' - /// - [Test] - public void MyStringTest() - { - // TODO unit test for the property 'MyString' - } - /// - /// Test the property 'MyBoolean' - /// - [Test] - public void MyBooleanTest() - { - // TODO unit test for the property 'MyBoolean' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs deleted file mode 100644 index eb7688835a0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing OuterEnum - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OuterEnumTests - { - // TODO uncomment below to declare an instance variable for OuterEnum - //private OuterEnum instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of OuterEnum - //instance = new OuterEnum(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of OuterEnum - /// - [Test] - public void OuterEnumInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" OuterEnum - //Assert.IsInstanceOf(typeof(OuterEnum), instance); - } - - - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/PetTests.cs deleted file mode 100644 index 37f2c09d2d3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/PetTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Pet - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class PetTests - { - // TODO uncomment below to declare an instance variable for Pet - //private Pet instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Pet - //instance = new Pet(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Pet - /// - [Test] - public void PetInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Pet - //Assert.IsInstanceOf(typeof(Pet), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Category' - /// - [Test] - public void CategoryTest() - { - // TODO unit test for the property 'Category' - } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'PhotoUrls' - /// - [Test] - public void PhotoUrlsTest() - { - // TODO unit test for the property 'PhotoUrls' - } - /// - /// Test the property 'Tags' - /// - [Test] - public void TagsTest() - { - // TODO unit test for the property 'Tags' - } - /// - /// Test the property 'Status' - /// - [Test] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs deleted file mode 100644 index c870caf786c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ReadOnlyFirst - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ReadOnlyFirstTests - { - // TODO uncomment below to declare an instance variable for ReadOnlyFirst - //private ReadOnlyFirst instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ReadOnlyFirst - //instance = new ReadOnlyFirst(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ReadOnlyFirst - /// - [Test] - public void ReadOnlyFirstInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ReadOnlyFirst - //Assert.IsInstanceOf(typeof(ReadOnlyFirst), instance); - } - - - /// - /// Test the property 'Bar' - /// - [Test] - public void BarTest() - { - // TODO unit test for the property 'Bar' - } - /// - /// Test the property 'Baz' - /// - [Test] - public void BazTest() - { - // TODO unit test for the property 'Baz' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ReturnTests.cs deleted file mode 100644 index e744ff4f711..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/ReturnTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Return - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ReturnTests - { - // TODO uncomment below to declare an instance variable for Return - //private Return instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Return - //instance = new Return(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Return - /// - [Test] - public void ReturnInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Return - //Assert.IsInstanceOf(typeof(Return), instance); - } - - - /// - /// Test the property '_Return' - /// - [Test] - public void _ReturnTest() - { - // TODO unit test for the property '_Return' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs deleted file mode 100644 index 274d9db265d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing SpecialModelName - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SpecialModelNameTests - { - // TODO uncomment below to declare an instance variable for SpecialModelName - //private SpecialModelName instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of SpecialModelName - //instance = new SpecialModelName(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of SpecialModelName - /// - [Test] - public void SpecialModelNameInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" SpecialModelName - //Assert.IsInstanceOf(typeof(SpecialModelName), instance); - } - - - /// - /// Test the property 'SpecialPropertyName' - /// - [Test] - public void SpecialPropertyNameTest() - { - // TODO unit test for the property 'SpecialPropertyName' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/TagTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/TagTests.cs deleted file mode 100644 index 22c9058e65d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/TagTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Tag - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TagTests - { - // TODO uncomment below to declare an instance variable for Tag - //private Tag instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Tag - //instance = new Tag(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Tag - /// - [Test] - public void TagInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Tag - //Assert.IsInstanceOf(typeof(Tag), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs deleted file mode 100644 index 18c3dc5d60e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs +++ /dev/null @@ -1,111 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing TypeHolderDefault - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TypeHolderDefaultTests - { - // TODO uncomment below to declare an instance variable for TypeHolderDefault - //private TypeHolderDefault instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of TypeHolderDefault - //instance = new TypeHolderDefault(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of TypeHolderDefault - /// - [Test] - public void TypeHolderDefaultInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" TypeHolderDefault - //Assert.IsInstanceOf(typeof(TypeHolderDefault), instance); - } - - - /// - /// Test the property 'StringItem' - /// - [Test] - public void StringItemTest() - { - // TODO unit test for the property 'StringItem' - } - /// - /// Test the property 'NumberItem' - /// - [Test] - public void NumberItemTest() - { - // TODO unit test for the property 'NumberItem' - } - /// - /// Test the property 'IntegerItem' - /// - [Test] - public void IntegerItemTest() - { - // TODO unit test for the property 'IntegerItem' - } - /// - /// Test the property 'BoolItem' - /// - [Test] - public void BoolItemTest() - { - // TODO unit test for the property 'BoolItem' - } - /// - /// Test the property 'ArrayItem' - /// - [Test] - public void ArrayItemTest() - { - // TODO unit test for the property 'ArrayItem' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs deleted file mode 100644 index b1e63784346..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing TypeHolderExample - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TypeHolderExampleTests - { - // TODO uncomment below to declare an instance variable for TypeHolderExample - //private TypeHolderExample instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of TypeHolderExample - //instance = new TypeHolderExample(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of TypeHolderExample - /// - [Test] - public void TypeHolderExampleInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" TypeHolderExample - //Assert.IsInstanceOf(typeof(TypeHolderExample), instance); - } - - - /// - /// Test the property 'StringItem' - /// - [Test] - public void StringItemTest() - { - // TODO unit test for the property 'StringItem' - } - /// - /// Test the property 'NumberItem' - /// - [Test] - public void NumberItemTest() - { - // TODO unit test for the property 'NumberItem' - } - /// - /// Test the property 'FloatItem' - /// - [Test] - public void FloatItemTest() - { - // TODO unit test for the property 'FloatItem' - } - /// - /// Test the property 'IntegerItem' - /// - [Test] - public void IntegerItemTest() - { - // TODO unit test for the property 'IntegerItem' - } - /// - /// Test the property 'BoolItem' - /// - [Test] - public void BoolItemTest() - { - // TODO unit test for the property 'BoolItem' - } - /// - /// Test the property 'ArrayItem' - /// - [Test] - public void ArrayItemTest() - { - // TODO unit test for the property 'ArrayItem' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/UserTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/UserTests.cs deleted file mode 100644 index 0f37935e9a2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/UserTests.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing User - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class UserTests - { - // TODO uncomment below to declare an instance variable for User - //private User instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of User - //instance = new User(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of User - /// - [Test] - public void UserInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" User - //Assert.IsInstanceOf(typeof(User), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Username' - /// - [Test] - public void UsernameTest() - { - // TODO unit test for the property 'Username' - } - /// - /// Test the property 'FirstName' - /// - [Test] - public void FirstNameTest() - { - // TODO unit test for the property 'FirstName' - } - /// - /// Test the property 'LastName' - /// - [Test] - public void LastNameTest() - { - // TODO unit test for the property 'LastName' - } - /// - /// Test the property 'Email' - /// - [Test] - public void EmailTest() - { - // TODO unit test for the property 'Email' - } - /// - /// Test the property 'Password' - /// - [Test] - public void PasswordTest() - { - // TODO unit test for the property 'Password' - } - /// - /// Test the property 'Phone' - /// - [Test] - public void PhoneTest() - { - // TODO unit test for the property 'Phone' - } - /// - /// Test the property 'UserStatus' - /// - [Test] - public void UserStatusTest() - { - // TODO unit test for the property 'UserStatus' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs deleted file mode 100644 index 5ab42bab1c6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs +++ /dev/null @@ -1,303 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing XmlItem - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class XmlItemTests - { - // TODO uncomment below to declare an instance variable for XmlItem - //private XmlItem instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of XmlItem - //instance = new XmlItem(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of XmlItem - /// - [Test] - public void XmlItemInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" XmlItem - //Assert.IsInstanceOf(typeof(XmlItem), instance); - } - - - /// - /// Test the property 'AttributeString' - /// - [Test] - public void AttributeStringTest() - { - // TODO unit test for the property 'AttributeString' - } - /// - /// Test the property 'AttributeNumber' - /// - [Test] - public void AttributeNumberTest() - { - // TODO unit test for the property 'AttributeNumber' - } - /// - /// Test the property 'AttributeInteger' - /// - [Test] - public void AttributeIntegerTest() - { - // TODO unit test for the property 'AttributeInteger' - } - /// - /// Test the property 'AttributeBoolean' - /// - [Test] - public void AttributeBooleanTest() - { - // TODO unit test for the property 'AttributeBoolean' - } - /// - /// Test the property 'WrappedArray' - /// - [Test] - public void WrappedArrayTest() - { - // TODO unit test for the property 'WrappedArray' - } - /// - /// Test the property 'NameString' - /// - [Test] - public void NameStringTest() - { - // TODO unit test for the property 'NameString' - } - /// - /// Test the property 'NameNumber' - /// - [Test] - public void NameNumberTest() - { - // TODO unit test for the property 'NameNumber' - } - /// - /// Test the property 'NameInteger' - /// - [Test] - public void NameIntegerTest() - { - // TODO unit test for the property 'NameInteger' - } - /// - /// Test the property 'NameBoolean' - /// - [Test] - public void NameBooleanTest() - { - // TODO unit test for the property 'NameBoolean' - } - /// - /// Test the property 'NameArray' - /// - [Test] - public void NameArrayTest() - { - // TODO unit test for the property 'NameArray' - } - /// - /// Test the property 'NameWrappedArray' - /// - [Test] - public void NameWrappedArrayTest() - { - // TODO unit test for the property 'NameWrappedArray' - } - /// - /// Test the property 'PrefixString' - /// - [Test] - public void PrefixStringTest() - { - // TODO unit test for the property 'PrefixString' - } - /// - /// Test the property 'PrefixNumber' - /// - [Test] - public void PrefixNumberTest() - { - // TODO unit test for the property 'PrefixNumber' - } - /// - /// Test the property 'PrefixInteger' - /// - [Test] - public void PrefixIntegerTest() - { - // TODO unit test for the property 'PrefixInteger' - } - /// - /// Test the property 'PrefixBoolean' - /// - [Test] - public void PrefixBooleanTest() - { - // TODO unit test for the property 'PrefixBoolean' - } - /// - /// Test the property 'PrefixArray' - /// - [Test] - public void PrefixArrayTest() - { - // TODO unit test for the property 'PrefixArray' - } - /// - /// Test the property 'PrefixWrappedArray' - /// - [Test] - public void PrefixWrappedArrayTest() - { - // TODO unit test for the property 'PrefixWrappedArray' - } - /// - /// Test the property 'NamespaceString' - /// - [Test] - public void NamespaceStringTest() - { - // TODO unit test for the property 'NamespaceString' - } - /// - /// Test the property 'NamespaceNumber' - /// - [Test] - public void NamespaceNumberTest() - { - // TODO unit test for the property 'NamespaceNumber' - } - /// - /// Test the property 'NamespaceInteger' - /// - [Test] - public void NamespaceIntegerTest() - { - // TODO unit test for the property 'NamespaceInteger' - } - /// - /// Test the property 'NamespaceBoolean' - /// - [Test] - public void NamespaceBooleanTest() - { - // TODO unit test for the property 'NamespaceBoolean' - } - /// - /// Test the property 'NamespaceArray' - /// - [Test] - public void NamespaceArrayTest() - { - // TODO unit test for the property 'NamespaceArray' - } - /// - /// Test the property 'NamespaceWrappedArray' - /// - [Test] - public void NamespaceWrappedArrayTest() - { - // TODO unit test for the property 'NamespaceWrappedArray' - } - /// - /// Test the property 'PrefixNsString' - /// - [Test] - public void PrefixNsStringTest() - { - // TODO unit test for the property 'PrefixNsString' - } - /// - /// Test the property 'PrefixNsNumber' - /// - [Test] - public void PrefixNsNumberTest() - { - // TODO unit test for the property 'PrefixNsNumber' - } - /// - /// Test the property 'PrefixNsInteger' - /// - [Test] - public void PrefixNsIntegerTest() - { - // TODO unit test for the property 'PrefixNsInteger' - } - /// - /// Test the property 'PrefixNsBoolean' - /// - [Test] - public void PrefixNsBooleanTest() - { - // TODO unit test for the property 'PrefixNsBoolean' - } - /// - /// Test the property 'PrefixNsArray' - /// - [Test] - public void PrefixNsArrayTest() - { - // TODO unit test for the property 'PrefixNsArray' - } - /// - /// Test the property 'PrefixNsWrappedArray' - /// - [Test] - public void PrefixNsWrappedArrayTest() - { - // TODO unit test for the property 'PrefixNsWrappedArray' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj deleted file mode 100644 index b756329e87f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ /dev/null @@ -1,89 +0,0 @@ - - - - - Debug - AnyCPU - {19F1DEBC-DE5E-4517-8062-F000CD499087} - Library - Properties - Org.OpenAPITools.Test - Org.OpenAPITools.Test - v3.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\JsonSubTypes.1.6.0\lib\net35\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.6.0\lib\net35\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.6.0\lib\net35\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.6.0\lib\net35\JsonSubTypes.dll - - - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net35\RestSharp.dll - - - $(SolutionDir)\packages\NUnit.3.11.0\lib\net35\nunit.framework.dll - ..\packages\NUnit.3.11.0\lib\net35\nunit.framework.dll - ..\..\packages\NUnit.3.11.0\lib\net35\nunit.framework.dll - ..\..\vendor\NUnit.3.11.0\lib\net35\nunit.framework.dll - - - - - - - - - - - - {321C8C3F-0156-40C1-AE42-D59761FB9B6C} - Org.OpenAPITools - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/packages.config deleted file mode 100644 index fb89a7e36fb..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools.Test/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/AnotherFakeApi.cs deleted file mode 100644 index 5a57d40235e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ /dev/null @@ -1,235 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IAnotherFakeApi : IApiAccessor - { - #region Synchronous Operations - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient Call123TestSpecialTags (ModelClient body); - - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse Call123TestSpecialTagsWithHttpInfo (ModelClient body); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class AnotherFakeApi : IAnotherFakeApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public AnotherFakeApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public AnotherFakeApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public AnotherFakeApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new Dictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient Call123TestSpecialTags (ModelClient body) - { - ApiResponse localVarResponse = Call123TestSpecialTagsWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse Call123TestSpecialTagsWithHttpInfo (ModelClient body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->Call123TestSpecialTags"); - - var localVarPath = "/another-fake/dummy"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Call123TestSpecialTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeApi.cs deleted file mode 100644 index 3db950b4ee2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeApi.cs +++ /dev/null @@ -1,1595 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IFakeApi : IApiAccessor - { - #region Synchronous Operations - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// - void CreateXmlItem (XmlItem xmlItem); - - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// ApiResponse of Object(void) - ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem); - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// bool - bool FakeOuterBooleanSerialize (bool? body = default(bool?)); - - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)); - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// OuterComposite - OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)); - - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)); - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// decimal - decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)); - - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)); - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// string - string FakeOuterStringSerialize (string body = default(string)); - - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)); - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// - void TestBodyWithFileSchema (FileSchemaTestClass body); - - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass body); - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void TestBodyWithQueryParams (string query, User body); - - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, User body); - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient TestClientModel (ModelClient body); - - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse TestClientModelWithHttpInfo (ModelClient body); - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// - void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), 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 test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// - void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); - - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// - void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); - - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// - void TestInlineAdditionalProperties (Dictionary param); - - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// ApiResponse of Object(void) - ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Dictionary param); - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// - void TestJsonFormData (string param, string param2); - - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// ApiResponse of Object(void) - ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2); - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context); - - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class FakeApi : IFakeApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public FakeApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public FakeApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public FakeApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new Dictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// - public void CreateXmlItem (XmlItem xmlItem) - { - CreateXmlItemWithHttpInfo(xmlItem); - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// ApiResponse of Object(void) - public ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem) - { - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) - throw new ApiException(400, "Missing required parameter 'xmlItem' when calling FakeApi->CreateXmlItem"); - - var localVarPath = "/fake/create_xml_item"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/xml", - "application/xml; charset=utf-8", - "application/xml; charset=utf-16", - "text/xml", - "text/xml; charset=utf-8", - "text/xml; charset=utf-16" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (xmlItem != null && xmlItem.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(xmlItem); // http body (model) parameter - } - else - { - localVarPostBody = xmlItem; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateXmlItem", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// bool - public bool FakeOuterBooleanSerialize (bool? body = default(bool?)) - { - ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// ApiResponse of bool - public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)) - { - - var localVarPath = "/fake/outer/boolean"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (bool) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(bool))); - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)) - { - ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// ApiResponse of OuterComposite - public ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)) - { - - var localVarPath = "/fake/outer/composite"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (OuterComposite) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite))); - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// decimal - public decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)) - { - ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// ApiResponse of decimal - public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)) - { - - var localVarPath = "/fake/outer/number"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (decimal) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(decimal))); - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// string - public string FakeOuterStringSerialize (string body = default(string)) - { - ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// ApiResponse of string - public ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)) - { - - var localVarPath = "/fake/outer/string"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// - public void TestBodyWithFileSchema (FileSchemaTestClass body) - { - TestBodyWithFileSchemaWithHttpInfo(body); - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithFileSchema"); - - var localVarPath = "/fake/body-with-file-schema"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithFileSchema", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - public void TestBodyWithQueryParams (string query, User body) - { - TestBodyWithQueryParamsWithHttpInfo(query, body); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - public ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, User body) - { - // verify the required parameter 'query' is set - if (query == null) - throw new ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams"); - - var localVarPath = "/fake/body-with-query-params"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithQueryParams", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient TestClientModel (ModelClient body) - { - ApiResponse localVarResponse = TestClientModelWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse TestClientModelWithHttpInfo (ModelClient body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClientModel", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// - public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) - { - TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) - { - // verify the required parameter 'number' is set - if (number == null) - throw new ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_double' is set - if (_double == null) - throw new ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'patternWithoutDelimiter' is set - if (patternWithoutDelimiter == null) - throw new ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_byte' is set - if (_byte == null) - throw new ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (integer != null) localVarFormParams.Add("integer", this.Configuration.ApiClient.ParameterToString(integer)); // form parameter - if (int32 != null) localVarFormParams.Add("int32", this.Configuration.ApiClient.ParameterToString(int32)); // form parameter - if (int64 != null) localVarFormParams.Add("int64", this.Configuration.ApiClient.ParameterToString(int64)); // form parameter - if (number != null) localVarFormParams.Add("number", this.Configuration.ApiClient.ParameterToString(number)); // form parameter - if (_float != null) localVarFormParams.Add("float", this.Configuration.ApiClient.ParameterToString(_float)); // form parameter - if (_double != null) localVarFormParams.Add("double", this.Configuration.ApiClient.ParameterToString(_double)); // form parameter - if (_string != null) localVarFormParams.Add("string", this.Configuration.ApiClient.ParameterToString(_string)); // form parameter - if (patternWithoutDelimiter != null) localVarFormParams.Add("pattern_without_delimiter", this.Configuration.ApiClient.ParameterToString(patternWithoutDelimiter)); // form parameter - if (_byte != null) localVarFormParams.Add("byte", this.Configuration.ApiClient.ParameterToString(_byte)); // form parameter - if (binary != null) localVarFileParams.Add("binary", this.Configuration.ApiClient.ParameterToFile("binary", binary)); - if (date != null) localVarFormParams.Add("date", this.Configuration.ApiClient.ParameterToString(date)); // form parameter - if (dateTime != null) localVarFormParams.Add("dateTime", this.Configuration.ApiClient.ParameterToString(dateTime)); // form parameter - if (password != null) localVarFormParams.Add("password", this.Configuration.ApiClient.ParameterToString(password)); // form parameter - if (callback != null) localVarFormParams.Add("callback", this.Configuration.ApiClient.ParameterToString(callback)); // form parameter - - // authentication (http_basic_test) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestEndpointParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// - public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) - { - TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// ApiResponse of Object(void) - public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) - { - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter - if (enumQueryString != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_string", enumQueryString)); // query parameter - if (enumQueryInteger != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_integer", enumQueryInteger)); // query parameter - if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter - if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter - if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter - if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter - if (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter - - - // 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("TestEnumParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// - public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) - { - TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// ApiResponse of Object(void) - public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) - { - // verify the required parameter 'requiredStringGroup' is set - if (requiredStringGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredBooleanGroup' is set - if (requiredBooleanGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredInt64Group' is set - if (requiredInt64Group == null) - throw new ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (requiredStringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_string_group", requiredStringGroup)); // query parameter - if (requiredInt64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_int64_group", requiredInt64Group)); // query parameter - if (stringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "string_group", stringGroup)); // query parameter - if (int64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "int64_group", int64Group)); // query parameter - if (requiredBooleanGroup != null) localVarHeaderParams.Add("required_boolean_group", this.Configuration.ApiClient.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) localVarHeaderParams.Add("boolean_group", this.Configuration.ApiClient.ParameterToString(booleanGroup)); // header parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestGroupParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// - public void TestInlineAdditionalProperties (Dictionary param) - { - TestInlineAdditionalPropertiesWithHttpInfo(param); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// ApiResponse of Object(void) - public ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Dictionary param) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties"); - - var localVarPath = "/fake/inline-additionalProperties"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null && param.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(param); // http body (model) parameter - } - else - { - localVarPostBody = param; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// - public void TestJsonFormData (string param, string param2) - { - TestJsonFormDataWithHttpInfo(param, param2); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// ApiResponse of Object(void) - public ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - // verify the required parameter 'param2' is set - if (param2 == null) - throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - - var localVarPath = "/fake/jsonFormData"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null) localVarFormParams.Add("param", this.Configuration.ApiClient.ParameterToString(param)); // form parameter - if (param2 != null) localVarFormParams.Add("param2", this.Configuration.ApiClient.ParameterToString(param2)); // form parameter - - - // 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("TestJsonFormData", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - public void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) - { - TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// ApiResponse of Object(void) - public ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context) - { - // verify the required parameter 'pipe' is set - if (pipe == null) - throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'ioutil' is set - if (ioutil == null) - throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'http' is set - if (http == null) - throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'url' is set - if (url == null) - throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'context' is set - if (context == null) - throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - - var localVarPath = "/fake/test-query-parameters"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter - if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter - if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("ssv", "http", http)); // query parameter - if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter - if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs deleted file mode 100644 index c6ab5a18d9e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ /dev/null @@ -1,240 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IFakeClassnameTags123Api : IApiAccessor - { - #region Synchronous Operations - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient TestClassname (ModelClient body); - - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse TestClassnameWithHttpInfo (ModelClient body); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public FakeClassnameTags123Api(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public FakeClassnameTags123Api() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public FakeClassnameTags123Api(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new Dictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient TestClassname (ModelClient body) - { - ApiResponse localVarResponse = TestClassnameWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse TestClassnameWithHttpInfo (ModelClient body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname"); - - var localVarPath = "/fake_classname_test"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (api_key_query) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClassname", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/PetApi.cs deleted file mode 100644 index 186ed1237e4..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/PetApi.cs +++ /dev/null @@ -1,1034 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IPetApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - void AddPet (Pet body); - - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - ApiResponse AddPetWithHttpInfo (Pet body); - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// - void DeletePet (long petId, string apiKey = default(string)); - - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)); - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// List<Pet> - List FindPetsByStatus (List status); - - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// ApiResponse of List<Pet> - ApiResponse> FindPetsByStatusWithHttpInfo (List status); - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// List<Pet> - [Obsolete] - List FindPetsByTags (List tags); - - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// ApiResponse of List<Pet> - [Obsolete] - ApiResponse> FindPetsByTagsWithHttpInfo (List tags); - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Pet - Pet GetPetById (long petId); - - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// ApiResponse of Pet - ApiResponse GetPetByIdWithHttpInfo (long petId); - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - void UpdatePet (Pet body); - - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - ApiResponse UpdatePetWithHttpInfo (Pet body); - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)); - - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); - - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class PetApi : IPetApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public PetApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public PetApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public PetApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new Dictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - public void AddPet (Pet body) - { - AddPetWithHttpInfo(body); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - public ApiResponse AddPetWithHttpInfo (Pet body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet"); - - var localVarPath = "/pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("AddPet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// - public void DeletePet (long petId, string apiKey = default(string)) - { - DeletePetWithHttpInfo(petId, apiKey); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (apiKey != null) localVarHeaderParams.Add("api_key", this.Configuration.ApiClient.ParameterToString(apiKey)); // header parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeletePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// List<Pet> - public List FindPetsByStatus (List status) - { - ApiResponse> localVarResponse = FindPetsByStatusWithHttpInfo(status); - return localVarResponse.Data; - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// ApiResponse of List<Pet> - public ApiResponse> FindPetsByStatusWithHttpInfo (List status) - { - // verify the required parameter 'status' is set - if (status == null) - throw new ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - - var localVarPath = "/pet/findByStatus"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "status", status)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // 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("FindPetsByStatus", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// List<Pet> - [Obsolete] - public List FindPetsByTags (List tags) - { - ApiResponse> localVarResponse = FindPetsByTagsWithHttpInfo(tags); - return localVarResponse.Data; - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// ApiResponse of List<Pet> - [Obsolete] - public ApiResponse> FindPetsByTagsWithHttpInfo (List tags) - { - // verify the required parameter 'tags' is set - if (tags == null) - throw new ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - - var localVarPath = "/pet/findByTags"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (tags != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "tags", tags)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // 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("FindPetsByTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Pet - public Pet GetPetById (long petId) - { - ApiResponse localVarResponse = GetPetByIdWithHttpInfo(petId); - return localVarResponse.Data; - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// ApiResponse of Pet - public ApiResponse GetPetByIdWithHttpInfo (long petId) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // 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("GetPetById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Pet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet))); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - public void UpdatePet (Pet body) - { - UpdatePetWithHttpInfo(body); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - public ApiResponse UpdatePetWithHttpInfo (Pet body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet"); - - var localVarPath = "/pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - public void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)) - { - UpdatePetWithFormWithHttpInfo(petId, name, status); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// ApiResponse of Object(void) - public ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (name != null) localVarFormParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // form parameter - if (status != null) localVarFormParams.Add("status", this.Configuration.ApiClient.ParameterToString(status)); // form parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePetWithForm", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - public ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) - { - ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); - return localVarResponse.Data; - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse of ApiResponse - public ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - - var localVarPath = "/pet/{petId}/uploadImage"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) - { - ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); - return localVarResponse.Data; - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - public ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'requiredFile' is set - if (requiredFile == null) - throw new ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (requiredFile != null) localVarFileParams.Add("requiredFile", this.Configuration.ApiClient.ParameterToFile("requiredFile", requiredFile)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/StoreApi.cs deleted file mode 100644 index 1d7e5a84940..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/StoreApi.cs +++ /dev/null @@ -1,492 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IStoreApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// - void DeleteOrder (string orderId); - - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// ApiResponse of Object(void) - ApiResponse DeleteOrderWithHttpInfo (string orderId); - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Dictionary<string, int> - Dictionary GetInventory (); - - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, int> - ApiResponse> GetInventoryWithHttpInfo (); - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Order - Order GetOrderById (long orderId); - - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// ApiResponse of Order - ApiResponse GetOrderByIdWithHttpInfo (long orderId); - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Order - Order PlaceOrder (Order body); - - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// ApiResponse of Order - ApiResponse PlaceOrderWithHttpInfo (Order body); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class StoreApi : IStoreApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public StoreApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public StoreApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public StoreApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new Dictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// - public void DeleteOrder (string orderId) - { - DeleteOrderWithHttpInfo(orderId); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// ApiResponse of Object(void) - public ApiResponse DeleteOrderWithHttpInfo (string orderId) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - - var localVarPath = "/store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Dictionary<string, int> - public Dictionary GetInventory () - { - ApiResponse> localVarResponse = GetInventoryWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, int> - public ApiResponse> GetInventoryWithHttpInfo () - { - - var localVarPath = "/store/inventory"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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); - - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // 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("GetInventory", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Order - public Order GetOrderById (long orderId) - { - ApiResponse localVarResponse = GetOrderByIdWithHttpInfo(orderId); - return localVarResponse.Data; - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// ApiResponse of Order - public ApiResponse GetOrderByIdWithHttpInfo (long orderId) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - - var localVarPath = "/store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // 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("GetOrderById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Order - public Order PlaceOrder (Order body) - { - ApiResponse localVarResponse = PlaceOrderWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// ApiResponse of Order - public ApiResponse PlaceOrderWithHttpInfo (Order body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder"); - - var localVarPath = "/store/order"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("PlaceOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/UserApi.cs deleted file mode 100644 index 9fa2c7f4d1a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Api/UserApi.cs +++ /dev/null @@ -1,862 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IUserApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// - void CreateUser (User body); - - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// ApiResponse of Object(void) - ApiResponse CreateUserWithHttpInfo (User body); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// - void CreateUsersWithArrayInput (List body); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - ApiResponse CreateUsersWithArrayInputWithHttpInfo (List body); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// - void CreateUsersWithListInput (List body); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - ApiResponse CreateUsersWithListInputWithHttpInfo (List body); - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// - void DeleteUser (string username); - - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// ApiResponse of Object(void) - ApiResponse DeleteUserWithHttpInfo (string username); - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// User - User GetUserByName (string username); - - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// ApiResponse of User - ApiResponse GetUserByNameWithHttpInfo (string username); - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// string - string LoginUser (string username, string password); - - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// ApiResponse of string - ApiResponse LoginUserWithHttpInfo (string username, string password); - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - void LogoutUser (); - - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - ApiResponse LogoutUserWithHttpInfo (); - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// - void UpdateUser (string username, User body); - - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// ApiResponse of Object(void) - ApiResponse UpdateUserWithHttpInfo (string username, User body); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class UserApi : IUserApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public UserApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public UserApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public UserApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new Dictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// - public void CreateUser (User body) - { - CreateUserWithHttpInfo(body); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// ApiResponse of Object(void) - public ApiResponse CreateUserWithHttpInfo (User body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser"); - - var localVarPath = "/user"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// - public void CreateUsersWithArrayInput (List body) - { - CreateUsersWithArrayInputWithHttpInfo(body); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - public ApiResponse CreateUsersWithArrayInputWithHttpInfo (List body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput"); - - var localVarPath = "/user/createWithArray"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithArrayInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// - public void CreateUsersWithListInput (List body) - { - CreateUsersWithListInputWithHttpInfo(body); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - public ApiResponse CreateUsersWithListInputWithHttpInfo (List body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput"); - - var localVarPath = "/user/createWithList"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithListInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// - public void DeleteUser (string username) - { - DeleteUserWithHttpInfo(username); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// ApiResponse of Object(void) - public ApiResponse DeleteUserWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// User - public User GetUserByName (string username) - { - ApiResponse localVarResponse = GetUserByNameWithHttpInfo(username); - return localVarResponse.Data; - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// ApiResponse of User - public ApiResponse GetUserByNameWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // 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("GetUserByName", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User))); - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// string - public string LoginUser (string username, string password) - { - ApiResponse localVarResponse = LoginUserWithHttpInfo(username, password); - return localVarResponse.Data; - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// ApiResponse of string - public ApiResponse LoginUserWithHttpInfo (string username, string password) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - // verify the required parameter 'password' is set - if (password == null) - throw new ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - - var localVarPath = "/user/login"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "username", username)); // query parameter - if (password != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "password", password)); // query parameter - - - // 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("LoginUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// - public void LogoutUser () - { - LogoutUserWithHttpInfo(); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - public ApiResponse LogoutUserWithHttpInfo () - { - - var localVarPath = "/user/logout"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - 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("LogoutUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// - public void UpdateUser (string username, User body) - { - UpdateUserWithHttpInfo(username, body); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// ApiResponse of Object(void) - public ApiResponse UpdateUserWithHttpInfo (string username, User body) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiClient.cs deleted file mode 100644 index 8816f4fffc0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiClient.cs +++ /dev/null @@ -1,508 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Text.RegularExpressions; -using System.IO; -using System.Threading; -using System.Web; -using System.Linq; -using System.Net; -using System.Text; -using Newtonsoft.Json; -using RestSharp; - -namespace Org.OpenAPITools.Client -{ - /// - /// API client is mainly responsible for making the HTTP call to the API backend. - /// - public partial class ApiClient - { - private JsonSerializerSettings serializerSettings = new JsonSerializerSettings - { - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor - }; - - /// - /// Allows for extending request processing for generated code. - /// - /// The RestSharp request object - partial void InterceptRequest(IRestRequest request); - - /// - /// Allows for extending response processing for generated code. - /// - /// The RestSharp request object - /// The RestSharp response object - partial void InterceptResponse(IRestRequest request, IRestResponse response); - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - public ApiClient() - { - Configuration = Org.OpenAPITools.Client.Configuration.Default; - RestClient = new RestClient("http://petstore.swagger.io:80/v2"); - } - - /// - /// Initializes a new instance of the class - /// with default base path (http://petstore.swagger.io:80/v2). - /// - /// An instance of Configuration. - public ApiClient(Configuration config) - { - Configuration = config ?? Org.OpenAPITools.Client.Configuration.Default; - - RestClient = new RestClient(Configuration.BasePath); - } - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - /// The base path. - public ApiClient(String basePath = "http://petstore.swagger.io:80/v2") - { - if (String.IsNullOrEmpty(basePath)) - throw new ArgumentException("basePath cannot be empty"); - - RestClient = new RestClient(basePath); - Configuration = Client.Configuration.Default; - } - - /// - /// Gets or sets the default API client for making HTTP calls. - /// - /// The default API client. - [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] - public static ApiClient Default; - - /// - /// Gets or sets an instance of the IReadableConfiguration. - /// - /// An instance of the IReadableConfiguration. - /// - /// helps us to avoid modifying possibly global - /// configuration values from within a given client. It does not guarantee thread-safety - /// of the instance in any way. - /// - public IReadableConfiguration Configuration { get; set; } - - /// - /// Gets or sets the RestClient. - /// - /// An instance of the RestClient - public RestClient RestClient { get; set; } - - // Creates and sets up a RestRequest prior to a call. - private RestRequest PrepareRequest( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = new RestRequest(path, method); - - // add path parameter, if any - foreach(var param in pathParams) - request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); - - // add header parameter, if any - foreach(var param in headerParams) - request.AddHeader(param.Key, param.Value); - - // add query parameter, if any - foreach(var param in queryParams) - request.AddQueryParameter(param.Key, param.Value); - - // add form parameter, if any - foreach(var param in formParams) - request.AddParameter(param.Key, param.Value); - - // add file parameter, if any - foreach(var param in fileParams) - { - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); - } - - if (postBody != null) // http body (model or byte[]) parameter - { - request.AddParameter(contentType, postBody, ParameterType.RequestBody); - } - - return request; - } - - /// - /// Makes the HTTP request (Sync). - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content Type of the request - /// Object - public Object CallApi( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - - // set timeout - - RestClient.Timeout = Configuration.Timeout; - // set user agent - RestClient.UserAgent = Configuration.UserAgent; - - InterceptRequest(request); - var response = RestClient.Execute(request); - InterceptResponse(request, response); - - return (Object) response; - } - - - /// - /// Escape string (url-encoded). - /// - /// String to be escaped. - /// Escaped string. - public string EscapeString(string str) - { - return UrlEncode(str); - } - - /// - /// Create FileParameter based on Stream. - /// - /// Parameter name. - /// Input stream. - /// FileParameter. - public FileParameter ParameterToFile(string name, Stream stream) - { - if (stream is FileStream) - return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); - else - return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// Formatted string. - public string ParameterToString(object obj) - { - if (obj is DateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTime)obj).ToString (Configuration.DateTimeFormat); - else if (obj is DateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); - else if (obj is bool) - return (bool)obj ? "true" : "false"; - else if (obj is IList) - { - var flattenedString = new StringBuilder(); - foreach (var param in (IList)obj) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } - else - return Convert.ToString (obj); - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The HTTP response. - /// Object type. - /// Object representation of the JSON string. - public object Deserialize(IRestResponse response, Type type) - { - IList headers = response.Headers; - if (type == typeof(byte[])) // return byte array - { - return response.RawBytes; - } - - // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) - if (type == typeof(Stream)) - { - if (headers != null) - { - var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) - ? Path.GetTempPath() - : Configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); - foreach (var header in headers) - { - var match = regex.Match(header.ToString()); - if (match.Success) - { - string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); - } - } - } - var stream = new MemoryStream(response.RawBytes); - return stream; - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return ConvertType(response.Content, type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Serialize an input (model) into JSON string - /// - /// Object. - /// JSON string. - public String Serialize(object obj) - { - try - { - return obj != null ? JsonConvert.SerializeObject(obj) : null; - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - ///Check if the given MIME is a JSON MIME. - ///JSON MIME examples: - /// application/json - /// application/json; charset=UTF8 - /// APPLICATION/JSON - /// application/vnd.company+json - /// - /// MIME - /// Returns True if MIME type is json. - public bool IsJsonMime(String mime) - { - var jsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); - return mime != null && (jsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json")); - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON type exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public String SelectHeaderContentType(String[] contentTypes) - { - if (contentTypes.Length == 0) - return "application/json"; - - foreach (var contentType in contentTypes) - { - if (IsJsonMime(contentType.ToLower())) - return contentType; - } - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public String SelectHeaderAccept(String[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return String.Join(",", accepts); - } - - /// - /// Encode string in base64 format. - /// - /// String to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Dynamically cast the object into target type. - /// - /// Object to be casted - /// Target type - /// Casted object - public static object ConvertType(T fromObject, Type toObject) where T : class - { - return Convert.ChangeType(fromObject, toObject); - } - - /// - /// Convert stream to byte array - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream inputStream) - { - byte[] buf = new byte[16*1024]; - using (MemoryStream ms = new MemoryStream()) - { - int count; - while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) - { - ms.Write(buf, 0, count); - } - return ms.ToArray(); - } - } - - /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 - /// - /// String to be URL encoded - /// Byte array - public static string UrlEncode(string input) - { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); - } - - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - - if (match.Success) - { - return match.Groups[1].Value; - } - else - { - return filename; - } - } - - /// - /// Convert params to key/value pairs. - /// Use collectionFormat to properly format lists and collections. - /// - /// Collection format. - /// Key name. - /// Value object. - /// A list of KeyValuePairs - public IEnumerable> ParameterToKeyValuePairs(string collectionFormat, string name, object value) - { - var parameters = new List>(); - - if (IsCollection(value) && collectionFormat == "multi") - { - var valueCollection = value as IEnumerable; - parameters.AddRange(from object item in valueCollection select new KeyValuePair(name, ParameterToString(item))); - } - else - { - parameters.Add(new KeyValuePair(name, ParameterToString(value))); - } - - return parameters; - } - - /// - /// Check if generic object is a collection. - /// - /// - /// True if object is a collection type - private static bool IsCollection(object value) - { - return value is IList || value is ICollection; - } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiException.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiException.cs deleted file mode 100644 index 31d7a6c635c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiException.cs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; - -namespace Org.OpenAPITools.Client -{ - /// - /// API Exception - /// - public class ApiException : Exception - { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public object ErrorContent { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() {} - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) - { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - public ApiException(int errorCode, string message, object errorContent = null) : base(message) - { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiResponse.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiResponse.cs deleted file mode 100644 index 4b462cf5424..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ApiResponse.cs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; - -namespace Org.OpenAPITools.Client -{ - /// - /// API Response - /// - public class ApiResponse - { - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - public int StatusCode { get; private set; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public IDictionary Headers { get; private set; } - - /// - /// Gets or sets the data (parsed HTTP body) - /// - /// The data. - public T Data { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - public ApiResponse(int statusCode, IDictionary headers, T data) - { - this.StatusCode= statusCode; - this.Headers = headers; - this.Data = data; - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/Configuration.cs deleted file mode 100644 index cc21a23b313..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/Configuration.cs +++ /dev/null @@ -1,451 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Reflection; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents a set of configuration settings - /// - public class Configuration : IReadableConfiguration - { - #region Constants - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "1.0.0"; - - /// - /// Identifier for ISO 8601 DateTime Format - /// - /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. - // ReSharper disable once InconsistentNaming - public const string ISO8601_DATETIME_FORMAT = "o"; - - #endregion Constants - - #region Static Members - - private static readonly object GlobalConfigSync = new { }; - private static Configuration _globalConfiguration; - - /// - /// Default creation of exceptions for a given method name and response object - /// - public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => - { - var status = (int)response.StatusCode; - if (status >= 400) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.Content), - response.Content); - } - if (status == 0) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage); - } - return null; - }; - - /// - /// Gets or sets the default Configuration. - /// - /// Configuration. - public static Configuration Default - { - get { return _globalConfiguration; } - set - { - lock (GlobalConfigSync) - { - _globalConfiguration = value; - } - } - } - - #endregion Static Members - - #region Private Members - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - private IDictionary _apiKey = null; - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - private IDictionary _apiKeyPrefix = null; - - private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - private string _tempFolderPath = Path.GetTempPath(); - - #endregion Private Members - - #region Constructors - - static Configuration() - { - _globalConfiguration = new GlobalConfiguration(); - } - - /// - /// Initializes a new instance of the class - /// - public Configuration() - { - UserAgent = "OpenAPI-Generator/1.0.0/csharp"; - BasePath = "http://petstore.swagger.io:80/v2"; - DefaultHeader = new Dictionary(); - ApiKey = new Dictionary(); - ApiKeyPrefix = new Dictionary(); - - // Setting Timeout has side effects (forces ApiClient creation). - Timeout = 100000; - } - - /// - /// Initializes a new instance of the class - /// - public Configuration( - IDictionary defaultHeader, - IDictionary apiKey, - IDictionary apiKeyPrefix, - string basePath = "http://petstore.swagger.io:80/v2") : this() - { - if (string.IsNullOrEmpty(basePath)) - throw new ArgumentException("The provided basePath is invalid.", "basePath"); - if (defaultHeader == null) - throw new ArgumentNullException("defaultHeader"); - if (apiKey == null) - throw new ArgumentNullException("apiKey"); - if (apiKeyPrefix == null) - throw new ArgumentNullException("apiKeyPrefix"); - - BasePath = basePath; - - foreach (var keyValuePair in defaultHeader) - { - DefaultHeader.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKey) - { - ApiKey.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKeyPrefix) - { - ApiKeyPrefix.Add(keyValuePair); - } - } - - /// - /// Initializes a new instance of the class with different settings - /// - /// Api client - /// Dictionary of default HTTP header - /// Username - /// Password - /// accessToken - /// Dictionary of API key - /// Dictionary of API key prefix - /// Temp folder path - /// DateTime format string - /// HTTP connection timeout (in milliseconds) - /// HTTP user agent - [Obsolete("Use explicit object construction and setting of properties.", true)] - public Configuration( - // ReSharper disable UnusedParameter.Local - ApiClient apiClient = null, - IDictionary defaultHeader = null, - string username = null, - string password = null, - string accessToken = null, - IDictionary apiKey = null, - IDictionary apiKeyPrefix = null, - string tempFolderPath = null, - string dateTimeFormat = null, - int timeout = 100000, - string userAgent = "OpenAPI-Generator/1.0.0/csharp" - // ReSharper restore UnusedParameter.Local - ) - { - - } - - /// - /// Initializes a new instance of the Configuration class. - /// - /// Api client. - [Obsolete("This constructor caused unexpected sharing of static data. It is no longer supported.", true)] - // ReSharper disable once UnusedParameter.Local - public Configuration(ApiClient apiClient) - { - - } - - #endregion Constructors - - - #region Properties - - private ApiClient _apiClient = null; - /// - /// Gets an instance of an ApiClient for this configuration - /// - public virtual ApiClient ApiClient - { - get - { - if (_apiClient == null) _apiClient = CreateApiClient(); - return _apiClient; - } - } - - private String _basePath = null; - /// - /// Gets or sets the base path for API access. - /// - public virtual string BasePath { - get { return _basePath; } - set { - _basePath = value; - // pass-through to ApiClient if it's set. - if(_apiClient != null) { - _apiClient.RestClient.BaseUrl = new Uri(_basePath); - } - } - } - - /// - /// Gets or sets the default header. - /// - public virtual IDictionary DefaultHeader { get; set; } - - /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. - /// - public virtual int Timeout - { - - get { return ApiClient.RestClient.Timeout; } - set { ApiClient.RestClient.Timeout = value; } - } - - /// - /// Gets or sets the HTTP user agent. - /// - /// Http user agent. - public virtual string UserAgent { get; set; } - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public virtual string Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public virtual string Password { get; set; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix(string apiKeyIdentifier) - { - var apiKeyValue = ""; - ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); - var apiKeyPrefix = ""; - if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) - return apiKeyPrefix + " " + apiKeyValue; - else - return apiKeyValue; - } - - /// - /// Gets or sets the access token for OAuth2 authentication. - /// - /// The access token. - public virtual string AccessToken { get; set; } - - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public virtual string TempFolderPath - { - get { return _tempFolderPath; } - - set - { - if (string.IsNullOrEmpty(value)) - { - _tempFolderPath = Path.GetTempPath(); - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - { - Directory.CreateDirectory(value); - } - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - { - _tempFolderPath = value; - } - else - { - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - } - - /// - /// Gets or sets the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public virtual string DateTimeFormat - { - get { return _dateTimeFormat; } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - public virtual IDictionary ApiKeyPrefix - { - get { return _apiKeyPrefix; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); - } - _apiKeyPrefix = value; - } - } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public virtual IDictionary ApiKey - { - get { return _apiKey; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKey collection may not be null."); - } - _apiKey = value; - } - } - - #endregion Properties - - #region Methods - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - public void AddDefaultHeader(string key, string value) - { - DefaultHeader[key] = value; - } - - /// - /// Creates a new based on this instance. - /// - /// - public ApiClient CreateApiClient() - { - return new ApiClient(BasePath) { Configuration = this }; - } - - - /// - /// Returns a string with essential information for debugging. - /// - public static String ToDebugReport() - { - String report = "C# SDK (Org.OpenAPITools) Debug Report:\n"; - report += " OS: " + System.Environment.OSVersion + "\n"; - report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 1.0.0\n"; - report += " SDK Package Version: 1.0.0\n"; - - return report; - } - - /// - /// Add Api Key Header. - /// - /// Api Key name. - /// Api Key value. - /// - public void AddApiKey(string key, string value) - { - ApiKey[key] = value; - } - - /// - /// Sets the API key prefix. - /// - /// Api Key name. - /// Api Key value. - public void AddApiKeyPrefix(string key, string value) - { - ApiKeyPrefix[key] = value; - } - - #endregion Methods - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ExceptionFactory.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ExceptionFactory.cs deleted file mode 100644 index d855d96821f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/ExceptionFactory.cs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using RestSharp; - -namespace Org.OpenAPITools.Client -{ - /// - /// A delegate to ExceptionFactory method - /// - /// Method name - /// Response - /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/GlobalConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/GlobalConfiguration.cs deleted file mode 100644 index a79bea966bd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/GlobalConfiguration.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Reflection; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; - -namespace Org.OpenAPITools.Client -{ - /// - /// provides a compile-time extension point for globally configuring - /// API Clients. - /// - /// - /// A customized implementation via partial class may reside in another file and may - /// be excluded from automatic generation via a .openapi-generator-ignore file. - /// - public partial class GlobalConfiguration : Configuration - { - - } -} \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/IApiAccessor.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/IApiAccessor.cs deleted file mode 100644 index cd03e8c1f97..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/IApiAccessor.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents configuration aspects required to interact with the API endpoints. - /// - public interface IApiAccessor - { - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - Configuration Configuration {get; set;} - - /// - /// Gets the base path of the API client. - /// - /// The base path - String GetBasePath(); - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - ExceptionFactory ExceptionFactory { get; set; } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/IReadableConfiguration.cs deleted file mode 100644 index 43ed169c6a1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System.Collections.Generic; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents a readable-only configuration contract. - /// - public interface IReadableConfiguration - { - /// - /// Gets the access token. - /// - /// Access token. - string AccessToken { get; } - - /// - /// Gets the API key. - /// - /// API key. - IDictionary ApiKey { get; } - - /// - /// Gets the API key prefix. - /// - /// API key prefix. - IDictionary ApiKeyPrefix { get; } - - /// - /// Gets the base path. - /// - /// Base path. - string BasePath { get; } - - /// - /// Gets the date time format. - /// - /// Date time format. - string DateTimeFormat { get; } - - /// - /// Gets the default header. - /// - /// Default header. - IDictionary DefaultHeader { get; } - - /// - /// Gets the temp folder path. - /// - /// Temp folder path. - string TempFolderPath { get; } - - /// - /// Gets the HTTP connection timeout (in milliseconds) - /// - /// HTTP connection timeout. - int Timeout { get; } - - /// - /// Gets the user agent. - /// - /// User agent. - string UserAgent { get; } - - /// - /// Gets the username. - /// - /// Username. - string Username { get; } - - /// - /// Gets the password. - /// - /// Password. - string Password { get; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - string GetApiKeyWithPrefix(string apiKeyIdentifier); - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs deleted file mode 100644 index a1bd6b08f3b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using Newtonsoft.Json.Converters; - -namespace Org.OpenAPITools.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public OpenAPIDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs deleted file mode 100644 index 20bc01f4d7a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs +++ /dev/null @@ -1,116 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesAnyType - /// - [DataContract] - public partial class AdditionalPropertiesAnyType : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesAnyType(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesAnyType {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesAnyType); - } - - /// - /// Returns true if AdditionalPropertiesAnyType instances are equal - /// - /// Instance of AdditionalPropertiesAnyType to be compared - /// Boolean - public bool Equals(AdditionalPropertiesAnyType input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs deleted file mode 100644 index a48978c4984..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs +++ /dev/null @@ -1,116 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesArray - /// - [DataContract] - public partial class AdditionalPropertiesArray : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesArray(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesArray {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesArray); - } - - /// - /// Returns true if AdditionalPropertiesArray instances are equal - /// - /// Instance of AdditionalPropertiesArray to be compared - /// Boolean - public bool Equals(AdditionalPropertiesArray input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs deleted file mode 100644 index 080909b2860..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs +++ /dev/null @@ -1,116 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesBoolean - /// - [DataContract] - public partial class AdditionalPropertiesBoolean : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesBoolean(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesBoolean {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesBoolean); - } - - /// - /// Returns true if AdditionalPropertiesBoolean instances are equal - /// - /// Instance of AdditionalPropertiesBoolean to be compared - /// Boolean - public bool Equals(AdditionalPropertiesBoolean input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs deleted file mode 100644 index d56cf173ddf..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ /dev/null @@ -1,283 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesClass - /// - [DataContract] - public partial class AdditionalPropertiesClass : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// mapString. - /// mapNumber. - /// mapInteger. - /// mapBoolean. - /// mapArrayInteger. - /// mapArrayAnytype. - /// mapMapString. - /// mapMapAnytype. - /// anytype1. - /// anytype2. - /// anytype3. - public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) - { - this.MapString = mapString; - this.MapNumber = mapNumber; - this.MapInteger = mapInteger; - this.MapBoolean = mapBoolean; - this.MapArrayInteger = mapArrayInteger; - this.MapArrayAnytype = mapArrayAnytype; - this.MapMapString = mapMapString; - this.MapMapAnytype = mapMapAnytype; - this.Anytype1 = anytype1; - this.Anytype2 = anytype2; - this.Anytype3 = anytype3; - } - - /// - /// Gets or Sets MapString - /// - [DataMember(Name="map_string", EmitDefaultValue=false)] - public Dictionary MapString { get; set; } - - /// - /// Gets or Sets MapNumber - /// - [DataMember(Name="map_number", EmitDefaultValue=false)] - public Dictionary MapNumber { get; set; } - - /// - /// Gets or Sets MapInteger - /// - [DataMember(Name="map_integer", EmitDefaultValue=false)] - public Dictionary MapInteger { get; set; } - - /// - /// Gets or Sets MapBoolean - /// - [DataMember(Name="map_boolean", EmitDefaultValue=false)] - public Dictionary MapBoolean { get; set; } - - /// - /// Gets or Sets MapArrayInteger - /// - [DataMember(Name="map_array_integer", EmitDefaultValue=false)] - public Dictionary> MapArrayInteger { get; set; } - - /// - /// Gets or Sets MapArrayAnytype - /// - [DataMember(Name="map_array_anytype", EmitDefaultValue=false)] - public Dictionary> MapArrayAnytype { get; set; } - - /// - /// Gets or Sets MapMapString - /// - [DataMember(Name="map_map_string", EmitDefaultValue=false)] - public Dictionary> MapMapString { get; set; } - - /// - /// Gets or Sets MapMapAnytype - /// - [DataMember(Name="map_map_anytype", EmitDefaultValue=false)] - public Dictionary> MapMapAnytype { get; set; } - - /// - /// Gets or Sets Anytype1 - /// - [DataMember(Name="anytype_1", EmitDefaultValue=false)] - public Object Anytype1 { get; set; } - - /// - /// Gets or Sets Anytype2 - /// - [DataMember(Name="anytype_2", EmitDefaultValue=false)] - public Object Anytype2 { get; set; } - - /// - /// Gets or Sets Anytype3 - /// - [DataMember(Name="anytype_3", EmitDefaultValue=false)] - public Object Anytype3 { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapString: ").Append(MapString).Append("\n"); - sb.Append(" MapNumber: ").Append(MapNumber).Append("\n"); - sb.Append(" MapInteger: ").Append(MapInteger).Append("\n"); - sb.Append(" MapBoolean: ").Append(MapBoolean).Append("\n"); - sb.Append(" MapArrayInteger: ").Append(MapArrayInteger).Append("\n"); - sb.Append(" MapArrayAnytype: ").Append(MapArrayAnytype).Append("\n"); - sb.Append(" MapMapString: ").Append(MapMapString).Append("\n"); - sb.Append(" MapMapAnytype: ").Append(MapMapAnytype).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); - sb.Append(" Anytype2: ").Append(Anytype2).Append("\n"); - sb.Append(" Anytype3: ").Append(Anytype3).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesClass); - } - - /// - /// Returns true if AdditionalPropertiesClass instances are equal - /// - /// Instance of AdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(AdditionalPropertiesClass input) - { - if (input == null) - return false; - - return - ( - this.MapString == input.MapString || - this.MapString != null && - input.MapString != null && - this.MapString.SequenceEqual(input.MapString) - ) && - ( - this.MapNumber == input.MapNumber || - this.MapNumber != null && - input.MapNumber != null && - this.MapNumber.SequenceEqual(input.MapNumber) - ) && - ( - this.MapInteger == input.MapInteger || - this.MapInteger != null && - input.MapInteger != null && - this.MapInteger.SequenceEqual(input.MapInteger) - ) && - ( - this.MapBoolean == input.MapBoolean || - this.MapBoolean != null && - input.MapBoolean != null && - this.MapBoolean.SequenceEqual(input.MapBoolean) - ) && - ( - this.MapArrayInteger == input.MapArrayInteger || - this.MapArrayInteger != null && - input.MapArrayInteger != null && - this.MapArrayInteger.SequenceEqual(input.MapArrayInteger) - ) && - ( - this.MapArrayAnytype == input.MapArrayAnytype || - this.MapArrayAnytype != null && - input.MapArrayAnytype != null && - this.MapArrayAnytype.SequenceEqual(input.MapArrayAnytype) - ) && - ( - this.MapMapString == input.MapMapString || - this.MapMapString != null && - input.MapMapString != null && - this.MapMapString.SequenceEqual(input.MapMapString) - ) && - ( - this.MapMapAnytype == input.MapMapAnytype || - this.MapMapAnytype != null && - input.MapMapAnytype != null && - this.MapMapAnytype.SequenceEqual(input.MapMapAnytype) - ) && - ( - this.Anytype1 == input.Anytype1 || - (this.Anytype1 != null && - this.Anytype1.Equals(input.Anytype1)) - ) && - ( - this.Anytype2 == input.Anytype2 || - (this.Anytype2 != null && - this.Anytype2.Equals(input.Anytype2)) - ) && - ( - this.Anytype3 == input.Anytype3 || - (this.Anytype3 != null && - this.Anytype3.Equals(input.Anytype3)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapString != null) - hashCode = hashCode * 59 + this.MapString.GetHashCode(); - if (this.MapNumber != null) - hashCode = hashCode * 59 + this.MapNumber.GetHashCode(); - if (this.MapInteger != null) - hashCode = hashCode * 59 + this.MapInteger.GetHashCode(); - if (this.MapBoolean != null) - hashCode = hashCode * 59 + this.MapBoolean.GetHashCode(); - if (this.MapArrayInteger != null) - hashCode = hashCode * 59 + this.MapArrayInteger.GetHashCode(); - if (this.MapArrayAnytype != null) - hashCode = hashCode * 59 + this.MapArrayAnytype.GetHashCode(); - if (this.MapMapString != null) - hashCode = hashCode * 59 + this.MapMapString.GetHashCode(); - if (this.MapMapAnytype != null) - hashCode = hashCode * 59 + this.MapMapAnytype.GetHashCode(); - if (this.Anytype1 != null) - hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); - if (this.Anytype2 != null) - hashCode = hashCode * 59 + this.Anytype2.GetHashCode(); - if (this.Anytype3 != null) - hashCode = hashCode * 59 + this.Anytype3.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs deleted file mode 100644 index 84bfecd9db5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs +++ /dev/null @@ -1,116 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesInteger - /// - [DataContract] - public partial class AdditionalPropertiesInteger : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesInteger(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesInteger {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesInteger); - } - - /// - /// Returns true if AdditionalPropertiesInteger instances are equal - /// - /// Instance of AdditionalPropertiesInteger to be compared - /// Boolean - public bool Equals(AdditionalPropertiesInteger input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs deleted file mode 100644 index 08aeaad1d49..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs +++ /dev/null @@ -1,116 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesNumber - /// - [DataContract] - public partial class AdditionalPropertiesNumber : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesNumber(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesNumber {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesNumber); - } - - /// - /// Returns true if AdditionalPropertiesNumber instances are equal - /// - /// Instance of AdditionalPropertiesNumber to be compared - /// Boolean - public bool Equals(AdditionalPropertiesNumber input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs deleted file mode 100644 index 10aa35f0cd2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs +++ /dev/null @@ -1,116 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesObject - /// - [DataContract] - public partial class AdditionalPropertiesObject : Dictionary>, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesObject(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesObject {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesObject); - } - - /// - /// Returns true if AdditionalPropertiesObject instances are equal - /// - /// Instance of AdditionalPropertiesObject to be compared - /// Boolean - public bool Equals(AdditionalPropertiesObject input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs deleted file mode 100644 index 49d0565ffc5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs +++ /dev/null @@ -1,116 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesString - /// - [DataContract] - public partial class AdditionalPropertiesString : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesString(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesString {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesString); - } - - /// - /// Returns true if AdditionalPropertiesString instances are equal - /// - /// Instance of AdditionalPropertiesString to be compared - /// Boolean - public bool Equals(AdditionalPropertiesString input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Animal.cs deleted file mode 100644 index 7a099f21b4a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Animal.cs +++ /dev/null @@ -1,158 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Animal - /// - [DataContract] - [JsonConverter(typeof(JsonSubtypes), "className")] - [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] - [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] - [JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")] - public partial class Animal : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Animal() { } - /// - /// Initializes a new instance of the class. - /// - /// className (required). - /// color (default to "red"). - public Animal(string className = default(string), string color = "red") - { - // to ensure "className" is required (not null) - if (className == null) - { - throw new InvalidDataException("className is a required property for Animal and cannot be null"); - } - else - { - this.ClassName = className; - } - - // use default value if no "color" provided - if (color == null) - { - this.Color = "red"; - } - else - { - this.Color = color; - } - } - - /// - /// Gets or Sets ClassName - /// - [DataMember(Name="className", EmitDefaultValue=true)] - public string ClassName { get; set; } - - /// - /// Gets or Sets Color - /// - [DataMember(Name="color", EmitDefaultValue=false)] - public string Color { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Animal {\n"); - sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Animal); - } - - /// - /// Returns true if Animal instances are equal - /// - /// Instance of Animal to be compared - /// Boolean - public bool Equals(Animal input) - { - if (input == null) - return false; - - return - ( - this.ClassName == input.ClassName || - (this.ClassName != null && - this.ClassName.Equals(input.ClassName)) - ) && - ( - this.Color == input.Color || - (this.Color != null && - this.Color.Equals(input.Color)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - hashCode = hashCode * 59 + this.ClassName.GetHashCode(); - if (this.Color != null) - hashCode = hashCode * 59 + this.Color.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ApiResponse.cs deleted file mode 100644 index 049a80493a1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ApiResponse.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ApiResponse - /// - [DataContract] - public partial class ApiResponse : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// code. - /// type. - /// message. - public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) - { - this.Code = code; - this.Type = type; - this.Message = message; - } - - /// - /// Gets or Sets Code - /// - [DataMember(Name="code", EmitDefaultValue=false)] - public int Code { get; set; } - - /// - /// Gets or Sets Type - /// - [DataMember(Name="type", EmitDefaultValue=false)] - public string Type { get; set; } - - /// - /// Gets or Sets Message - /// - [DataMember(Name="message", EmitDefaultValue=false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ApiResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApiResponse); - } - - /// - /// Returns true if ApiResponse instances are equal - /// - /// Instance of ApiResponse to be compared - /// Boolean - public bool Equals(ApiResponse input) - { - if (input == null) - return false; - - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - hashCode = hashCode * 59 + this.Code.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs deleted file mode 100644 index 3e8a9d91972..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ /dev/null @@ -1,116 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ArrayOfArrayOfNumberOnly - /// - [DataContract] - public partial class ArrayOfArrayOfNumberOnly : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// arrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) - { - this.ArrayArrayNumber = arrayArrayNumber; - } - - /// - /// Gets or Sets ArrayArrayNumber - /// - [DataMember(Name="ArrayArrayNumber", EmitDefaultValue=false)] - public List> ArrayArrayNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayOfArrayOfNumberOnly {\n"); - sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayOfArrayOfNumberOnly); - } - - /// - /// Returns true if ArrayOfArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfArrayOfNumberOnly input) - { - if (input == null) - return false; - - return - ( - this.ArrayArrayNumber == input.ArrayArrayNumber || - this.ArrayArrayNumber != null && - input.ArrayArrayNumber != null && - this.ArrayArrayNumber.SequenceEqual(input.ArrayArrayNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayArrayNumber != null) - hashCode = hashCode * 59 + this.ArrayArrayNumber.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs deleted file mode 100644 index 1df8accf895..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ /dev/null @@ -1,116 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ArrayOfNumberOnly - /// - [DataContract] - public partial class ArrayOfNumberOnly : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// arrayNumber. - public ArrayOfNumberOnly(List arrayNumber = default(List)) - { - this.ArrayNumber = arrayNumber; - } - - /// - /// Gets or Sets ArrayNumber - /// - [DataMember(Name="ArrayNumber", EmitDefaultValue=false)] - public List ArrayNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayOfNumberOnly {\n"); - sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayOfNumberOnly); - } - - /// - /// Returns true if ArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfNumberOnly input) - { - if (input == null) - return false; - - return - ( - this.ArrayNumber == input.ArrayNumber || - this.ArrayNumber != null && - input.ArrayNumber != null && - this.ArrayNumber.SequenceEqual(input.ArrayNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayNumber != null) - hashCode = hashCode * 59 + this.ArrayNumber.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ArrayTest.cs deleted file mode 100644 index 0ad2d15a52f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ArrayTest.cs +++ /dev/null @@ -1,150 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ArrayTest - /// - [DataContract] - public partial class ArrayTest : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// arrayOfString. - /// arrayArrayOfInteger. - /// arrayArrayOfModel. - public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) - { - this.ArrayOfString = arrayOfString; - this.ArrayArrayOfInteger = arrayArrayOfInteger; - this.ArrayArrayOfModel = arrayArrayOfModel; - } - - /// - /// Gets or Sets ArrayOfString - /// - [DataMember(Name="array_of_string", EmitDefaultValue=false)] - public List ArrayOfString { get; set; } - - /// - /// Gets or Sets ArrayArrayOfInteger - /// - [DataMember(Name="array_array_of_integer", EmitDefaultValue=false)] - public List> ArrayArrayOfInteger { get; set; } - - /// - /// Gets or Sets ArrayArrayOfModel - /// - [DataMember(Name="array_array_of_model", EmitDefaultValue=false)] - public List> ArrayArrayOfModel { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); - sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); - sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayTest); - } - - /// - /// Returns true if ArrayTest instances are equal - /// - /// Instance of ArrayTest to be compared - /// Boolean - public bool Equals(ArrayTest input) - { - if (input == null) - return false; - - return - ( - this.ArrayOfString == input.ArrayOfString || - this.ArrayOfString != null && - input.ArrayOfString != null && - this.ArrayOfString.SequenceEqual(input.ArrayOfString) - ) && - ( - this.ArrayArrayOfInteger == input.ArrayArrayOfInteger || - this.ArrayArrayOfInteger != null && - input.ArrayArrayOfInteger != null && - this.ArrayArrayOfInteger.SequenceEqual(input.ArrayArrayOfInteger) - ) && - ( - this.ArrayArrayOfModel == input.ArrayArrayOfModel || - this.ArrayArrayOfModel != null && - input.ArrayArrayOfModel != null && - this.ArrayArrayOfModel.SequenceEqual(input.ArrayArrayOfModel) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayOfString != null) - hashCode = hashCode * 59 + this.ArrayOfString.GetHashCode(); - if (this.ArrayArrayOfInteger != null) - hashCode = hashCode * 59 + this.ArrayArrayOfInteger.GetHashCode(); - if (this.ArrayArrayOfModel != null) - hashCode = hashCode * 59 + this.ArrayArrayOfModel.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/BigCat.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/BigCat.cs deleted file mode 100644 index 7d09fc34c5c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/BigCat.cs +++ /dev/null @@ -1,153 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// BigCat - /// - [DataContract] - public partial class BigCat : Cat, IEquatable - { - /// - /// Defines Kind - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum KindEnum - { - /// - /// Enum Lions for value: lions - /// - [EnumMember(Value = "lions")] - Lions = 1, - - /// - /// Enum Tigers for value: tigers - /// - [EnumMember(Value = "tigers")] - Tigers = 2, - - /// - /// Enum Leopards for value: leopards - /// - [EnumMember(Value = "leopards")] - Leopards = 3, - - /// - /// Enum Jaguars for value: jaguars - /// - [EnumMember(Value = "jaguars")] - Jaguars = 4 - - } - - /// - /// Gets or Sets Kind - /// - [DataMember(Name="kind", EmitDefaultValue=false)] - public KindEnum? Kind { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BigCat() { } - /// - /// Initializes a new instance of the class. - /// - /// kind. - public BigCat(KindEnum? kind = default(KindEnum?), string className = default(string), string color = "red", bool declawed = default(bool)) : base(declawed) - { - this.Kind = kind; - } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BigCat {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Kind: ").Append(Kind).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BigCat); - } - - /// - /// Returns true if BigCat instances are equal - /// - /// Instance of BigCat to be compared - /// Boolean - public bool Equals(BigCat input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Kind == input.Kind || - (this.Kind != null && - this.Kind.Equals(input.Kind)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Kind != null) - hashCode = hashCode * 59 + this.Kind.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/BigCatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/BigCatAllOf.cs deleted file mode 100644 index 0438df1a7af..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/BigCatAllOf.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// BigCatAllOf - /// - [DataContract] - public partial class BigCatAllOf : IEquatable - { - /// - /// Defines Kind - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum KindEnum - { - /// - /// Enum Lions for value: lions - /// - [EnumMember(Value = "lions")] - Lions = 1, - - /// - /// Enum Tigers for value: tigers - /// - [EnumMember(Value = "tigers")] - Tigers = 2, - - /// - /// Enum Leopards for value: leopards - /// - [EnumMember(Value = "leopards")] - Leopards = 3, - - /// - /// Enum Jaguars for value: jaguars - /// - [EnumMember(Value = "jaguars")] - Jaguars = 4 - - } - - /// - /// Gets or Sets Kind - /// - [DataMember(Name="kind", EmitDefaultValue=false)] - public KindEnum? Kind { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// kind. - public BigCatAllOf(KindEnum? kind = default(KindEnum?)) - { - this.Kind = kind; - } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BigCatAllOf {\n"); - sb.Append(" Kind: ").Append(Kind).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BigCatAllOf); - } - - /// - /// Returns true if BigCatAllOf instances are equal - /// - /// Instance of BigCatAllOf to be compared - /// Boolean - public bool Equals(BigCatAllOf input) - { - if (input == null) - return false; - - return - ( - this.Kind == input.Kind || - (this.Kind != null && - this.Kind.Equals(input.Kind)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Kind != null) - hashCode = hashCode * 59 + this.Kind.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Capitalization.cs deleted file mode 100644 index 4b4f476d1b3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Capitalization.cs +++ /dev/null @@ -1,196 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Capitalization - /// - [DataContract] - public partial class Capitalization : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// smallCamel. - /// capitalCamel. - /// smallSnake. - /// capitalSnake. - /// sCAETHFlowPoints. - /// Name of the pet . - public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) - { - this.SmallCamel = smallCamel; - this.CapitalCamel = capitalCamel; - this.SmallSnake = smallSnake; - this.CapitalSnake = capitalSnake; - this.SCAETHFlowPoints = sCAETHFlowPoints; - this.ATT_NAME = aTTNAME; - } - - /// - /// Gets or Sets SmallCamel - /// - [DataMember(Name="smallCamel", EmitDefaultValue=false)] - public string SmallCamel { get; set; } - - /// - /// Gets or Sets CapitalCamel - /// - [DataMember(Name="CapitalCamel", EmitDefaultValue=false)] - public string CapitalCamel { get; set; } - - /// - /// Gets or Sets SmallSnake - /// - [DataMember(Name="small_Snake", EmitDefaultValue=false)] - public string SmallSnake { get; set; } - - /// - /// Gets or Sets CapitalSnake - /// - [DataMember(Name="Capital_Snake", EmitDefaultValue=false)] - public string CapitalSnake { get; set; } - - /// - /// Gets or Sets SCAETHFlowPoints - /// - [DataMember(Name="SCA_ETH_Flow_Points", EmitDefaultValue=false)] - public string SCAETHFlowPoints { get; set; } - - /// - /// Name of the pet - /// - /// Name of the pet - [DataMember(Name="ATT_NAME", EmitDefaultValue=false)] - public string ATT_NAME { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); - sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); - sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); - sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Capitalization); - } - - /// - /// Returns true if Capitalization instances are equal - /// - /// Instance of Capitalization to be compared - /// Boolean - public bool Equals(Capitalization input) - { - if (input == null) - return false; - - return - ( - this.SmallCamel == input.SmallCamel || - (this.SmallCamel != null && - this.SmallCamel.Equals(input.SmallCamel)) - ) && - ( - this.CapitalCamel == input.CapitalCamel || - (this.CapitalCamel != null && - this.CapitalCamel.Equals(input.CapitalCamel)) - ) && - ( - this.SmallSnake == input.SmallSnake || - (this.SmallSnake != null && - this.SmallSnake.Equals(input.SmallSnake)) - ) && - ( - this.CapitalSnake == input.CapitalSnake || - (this.CapitalSnake != null && - this.CapitalSnake.Equals(input.CapitalSnake)) - ) && - ( - this.SCAETHFlowPoints == input.SCAETHFlowPoints || - (this.SCAETHFlowPoints != null && - this.SCAETHFlowPoints.Equals(input.SCAETHFlowPoints)) - ) && - ( - this.ATT_NAME == input.ATT_NAME || - (this.ATT_NAME != null && - this.ATT_NAME.Equals(input.ATT_NAME)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SmallCamel != null) - hashCode = hashCode * 59 + this.SmallCamel.GetHashCode(); - if (this.CapitalCamel != null) - hashCode = hashCode * 59 + this.CapitalCamel.GetHashCode(); - if (this.SmallSnake != null) - hashCode = hashCode * 59 + this.SmallSnake.GetHashCode(); - if (this.CapitalSnake != null) - hashCode = hashCode * 59 + this.CapitalSnake.GetHashCode(); - if (this.SCAETHFlowPoints != null) - hashCode = hashCode * 59 + this.SCAETHFlowPoints.GetHashCode(); - if (this.ATT_NAME != null) - hashCode = hashCode * 59 + this.ATT_NAME.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Cat.cs deleted file mode 100644 index 9ca5d9c2b5e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Cat.cs +++ /dev/null @@ -1,121 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Cat - /// - [DataContract] - public partial class Cat : Animal, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Cat() { } - /// - /// Initializes a new instance of the class. - /// - /// declawed. - public Cat(bool declawed = default(bool), string className = "Cat", string color = "red") : base(className, color) - { - this.Declawed = declawed; - } - - /// - /// Gets or Sets Declawed - /// - [DataMember(Name="declawed", EmitDefaultValue=false)] - public bool Declawed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Cat {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Cat); - } - - /// - /// Returns true if Cat instances are equal - /// - /// Instance of Cat to be compared - /// Boolean - public bool Equals(Cat input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Declawed == input.Declawed || - (this.Declawed != null && - this.Declawed.Equals(input.Declawed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Declawed != null) - hashCode = hashCode * 59 + this.Declawed.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/CatAllOf.cs deleted file mode 100644 index 44294da9380..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/CatAllOf.cs +++ /dev/null @@ -1,115 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// CatAllOf - /// - [DataContract] - public partial class CatAllOf : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// declawed. - public CatAllOf(bool declawed = default(bool)) - { - this.Declawed = declawed; - } - - /// - /// Gets or Sets Declawed - /// - [DataMember(Name="declawed", EmitDefaultValue=false)] - public bool Declawed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class CatAllOf {\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CatAllOf); - } - - /// - /// Returns true if CatAllOf instances are equal - /// - /// Instance of CatAllOf to be compared - /// Boolean - public bool Equals(CatAllOf input) - { - if (input == null) - return false; - - return - ( - this.Declawed == input.Declawed || - (this.Declawed != null && - this.Declawed.Equals(input.Declawed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Declawed != null) - hashCode = hashCode * 59 + this.Declawed.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Category.cs deleted file mode 100644 index 4261e7767d3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Category.cs +++ /dev/null @@ -1,145 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Category - /// - [DataContract] - public partial class Category : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Category() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required) (default to "default-name"). - 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; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Category); - } - - /// - /// Returns true if Category instances are equal - /// - /// Instance of Category to be compared - /// Boolean - public bool Equals(Category input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ClassModel.cs deleted file mode 100644 index 01c9a832999..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ClassModel.cs +++ /dev/null @@ -1,115 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing model with \"_class\" property - /// - [DataContract] - public partial class ClassModel : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// _class. - public ClassModel(string _class = default(string)) - { - this.Class = _class; - } - - /// - /// Gets or Sets Class - /// - [DataMember(Name="_class", EmitDefaultValue=false)] - public string Class { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ClassModel); - } - - /// - /// Returns true if ClassModel instances are equal - /// - /// Instance of ClassModel to be compared - /// Boolean - public bool Equals(ClassModel input) - { - if (input == null) - return false; - - return - ( - this.Class == input.Class || - (this.Class != null && - this.Class.Equals(input.Class)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Class != null) - hashCode = hashCode * 59 + this.Class.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Dog.cs deleted file mode 100644 index cfc41f56448..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Dog.cs +++ /dev/null @@ -1,121 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Dog - /// - [DataContract] - public partial class Dog : Animal, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Dog() { } - /// - /// Initializes a new instance of the class. - /// - /// breed. - public Dog(string breed = default(string), string className = "Dog", string color = "red") : base(className, color) - { - this.Breed = breed; - } - - /// - /// Gets or Sets Breed - /// - [DataMember(Name="breed", EmitDefaultValue=false)] - public string Breed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Dog {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Dog); - } - - /// - /// Returns true if Dog instances are equal - /// - /// Instance of Dog to be compared - /// Boolean - public bool Equals(Dog input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Breed == input.Breed || - (this.Breed != null && - this.Breed.Equals(input.Breed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Breed != null) - hashCode = hashCode * 59 + this.Breed.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/DogAllOf.cs deleted file mode 100644 index 58659dc5147..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/DogAllOf.cs +++ /dev/null @@ -1,115 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// DogAllOf - /// - [DataContract] - public partial class DogAllOf : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// breed. - public DogAllOf(string breed = default(string)) - { - this.Breed = breed; - } - - /// - /// Gets or Sets Breed - /// - [DataMember(Name="breed", EmitDefaultValue=false)] - public string Breed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class DogAllOf {\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DogAllOf); - } - - /// - /// Returns true if DogAllOf instances are equal - /// - /// Instance of DogAllOf to be compared - /// Boolean - public bool Equals(DogAllOf input) - { - if (input == null) - return false; - - return - ( - this.Breed == input.Breed || - (this.Breed != null && - this.Breed.Equals(input.Breed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Breed != null) - hashCode = hashCode * 59 + this.Breed.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/EnumArrays.cs deleted file mode 100644 index 3f6744d95dd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/EnumArrays.cs +++ /dev/null @@ -1,173 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// EnumArrays - /// - [DataContract] - public partial class EnumArrays : IEquatable - { - /// - /// Defines JustSymbol - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum JustSymbolEnum - { - /// - /// Enum GreaterThanOrEqualTo for value: >= - /// - [EnumMember(Value = ">=")] - GreaterThanOrEqualTo = 1, - - /// - /// Enum Dollar for value: $ - /// - [EnumMember(Value = "$")] - Dollar = 2 - - } - - /// - /// Gets or Sets JustSymbol - /// - [DataMember(Name="just_symbol", EmitDefaultValue=false)] - public JustSymbolEnum? JustSymbol { get; set; } - /// - /// Defines ArrayEnum - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ArrayEnumEnum - { - /// - /// Enum Fish for value: fish - /// - [EnumMember(Value = "fish")] - Fish = 1, - - /// - /// Enum Crab for value: crab - /// - [EnumMember(Value = "crab")] - Crab = 2 - - } - - - /// - /// Gets or Sets ArrayEnum - /// - [DataMember(Name="array_enum", EmitDefaultValue=false)] - public List ArrayEnum { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// justSymbol. - /// arrayEnum. - public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) - { - this.JustSymbol = justSymbol; - this.ArrayEnum = arrayEnum; - } - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); - sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EnumArrays); - } - - /// - /// Returns true if EnumArrays instances are equal - /// - /// Instance of EnumArrays to be compared - /// Boolean - public bool Equals(EnumArrays input) - { - if (input == null) - return false; - - return - ( - this.JustSymbol == input.JustSymbol || - (this.JustSymbol != null && - this.JustSymbol.Equals(input.JustSymbol)) - ) && - ( - this.ArrayEnum == input.ArrayEnum || - this.ArrayEnum != null && - input.ArrayEnum != null && - this.ArrayEnum.SequenceEqual(input.ArrayEnum) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.JustSymbol != null) - hashCode = hashCode * 59 + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) - hashCode = hashCode * 59 + this.ArrayEnum.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/EnumClass.cs deleted file mode 100644 index 96e427f9b32..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/EnumClass.cs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Defines EnumClass - /// - - [JsonConverter(typeof(StringEnumConverter))] - - public enum EnumClass - { - /// - /// Enum Abc for value: _abc - /// - [EnumMember(Value = "_abc")] - Abc = 1, - - /// - /// Enum Efg for value: -efg - /// - [EnumMember(Value = "-efg")] - Efg = 2, - - /// - /// Enum Xyz for value: (xyz) - /// - [EnumMember(Value = "(xyz)")] - Xyz = 3 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/EnumTest.cs deleted file mode 100644 index fb86bb0c298..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/EnumTest.cs +++ /dev/null @@ -1,282 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// EnumTest - /// - [DataContract] - public partial class EnumTest : IEquatable - { - /// - /// Defines EnumString - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumStringEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumString - /// - [DataMember(Name="enum_string", EmitDefaultValue=false)] - public EnumStringEnum? EnumString { get; set; } - /// - /// Defines EnumStringRequired - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumStringRequiredEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumStringRequired - /// - [DataMember(Name="enum_string_required", EmitDefaultValue=true)] - public EnumStringRequiredEnum EnumStringRequired { get; set; } - /// - /// Defines EnumInteger - /// - public enum EnumIntegerEnum - { - /// - /// Enum NUMBER_1 for value: 1 - /// - NUMBER_1 = 1, - - /// - /// Enum NUMBER_MINUS_1 for value: -1 - /// - NUMBER_MINUS_1 = -1 - - } - - /// - /// Gets or Sets EnumInteger - /// - [DataMember(Name="enum_integer", EmitDefaultValue=false)] - public EnumIntegerEnum? EnumInteger { get; set; } - /// - /// Defines EnumNumber - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumNumberEnum - { - /// - /// Enum NUMBER_1_DOT_1 for value: 1.1 - /// - [EnumMember(Value = "1.1")] - NUMBER_1_DOT_1 = 1, - - /// - /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2 - /// - [EnumMember(Value = "-1.2")] - NUMBER_MINUS_1_DOT_2 = 2 - - } - - /// - /// Gets or Sets EnumNumber - /// - [DataMember(Name="enum_number", EmitDefaultValue=false)] - public EnumNumberEnum? EnumNumber { get; set; } - /// - /// Gets or Sets OuterEnum - /// - [DataMember(Name="outerEnum", EmitDefaultValue=false)] - public OuterEnum? OuterEnum { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EnumTest() { } - /// - /// Initializes a new instance of the class. - /// - /// enumString. - /// enumStringRequired (required). - /// enumInteger. - /// enumNumber. - /// outerEnum. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?)) - { - // to ensure "enumStringRequired" is required (not null) - if (enumStringRequired == null) - { - throw new InvalidDataException("enumStringRequired is a required property for EnumTest and cannot be null"); - } - else - { - this.EnumStringRequired = enumStringRequired; - } - - this.EnumString = enumString; - this.EnumInteger = enumInteger; - this.EnumNumber = enumNumber; - this.OuterEnum = outerEnum; - } - - - - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class EnumTest {\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); - sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); - sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EnumTest); - } - - /// - /// Returns true if EnumTest instances are equal - /// - /// Instance of EnumTest to be compared - /// Boolean - public bool Equals(EnumTest input) - { - if (input == null) - return false; - - return - ( - this.EnumString == input.EnumString || - (this.EnumString != null && - this.EnumString.Equals(input.EnumString)) - ) && - ( - this.EnumStringRequired == input.EnumStringRequired || - (this.EnumStringRequired != null && - this.EnumStringRequired.Equals(input.EnumStringRequired)) - ) && - ( - this.EnumInteger == input.EnumInteger || - (this.EnumInteger != null && - this.EnumInteger.Equals(input.EnumInteger)) - ) && - ( - this.EnumNumber == input.EnumNumber || - (this.EnumNumber != null && - this.EnumNumber.Equals(input.EnumNumber)) - ) && - ( - this.OuterEnum == input.OuterEnum || - (this.OuterEnum != null && - this.OuterEnum.Equals(input.OuterEnum)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EnumString != null) - hashCode = hashCode * 59 + this.EnumString.GetHashCode(); - if (this.EnumStringRequired != null) - hashCode = hashCode * 59 + this.EnumStringRequired.GetHashCode(); - if (this.EnumInteger != null) - hashCode = hashCode * 59 + this.EnumInteger.GetHashCode(); - if (this.EnumNumber != null) - hashCode = hashCode * 59 + this.EnumNumber.GetHashCode(); - if (this.OuterEnum != null) - hashCode = hashCode * 59 + this.OuterEnum.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/File.cs deleted file mode 100644 index e55ed620ead..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/File.cs +++ /dev/null @@ -1,116 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Must be named `File` for test. - /// - [DataContract] - public partial class File : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// Test capitalization. - public File(string sourceURI = default(string)) - { - this.SourceURI = sourceURI; - } - - /// - /// Test capitalization - /// - /// Test capitalization - [DataMember(Name="sourceURI", EmitDefaultValue=false)] - public string SourceURI { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class File {\n"); - sb.Append(" SourceURI: ").Append(SourceURI).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as File); - } - - /// - /// Returns true if File instances are equal - /// - /// Instance of File to be compared - /// Boolean - public bool Equals(File input) - { - if (input == null) - return false; - - return - ( - this.SourceURI == input.SourceURI || - (this.SourceURI != null && - this.SourceURI.Equals(input.SourceURI)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SourceURI != null) - hashCode = hashCode * 59 + this.SourceURI.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs deleted file mode 100644 index 5fe2f91e822..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ /dev/null @@ -1,132 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// FileSchemaTestClass - /// - [DataContract] - public partial class FileSchemaTestClass : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// file. - /// files. - public FileSchemaTestClass(File file = default(File), List files = default(List)) - { - this.File = file; - this.Files = files; - } - - /// - /// Gets or Sets File - /// - [DataMember(Name="file", EmitDefaultValue=false)] - public File File { get; set; } - - /// - /// Gets or Sets Files - /// - [DataMember(Name="files", EmitDefaultValue=false)] - public List Files { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class FileSchemaTestClass {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FileSchemaTestClass); - } - - /// - /// Returns true if FileSchemaTestClass instances are equal - /// - /// Instance of FileSchemaTestClass to be compared - /// Boolean - public bool Equals(FileSchemaTestClass input) - { - if (input == null) - return false; - - return - ( - this.File == input.File || - (this.File != null && - this.File.Equals(input.File)) - ) && - ( - this.Files == input.Files || - this.Files != null && - input.Files != null && - this.Files.SequenceEqual(input.Files) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.File != null) - hashCode = hashCode * 59 + this.File.GetHashCode(); - if (this.Files != null) - hashCode = hashCode * 59 + this.Files.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/FormatTest.cs deleted file mode 100644 index 13dc6109e34..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/FormatTest.cs +++ /dev/null @@ -1,365 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// FormatTest - /// - [DataContract] - public partial class FormatTest : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FormatTest() { } - /// - /// Initializes a new instance of the class. - /// - /// integer. - /// int32. - /// int64. - /// number (required). - /// _float. - /// _double. - /// _string. - /// _byte (required). - /// binary. - /// date (required). - /// dateTime. - /// uuid. - /// password (required). - /// bigDecimal. - public FormatTest(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), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), decimal bigDecimal = default(decimal)) - { - // to ensure "number" is required (not null) - if (number == null) - { - throw new InvalidDataException("number is a required property for FormatTest and cannot be null"); - } - else - { - this.Number = number; - } - - // to ensure "_byte" is required (not null) - if (_byte == null) - { - throw new InvalidDataException("_byte is a required property for FormatTest and cannot be null"); - } - else - { - this.Byte = _byte; - } - - // to ensure "date" is required (not null) - if (date == null) - { - throw new InvalidDataException("date is a required property for FormatTest and cannot be null"); - } - else - { - this.Date = date; - } - - // to ensure "password" is required (not null) - if (password == null) - { - throw new InvalidDataException("password is a required property for FormatTest and cannot be null"); - } - else - { - this.Password = password; - } - - this.Integer = integer; - this.Int32 = int32; - this.Int64 = int64; - this.Float = _float; - this.Double = _double; - this.String = _string; - this.Binary = binary; - this.DateTime = dateTime; - this.Uuid = uuid; - this.BigDecimal = bigDecimal; - } - - /// - /// Gets or Sets Integer - /// - [DataMember(Name="integer", EmitDefaultValue=false)] - public int Integer { get; set; } - - /// - /// Gets or Sets Int32 - /// - [DataMember(Name="int32", EmitDefaultValue=false)] - public int Int32 { get; set; } - - /// - /// Gets or Sets Int64 - /// - [DataMember(Name="int64", EmitDefaultValue=false)] - public long Int64 { get; set; } - - /// - /// Gets or Sets Number - /// - [DataMember(Name="number", EmitDefaultValue=true)] - public decimal Number { get; set; } - - /// - /// Gets or Sets Float - /// - [DataMember(Name="float", EmitDefaultValue=false)] - public float Float { get; set; } - - /// - /// Gets or Sets Double - /// - [DataMember(Name="double", EmitDefaultValue=false)] - public double Double { get; set; } - - /// - /// Gets or Sets String - /// - [DataMember(Name="string", EmitDefaultValue=false)] - public string String { get; set; } - - /// - /// Gets or Sets Byte - /// - [DataMember(Name="byte", EmitDefaultValue=true)] - public byte[] Byte { get; set; } - - /// - /// Gets or Sets Binary - /// - [DataMember(Name="binary", EmitDefaultValue=false)] - public System.IO.Stream Binary { get; set; } - - /// - /// Gets or Sets Date - /// - [DataMember(Name="date", EmitDefaultValue=true)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime Date { get; set; } - - /// - /// Gets or Sets DateTime - /// - [DataMember(Name="dateTime", EmitDefaultValue=false)] - public DateTime DateTime { get; set; } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name="uuid", EmitDefaultValue=false)] - public Guid Uuid { get; set; } - - /// - /// Gets or Sets Password - /// - [DataMember(Name="password", EmitDefaultValue=true)] - public string Password { get; set; } - - /// - /// Gets or Sets BigDecimal - /// - [DataMember(Name="BigDecimal", EmitDefaultValue=false)] - public decimal BigDecimal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class FormatTest {\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(" 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(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" BigDecimal: ").Append(BigDecimal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FormatTest); - } - - /// - /// Returns true if FormatTest instances are equal - /// - /// Instance of FormatTest to be compared - /// Boolean - public bool Equals(FormatTest 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.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.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.BigDecimal == input.BigDecimal || - (this.BigDecimal != null && - this.BigDecimal.Equals(input.BigDecimal)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.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.Uuid != null) - hashCode = hashCode * 59 + this.Uuid.GetHashCode(); - if (this.Password != null) - hashCode = hashCode * 59 + this.Password.GetHashCode(); - if (this.BigDecimal != null) - hashCode = hashCode * 59 + this.BigDecimal.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs deleted file mode 100644 index 91e9a6fbf74..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// HasOnlyReadOnly - /// - [DataContract] - public partial class HasOnlyReadOnly : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - public HasOnlyReadOnly() - { - } - - /// - /// Gets or Sets Bar - /// - [DataMember(Name="bar", EmitDefaultValue=false)] - public string Bar { get; private set; } - - /// - /// Gets or Sets Foo - /// - [DataMember(Name="foo", EmitDefaultValue=false)] - public string Foo { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class HasOnlyReadOnly {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Foo: ").Append(Foo).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HasOnlyReadOnly); - } - - /// - /// Returns true if HasOnlyReadOnly instances are equal - /// - /// Instance of HasOnlyReadOnly to be compared - /// Boolean - public bool Equals(HasOnlyReadOnly input) - { - if (input == null) - return false; - - return - ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) - ) && - ( - this.Foo == input.Foo || - (this.Foo != null && - this.Foo.Equals(input.Foo)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bar != null) - hashCode = hashCode * 59 + this.Bar.GetHashCode(); - if (this.Foo != null) - hashCode = hashCode * 59 + this.Foo.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/List.cs deleted file mode 100644 index 6f8bfb2f9bc..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/List.cs +++ /dev/null @@ -1,115 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// List - /// - [DataContract] - public partial class List : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// _123list. - public List(string _123list = default(string)) - { - this._123List = _123list; - } - - /// - /// Gets or Sets _123List - /// - [DataMember(Name="123-list", EmitDefaultValue=false)] - public string _123List { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class List {\n"); - sb.Append(" _123List: ").Append(_123List).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as List); - } - - /// - /// Returns true if List instances are equal - /// - /// Instance of List to be compared - /// Boolean - public bool Equals(List input) - { - if (input == null) - return false; - - return - ( - this._123List == input._123List || - (this._123List != null && - this._123List.Equals(input._123List)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._123List != null) - hashCode = hashCode * 59 + this._123List.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/MapTest.cs deleted file mode 100644 index e1f51997533..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/MapTest.cs +++ /dev/null @@ -1,188 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// MapTest - /// - [DataContract] - public partial class MapTest : IEquatable - { - /// - /// Defines Inner - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum InnerEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2 - - } - - - /// - /// Gets or Sets MapOfEnumString - /// - [DataMember(Name="map_of_enum_string", EmitDefaultValue=false)] - public Dictionary MapOfEnumString { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// mapMapOfString. - /// mapOfEnumString. - /// directMap. - /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) - { - this.MapMapOfString = mapMapOfString; - this.MapOfEnumString = mapOfEnumString; - this.DirectMap = directMap; - this.IndirectMap = indirectMap; - } - - /// - /// Gets or Sets MapMapOfString - /// - [DataMember(Name="map_map_of_string", EmitDefaultValue=false)] - public Dictionary> MapMapOfString { get; set; } - - - /// - /// Gets or Sets DirectMap - /// - [DataMember(Name="direct_map", EmitDefaultValue=false)] - public Dictionary DirectMap { get; set; } - - /// - /// Gets or Sets IndirectMap - /// - [DataMember(Name="indirect_map", EmitDefaultValue=false)] - public Dictionary IndirectMap { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); - sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); - sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MapTest); - } - - /// - /// Returns true if MapTest instances are equal - /// - /// Instance of MapTest to be compared - /// Boolean - public bool Equals(MapTest input) - { - if (input == null) - return false; - - return - ( - this.MapMapOfString == input.MapMapOfString || - this.MapMapOfString != null && - input.MapMapOfString != null && - this.MapMapOfString.SequenceEqual(input.MapMapOfString) - ) && - ( - this.MapOfEnumString == input.MapOfEnumString || - this.MapOfEnumString != null && - input.MapOfEnumString != null && - this.MapOfEnumString.SequenceEqual(input.MapOfEnumString) - ) && - ( - this.DirectMap == input.DirectMap || - this.DirectMap != null && - input.DirectMap != null && - this.DirectMap.SequenceEqual(input.DirectMap) - ) && - ( - this.IndirectMap == input.IndirectMap || - this.IndirectMap != null && - input.IndirectMap != null && - this.IndirectMap.SequenceEqual(input.IndirectMap) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapMapOfString != null) - hashCode = hashCode * 59 + this.MapMapOfString.GetHashCode(); - if (this.MapOfEnumString != null) - hashCode = hashCode * 59 + this.MapOfEnumString.GetHashCode(); - if (this.DirectMap != null) - hashCode = hashCode * 59 + this.DirectMap.GetHashCode(); - if (this.IndirectMap != null) - hashCode = hashCode * 59 + this.IndirectMap.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs deleted file mode 100644 index d93339d98d9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixedPropertiesAndAdditionalPropertiesClass - /// - [DataContract] - public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// uuid. - /// dateTime. - /// map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) - { - this.Uuid = uuid; - this.DateTime = dateTime; - this.Map = map; - } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name="uuid", EmitDefaultValue=false)] - public Guid Uuid { get; set; } - - /// - /// Gets or Sets DateTime - /// - [DataMember(Name="dateTime", EmitDefaultValue=false)] - public DateTime DateTime { get; set; } - - /// - /// Gets or Sets Map - /// - [DataMember(Name="map", EmitDefaultValue=false)] - public Dictionary Map { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Map: ").Append(Map).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MixedPropertiesAndAdditionalPropertiesClass); - } - - /// - /// Returns true if MixedPropertiesAndAdditionalPropertiesClass instances are equal - /// - /// Instance of MixedPropertiesAndAdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(MixedPropertiesAndAdditionalPropertiesClass input) - { - if (input == null) - return false; - - return - ( - this.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) - ) && - ( - this.DateTime == input.DateTime || - (this.DateTime != null && - this.DateTime.Equals(input.DateTime)) - ) && - ( - this.Map == input.Map || - this.Map != null && - input.Map != null && - this.Map.SequenceEqual(input.Map) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uuid != null) - hashCode = hashCode * 59 + this.Uuid.GetHashCode(); - if (this.DateTime != null) - hashCode = hashCode * 59 + this.DateTime.GetHashCode(); - if (this.Map != null) - hashCode = hashCode * 59 + this.Map.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Model200Response.cs deleted file mode 100644 index d50997f9fe1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Model200Response.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing model name starting with number - /// - [DataContract] - public partial class Model200Response : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - /// _class. - public Model200Response(int name = default(int), string _class = default(string)) - { - this.Name = name; - this.Class = _class; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public int Name { get; set; } - - /// - /// Gets or Sets Class - /// - [DataMember(Name="class", EmitDefaultValue=false)] - public string Class { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Model200Response {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Model200Response); - } - - /// - /// Returns true if Model200Response instances are equal - /// - /// Instance of Model200Response to be compared - /// Boolean - public bool Equals(Model200Response input) - { - if (input == null) - return false; - - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Class == input.Class || - (this.Class != null && - this.Class.Equals(input.Class)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.Class != null) - hashCode = hashCode * 59 + this.Class.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ModelClient.cs deleted file mode 100644 index 223e922d2e7..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ModelClient.cs +++ /dev/null @@ -1,115 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ModelClient - /// - [DataContract] - public partial class ModelClient : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// _client. - public ModelClient(string _client = default(string)) - { - this.__Client = _client; - } - - /// - /// Gets or Sets __Client - /// - [DataMember(Name="client", EmitDefaultValue=false)] - public string __Client { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ModelClient {\n"); - sb.Append(" __Client: ").Append(__Client).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ModelClient); - } - - /// - /// Returns true if ModelClient instances are equal - /// - /// Instance of ModelClient to be compared - /// Boolean - public bool Equals(ModelClient input) - { - if (input == null) - return false; - - return - ( - this.__Client == input.__Client || - (this.__Client != null && - this.__Client.Equals(input.__Client)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.__Client != null) - hashCode = hashCode * 59 + this.__Client.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Name.cs deleted file mode 100644 index c9040b4538e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Name.cs +++ /dev/null @@ -1,173 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing model name same as property name - /// - [DataContract] - public partial class Name : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Name() { } - /// - /// Initializes a new instance of the class. - /// - /// name (required). - /// property. - public Name(int name = default(int), string property = default(string)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Name and cannot be null"); - } - else - { - this._Name = name; - } - - this.Property = property; - } - - /// - /// Gets or Sets _Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public int _Name { get; set; } - - /// - /// Gets or Sets SnakeCase - /// - [DataMember(Name="snake_case", EmitDefaultValue=false)] - public int SnakeCase { get; private set; } - - /// - /// Gets or Sets Property - /// - [DataMember(Name="property", EmitDefaultValue=false)] - public string Property { get; set; } - - /// - /// Gets or Sets _123Number - /// - [DataMember(Name="123Number", EmitDefaultValue=false)] - public int _123Number { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Name {\n"); - sb.Append(" _Name: ").Append(_Name).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); - sb.Append(" Property: ").Append(Property).Append("\n"); - sb.Append(" _123Number: ").Append(_123Number).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Name); - } - - /// - /// Returns true if Name instances are equal - /// - /// Instance of Name to be compared - /// Boolean - public bool Equals(Name input) - { - if (input == null) - return false; - - return - ( - this._Name == input._Name || - (this._Name != null && - this._Name.Equals(input._Name)) - ) && - ( - this.SnakeCase == input.SnakeCase || - (this.SnakeCase != null && - this.SnakeCase.Equals(input.SnakeCase)) - ) && - ( - this.Property == input.Property || - (this.Property != null && - this.Property.Equals(input.Property)) - ) && - ( - this._123Number == input._123Number || - (this._123Number != null && - this._123Number.Equals(input._123Number)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.SnakeCase != null) - hashCode = hashCode * 59 + this.SnakeCase.GetHashCode(); - if (this.Property != null) - hashCode = hashCode * 59 + this.Property.GetHashCode(); - if (this._123Number != null) - hashCode = hashCode * 59 + this._123Number.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/NumberOnly.cs deleted file mode 100644 index 465fac92f9c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/NumberOnly.cs +++ /dev/null @@ -1,115 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// NumberOnly - /// - [DataContract] - public partial class NumberOnly : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// justNumber. - public NumberOnly(decimal justNumber = default(decimal)) - { - this.JustNumber = justNumber; - } - - /// - /// Gets or Sets JustNumber - /// - [DataMember(Name="JustNumber", EmitDefaultValue=false)] - public decimal JustNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class NumberOnly {\n"); - sb.Append(" JustNumber: ").Append(JustNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NumberOnly); - } - - /// - /// Returns true if NumberOnly instances are equal - /// - /// Instance of NumberOnly to be compared - /// Boolean - public bool Equals(NumberOnly input) - { - if (input == null) - return false; - - return - ( - this.JustNumber == input.JustNumber || - (this.JustNumber != null && - this.JustNumber.Equals(input.JustNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.JustNumber != null) - hashCode = hashCode * 59 + this.JustNumber.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Order.cs deleted file mode 100644 index 927133c3f63..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Order.cs +++ /dev/null @@ -1,231 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Order - /// - [DataContract] - public partial class Order : IEquatable - { - /// - /// Order Status - /// - /// Order Status - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Placed for value: placed - /// - [EnumMember(Value = "placed")] - Placed = 1, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 2, - - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 3 - - } - - /// - /// Order Status - /// - /// Order Status - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// petId. - /// quantity. - /// shipDate. - /// Order Status. - /// complete (default to false). - public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) - { - this.Id = id; - this.PetId = petId; - this.Quantity = quantity; - this.ShipDate = shipDate; - this.Status = status; - // use default value if no "complete" provided - if (complete == null) - { - this.Complete = false; - } - else - { - this.Complete = complete; - } - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets PetId - /// - [DataMember(Name="petId", EmitDefaultValue=false)] - public long PetId { get; set; } - - /// - /// Gets or Sets Quantity - /// - [DataMember(Name="quantity", EmitDefaultValue=false)] - public int Quantity { get; set; } - - /// - /// Gets or Sets ShipDate - /// - [DataMember(Name="shipDate", EmitDefaultValue=false)] - public DateTime ShipDate { get; set; } - - - /// - /// Gets or Sets Complete - /// - [DataMember(Name="complete", EmitDefaultValue=false)] - public bool Complete { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Order {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Order); - } - - /// - /// Returns true if Order instances are equal - /// - /// Instance of Order to be compared - /// Boolean - public bool Equals(Order input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PetId == input.PetId || - (this.PetId != null && - this.PetId.Equals(input.PetId)) - ) && - ( - this.Quantity == input.Quantity || - (this.Quantity != null && - this.Quantity.Equals(input.Quantity)) - ) && - ( - this.ShipDate == input.ShipDate || - (this.ShipDate != null && - this.ShipDate.Equals(input.ShipDate)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.Complete == input.Complete || - (this.Complete != null && - this.Complete.Equals(input.Complete)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.PetId != null) - hashCode = hashCode * 59 + this.PetId.GetHashCode(); - if (this.Quantity != null) - hashCode = hashCode * 59 + this.Quantity.GetHashCode(); - if (this.ShipDate != null) - hashCode = hashCode * 59 + this.ShipDate.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - if (this.Complete != null) - hashCode = hashCode * 59 + this.Complete.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/OuterComposite.cs deleted file mode 100644 index e28ea0f8c13..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/OuterComposite.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// OuterComposite - /// - [DataContract] - public partial class OuterComposite : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// myNumber. - /// myString. - /// myBoolean. - public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) - { - this.MyNumber = myNumber; - this.MyString = myString; - this.MyBoolean = myBoolean; - } - - /// - /// Gets or Sets MyNumber - /// - [DataMember(Name="my_number", EmitDefaultValue=false)] - public decimal MyNumber { get; set; } - - /// - /// Gets or Sets MyString - /// - [DataMember(Name="my_string", EmitDefaultValue=false)] - public string MyString { get; set; } - - /// - /// Gets or Sets MyBoolean - /// - [DataMember(Name="my_boolean", EmitDefaultValue=false)] - public bool MyBoolean { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class OuterComposite {\n"); - sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); - sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OuterComposite); - } - - /// - /// Returns true if OuterComposite instances are equal - /// - /// Instance of OuterComposite to be compared - /// Boolean - public bool Equals(OuterComposite input) - { - if (input == null) - return false; - - return - ( - this.MyNumber == input.MyNumber || - (this.MyNumber != null && - this.MyNumber.Equals(input.MyNumber)) - ) && - ( - this.MyString == input.MyString || - (this.MyString != null && - this.MyString.Equals(input.MyString)) - ) && - ( - this.MyBoolean == input.MyBoolean || - (this.MyBoolean != null && - this.MyBoolean.Equals(input.MyBoolean)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MyNumber != null) - hashCode = hashCode * 59 + this.MyNumber.GetHashCode(); - if (this.MyString != null) - hashCode = hashCode * 59 + this.MyString.GetHashCode(); - if (this.MyBoolean != null) - hashCode = hashCode * 59 + this.MyBoolean.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/OuterEnum.cs deleted file mode 100644 index e902802e0d6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/OuterEnum.cs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Defines OuterEnum - /// - - [JsonConverter(typeof(StringEnumConverter))] - - public enum OuterEnum - { - /// - /// Enum Placed for value: placed - /// - [EnumMember(Value = "placed")] - Placed = 1, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 2, - - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 3 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Pet.cs deleted file mode 100644 index 2329c8b0690..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Pet.cs +++ /dev/null @@ -1,248 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Pet - /// - [DataContract] - public partial class Pet : IEquatable - { - /// - /// pet status in the store - /// - /// pet status in the store - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Available for value: available - /// - [EnumMember(Value = "available")] - Available = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2, - - /// - /// Enum Sold for value: sold - /// - [EnumMember(Value = "sold")] - Sold = 3 - - } - - /// - /// pet status in the store - /// - /// pet status in the store - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Pet() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// category. - /// name (required). - /// photoUrls (required). - /// tags. - /// pet status in the store. - public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Pet and cannot be null"); - } - else - { - this.Name = name; - } - - // to ensure "photoUrls" is required (not null) - if (photoUrls == null) - { - throw new InvalidDataException("photoUrls is a required property for Pet and cannot be null"); - } - else - { - this.PhotoUrls = photoUrls; - } - - this.Id = id; - this.Category = category; - this.Tags = tags; - this.Status = status; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Category - /// - [DataMember(Name="category", EmitDefaultValue=false)] - public Category Category { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Gets or Sets PhotoUrls - /// - [DataMember(Name="photoUrls", EmitDefaultValue=true)] - public List PhotoUrls { get; set; } - - /// - /// Gets or Sets Tags - /// - [DataMember(Name="tags", EmitDefaultValue=false)] - public List Tags { get; set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Pet); - } - - /// - /// Returns true if Pet instances are equal - /// - /// Instance of Pet to be compared - /// Boolean - public bool Equals(Pet input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Category == input.Category || - (this.Category != null && - this.Category.Equals(input.Category)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PhotoUrls == input.PhotoUrls || - this.PhotoUrls != null && - input.PhotoUrls != null && - this.PhotoUrls.SequenceEqual(input.PhotoUrls) - ) && - ( - this.Tags == input.Tags || - this.Tags != null && - input.Tags != null && - this.Tags.SequenceEqual(input.Tags) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Category != null) - hashCode = hashCode * 59 + this.Category.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.PhotoUrls != null) - hashCode = hashCode * 59 + this.PhotoUrls.GetHashCode(); - if (this.Tags != null) - hashCode = hashCode * 59 + this.Tags.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs deleted file mode 100644 index e2af8b80b78..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ReadOnlyFirst - /// - [DataContract] - public partial class ReadOnlyFirst : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// baz. - public ReadOnlyFirst(string baz = default(string)) - { - this.Baz = baz; - } - - /// - /// Gets or Sets Bar - /// - [DataMember(Name="bar", EmitDefaultValue=false)] - public string Bar { get; private set; } - - /// - /// Gets or Sets Baz - /// - [DataMember(Name="baz", EmitDefaultValue=false)] - public string Baz { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ReadOnlyFirst {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Baz: ").Append(Baz).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReadOnlyFirst); - } - - /// - /// Returns true if ReadOnlyFirst instances are equal - /// - /// Instance of ReadOnlyFirst to be compared - /// Boolean - public bool Equals(ReadOnlyFirst input) - { - if (input == null) - return false; - - return - ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) - ) && - ( - this.Baz == input.Baz || - (this.Baz != null && - this.Baz.Equals(input.Baz)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bar != null) - hashCode = hashCode * 59 + this.Bar.GetHashCode(); - if (this.Baz != null) - hashCode = hashCode * 59 + this.Baz.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Return.cs deleted file mode 100644 index 2c74f50eddb..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Return.cs +++ /dev/null @@ -1,115 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing reserved words - /// - [DataContract] - public partial class Return : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// _return. - public Return(int _return = default(int)) - { - this._Return = _return; - } - - /// - /// Gets or Sets _Return - /// - [DataMember(Name="return", EmitDefaultValue=false)] - public int _Return { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Return {\n"); - sb.Append(" _Return: ").Append(_Return).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Return); - } - - /// - /// Returns true if Return instances are equal - /// - /// Instance of Return to be compared - /// Boolean - public bool Equals(Return input) - { - if (input == null) - return false; - - return - ( - this._Return == input._Return || - (this._Return != null && - this._Return.Equals(input._Return)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._Return != null) - hashCode = hashCode * 59 + this._Return.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/SpecialModelName.cs deleted file mode 100644 index 7e0ffbb1c26..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ /dev/null @@ -1,115 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// SpecialModelName - /// - [DataContract] - public partial class SpecialModelName : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// specialPropertyName. - public SpecialModelName(long specialPropertyName = default(long)) - { - this.SpecialPropertyName = specialPropertyName; - } - - /// - /// Gets or Sets SpecialPropertyName - /// - [DataMember(Name="$special[property.name]", EmitDefaultValue=false)] - public long SpecialPropertyName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SpecialModelName); - } - - /// - /// Returns true if SpecialModelName instances are equal - /// - /// Instance of SpecialModelName to be compared - /// Boolean - public bool Equals(SpecialModelName input) - { - if (input == null) - return false; - - return - ( - this.SpecialPropertyName == input.SpecialPropertyName || - (this.SpecialPropertyName != null && - this.SpecialPropertyName.Equals(input.SpecialPropertyName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SpecialPropertyName != null) - hashCode = hashCode * 59 + this.SpecialPropertyName.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Tag.cs deleted file mode 100644 index 9acc8c9a8df..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/Tag.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Tag - /// - [DataContract] - public partial class Tag : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - public Tag(long id = default(long), string name = default(string)) - { - this.Id = id; - this.Name = name; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Tag); - } - - /// - /// Returns true if Tag instances are equal - /// - /// Instance of Tag to be compared - /// Boolean - public bool Equals(Tag input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderDefault.cs deleted file mode 100644 index 0e02333a151..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderDefault.cs +++ /dev/null @@ -1,230 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// TypeHolderDefault - /// - [DataContract] - public partial class TypeHolderDefault : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TypeHolderDefault() { } - /// - /// Initializes a new instance of the class. - /// - /// stringItem (required) (default to "what"). - /// numberItem (required). - /// integerItem (required). - /// boolItem (required) (default to true). - /// arrayItem (required). - public TypeHolderDefault(string stringItem = "what", decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = true, List arrayItem = default(List)) - { - // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - - // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - - } - - /// - /// Gets or Sets StringItem - /// - [DataMember(Name="string_item", EmitDefaultValue=true)] - public string StringItem { get; set; } - - /// - /// Gets or Sets NumberItem - /// - [DataMember(Name="number_item", EmitDefaultValue=true)] - public decimal NumberItem { get; set; } - - /// - /// Gets or Sets IntegerItem - /// - [DataMember(Name="integer_item", EmitDefaultValue=true)] - public int IntegerItem { get; set; } - - /// - /// Gets or Sets BoolItem - /// - [DataMember(Name="bool_item", EmitDefaultValue=true)] - public bool BoolItem { get; set; } - - /// - /// Gets or Sets ArrayItem - /// - [DataMember(Name="array_item", EmitDefaultValue=true)] - public List ArrayItem { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TypeHolderDefault {\n"); - sb.Append(" StringItem: ").Append(StringItem).Append("\n"); - sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); - sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); - sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); - sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TypeHolderDefault); - } - - /// - /// Returns true if TypeHolderDefault instances are equal - /// - /// Instance of TypeHolderDefault to be compared - /// Boolean - public bool Equals(TypeHolderDefault input) - { - if (input == null) - return false; - - return - ( - this.StringItem == input.StringItem || - (this.StringItem != null && - this.StringItem.Equals(input.StringItem)) - ) && - ( - this.NumberItem == input.NumberItem || - (this.NumberItem != null && - this.NumberItem.Equals(input.NumberItem)) - ) && - ( - this.IntegerItem == input.IntegerItem || - (this.IntegerItem != null && - this.IntegerItem.Equals(input.IntegerItem)) - ) && - ( - this.BoolItem == input.BoolItem || - (this.BoolItem != null && - this.BoolItem.Equals(input.BoolItem)) - ) && - ( - this.ArrayItem == input.ArrayItem || - this.ArrayItem != null && - input.ArrayItem != null && - this.ArrayItem.SequenceEqual(input.ArrayItem) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.StringItem != null) - hashCode = hashCode * 59 + this.StringItem.GetHashCode(); - if (this.NumberItem != null) - hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); - if (this.IntegerItem != null) - hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); - if (this.BoolItem != null) - hashCode = hashCode * 59 + this.BoolItem.GetHashCode(); - if (this.ArrayItem != null) - hashCode = hashCode * 59 + this.ArrayItem.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderExample.cs deleted file mode 100644 index ef1da190a1c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ /dev/null @@ -1,255 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// TypeHolderExample - /// - [DataContract] - public partial class TypeHolderExample : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TypeHolderExample() { } - /// - /// Initializes a new instance of the class. - /// - /// stringItem (required). - /// numberItem (required). - /// floatItem (required). - /// integerItem (required). - /// boolItem (required). - /// arrayItem (required). - public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) - { - // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "floatItem" is required (not null) - if (floatItem == null) - { - throw new InvalidDataException("floatItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.FloatItem = floatItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - - // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - - } - - /// - /// Gets or Sets StringItem - /// - [DataMember(Name="string_item", EmitDefaultValue=true)] - public string StringItem { get; set; } - - /// - /// Gets or Sets NumberItem - /// - [DataMember(Name="number_item", EmitDefaultValue=true)] - public decimal NumberItem { get; set; } - - /// - /// Gets or Sets FloatItem - /// - [DataMember(Name="float_item", EmitDefaultValue=true)] - public float FloatItem { get; set; } - - /// - /// Gets or Sets IntegerItem - /// - [DataMember(Name="integer_item", EmitDefaultValue=true)] - public int IntegerItem { get; set; } - - /// - /// Gets or Sets BoolItem - /// - [DataMember(Name="bool_item", EmitDefaultValue=true)] - public bool BoolItem { get; set; } - - /// - /// Gets or Sets ArrayItem - /// - [DataMember(Name="array_item", EmitDefaultValue=true)] - public List ArrayItem { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TypeHolderExample {\n"); - sb.Append(" StringItem: ").Append(StringItem).Append("\n"); - sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); - sb.Append(" FloatItem: ").Append(FloatItem).Append("\n"); - sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); - sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); - sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TypeHolderExample); - } - - /// - /// Returns true if TypeHolderExample instances are equal - /// - /// Instance of TypeHolderExample to be compared - /// Boolean - public bool Equals(TypeHolderExample input) - { - if (input == null) - return false; - - return - ( - this.StringItem == input.StringItem || - (this.StringItem != null && - this.StringItem.Equals(input.StringItem)) - ) && - ( - this.NumberItem == input.NumberItem || - (this.NumberItem != null && - this.NumberItem.Equals(input.NumberItem)) - ) && - ( - this.FloatItem == input.FloatItem || - (this.FloatItem != null && - this.FloatItem.Equals(input.FloatItem)) - ) && - ( - this.IntegerItem == input.IntegerItem || - (this.IntegerItem != null && - this.IntegerItem.Equals(input.IntegerItem)) - ) && - ( - this.BoolItem == input.BoolItem || - (this.BoolItem != null && - this.BoolItem.Equals(input.BoolItem)) - ) && - ( - this.ArrayItem == input.ArrayItem || - this.ArrayItem != null && - input.ArrayItem != null && - this.ArrayItem.SequenceEqual(input.ArrayItem) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.StringItem != null) - hashCode = hashCode * 59 + this.StringItem.GetHashCode(); - if (this.NumberItem != null) - hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); - if (this.FloatItem != null) - hashCode = hashCode * 59 + this.FloatItem.GetHashCode(); - if (this.IntegerItem != null) - hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); - if (this.BoolItem != null) - hashCode = hashCode * 59 + this.BoolItem.GetHashCode(); - if (this.ArrayItem != null) - hashCode = hashCode * 59 + this.ArrayItem.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/User.cs deleted file mode 100644 index a4b150d971d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/User.cs +++ /dev/null @@ -1,228 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// User - /// - [DataContract] - public partial class User : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// username. - /// firstName. - /// lastName. - /// email. - /// password. - /// phone. - /// User Status. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int)) - { - this.Id = id; - this.Username = username; - this.FirstName = firstName; - this.LastName = lastName; - this.Email = email; - this.Password = password; - this.Phone = phone; - this.UserStatus = userStatus; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Username - /// - [DataMember(Name="username", EmitDefaultValue=false)] - public string Username { get; set; } - - /// - /// Gets or Sets FirstName - /// - [DataMember(Name="firstName", EmitDefaultValue=false)] - public string FirstName { get; set; } - - /// - /// Gets or Sets LastName - /// - [DataMember(Name="lastName", EmitDefaultValue=false)] - public string LastName { get; set; } - - /// - /// Gets or Sets Email - /// - [DataMember(Name="email", EmitDefaultValue=false)] - public string Email { get; set; } - - /// - /// Gets or Sets Password - /// - [DataMember(Name="password", EmitDefaultValue=false)] - public string Password { get; set; } - - /// - /// Gets or Sets Phone - /// - [DataMember(Name="phone", EmitDefaultValue=false)] - public string Phone { get; set; } - - /// - /// User Status - /// - /// User Status - [DataMember(Name="userStatus", EmitDefaultValue=false)] - public int UserStatus { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as User); - } - - /// - /// Returns true if User instances are equal - /// - /// Instance of User to be compared - /// Boolean - public bool Equals(User input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.UserStatus == input.UserStatus || - (this.UserStatus != null && - this.UserStatus.Equals(input.UserStatus)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Username != null) - hashCode = hashCode * 59 + this.Username.GetHashCode(); - if (this.FirstName != null) - hashCode = hashCode * 59 + this.FirstName.GetHashCode(); - if (this.LastName != null) - hashCode = hashCode * 59 + this.LastName.GetHashCode(); - if (this.Email != null) - hashCode = hashCode * 59 + this.Email.GetHashCode(); - if (this.Password != null) - hashCode = hashCode * 59 + this.Password.GetHashCode(); - if (this.Phone != null) - hashCode = hashCode * 59 + this.Phone.GetHashCode(); - if (this.UserStatus != null) - hashCode = hashCode * 59 + this.UserStatus.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/XmlItem.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/XmlItem.cs deleted file mode 100644 index ee836a55fc9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Model/XmlItem.cs +++ /dev/null @@ -1,572 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// XmlItem - /// - [DataContract] - public partial class XmlItem : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// attributeString. - /// attributeNumber. - /// attributeInteger. - /// attributeBoolean. - /// wrappedArray. - /// nameString. - /// nameNumber. - /// nameInteger. - /// nameBoolean. - /// nameArray. - /// nameWrappedArray. - /// prefixString. - /// prefixNumber. - /// prefixInteger. - /// prefixBoolean. - /// prefixArray. - /// prefixWrappedArray. - /// namespaceString. - /// namespaceNumber. - /// namespaceInteger. - /// namespaceBoolean. - /// namespaceArray. - /// namespaceWrappedArray. - /// prefixNsString. - /// prefixNsNumber. - /// prefixNsInteger. - /// prefixNsBoolean. - /// prefixNsArray. - /// prefixNsWrappedArray. - public XmlItem(string attributeString = default(string), decimal attributeNumber = default(decimal), int attributeInteger = default(int), bool attributeBoolean = default(bool), List wrappedArray = default(List), string nameString = default(string), decimal nameNumber = default(decimal), int nameInteger = default(int), bool nameBoolean = default(bool), List nameArray = default(List), List nameWrappedArray = default(List), string prefixString = default(string), decimal prefixNumber = default(decimal), int prefixInteger = default(int), bool prefixBoolean = default(bool), List prefixArray = default(List), List prefixWrappedArray = default(List), string namespaceString = default(string), decimal namespaceNumber = default(decimal), int namespaceInteger = default(int), bool namespaceBoolean = default(bool), List namespaceArray = default(List), List namespaceWrappedArray = default(List), string prefixNsString = default(string), decimal prefixNsNumber = default(decimal), int prefixNsInteger = default(int), bool prefixNsBoolean = default(bool), List prefixNsArray = default(List), List prefixNsWrappedArray = default(List)) - { - this.AttributeString = attributeString; - this.AttributeNumber = attributeNumber; - this.AttributeInteger = attributeInteger; - this.AttributeBoolean = attributeBoolean; - this.WrappedArray = wrappedArray; - this.NameString = nameString; - this.NameNumber = nameNumber; - this.NameInteger = nameInteger; - this.NameBoolean = nameBoolean; - this.NameArray = nameArray; - this.NameWrappedArray = nameWrappedArray; - this.PrefixString = prefixString; - this.PrefixNumber = prefixNumber; - this.PrefixInteger = prefixInteger; - this.PrefixBoolean = prefixBoolean; - this.PrefixArray = prefixArray; - this.PrefixWrappedArray = prefixWrappedArray; - this.NamespaceString = namespaceString; - this.NamespaceNumber = namespaceNumber; - this.NamespaceInteger = namespaceInteger; - this.NamespaceBoolean = namespaceBoolean; - this.NamespaceArray = namespaceArray; - this.NamespaceWrappedArray = namespaceWrappedArray; - this.PrefixNsString = prefixNsString; - this.PrefixNsNumber = prefixNsNumber; - this.PrefixNsInteger = prefixNsInteger; - this.PrefixNsBoolean = prefixNsBoolean; - this.PrefixNsArray = prefixNsArray; - this.PrefixNsWrappedArray = prefixNsWrappedArray; - } - - /// - /// Gets or Sets AttributeString - /// - [DataMember(Name="attribute_string", EmitDefaultValue=false)] - public string AttributeString { get; set; } - - /// - /// Gets or Sets AttributeNumber - /// - [DataMember(Name="attribute_number", EmitDefaultValue=false)] - public decimal AttributeNumber { get; set; } - - /// - /// Gets or Sets AttributeInteger - /// - [DataMember(Name="attribute_integer", EmitDefaultValue=false)] - public int AttributeInteger { get; set; } - - /// - /// Gets or Sets AttributeBoolean - /// - [DataMember(Name="attribute_boolean", EmitDefaultValue=false)] - public bool AttributeBoolean { get; set; } - - /// - /// Gets or Sets WrappedArray - /// - [DataMember(Name="wrapped_array", EmitDefaultValue=false)] - public List WrappedArray { get; set; } - - /// - /// Gets or Sets NameString - /// - [DataMember(Name="name_string", EmitDefaultValue=false)] - public string NameString { get; set; } - - /// - /// Gets or Sets NameNumber - /// - [DataMember(Name="name_number", EmitDefaultValue=false)] - public decimal NameNumber { get; set; } - - /// - /// Gets or Sets NameInteger - /// - [DataMember(Name="name_integer", EmitDefaultValue=false)] - public int NameInteger { get; set; } - - /// - /// Gets or Sets NameBoolean - /// - [DataMember(Name="name_boolean", EmitDefaultValue=false)] - public bool NameBoolean { get; set; } - - /// - /// Gets or Sets NameArray - /// - [DataMember(Name="name_array", EmitDefaultValue=false)] - public List NameArray { get; set; } - - /// - /// Gets or Sets NameWrappedArray - /// - [DataMember(Name="name_wrapped_array", EmitDefaultValue=false)] - public List NameWrappedArray { get; set; } - - /// - /// Gets or Sets PrefixString - /// - [DataMember(Name="prefix_string", EmitDefaultValue=false)] - public string PrefixString { get; set; } - - /// - /// Gets or Sets PrefixNumber - /// - [DataMember(Name="prefix_number", EmitDefaultValue=false)] - public decimal PrefixNumber { get; set; } - - /// - /// Gets or Sets PrefixInteger - /// - [DataMember(Name="prefix_integer", EmitDefaultValue=false)] - public int PrefixInteger { get; set; } - - /// - /// Gets or Sets PrefixBoolean - /// - [DataMember(Name="prefix_boolean", EmitDefaultValue=false)] - public bool PrefixBoolean { get; set; } - - /// - /// Gets or Sets PrefixArray - /// - [DataMember(Name="prefix_array", EmitDefaultValue=false)] - public List PrefixArray { get; set; } - - /// - /// Gets or Sets PrefixWrappedArray - /// - [DataMember(Name="prefix_wrapped_array", EmitDefaultValue=false)] - public List PrefixWrappedArray { get; set; } - - /// - /// Gets or Sets NamespaceString - /// - [DataMember(Name="namespace_string", EmitDefaultValue=false)] - public string NamespaceString { get; set; } - - /// - /// Gets or Sets NamespaceNumber - /// - [DataMember(Name="namespace_number", EmitDefaultValue=false)] - public decimal NamespaceNumber { get; set; } - - /// - /// Gets or Sets NamespaceInteger - /// - [DataMember(Name="namespace_integer", EmitDefaultValue=false)] - public int NamespaceInteger { get; set; } - - /// - /// Gets or Sets NamespaceBoolean - /// - [DataMember(Name="namespace_boolean", EmitDefaultValue=false)] - public bool NamespaceBoolean { get; set; } - - /// - /// Gets or Sets NamespaceArray - /// - [DataMember(Name="namespace_array", EmitDefaultValue=false)] - public List NamespaceArray { get; set; } - - /// - /// Gets or Sets NamespaceWrappedArray - /// - [DataMember(Name="namespace_wrapped_array", EmitDefaultValue=false)] - public List NamespaceWrappedArray { get; set; } - - /// - /// Gets or Sets PrefixNsString - /// - [DataMember(Name="prefix_ns_string", EmitDefaultValue=false)] - public string PrefixNsString { get; set; } - - /// - /// Gets or Sets PrefixNsNumber - /// - [DataMember(Name="prefix_ns_number", EmitDefaultValue=false)] - public decimal PrefixNsNumber { get; set; } - - /// - /// Gets or Sets PrefixNsInteger - /// - [DataMember(Name="prefix_ns_integer", EmitDefaultValue=false)] - public int PrefixNsInteger { get; set; } - - /// - /// Gets or Sets PrefixNsBoolean - /// - [DataMember(Name="prefix_ns_boolean", EmitDefaultValue=false)] - public bool PrefixNsBoolean { get; set; } - - /// - /// Gets or Sets PrefixNsArray - /// - [DataMember(Name="prefix_ns_array", EmitDefaultValue=false)] - public List PrefixNsArray { get; set; } - - /// - /// Gets or Sets PrefixNsWrappedArray - /// - [DataMember(Name="prefix_ns_wrapped_array", EmitDefaultValue=false)] - public List PrefixNsWrappedArray { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class XmlItem {\n"); - sb.Append(" AttributeString: ").Append(AttributeString).Append("\n"); - sb.Append(" AttributeNumber: ").Append(AttributeNumber).Append("\n"); - sb.Append(" AttributeInteger: ").Append(AttributeInteger).Append("\n"); - sb.Append(" AttributeBoolean: ").Append(AttributeBoolean).Append("\n"); - sb.Append(" WrappedArray: ").Append(WrappedArray).Append("\n"); - sb.Append(" NameString: ").Append(NameString).Append("\n"); - sb.Append(" NameNumber: ").Append(NameNumber).Append("\n"); - sb.Append(" NameInteger: ").Append(NameInteger).Append("\n"); - sb.Append(" NameBoolean: ").Append(NameBoolean).Append("\n"); - sb.Append(" NameArray: ").Append(NameArray).Append("\n"); - sb.Append(" NameWrappedArray: ").Append(NameWrappedArray).Append("\n"); - sb.Append(" PrefixString: ").Append(PrefixString).Append("\n"); - sb.Append(" PrefixNumber: ").Append(PrefixNumber).Append("\n"); - sb.Append(" PrefixInteger: ").Append(PrefixInteger).Append("\n"); - sb.Append(" PrefixBoolean: ").Append(PrefixBoolean).Append("\n"); - sb.Append(" PrefixArray: ").Append(PrefixArray).Append("\n"); - sb.Append(" PrefixWrappedArray: ").Append(PrefixWrappedArray).Append("\n"); - sb.Append(" NamespaceString: ").Append(NamespaceString).Append("\n"); - sb.Append(" NamespaceNumber: ").Append(NamespaceNumber).Append("\n"); - sb.Append(" NamespaceInteger: ").Append(NamespaceInteger).Append("\n"); - sb.Append(" NamespaceBoolean: ").Append(NamespaceBoolean).Append("\n"); - sb.Append(" NamespaceArray: ").Append(NamespaceArray).Append("\n"); - sb.Append(" NamespaceWrappedArray: ").Append(NamespaceWrappedArray).Append("\n"); - sb.Append(" PrefixNsString: ").Append(PrefixNsString).Append("\n"); - sb.Append(" PrefixNsNumber: ").Append(PrefixNsNumber).Append("\n"); - sb.Append(" PrefixNsInteger: ").Append(PrefixNsInteger).Append("\n"); - sb.Append(" PrefixNsBoolean: ").Append(PrefixNsBoolean).Append("\n"); - sb.Append(" PrefixNsArray: ").Append(PrefixNsArray).Append("\n"); - sb.Append(" PrefixNsWrappedArray: ").Append(PrefixNsWrappedArray).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as XmlItem); - } - - /// - /// Returns true if XmlItem instances are equal - /// - /// Instance of XmlItem to be compared - /// Boolean - public bool Equals(XmlItem input) - { - if (input == null) - return false; - - return - ( - this.AttributeString == input.AttributeString || - (this.AttributeString != null && - this.AttributeString.Equals(input.AttributeString)) - ) && - ( - this.AttributeNumber == input.AttributeNumber || - (this.AttributeNumber != null && - this.AttributeNumber.Equals(input.AttributeNumber)) - ) && - ( - this.AttributeInteger == input.AttributeInteger || - (this.AttributeInteger != null && - this.AttributeInteger.Equals(input.AttributeInteger)) - ) && - ( - this.AttributeBoolean == input.AttributeBoolean || - (this.AttributeBoolean != null && - this.AttributeBoolean.Equals(input.AttributeBoolean)) - ) && - ( - this.WrappedArray == input.WrappedArray || - this.WrappedArray != null && - input.WrappedArray != null && - this.WrappedArray.SequenceEqual(input.WrappedArray) - ) && - ( - this.NameString == input.NameString || - (this.NameString != null && - this.NameString.Equals(input.NameString)) - ) && - ( - this.NameNumber == input.NameNumber || - (this.NameNumber != null && - this.NameNumber.Equals(input.NameNumber)) - ) && - ( - this.NameInteger == input.NameInteger || - (this.NameInteger != null && - this.NameInteger.Equals(input.NameInteger)) - ) && - ( - this.NameBoolean == input.NameBoolean || - (this.NameBoolean != null && - this.NameBoolean.Equals(input.NameBoolean)) - ) && - ( - this.NameArray == input.NameArray || - this.NameArray != null && - input.NameArray != null && - this.NameArray.SequenceEqual(input.NameArray) - ) && - ( - this.NameWrappedArray == input.NameWrappedArray || - this.NameWrappedArray != null && - input.NameWrappedArray != null && - this.NameWrappedArray.SequenceEqual(input.NameWrappedArray) - ) && - ( - this.PrefixString == input.PrefixString || - (this.PrefixString != null && - this.PrefixString.Equals(input.PrefixString)) - ) && - ( - this.PrefixNumber == input.PrefixNumber || - (this.PrefixNumber != null && - this.PrefixNumber.Equals(input.PrefixNumber)) - ) && - ( - this.PrefixInteger == input.PrefixInteger || - (this.PrefixInteger != null && - this.PrefixInteger.Equals(input.PrefixInteger)) - ) && - ( - this.PrefixBoolean == input.PrefixBoolean || - (this.PrefixBoolean != null && - this.PrefixBoolean.Equals(input.PrefixBoolean)) - ) && - ( - this.PrefixArray == input.PrefixArray || - this.PrefixArray != null && - input.PrefixArray != null && - this.PrefixArray.SequenceEqual(input.PrefixArray) - ) && - ( - this.PrefixWrappedArray == input.PrefixWrappedArray || - this.PrefixWrappedArray != null && - input.PrefixWrappedArray != null && - this.PrefixWrappedArray.SequenceEqual(input.PrefixWrappedArray) - ) && - ( - this.NamespaceString == input.NamespaceString || - (this.NamespaceString != null && - this.NamespaceString.Equals(input.NamespaceString)) - ) && - ( - this.NamespaceNumber == input.NamespaceNumber || - (this.NamespaceNumber != null && - this.NamespaceNumber.Equals(input.NamespaceNumber)) - ) && - ( - this.NamespaceInteger == input.NamespaceInteger || - (this.NamespaceInteger != null && - this.NamespaceInteger.Equals(input.NamespaceInteger)) - ) && - ( - this.NamespaceBoolean == input.NamespaceBoolean || - (this.NamespaceBoolean != null && - this.NamespaceBoolean.Equals(input.NamespaceBoolean)) - ) && - ( - this.NamespaceArray == input.NamespaceArray || - this.NamespaceArray != null && - input.NamespaceArray != null && - this.NamespaceArray.SequenceEqual(input.NamespaceArray) - ) && - ( - this.NamespaceWrappedArray == input.NamespaceWrappedArray || - this.NamespaceWrappedArray != null && - input.NamespaceWrappedArray != null && - this.NamespaceWrappedArray.SequenceEqual(input.NamespaceWrappedArray) - ) && - ( - this.PrefixNsString == input.PrefixNsString || - (this.PrefixNsString != null && - this.PrefixNsString.Equals(input.PrefixNsString)) - ) && - ( - this.PrefixNsNumber == input.PrefixNsNumber || - (this.PrefixNsNumber != null && - this.PrefixNsNumber.Equals(input.PrefixNsNumber)) - ) && - ( - this.PrefixNsInteger == input.PrefixNsInteger || - (this.PrefixNsInteger != null && - this.PrefixNsInteger.Equals(input.PrefixNsInteger)) - ) && - ( - this.PrefixNsBoolean == input.PrefixNsBoolean || - (this.PrefixNsBoolean != null && - this.PrefixNsBoolean.Equals(input.PrefixNsBoolean)) - ) && - ( - this.PrefixNsArray == input.PrefixNsArray || - this.PrefixNsArray != null && - input.PrefixNsArray != null && - this.PrefixNsArray.SequenceEqual(input.PrefixNsArray) - ) && - ( - this.PrefixNsWrappedArray == input.PrefixNsWrappedArray || - this.PrefixNsWrappedArray != null && - input.PrefixNsWrappedArray != null && - this.PrefixNsWrappedArray.SequenceEqual(input.PrefixNsWrappedArray) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AttributeString != null) - hashCode = hashCode * 59 + this.AttributeString.GetHashCode(); - if (this.AttributeNumber != null) - hashCode = hashCode * 59 + this.AttributeNumber.GetHashCode(); - if (this.AttributeInteger != null) - hashCode = hashCode * 59 + this.AttributeInteger.GetHashCode(); - if (this.AttributeBoolean != null) - hashCode = hashCode * 59 + this.AttributeBoolean.GetHashCode(); - if (this.WrappedArray != null) - hashCode = hashCode * 59 + this.WrappedArray.GetHashCode(); - if (this.NameString != null) - hashCode = hashCode * 59 + this.NameString.GetHashCode(); - if (this.NameNumber != null) - hashCode = hashCode * 59 + this.NameNumber.GetHashCode(); - if (this.NameInteger != null) - hashCode = hashCode * 59 + this.NameInteger.GetHashCode(); - if (this.NameBoolean != null) - hashCode = hashCode * 59 + this.NameBoolean.GetHashCode(); - if (this.NameArray != null) - hashCode = hashCode * 59 + this.NameArray.GetHashCode(); - if (this.NameWrappedArray != null) - hashCode = hashCode * 59 + this.NameWrappedArray.GetHashCode(); - if (this.PrefixString != null) - hashCode = hashCode * 59 + this.PrefixString.GetHashCode(); - if (this.PrefixNumber != null) - hashCode = hashCode * 59 + this.PrefixNumber.GetHashCode(); - if (this.PrefixInteger != null) - hashCode = hashCode * 59 + this.PrefixInteger.GetHashCode(); - if (this.PrefixBoolean != null) - hashCode = hashCode * 59 + this.PrefixBoolean.GetHashCode(); - if (this.PrefixArray != null) - hashCode = hashCode * 59 + this.PrefixArray.GetHashCode(); - if (this.PrefixWrappedArray != null) - hashCode = hashCode * 59 + this.PrefixWrappedArray.GetHashCode(); - if (this.NamespaceString != null) - hashCode = hashCode * 59 + this.NamespaceString.GetHashCode(); - if (this.NamespaceNumber != null) - hashCode = hashCode * 59 + this.NamespaceNumber.GetHashCode(); - if (this.NamespaceInteger != null) - hashCode = hashCode * 59 + this.NamespaceInteger.GetHashCode(); - if (this.NamespaceBoolean != null) - hashCode = hashCode * 59 + this.NamespaceBoolean.GetHashCode(); - if (this.NamespaceArray != null) - hashCode = hashCode * 59 + this.NamespaceArray.GetHashCode(); - if (this.NamespaceWrappedArray != null) - hashCode = hashCode * 59 + this.NamespaceWrappedArray.GetHashCode(); - if (this.PrefixNsString != null) - hashCode = hashCode * 59 + this.PrefixNsString.GetHashCode(); - if (this.PrefixNsNumber != null) - hashCode = hashCode * 59 + this.PrefixNsNumber.GetHashCode(); - if (this.PrefixNsInteger != null) - hashCode = hashCode * 59 + this.PrefixNsInteger.GetHashCode(); - if (this.PrefixNsBoolean != null) - hashCode = hashCode * 59 + this.PrefixNsBoolean.GetHashCode(); - if (this.PrefixNsArray != null) - hashCode = hashCode * 59 + this.PrefixNsArray.GetHashCode(); - if (this.PrefixNsWrappedArray != null) - hashCode = hashCode * 59 + this.PrefixNsWrappedArray.GetHashCode(); - return hashCode; - } - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.csproj deleted file mode 100644 index c114f159dba..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - Debug - AnyCPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C} - Library - Properties - Org.OpenAPITools - Org.OpenAPITools - v3.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Org.OpenAPITools.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Org.OpenAPITools.xml - - - - - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.12.0.3\lib\net35\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\JsonSubTypes.1.6.0\lib\net35\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.6.0\lib\net35\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.6.0\lib\net35\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.6.0\lib\net35\JsonSubTypes.dll - - - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net35\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net35\RestSharp.dll - - - - - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec deleted file mode 100644 index c2528caadb9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ /dev/null @@ -1,41 +0,0 @@ - - - - - $id$ - OpenAPI Library - - - $version$ - - - $author$ - - - $author$ - false - false - - - A library generated from a OpenAPI doc - https://www.apache.org/licenses/LICENSE-2.0.html - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Properties/AssemblyInfo.cs b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Properties/AssemblyInfo.cs deleted file mode 100644 index d1abdf7936a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenAPI Library")] -[assembly: AssemblyDescription("A library generated from a OpenAPI doc")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("OpenAPI")] -[assembly: AssemblyProduct("OpenAPILibrary")] -[assembly: AssemblyCopyright("No Copyright")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0")] -[assembly: AssemblyFileVersion("1.0.0")] diff --git a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/packages.config deleted file mode 100644 index fb89a7e36fb..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet35/src/Org.OpenAPITools/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/.gitignore b/samples/client/petstore/csharp/OpenAPIClientNet40/.gitignore deleted file mode 100644 index 1ee53850b84..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/.gitignore +++ /dev/null @@ -1,362 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator-ignore b/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/FILES b/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/FILES deleted file mode 100644 index 9a35dcfce09..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/FILES +++ /dev/null @@ -1,133 +0,0 @@ -.gitignore -.travis.yml -Org.OpenAPITools.sln -README.md -build.bat -build.sh -docs/AdditionalPropertiesAnyType.md -docs/AdditionalPropertiesArray.md -docs/AdditionalPropertiesBoolean.md -docs/AdditionalPropertiesClass.md -docs/AdditionalPropertiesInteger.md -docs/AdditionalPropertiesNumber.md -docs/AdditionalPropertiesObject.md -docs/AdditionalPropertiesString.md -docs/Animal.md -docs/AnotherFakeApi.md -docs/ApiResponse.md -docs/ArrayOfArrayOfNumberOnly.md -docs/ArrayOfNumberOnly.md -docs/ArrayTest.md -docs/BigCat.md -docs/BigCatAllOf.md -docs/Capitalization.md -docs/Cat.md -docs/CatAllOf.md -docs/Category.md -docs/ClassModel.md -docs/Dog.md -docs/DogAllOf.md -docs/EnumArrays.md -docs/EnumClass.md -docs/EnumTest.md -docs/FakeApi.md -docs/FakeClassnameTags123Api.md -docs/File.md -docs/FileSchemaTestClass.md -docs/FormatTest.md -docs/HasOnlyReadOnly.md -docs/List.md -docs/MapTest.md -docs/MixedPropertiesAndAdditionalPropertiesClass.md -docs/Model200Response.md -docs/ModelClient.md -docs/Name.md -docs/NumberOnly.md -docs/Order.md -docs/OuterComposite.md -docs/OuterEnum.md -docs/Pet.md -docs/PetApi.md -docs/ReadOnlyFirst.md -docs/Return.md -docs/SpecialModelName.md -docs/StoreApi.md -docs/Tag.md -docs/TypeHolderDefault.md -docs/TypeHolderExample.md -docs/User.md -docs/UserApi.md -docs/XmlItem.md -git_push.sh -mono_nunit_test.sh -src/Org.OpenAPITools.Test/Client/JsonSubTypesTests.cs -src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj -src/Org.OpenAPITools.Test/packages.config -src/Org.OpenAPITools/Api/AnotherFakeApi.cs -src/Org.OpenAPITools/Api/FakeApi.cs -src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs -src/Org.OpenAPITools/Api/PetApi.cs -src/Org.OpenAPITools/Api/StoreApi.cs -src/Org.OpenAPITools/Api/UserApi.cs -src/Org.OpenAPITools/Client/ApiClient.cs -src/Org.OpenAPITools/Client/ApiException.cs -src/Org.OpenAPITools/Client/ApiResponse.cs -src/Org.OpenAPITools/Client/Configuration.cs -src/Org.OpenAPITools/Client/ExceptionFactory.cs -src/Org.OpenAPITools/Client/GlobalConfiguration.cs -src/Org.OpenAPITools/Client/IApiAccessor.cs -src/Org.OpenAPITools/Client/IReadableConfiguration.cs -src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs -src/Org.OpenAPITools/Client/ReadOnlyDictionary.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs -src/Org.OpenAPITools/Model/Animal.cs -src/Org.OpenAPITools/Model/ApiResponse.cs -src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs -src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs -src/Org.OpenAPITools/Model/ArrayTest.cs -src/Org.OpenAPITools/Model/BigCat.cs -src/Org.OpenAPITools/Model/BigCatAllOf.cs -src/Org.OpenAPITools/Model/Capitalization.cs -src/Org.OpenAPITools/Model/Cat.cs -src/Org.OpenAPITools/Model/CatAllOf.cs -src/Org.OpenAPITools/Model/Category.cs -src/Org.OpenAPITools/Model/ClassModel.cs -src/Org.OpenAPITools/Model/Dog.cs -src/Org.OpenAPITools/Model/DogAllOf.cs -src/Org.OpenAPITools/Model/EnumArrays.cs -src/Org.OpenAPITools/Model/EnumClass.cs -src/Org.OpenAPITools/Model/EnumTest.cs -src/Org.OpenAPITools/Model/File.cs -src/Org.OpenAPITools/Model/FileSchemaTestClass.cs -src/Org.OpenAPITools/Model/FormatTest.cs -src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs -src/Org.OpenAPITools/Model/List.cs -src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs -src/Org.OpenAPITools/Model/Model200Response.cs -src/Org.OpenAPITools/Model/ModelClient.cs -src/Org.OpenAPITools/Model/Name.cs -src/Org.OpenAPITools/Model/NumberOnly.cs -src/Org.OpenAPITools/Model/Order.cs -src/Org.OpenAPITools/Model/OuterComposite.cs -src/Org.OpenAPITools/Model/OuterEnum.cs -src/Org.OpenAPITools/Model/Pet.cs -src/Org.OpenAPITools/Model/ReadOnlyFirst.cs -src/Org.OpenAPITools/Model/Return.cs -src/Org.OpenAPITools/Model/SpecialModelName.cs -src/Org.OpenAPITools/Model/Tag.cs -src/Org.OpenAPITools/Model/TypeHolderDefault.cs -src/Org.OpenAPITools/Model/TypeHolderExample.cs -src/Org.OpenAPITools/Model/User.cs -src/Org.OpenAPITools/Model/XmlItem.cs -src/Org.OpenAPITools/Org.OpenAPITools.csproj -src/Org.OpenAPITools/Org.OpenAPITools.nuspec -src/Org.OpenAPITools/Properties/AssemblyInfo.cs -src/Org.OpenAPITools/packages.config diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/.travis.yml b/samples/client/petstore/csharp/OpenAPIClientNet40/.travis.yml deleted file mode 100644 index e4965fc7e5c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -# -# Generated by: https://github.com/openapitools/openapi-generator.git -# -language: csharp -mono: - - latest -solution: Org.OpenAPITools.sln -script: - - /bin/sh ./mono_nunit_test.sh diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/Org.OpenAPITools.sln b/samples/client/petstore/csharp/OpenAPIClientNet40/Org.OpenAPITools.sln deleted file mode 100644 index 5b15451c9dc..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/Org.OpenAPITools.sln +++ /dev/null @@ -1,27 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -VisualStudioVersion = 12.0.0.0 -MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools.Test", "src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.Build.0 = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/README.md b/samples/client/petstore/csharp/OpenAPIClientNet40/README.md deleted file mode 100644 index 4a48304fa4b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/README.md +++ /dev/null @@ -1,233 +0,0 @@ -# Org.OpenAPITools - the C# library for the 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: \" \\ - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- SDK version: 1.0.0 -- Build package: org.openapitools.codegen.languages.CSharpClientCodegen - -## Frameworks supported - - -- .NET 4.0 or later -- Windows Phone 7.1 (Mango) - -## Dependencies - - -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 105.1.0 or later -- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.2.0 or later - -The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages: - -``` -Install-Package RestSharp -Install-Package Newtonsoft.Json -Install-Package JsonSubTypes -``` - -NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742) - -## Installation - -Run the following command to generate the DLL - -- [Mac/Linux] `/bin/sh build.sh` -- [Windows] `build.bat` - -Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: - -```csharp -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -``` - - -## Packaging - -A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages. - -This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly: - -``` -nuget pack -Build -OutputDirectory out Org.OpenAPITools.csproj -``` - -Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual. - - -## Getting Started - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class Example - { - public static void Main() - { - - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test special tags - ModelClient result = apiInstance.Call123TestSpecialTags(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - - } - } -} -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*FakeApi* | [**CreateXmlItem**](docs/FakeApi.md#createxmlitem) | **POST** /fake/create_xml_item | creates an XmlItem -*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | -*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **POST** /user | Create user -*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation for Models - - - [Model.AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - - [Model.AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - - [Model.AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) - - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [Model.AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md) - - [Model.AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md) - - [Model.AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - - [Model.AdditionalPropertiesString](docs/AdditionalPropertiesString.md) - - [Model.Animal](docs/Animal.md) - - [Model.ApiResponse](docs/ApiResponse.md) - - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - - [Model.ArrayTest](docs/ArrayTest.md) - - [Model.BigCat](docs/BigCat.md) - - [Model.BigCatAllOf](docs/BigCatAllOf.md) - - [Model.Capitalization](docs/Capitalization.md) - - [Model.Cat](docs/Cat.md) - - [Model.CatAllOf](docs/CatAllOf.md) - - [Model.Category](docs/Category.md) - - [Model.ClassModel](docs/ClassModel.md) - - [Model.Dog](docs/Dog.md) - - [Model.DogAllOf](docs/DogAllOf.md) - - [Model.EnumArrays](docs/EnumArrays.md) - - [Model.EnumClass](docs/EnumClass.md) - - [Model.EnumTest](docs/EnumTest.md) - - [Model.File](docs/File.md) - - [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md) - - [Model.FormatTest](docs/FormatTest.md) - - [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - - [Model.List](docs/List.md) - - [Model.MapTest](docs/MapTest.md) - - [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model.Model200Response](docs/Model200Response.md) - - [Model.ModelClient](docs/ModelClient.md) - - [Model.Name](docs/Name.md) - - [Model.NumberOnly](docs/NumberOnly.md) - - [Model.Order](docs/Order.md) - - [Model.OuterComposite](docs/OuterComposite.md) - - [Model.OuterEnum](docs/OuterEnum.md) - - [Model.Pet](docs/Pet.md) - - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - - [Model.Return](docs/Return.md) - - [Model.SpecialModelName](docs/SpecialModelName.md) - - [Model.Tag](docs/Tag.md) - - [Model.TypeHolderDefault](docs/TypeHolderDefault.md) - - [Model.TypeHolderExample](docs/TypeHolderExample.md) - - [Model.User](docs/User.md) - - [Model.XmlItem](docs/XmlItem.md) - - -## Documentation for Authorization - - -### api_key - -- **Type**: API key - -- **API key parameter name**: api_key -- **Location**: HTTP header - - -### api_key_query - -- **Type**: API key - -- **API key parameter name**: api_key_query -- **Location**: URL query string - - -### http_basic_test - - -- **Type**: HTTP basic authentication - - -### petstore_auth - - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - write:pets: modify pets in your account - - read:pets: read your pets - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/build.bat b/samples/client/petstore/csharp/OpenAPIClientNet40/build.bat deleted file mode 100644 index f14ee219765..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/build.bat +++ /dev/null @@ -1,17 +0,0 @@ -:: Generated by: https://github.com/openapitools/openapi-generator.git -:: - -@echo off - -SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v3.5 - -if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '.\nuget.exe')" -.\nuget.exe install src\Org.OpenAPITools\packages.config -o packages - -if not exist ".\bin" mkdir bin - -copy packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.1.6.0\lib\net40\JsonSubTypes.dll bin\JsonSubTypes.dll -copy packages\RestSharp.105.1.0\lib\net4\RestSharp.dll bin\RestSharp.dll -%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /target:library /out:bin\Org.OpenAPITools.dll /recurse:src\Org.OpenAPITools\*.cs /doc:bin\Org.OpenAPITools.xml - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh b/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh deleted file mode 100644 index bd7ed61518c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/build.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/usr/bin/env bash -# -# Generated by: https://github.com/openapitools/openapi-generator.git -# - -frameworkVersion=net40 - -# sdk must match installed frameworks under PREFIX/lib/mono/[value] -sdk=4 - -# langversion refers to C# language features. see man mcs for details. -langversion=${sdk} -nuget_cmd=nuget - -# Match against our known SDK possibilities -case "${sdk}" in - 4) - langversion=4 - ;; - 4.5*) - langversion=5 - ;; - 4.6*) - langversion=6 - ;; - 4.7*) - langversion=7 # ignoring 7.1 for now. - ;; - *) - langversion=6 - ;; -esac - -echo "[INFO] Target framework: ${frameworkVersion}" - -if ! type nuget &>/dev/null; then - echo "[INFO] Download nuget and packages" - wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe; - nuget_cmd="mono nuget.exe" -fi - -mozroots --import --sync -${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages; - -echo "[INFO] Copy DLLs to the 'bin' folder" -mkdir -p bin; -cp packages/Newtonsoft.Json.12.0.3/lib/net40/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; -cp packages/RestSharp.105.1.0/lib/net4/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.1.6.0/lib/net40/JsonSubTypes.dll bin/JsonSubTypes.dll - -echo "[INFO] Run 'mcs' to build bin/Org.OpenAPITools.dll" -mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\ -bin/RestSharp.dll,\ -System.ComponentModel.DataAnnotations.dll,\ -System.Runtime.Serialization.dll \ --target:library \ --out:bin/Org.OpenAPITools.dll \ --recurse:'src/Org.OpenAPITools/*.cs' \ --doc:bin/Org.OpenAPITools.xml \ --platform:anycpu - -if [ $? -ne 0 ] -then - echo "[ERROR] Compilation failed with exit code $?" - exit 1 -else - echo "[INFO] bin/Org.OpenAPITools.dll was created successfully" -fi diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesAnyType.md deleted file mode 100644 index fd118d3bfc5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesAnyType.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesAnyType - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesArray.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesArray.md deleted file mode 100644 index 3d0606cea5f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesArray.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesArray - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesBoolean.md deleted file mode 100644 index bb4b2498263..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesBoolean.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesBoolean - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesClass.md deleted file mode 100644 index 12f3292db0b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesClass.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MapString** | **Dictionary<string, string>** | | [optional] -**MapNumber** | **Dictionary<string, decimal>** | | [optional] -**MapInteger** | **Dictionary<string, int>** | | [optional] -**MapBoolean** | **Dictionary<string, bool>** | | [optional] -**MapArrayInteger** | **Dictionary<string, List<int>>** | | [optional] -**MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] -**MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**Anytype1** | **Object** | | [optional] -**Anytype2** | **Object** | | [optional] -**Anytype3** | **Object** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesInteger.md deleted file mode 100644 index 86a6259ecc9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesInteger.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesInteger - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesNumber.md deleted file mode 100644 index 8dc46024e03..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesNumber.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesNumber - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesObject.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesObject.md deleted file mode 100644 index 455456fe6dd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesObject.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesString.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesString.md deleted file mode 100644 index 0f7cf804167..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AdditionalPropertiesString.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesString - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Animal.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Animal.md deleted file mode 100644 index 0a05bcdf061..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Animal.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Animal - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AnotherFakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AnotherFakeApi.md deleted file mode 100644 index 5af41a1862c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/AnotherFakeApi.md +++ /dev/null @@ -1,84 +0,0 @@ -# Org.OpenAPITools.Api.AnotherFakeApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**Call123TestSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags - - - -## Call123TestSpecialTags - -> ModelClient Call123TestSpecialTags (ModelClient body) - -To test special tags - -To test special tags and operation ID starting with number - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class Call123TestSpecialTagsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test special tags - ModelClient result = apiInstance.Call123TestSpecialTags(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ApiResponse.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ApiResponse.md deleted file mode 100644 index a3b916355fd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ApiResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.ApiResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Code** | **int** | | [optional] -**Type** | **string** | | [optional] -**Message** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index e05ea7dc240..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayOfArrayOfNumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayArrayNumber** | **List<List<decimal>>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ArrayOfNumberOnly.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ArrayOfNumberOnly.md deleted file mode 100644 index 5f593d42929..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ArrayOfNumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayOfNumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayNumber** | **List<decimal>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ArrayTest.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ArrayTest.md deleted file mode 100644 index 593bc2d7386..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ArrayTest.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayOfString** | **List<string>** | | [optional] -**ArrayArrayOfInteger** | **List<List<long>>** | | [optional] -**ArrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/BigCat.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/BigCat.md deleted file mode 100644 index 6247107ab35..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/BigCat.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.BigCat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Declawed** | **bool** | | [optional] -**Kind** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/BigCatAllOf.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/BigCatAllOf.md deleted file mode 100644 index 864c2298e03..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/BigCatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.BigCatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Kind** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Capitalization.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Capitalization.md deleted file mode 100644 index 0c66f2d2d44..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Capitalization.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Capitalization - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SmallCamel** | **string** | | [optional] -**CapitalCamel** | **string** | | [optional] -**SmallSnake** | **string** | | [optional] -**CapitalSnake** | **string** | | [optional] -**SCAETHFlowPoints** | **string** | | [optional] -**ATT_NAME** | **string** | Name 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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Cat.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Cat.md deleted file mode 100644 index 6609de8e12a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Cat.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.Cat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] -**Declawed** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/CatAllOf.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/CatAllOf.md deleted file mode 100644 index d623d2a0a6e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.CatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Declawed** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Category.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Category.md deleted file mode 100644 index 42102d4e508..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Category.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Category - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ClassModel.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ClassModel.md deleted file mode 100644 index b2b42407d2b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ClassModel.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ClassModel - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Class** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Dog.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Dog.md deleted file mode 100644 index 1f39769d2b9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Dog.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.Dog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] -**Breed** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/DogAllOf.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/DogAllOf.md deleted file mode 100644 index d72134a0f5f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.DogAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Breed** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/EnumArrays.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/EnumArrays.md deleted file mode 100644 index 9d58d25f972..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/EnumArrays.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.EnumArrays - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JustSymbol** | **string** | | [optional] -**ArrayEnum** | **List<string>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/EnumClass.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/EnumClass.md deleted file mode 100644 index 16d21587b4c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/EnumClass.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.EnumClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/EnumTest.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/EnumTest.md deleted file mode 100644 index f8bc67baa6a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/EnumTest.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Org.OpenAPITools.Model.EnumTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EnumString** | **string** | | [optional] -**EnumStringRequired** | **string** | | -**EnumInteger** | **int** | | [optional] -**EnumNumber** | **double** | | [optional] -**OuterEnum** | **OuterEnum** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md deleted file mode 100644 index 47853770985..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeApi.md +++ /dev/null @@ -1,1118 +0,0 @@ -# Org.OpenAPITools.Api.FakeApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateXmlItem**](FakeApi.md#createxmlitem) | **POST** /fake/create_xml_item | creates an XmlItem -[**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -[**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -[**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -[**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -[**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -[**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -[**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -[**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | - - - -## CreateXmlItem - -> void CreateXmlItem (XmlItem xmlItem) - -creates an XmlItem - -this route creates an XmlItem - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateXmlItemExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var xmlItem = new XmlItem(); // XmlItem | XmlItem Body - - try - { - // creates an XmlItem - apiInstance.CreateXmlItem(xmlItem); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.CreateXmlItem: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## FakeOuterBooleanSerialize - -> bool FakeOuterBooleanSerialize (bool? body = null) - - - -Test serialization of outer boolean types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterBooleanSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = true; // bool? | Input boolean as post body (optional) - - try - { - bool result = apiInstance.FakeOuterBooleanSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **bool?**| Input boolean as post body | [optional] - -### Return type - -**bool** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output boolean | - | - -[[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) - - -## FakeOuterCompositeSerialize - -> OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null) - - - -Test serialization of object with outer number type - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterCompositeSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional) - - try - { - OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output composite | - | - -[[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) - - -## FakeOuterNumberSerialize - -> decimal FakeOuterNumberSerialize (decimal? body = null) - - - -Test serialization of outer number types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterNumberSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = 8.14; // decimal? | Input number as post body (optional) - - try - { - decimal result = apiInstance.FakeOuterNumberSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **decimal?**| Input number as post body | [optional] - -### Return type - -**decimal** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output number | - | - -[[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) - - -## FakeOuterStringSerialize - -> string FakeOuterStringSerialize (string body = null) - - - -Test serialization of outer string types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterStringSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = body_example; // string | Input string as post body (optional) - - try - { - string result = apiInstance.FakeOuterStringSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **string**| Input string as post body | [optional] - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output string | - | - -[[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) - - -## TestBodyWithFileSchema - -> void TestBodyWithFileSchema (FileSchemaTestClass body) - - - -For this test, the body for this request much reference a schema named `File`. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestBodyWithFileSchemaExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new FileSchemaTestClass(); // FileSchemaTestClass | - - try - { - apiInstance.TestBodyWithFileSchema(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - - -## TestBodyWithQueryParams - -> void TestBodyWithQueryParams (string query, User body) - - - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestBodyWithQueryParamsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var query = query_example; // string | - var body = new User(); // User | - - try - { - apiInstance.TestBodyWithQueryParams(query, body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **string**| | - **body** | [**User**](User.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - - -## TestClientModel - -> ModelClient TestClientModel (ModelClient body) - -To test \"client\" model - -To test \"client\" model - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestClientModelExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test \"client\" model - ModelClient result = apiInstance.TestClientModel(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestEndpointParameters - -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestEndpointParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure HTTP basic authorization: http_basic_test - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - - var apiInstance = new FakeApi(Configuration.Default); - var number = 8.14; // decimal | None - var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None - var integer = 56; // int? | None (optional) - var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) - var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) - var password = password_example; // string | None (optional) - var callback = callback_example; // string | None (optional) - - try - { - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **decimal**| None | - **_double** | **double**| None | - **patternWithoutDelimiter** | **string**| None | - **_byte** | **byte[]**| None | - **integer** | **int?**| None | [optional] - **int32** | **int?**| None | [optional] - **int64** | **long?**| None | [optional] - **_float** | **float?**| None | [optional] - **_string** | **string**| None | [optional] - **binary** | **System.IO.Stream**| None | [optional] - **date** | **DateTime?**| None | [optional] - **dateTime** | **DateTime?**| None | [optional] - **password** | **string**| None | [optional] - **callback** | **string**| None | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## TestEnumParameters - -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) - -To test enum parameters - -To test enum parameters - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestEnumParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) - var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) - var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) - - try - { - // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional] - **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] - **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] - **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] - **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] - **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] - **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid request | - | -| **404** | Not found | - | - -[[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) - - -## TestGroupParameters - -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestGroupParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var requiredStringGroup = 56; // int | Required String in group parameters - var requiredBooleanGroup = true; // bool | Required Boolean in group parameters - var requiredInt64Group = 789; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) - var booleanGroup = true; // bool? | Boolean in group parameters (optional) - var int64Group = 789; // long? | Integer in group parameters (optional) - - try - { - // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **int**| Required String in group parameters | - **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | - **requiredInt64Group** | **long**| Required Integer in group parameters | - **stringGroup** | **int?**| String in group parameters | [optional] - **booleanGroup** | **bool?**| Boolean in group parameters | [optional] - **int64Group** | **long?**| Integer in group parameters | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Something wrong | - | - -[[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) - - -## TestInlineAdditionalProperties - -> void TestInlineAdditionalProperties (Dictionary param) - -test inline additionalProperties - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestInlineAdditionalPropertiesExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var param = new Dictionary(); // Dictionary | request body - - try - { - // test inline additionalProperties - apiInstance.TestInlineAdditionalProperties(param); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestInlineAdditionalProperties: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Dictionary<string, string>**](string.md)| request body | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestJsonFormData - -> void TestJsonFormData (string param, string param2) - -test json serialization of form data - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestJsonFormDataExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 - - try - { - // test json serialization of form data - apiInstance.TestJsonFormData(param, param2); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **string**| field1 | - **param2** | **string**| field2 | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestQueryParameterCollectionFormat - -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) - - - -To test the collection format in query parameters - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestQueryParameterCollectionFormatExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var pipe = new List(); // List | - var ioutil = new List(); // List | - var http = new List(); // List | - var url = new List(); // List | - var context = new List(); // List | - - try - { - apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormat: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<string>**](string.md)| | - **ioutil** | [**List<string>**](string.md)| | - **http** | [**List<string>**](string.md)| | - **url** | [**List<string>**](string.md)| | - **context** | [**List<string>**](string.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeClassnameTags123Api.md deleted file mode 100644 index deb97a27697..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FakeClassnameTags123Api.md +++ /dev/null @@ -1,89 +0,0 @@ -# Org.OpenAPITools.Api.FakeClassnameTags123Api - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**TestClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case - - - -## TestClassname - -> ModelClient TestClassname (ModelClient body) - -To test class name in snake case - -To test class name in snake case - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestClassnameExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key_query - Configuration.Default.AddApiKey("api_key_query", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key_query", "Bearer"); - - var apiInstance = new FakeClassnameTags123Api(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test class name in snake case - ModelClient result = apiInstance.TestClassname(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeClassnameTags123Api.TestClassname: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/File.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/File.md deleted file mode 100644 index b7105102579..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/File.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.File - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SourceURI** | **string** | Test capitalization | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FileSchemaTestClass.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FileSchemaTestClass.md deleted file mode 100644 index df1453f686b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FileSchemaTestClass.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.FileSchemaTestClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**File** | [**File**](File.md) | | [optional] -**Files** | [**List<File>**](File.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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FormatTest.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FormatTest.md deleted file mode 100644 index 92d7d1e0104..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/FormatTest.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Org.OpenAPITools.Model.FormatTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Integer** | **int** | | [optional] -**Int32** | **int** | | [optional] -**Int64** | **long** | | [optional] -**Number** | **decimal** | | -**Float** | **float** | | [optional] -**Double** | **double** | | [optional] -**String** | **string** | | [optional] -**Byte** | **byte[]** | | -**Binary** | **System.IO.Stream** | | [optional] -**Date** | **DateTime** | | -**DateTime** | **DateTime** | | [optional] -**Uuid** | **Guid** | | [optional] -**Password** | **string** | | -**BigDecimal** | **decimal** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/HasOnlyReadOnly.md deleted file mode 100644 index 043d2442b4e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/HasOnlyReadOnly.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.HasOnlyReadOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] [readonly] -**Foo** | **string** | | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/List.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/List.md deleted file mode 100644 index cb41193b43e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/List.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.List - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123List** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/MapTest.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/MapTest.md deleted file mode 100644 index 79d499e2cf9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/MapTest.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Org.OpenAPITools.Model.MapTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**MapOfEnumString** | **Dictionary<string, string>** | | [optional] -**DirectMap** | **Dictionary<string, bool>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index dd7b01e49fe..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.MixedPropertiesAndAdditionalPropertiesClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Uuid** | **Guid** | | [optional] -**DateTime** | **DateTime** | | [optional] -**Map** | [**Dictionary<string, Animal>**](Animal.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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Model200Response.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Model200Response.md deleted file mode 100644 index 7d826bca1ec..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Model200Response.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Model200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **int** | | [optional] -**Class** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ModelClient.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ModelClient.md deleted file mode 100644 index e36e1fad802..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ModelClient.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ModelClient - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**__Client** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Name.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Name.md deleted file mode 100644 index bfd7955e5b4..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Name.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Org.OpenAPITools.Model.Name - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_Name** | **int** | | -**SnakeCase** | **int** | | [optional] [readonly] -**Property** | **string** | | [optional] -**_123Number** | **int** | | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/NumberOnly.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/NumberOnly.md deleted file mode 100644 index e4b08467e08..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/NumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.NumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JustNumber** | **decimal** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Order.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Order.md deleted file mode 100644 index 875f43a30e5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Order.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Order - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**PetId** | **long** | | [optional] -**Quantity** | **int** | | [optional] -**ShipDate** | **DateTime** | | [optional] -**Status** | **string** | Order Status | [optional] -**Complete** | **bool** | | [optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/OuterComposite.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/OuterComposite.md deleted file mode 100644 index f381fb7fd28..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/OuterComposite.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.OuterComposite - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MyNumber** | **decimal** | | [optional] -**MyString** | **string** | | [optional] -**MyBoolean** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/OuterEnum.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/OuterEnum.md deleted file mode 100644 index edc2300684d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/OuterEnum.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.OuterEnum - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Pet.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Pet.md deleted file mode 100644 index 0bd5c40fc99..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Pet.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Pet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Category** | [**Category**](Category.md) | | [optional] -**Name** | **string** | | -**PhotoUrls** | **List<string>** | | -**Tags** | [**List<Tag>**](Tag.md) | | [optional] -**Status** | **string** | pet status in the store | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/PetApi.md deleted file mode 100644 index 1a9eba14868..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/PetApi.md +++ /dev/null @@ -1,728 +0,0 @@ -# Org.OpenAPITools.Api.PetApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -[**DeletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -[**FindPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -[**FindPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -[**GetPetById**](PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -[**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -[**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) - - - -## AddPet - -> void AddPet (Pet body) - -Add a new pet to the store - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class AddPetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var body = new Pet(); // Pet | Pet object that needs to be added to the store - - try - { - // Add a new pet to the store - apiInstance.AddPet(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.AddPet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **405** | Invalid input | - | - -[[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) - - -## DeletePet - -> void DeletePet (long petId, string apiKey = null) - -Deletes a pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeletePetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) - - try - { - // Deletes a pet - apiInstance.DeletePet(petId, apiKey); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| Pet id to delete | - **apiKey** | **string**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid pet value | - | - -[[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) - - -## FindPetsByStatus - -> List<Pet> FindPetsByStatus (List status) - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FindPetsByStatusExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var status = status_example; // List | Status values that need to be considered for filter - - try - { - // Finds Pets by status - List result = apiInstance.FindPetsByStatus(status); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **List<string>**| Status values that need to be considered for filter | - -### Return type - -[**List<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid status value | - | - -[[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) - - -## FindPetsByTags - -> List<Pet> FindPetsByTags (List tags) - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FindPetsByTagsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var tags = new List(); // List | Tags to filter by - - try - { - // Finds Pets by tags - List result = apiInstance.FindPetsByTags(tags); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**List<string>**](string.md)| Tags to filter by | - -### Return type - -[**List<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid tag value | - | - -[[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) - - -## GetPetById - -> Pet GetPetById (long petId) - -Find pet by ID - -Returns a single pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetPetByIdExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to return - - try - { - // Find pet by ID - Pet result = apiInstance.GetPetById(petId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to return | - -### Return type - -[**Pet**](Pet.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | - -[[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) - - -## UpdatePet - -> void UpdatePet (Pet body) - -Update an existing pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdatePetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var body = new Pet(); // Pet | Pet object that needs to be added to the store - - try - { - // Update an existing pet - apiInstance.UpdatePet(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | -| **405** | Validation exception | - | - -[[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) - - -## UpdatePetWithForm - -> void UpdatePetWithForm (long petId, string name = null, string status = null) - -Updates a pet in the store with form data - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdatePetWithFormExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet that needs to be updated - var name = name_example; // string | Updated name of the pet (optional) - var status = status_example; // string | Updated status of the pet (optional) - - try - { - // Updates a pet in the store with form data - apiInstance.UpdatePetWithForm(petId, name, status); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet that needs to be updated | - **name** | **string**| Updated name of the pet | [optional] - **status** | **string**| Updated status of the pet | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **405** | Invalid input | - | - -[[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) - - -## UploadFile - -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) - -uploads an image - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to update - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) - - try - { - // uploads an image - ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to update | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - **file** | **System.IO.Stream**| file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UploadFileWithRequiredFile - -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) - -uploads an image (required) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileWithRequiredFileExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to update - var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - - try - { - // uploads an image (required) - ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to update | - **requiredFile** | **System.IO.Stream**| file to upload | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ReadOnlyFirst.md deleted file mode 100644 index 8ea3b95919b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/ReadOnlyFirst.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.ReadOnlyFirst - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] [readonly] -**Baz** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Return.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Return.md deleted file mode 100644 index 4761c70748e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Return.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.Return - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_Return** | **int** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/SpecialModelName.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/SpecialModelName.md deleted file mode 100644 index ee6489524d0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/SpecialModelName.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.SpecialModelName - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SpecialPropertyName** | **long** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/StoreApi.md deleted file mode 100644 index ae123168a11..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/StoreApi.md +++ /dev/null @@ -1,314 +0,0 @@ -# Org.OpenAPITools.Api.StoreApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**GetInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[**PlaceOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet - - - -## DeleteOrder - -> void DeleteOrder (string orderId) - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeleteOrderExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var orderId = orderId_example; // string | ID of the order that needs to be deleted - - try - { - // Delete purchase order by ID - apiInstance.DeleteOrder(orderId); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **string**| ID of the order that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - -[[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) - - -## GetInventory - -> Dictionary<string, int> GetInventory () - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetInventoryExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - - var apiInstance = new StoreApi(Configuration.Default); - - try - { - // Returns pet inventories by status - Dictionary result = apiInstance.GetInventory(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**Dictionary** - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetOrderById - -> Order GetOrderById (long orderId) - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetOrderByIdExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var orderId = 789; // long | ID of pet that needs to be fetched - - try - { - // Find purchase order by ID - Order result = apiInstance.GetOrderById(orderId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **long**| ID of pet that needs to be fetched | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - -[[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) - - -## PlaceOrder - -> Order PlaceOrder (Order body) - -Place an order for a pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class PlaceOrderExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var body = new Order(); // Order | order placed for purchasing the pet - - try - { - // Place an order for a pet - Order result = apiInstance.PlaceOrder(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid Order | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Tag.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Tag.md deleted file mode 100644 index f781c26f017..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/Tag.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Tag - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/TypeHolderDefault.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/TypeHolderDefault.md deleted file mode 100644 index 0945245b213..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/TypeHolderDefault.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Org.OpenAPITools.Model.TypeHolderDefault - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StringItem** | **string** | | [default to "what"] -**NumberItem** | **decimal** | | -**IntegerItem** | **int** | | -**BoolItem** | **bool** | | [default to true] -**ArrayItem** | **List<int>** | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/TypeHolderExample.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/TypeHolderExample.md deleted file mode 100644 index b9573673baf..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/TypeHolderExample.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.TypeHolderExample - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StringItem** | **string** | | -**NumberItem** | **decimal** | | -**FloatItem** | **float** | | -**IntegerItem** | **int** | | -**BoolItem** | **bool** | | -**ArrayItem** | **List<int>** | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/User.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/User.md deleted file mode 100644 index a25c25d1aa0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/User.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Org.OpenAPITools.Model.User - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Username** | **string** | | [optional] -**FirstName** | **string** | | [optional] -**LastName** | **string** | | [optional] -**Email** | **string** | | [optional] -**Password** | **string** | | [optional] -**Phone** | **string** | | [optional] -**UserStatus** | **int** | User Status | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/UserApi.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/UserApi.md deleted file mode 100644 index 1385d840413..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/UserApi.md +++ /dev/null @@ -1,605 +0,0 @@ -# Org.OpenAPITools.Api.UserApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateUser**](UserApi.md#createuser) | **POST** /user | Create user -[**CreateUsersWithArrayInput**](UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -[**CreateUsersWithListInput**](UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -[**DeleteUser**](UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -[**GetUserByName**](UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -[**LoginUser**](UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -[**LogoutUser**](UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -[**UpdateUser**](UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - - -## CreateUser - -> void CreateUser (User body) - -Create user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var body = new User(); // User | Created user object - - try - { - // Create user - apiInstance.CreateUser(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateUsersWithArrayInput - -> void CreateUsersWithArrayInput (List body) - -Creates list of users with given input array - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUsersWithArrayInputExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var body = new List(); // List | List of user object - - try - { - // Creates list of users with given input array - apiInstance.CreateUsersWithArrayInput(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateUsersWithListInput - -> void CreateUsersWithListInput (List body) - -Creates list of users with given input array - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUsersWithListInputExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var body = new List(); // List | List of user object - - try - { - // Creates list of users with given input array - apiInstance.CreateUsersWithListInput(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteUser - -> void DeleteUser (string username) - -Delete user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeleteUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The name that needs to be deleted - - try - { - // Delete user - apiInstance.DeleteUser(username); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## GetUserByName - -> User GetUserByName (string username) - -Get user by user name - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetUserByNameExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. - - try - { - // Get user by user name - User result = apiInstance.GetUserByName(username); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be fetched. Use user1 for testing. | - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## LoginUser - -> string LoginUser (string username, string password) - -Logs user into the system - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class LoginUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text - - try - { - // Logs user into the system - string result = apiInstance.LoginUser(username, password); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The user name for login | - **password** | **string**| The password for login in clear text | - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| -| **400** | Invalid username/password supplied | - | - -[[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) - - -## LogoutUser - -> void LogoutUser () - -Logs out current logged in user session - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class LogoutUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - - try - { - // Logs out current logged in user session - apiInstance.LogoutUser(); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateUser - -> void UpdateUser (string username, User body) - -Updated user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdateUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | name that need to be deleted - var body = new User(); // User | Updated user object - - try - { - // Updated user - apiInstance.UpdateUser(username, body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid user supplied | - | -| **404** | User not found | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/XmlItem.md b/samples/client/petstore/csharp/OpenAPIClientNet40/docs/XmlItem.md deleted file mode 100644 index 0dca90c706f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/docs/XmlItem.md +++ /dev/null @@ -1,41 +0,0 @@ - -# Org.OpenAPITools.Model.XmlItem - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AttributeString** | **string** | | [optional] -**AttributeNumber** | **decimal** | | [optional] -**AttributeInteger** | **int** | | [optional] -**AttributeBoolean** | **bool** | | [optional] -**WrappedArray** | **List<int>** | | [optional] -**NameString** | **string** | | [optional] -**NameNumber** | **decimal** | | [optional] -**NameInteger** | **int** | | [optional] -**NameBoolean** | **bool** | | [optional] -**NameArray** | **List<int>** | | [optional] -**NameWrappedArray** | **List<int>** | | [optional] -**PrefixString** | **string** | | [optional] -**PrefixNumber** | **decimal** | | [optional] -**PrefixInteger** | **int** | | [optional] -**PrefixBoolean** | **bool** | | [optional] -**PrefixArray** | **List<int>** | | [optional] -**PrefixWrappedArray** | **List<int>** | | [optional] -**NamespaceString** | **string** | | [optional] -**NamespaceNumber** | **decimal** | | [optional] -**NamespaceInteger** | **int** | | [optional] -**NamespaceBoolean** | **bool** | | [optional] -**NamespaceArray** | **List<int>** | | [optional] -**NamespaceWrappedArray** | **List<int>** | | [optional] -**PrefixNsString** | **string** | | [optional] -**PrefixNsNumber** | **decimal** | | [optional] -**PrefixNsInteger** | **int** | | [optional] -**PrefixNsBoolean** | **bool** | | [optional] -**PrefixNsArray** | **List<int>** | | [optional] -**PrefixNsWrappedArray** | **List<int>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/git_push.sh b/samples/client/petstore/csharp/OpenAPIClientNet40/git_push.sh deleted file mode 100644 index 200e975d212..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/mono_nunit_test.sh b/samples/client/petstore/csharp/OpenAPIClientNet40/mono_nunit_test.sh deleted file mode 100644 index ef4209de27b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/mono_nunit_test.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# -# Generated by: https://github.com/openapitools/openapi-generator.git -# - -wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -mozroots --import --sync - -echo "[INFO] remove bin/Debug/Org.OpenAPITools.Test.dll" -rm src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll 2> /dev/null - -echo "[INFO] install NUnit runners via NuGet" -wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -mozroots --import --sync -mono nuget.exe install src/Org.OpenAPITools.Test/packages.config -o packages - -echo "[INFO] Install NUnit Console 3.x runners via NuGet" -mono nuget.exe install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory packages - -echo "[INFO] Build the solution and run the unit test" -xbuild Org.OpenAPITools.sln && \ - mono ./packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs deleted file mode 100644 index 626c8e8329d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing AnotherFakeApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class AnotherFakeApiTests - { - private AnotherFakeApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new AnotherFakeApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AnotherFakeApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' AnotherFakeApi - //Assert.IsInstanceOf(typeof(AnotherFakeApi), instance); - } - - - /// - /// Test Call123TestSpecialTags - /// - [Test] - public void Call123TestSpecialTagsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //ModelClient body = null; - //var response = instance.Call123TestSpecialTags(body); - //Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs deleted file mode 100644 index bdbcdb21efe..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ /dev/null @@ -1,267 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing FakeApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class FakeApiTests - { - private FakeApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new FakeApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FakeApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' FakeApi - //Assert.IsInstanceOf(typeof(FakeApi), instance); - } - - - /// - /// Test CreateXmlItem - /// - [Test] - public void CreateXmlItemTest() - { - // TODO uncomment below to test the method and replace null with proper value - //XmlItem xmlItem = null; - //instance.CreateXmlItem(xmlItem); - - } - - /// - /// Test FakeOuterBooleanSerialize - /// - [Test] - public void FakeOuterBooleanSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //bool? body = null; - //var response = instance.FakeOuterBooleanSerialize(body); - //Assert.IsInstanceOf(typeof(bool), response, "response is bool"); - } - - /// - /// Test FakeOuterCompositeSerialize - /// - [Test] - public void FakeOuterCompositeSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //OuterComposite body = null; - //var response = instance.FakeOuterCompositeSerialize(body); - //Assert.IsInstanceOf(typeof(OuterComposite), response, "response is OuterComposite"); - } - - /// - /// Test FakeOuterNumberSerialize - /// - [Test] - public void FakeOuterNumberSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //decimal? body = null; - //var response = instance.FakeOuterNumberSerialize(body); - //Assert.IsInstanceOf(typeof(decimal), response, "response is decimal"); - } - - /// - /// Test FakeOuterStringSerialize - /// - [Test] - public void FakeOuterStringSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string body = null; - //var response = instance.FakeOuterStringSerialize(body); - //Assert.IsInstanceOf(typeof(string), response, "response is string"); - } - - /// - /// Test TestBodyWithFileSchema - /// - [Test] - public void TestBodyWithFileSchemaTest() - { - // TODO uncomment below to test the method and replace null with proper value - //FileSchemaTestClass body = null; - //instance.TestBodyWithFileSchema(body); - - } - - /// - /// Test TestBodyWithQueryParams - /// - [Test] - public void TestBodyWithQueryParamsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string query = null; - //User body = null; - //instance.TestBodyWithQueryParams(query, body); - - } - - /// - /// Test TestClientModel - /// - [Test] - public void TestClientModelTest() - { - // TODO uncomment below to test the method and replace null with proper value - //ModelClient body = null; - //var response = instance.TestClientModel(body); - //Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient"); - } - - /// - /// Test TestEndpointParameters - /// - [Test] - public void TestEndpointParametersTest() - { - // TODO uncomment below to test the method and replace null with proper value - //decimal number = null; - //double _double = null; - //string patternWithoutDelimiter = null; - //byte[] _byte = null; - //int? integer = null; - //int? int32 = null; - //long? int64 = null; - //float? _float = null; - //string _string = null; - //System.IO.Stream binary = null; - //DateTime? date = null; - //DateTime? dateTime = null; - //string password = null; - //string callback = null; - //instance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); - - } - - /// - /// Test TestEnumParameters - /// - [Test] - public void TestEnumParametersTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List enumHeaderStringArray = null; - //string enumHeaderString = null; - //List enumQueryStringArray = null; - //string enumQueryString = null; - //int? enumQueryInteger = null; - //double? enumQueryDouble = null; - //List enumFormStringArray = null; - //string enumFormString = null; - //instance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - - } - - /// - /// Test TestGroupParameters - /// - [Test] - public void TestGroupParametersTest() - { - // TODO uncomment below to test the method and replace null with proper value - //int requiredStringGroup = null; - //bool requiredBooleanGroup = null; - //long requiredInt64Group = null; - //int? stringGroup = null; - //bool? booleanGroup = null; - //long? int64Group = null; - //instance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - - } - - /// - /// Test TestInlineAdditionalProperties - /// - [Test] - public void TestInlineAdditionalPropertiesTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Dictionary param = null; - //instance.TestInlineAdditionalProperties(param); - - } - - /// - /// Test TestJsonFormData - /// - [Test] - public void TestJsonFormDataTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string param = null; - //string param2 = null; - //instance.TestJsonFormData(param, param2); - - } - - /// - /// Test TestQueryParameterCollectionFormat - /// - [Test] - public void TestQueryParameterCollectionFormatTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List pipe = null; - //List ioutil = null; - //List http = null; - //List url = null; - //List context = null; - //instance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); - - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs deleted file mode 100644 index f73f71bc211..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing FakeClassnameTags123Api - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class FakeClassnameTags123ApiTests - { - private FakeClassnameTags123Api instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new FakeClassnameTags123Api(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FakeClassnameTags123Api - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' FakeClassnameTags123Api - //Assert.IsInstanceOf(typeof(FakeClassnameTags123Api), instance); - } - - - /// - /// Test TestClassname - /// - [Test] - public void TestClassnameTest() - { - // TODO uncomment below to test the method and replace null with proper value - //ModelClient body = null; - //var response = instance.TestClassname(body); - //Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/PetApiTests.cs deleted file mode 100644 index ef563f71442..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/PetApiTests.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing PetApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class PetApiTests - { - private PetApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new PetApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of PetApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' PetApi - //Assert.IsInstanceOf(typeof(PetApi), instance); - } - - - /// - /// Test AddPet - /// - [Test] - public void AddPetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Pet body = null; - //instance.AddPet(body); - - } - - /// - /// Test DeletePet - /// - [Test] - public void DeletePetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //string apiKey = null; - //instance.DeletePet(petId, apiKey); - - } - - /// - /// Test FindPetsByStatus - /// - [Test] - public void FindPetsByStatusTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List status = null; - //var response = instance.FindPetsByStatus(status); - //Assert.IsInstanceOf(typeof(List), response, "response is List"); - } - - /// - /// Test FindPetsByTags - /// - [Test] - public void FindPetsByTagsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List tags = null; - //var response = instance.FindPetsByTags(tags); - //Assert.IsInstanceOf(typeof(List), response, "response is List"); - } - - /// - /// Test GetPetById - /// - [Test] - public void GetPetByIdTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //var response = instance.GetPetById(petId); - //Assert.IsInstanceOf(typeof(Pet), response, "response is Pet"); - } - - /// - /// Test UpdatePet - /// - [Test] - public void UpdatePetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Pet body = null; - //instance.UpdatePet(body); - - } - - /// - /// Test UpdatePetWithForm - /// - [Test] - public void UpdatePetWithFormTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //string name = null; - //string status = null; - //instance.UpdatePetWithForm(petId, name, status); - - } - - /// - /// Test UploadFile - /// - [Test] - public void UploadFileTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //string additionalMetadata = null; - //System.IO.Stream file = null; - //var response = instance.UploadFile(petId, additionalMetadata, file); - //Assert.IsInstanceOf(typeof(ApiResponse), response, "response is ApiResponse"); - } - - /// - /// Test UploadFileWithRequiredFile - /// - [Test] - public void UploadFileWithRequiredFileTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //System.IO.Stream requiredFile = null; - //string additionalMetadata = null; - //var response = instance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - //Assert.IsInstanceOf(typeof(ApiResponse), response, "response is ApiResponse"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs deleted file mode 100644 index 969eaa7a2ab..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs +++ /dev/null @@ -1,115 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing StoreApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class StoreApiTests - { - private StoreApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new StoreApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of StoreApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' StoreApi - //Assert.IsInstanceOf(typeof(StoreApi), instance); - } - - - /// - /// Test DeleteOrder - /// - [Test] - public void DeleteOrderTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string orderId = null; - //instance.DeleteOrder(orderId); - - } - - /// - /// Test GetInventory - /// - [Test] - public void GetInventoryTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.GetInventory(); - //Assert.IsInstanceOf(typeof(Dictionary), response, "response is Dictionary"); - } - - /// - /// Test GetOrderById - /// - [Test] - public void GetOrderByIdTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long orderId = null; - //var response = instance.GetOrderById(orderId); - //Assert.IsInstanceOf(typeof(Order), response, "response is Order"); - } - - /// - /// Test PlaceOrder - /// - [Test] - public void PlaceOrderTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Order body = null; - //var response = instance.PlaceOrder(body); - //Assert.IsInstanceOf(typeof(Order), response, "response is Order"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/UserApiTests.cs deleted file mode 100644 index a79cad43130..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing UserApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class UserApiTests - { - private UserApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new UserApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of UserApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' UserApi - //Assert.IsInstanceOf(typeof(UserApi), instance); - } - - - /// - /// Test CreateUser - /// - [Test] - public void CreateUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //User body = null; - //instance.CreateUser(body); - - } - - /// - /// Test CreateUsersWithArrayInput - /// - [Test] - public void CreateUsersWithArrayInputTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List body = null; - //instance.CreateUsersWithArrayInput(body); - - } - - /// - /// Test CreateUsersWithListInput - /// - [Test] - public void CreateUsersWithListInputTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List body = null; - //instance.CreateUsersWithListInput(body); - - } - - /// - /// Test DeleteUser - /// - [Test] - public void DeleteUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //instance.DeleteUser(username); - - } - - /// - /// Test GetUserByName - /// - [Test] - public void GetUserByNameTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //var response = instance.GetUserByName(username); - //Assert.IsInstanceOf(typeof(User), response, "response is User"); - } - - /// - /// Test LoginUser - /// - [Test] - public void LoginUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //string password = null; - //var response = instance.LoginUser(username, password); - //Assert.IsInstanceOf(typeof(string), response, "response is string"); - } - - /// - /// Test LogoutUser - /// - [Test] - public void LogoutUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //instance.LogoutUser(); - - } - - /// - /// Test UpdateUser - /// - [Test] - public void UpdateUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //User body = null; - //instance.UpdateUser(username, body); - - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Client/JsonSubTypesTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Client/JsonSubTypesTests.cs deleted file mode 100644 index 0df08ed75e8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Client/JsonSubTypesTests.cs +++ /dev/null @@ -1,134 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System.Collections.Generic; -using System.Linq; -using JsonSubTypes; -using Newtonsoft.Json; -using NUnit.Framework; - -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; - -namespace Org.OpenAPITools.Test.Client -{ - public class JsonSubTypesTests - { - [Test] - public void TestSimpleJsonSubTypesExample() - { - var annimal = - JsonConvert.DeserializeObject("{\"Kind\":\"Dog\",\"Breed\":\"Jack Russell Terrier\"}"); - Assert.AreEqual("Jack Russell Terrier", (annimal as Dog)?.Breed); - } - - [Test] - public void DeserializeObjectWithCustomMapping() - { - var annimal = - JsonConvert.DeserializeObject("{\"Sound\":\"Bark\",\"Breed\":\"Jack Russell Terrier\"}"); - Assert.AreEqual("Jack Russell Terrier", (annimal as Dog2)?.Breed); - } - - [Test] - public void DeserializeObjectMappingByPropertyPresence() - { - string json = - "[{\"Department\":\"Department1\",\"JobTitle\":\"JobTitle1\",\"FirstName\":\"FirstName1\",\"LastName\":\"LastName1\"}," + - "{\"Department\":\"Department1\",\"JobTitle\":\"JobTitle1\",\"FirstName\":\"FirstName1\",\"LastName\":\"LastName1\"}," + - "{\"Skill\":\"Painter\",\"FirstName\":\"FirstName1\",\"LastName\":\"LastName1\"}]"; - - - var persons = JsonConvert.DeserializeObject>(json); - Assert.AreEqual("Painter", (persons.Last() as Artist)?.Skill); - } - } - - [JsonConverter(typeof(JsonSubtypes), "Kind")] - public interface IAnimal - { - string Kind { get; } - } - - public class Dog : IAnimal - { - public Dog() - { - Kind = "Dog"; - } - - public string Kind { get; } - public string Breed { get; set; } - } - - class Cat : IAnimal - { - public Cat() - { - Kind = "Cat"; - } - - public string Kind { get; } - bool Declawed { get; set; } - } - - [JsonConverter(typeof(JsonSubtypes), "Sound")] - [JsonSubtypes.KnownSubType(typeof(Dog2), "Bark")] - [JsonSubtypes.KnownSubType(typeof(Cat2), "Meow")] - public class Animal2 - { - public virtual string Sound { get; } - public string Color { get; set; } - } - - public class Dog2 : Animal2 - { - public Dog2() - { - Sound = "Bark"; - } - - public override string Sound { get; } - public string Breed { get; set; } - } - - public class Cat2 : Animal2 - { - public Cat2() - { - Sound = "Meow"; - } - - public override string Sound { get; } - public bool Declawed { get; set; } - } - - [JsonConverter(typeof(JsonSubtypes))] - [JsonSubtypes.KnownSubTypeWithProperty(typeof(Employee), "JobTitle")] - [JsonSubtypes.KnownSubTypeWithProperty(typeof(Artist), "Skill")] - public class Person - { - public string FirstName { get; set; } - public string LastName { get; set; } - } - - public class Employee : Person - { - public string Department { get; set; } - public string JobTitle { get; set; } - } - - public class Artist : Person - { - public string Skill { get; set; } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs deleted file mode 100644 index 03151430729..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesAnyType - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesAnyTypeTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesAnyType - //private AdditionalPropertiesAnyType instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesAnyType - //instance = new AdditionalPropertiesAnyType(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesAnyType - /// - [Test] - public void AdditionalPropertiesAnyTypeInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesAnyType - //Assert.IsInstanceOf(typeof(AdditionalPropertiesAnyType), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs deleted file mode 100644 index e75114595b6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesArray - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesArrayTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesArray - //private AdditionalPropertiesArray instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesArray - //instance = new AdditionalPropertiesArray(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesArray - /// - [Test] - public void AdditionalPropertiesArrayInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesArray - //Assert.IsInstanceOf(typeof(AdditionalPropertiesArray), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs deleted file mode 100644 index c09b604fae8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesBoolean - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesBooleanTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesBoolean - //private AdditionalPropertiesBoolean instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesBoolean - //instance = new AdditionalPropertiesBoolean(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesBoolean - /// - [Test] - public void AdditionalPropertiesBooleanInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesBoolean - //Assert.IsInstanceOf(typeof(AdditionalPropertiesBoolean), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs deleted file mode 100644 index 4ee461b5ed0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesClassTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesClass - //private AdditionalPropertiesClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesClass - //instance = new AdditionalPropertiesClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesClass - /// - [Test] - public void AdditionalPropertiesClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesClass - //Assert.IsInstanceOf(typeof(AdditionalPropertiesClass), instance); - } - - - /// - /// Test the property 'MapString' - /// - [Test] - public void MapStringTest() - { - // TODO unit test for the property 'MapString' - } - /// - /// Test the property 'MapNumber' - /// - [Test] - public void MapNumberTest() - { - // TODO unit test for the property 'MapNumber' - } - /// - /// Test the property 'MapInteger' - /// - [Test] - public void MapIntegerTest() - { - // TODO unit test for the property 'MapInteger' - } - /// - /// Test the property 'MapBoolean' - /// - [Test] - public void MapBooleanTest() - { - // TODO unit test for the property 'MapBoolean' - } - /// - /// Test the property 'MapArrayInteger' - /// - [Test] - public void MapArrayIntegerTest() - { - // TODO unit test for the property 'MapArrayInteger' - } - /// - /// Test the property 'MapArrayAnytype' - /// - [Test] - public void MapArrayAnytypeTest() - { - // TODO unit test for the property 'MapArrayAnytype' - } - /// - /// Test the property 'MapMapString' - /// - [Test] - public void MapMapStringTest() - { - // TODO unit test for the property 'MapMapString' - } - /// - /// Test the property 'MapMapAnytype' - /// - [Test] - public void MapMapAnytypeTest() - { - // TODO unit test for the property 'MapMapAnytype' - } - /// - /// Test the property 'Anytype1' - /// - [Test] - public void Anytype1Test() - { - // TODO unit test for the property 'Anytype1' - } - /// - /// Test the property 'Anytype2' - /// - [Test] - public void Anytype2Test() - { - // TODO unit test for the property 'Anytype2' - } - /// - /// Test the property 'Anytype3' - /// - [Test] - public void Anytype3Test() - { - // TODO unit test for the property 'Anytype3' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs deleted file mode 100644 index 98e65b0e548..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesInteger - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesIntegerTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesInteger - //private AdditionalPropertiesInteger instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesInteger - //instance = new AdditionalPropertiesInteger(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesInteger - /// - [Test] - public void AdditionalPropertiesIntegerInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesInteger - //Assert.IsInstanceOf(typeof(AdditionalPropertiesInteger), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs deleted file mode 100644 index b20dac9314a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesNumber - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesNumberTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesNumber - //private AdditionalPropertiesNumber instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesNumber - //instance = new AdditionalPropertiesNumber(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesNumber - /// - [Test] - public void AdditionalPropertiesNumberInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesNumber - //Assert.IsInstanceOf(typeof(AdditionalPropertiesNumber), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs deleted file mode 100644 index 342cbd47075..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesObject - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesObjectTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesObject - //private AdditionalPropertiesObject instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesObject - //instance = new AdditionalPropertiesObject(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesObject - /// - [Test] - public void AdditionalPropertiesObjectInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesObject - //Assert.IsInstanceOf(typeof(AdditionalPropertiesObject), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs deleted file mode 100644 index 273ade918d8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesString - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesStringTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesString - //private AdditionalPropertiesString instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesString - //instance = new AdditionalPropertiesString(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesString - /// - [Test] - public void AdditionalPropertiesStringInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesString - //Assert.IsInstanceOf(typeof(AdditionalPropertiesString), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AnimalTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AnimalTests.cs deleted file mode 100644 index f404924f459..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/AnimalTests.cs +++ /dev/null @@ -1,114 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Animal - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AnimalTests - { - // TODO uncomment below to declare an instance variable for Animal - //private Animal instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Animal - //instance = new Animal(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Animal - /// - [Test] - public void AnimalInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Animal - //Assert.IsInstanceOf(typeof(Animal), instance); - } - - /// - /// Test deserialize a Dog from type Animal - /// - [Test] - public void DogDeserializeFromAnimalTest() - { - // TODO uncomment below to test deserialize a Dog from type Animal - //Assert.IsInstanceOf(typeof(Animal), JsonConvert.DeserializeObject(new Dog().ToJson())); - } - /// - /// Test deserialize a Cat from type Animal - /// - [Test] - public void CatDeserializeFromAnimalTest() - { - // TODO uncomment below to test deserialize a Cat from type Animal - //Assert.IsInstanceOf(typeof(Animal), JsonConvert.DeserializeObject(new Cat().ToJson())); - } - /// - /// Test deserialize a BigCat from type Cat - /// - [Test] - public void BigCatDeserializeFromCatTest() - { - // TODO uncomment below to test deserialize a BigCat from type Cat - //Assert.IsInstanceOf(typeof(Cat), JsonConvert.DeserializeObject(new BigCat().ToJson())); - } - - /// - /// Test the property 'ClassName' - /// - [Test] - public void ClassNameTest() - { - // TODO unit test for the property 'ClassName' - } - /// - /// Test the property 'Color' - /// - [Test] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs deleted file mode 100644 index 2442b4ef55d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ApiResponse - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ApiResponseTests - { - // TODO uncomment below to declare an instance variable for ApiResponse - //private ApiResponse instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ApiResponse - //instance = new ApiResponse(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ApiResponse - /// - [Test] - public void ApiResponseInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ApiResponse - //Assert.IsInstanceOf(typeof(ApiResponse), instance); - } - - - /// - /// Test the property 'Code' - /// - [Test] - public void CodeTest() - { - // TODO unit test for the property 'Code' - } - /// - /// Test the property 'Type' - /// - [Test] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } - /// - /// Test the property 'Message' - /// - [Test] - public void MessageTest() - { - // TODO unit test for the property 'Message' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs deleted file mode 100644 index 094432c3361..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ArrayOfArrayOfNumberOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ArrayOfArrayOfNumberOnlyTests - { - // TODO uncomment below to declare an instance variable for ArrayOfArrayOfNumberOnly - //private ArrayOfArrayOfNumberOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ArrayOfArrayOfNumberOnly - //instance = new ArrayOfArrayOfNumberOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ArrayOfArrayOfNumberOnly - /// - [Test] - public void ArrayOfArrayOfNumberOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ArrayOfArrayOfNumberOnly - //Assert.IsInstanceOf(typeof(ArrayOfArrayOfNumberOnly), instance); - } - - - /// - /// Test the property 'ArrayArrayNumber' - /// - [Test] - public void ArrayArrayNumberTest() - { - // TODO unit test for the property 'ArrayArrayNumber' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs deleted file mode 100644 index d95bf3883d9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ArrayOfNumberOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ArrayOfNumberOnlyTests - { - // TODO uncomment below to declare an instance variable for ArrayOfNumberOnly - //private ArrayOfNumberOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ArrayOfNumberOnly - //instance = new ArrayOfNumberOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ArrayOfNumberOnly - /// - [Test] - public void ArrayOfNumberOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ArrayOfNumberOnly - //Assert.IsInstanceOf(typeof(ArrayOfNumberOnly), instance); - } - - - /// - /// Test the property 'ArrayNumber' - /// - [Test] - public void ArrayNumberTest() - { - // TODO unit test for the property 'ArrayNumber' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs deleted file mode 100644 index af09220da3c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ArrayTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ArrayTestTests - { - // TODO uncomment below to declare an instance variable for ArrayTest - //private ArrayTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ArrayTest - //instance = new ArrayTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ArrayTest - /// - [Test] - public void ArrayTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ArrayTest - //Assert.IsInstanceOf(typeof(ArrayTest), instance); - } - - - /// - /// Test the property 'ArrayOfString' - /// - [Test] - public void ArrayOfStringTest() - { - // TODO unit test for the property 'ArrayOfString' - } - /// - /// Test the property 'ArrayArrayOfInteger' - /// - [Test] - public void ArrayArrayOfIntegerTest() - { - // TODO unit test for the property 'ArrayArrayOfInteger' - } - /// - /// Test the property 'ArrayArrayOfModel' - /// - [Test] - public void ArrayArrayOfModelTest() - { - // TODO unit test for the property 'ArrayArrayOfModel' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs deleted file mode 100644 index 4cbdb4b8a5e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing BigCatAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class BigCatAllOfTests - { - // TODO uncomment below to declare an instance variable for BigCatAllOf - //private BigCatAllOf instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of BigCatAllOf - //instance = new BigCatAllOf(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of BigCatAllOf - /// - [Test] - public void BigCatAllOfInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" BigCatAllOf - //Assert.IsInstanceOf(typeof(BigCatAllOf), instance); - } - - - /// - /// Test the property 'Kind' - /// - [Test] - public void KindTest() - { - // TODO unit test for the property 'Kind' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/BigCatTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/BigCatTests.cs deleted file mode 100644 index 1d78ea9f1e6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/BigCatTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing BigCat - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class BigCatTests - { - // TODO uncomment below to declare an instance variable for BigCat - //private BigCat instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of BigCat - //instance = new BigCat(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of BigCat - /// - [Test] - public void BigCatInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" BigCat - //Assert.IsInstanceOf(typeof(BigCat), instance); - } - - - /// - /// Test the property 'Kind' - /// - [Test] - public void KindTest() - { - // TODO unit test for the property 'Kind' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs deleted file mode 100644 index dd2156d3ba8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Capitalization - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CapitalizationTests - { - // TODO uncomment below to declare an instance variable for Capitalization - //private Capitalization instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Capitalization - //instance = new Capitalization(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Capitalization - /// - [Test] - public void CapitalizationInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Capitalization - //Assert.IsInstanceOf(typeof(Capitalization), instance); - } - - - /// - /// Test the property 'SmallCamel' - /// - [Test] - public void SmallCamelTest() - { - // TODO unit test for the property 'SmallCamel' - } - /// - /// Test the property 'CapitalCamel' - /// - [Test] - public void CapitalCamelTest() - { - // TODO unit test for the property 'CapitalCamel' - } - /// - /// Test the property 'SmallSnake' - /// - [Test] - public void SmallSnakeTest() - { - // TODO unit test for the property 'SmallSnake' - } - /// - /// Test the property 'CapitalSnake' - /// - [Test] - public void CapitalSnakeTest() - { - // TODO unit test for the property 'CapitalSnake' - } - /// - /// Test the property 'SCAETHFlowPoints' - /// - [Test] - public void SCAETHFlowPointsTest() - { - // TODO unit test for the property 'SCAETHFlowPoints' - } - /// - /// Test the property 'ATT_NAME' - /// - [Test] - public void ATT_NAMETest() - { - // TODO unit test for the property 'ATT_NAME' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs deleted file mode 100644 index d7afe6310fa..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing CatAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CatAllOfTests - { - // TODO uncomment below to declare an instance variable for CatAllOf - //private CatAllOf instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of CatAllOf - //instance = new CatAllOf(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of CatAllOf - /// - [Test] - public void CatAllOfInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" CatAllOf - //Assert.IsInstanceOf(typeof(CatAllOf), instance); - } - - - /// - /// Test the property 'Declawed' - /// - [Test] - public void DeclawedTest() - { - // TODO unit test for the property 'Declawed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/CatTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/CatTests.cs deleted file mode 100644 index 8b89be0ec8d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/CatTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Cat - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CatTests - { - // TODO uncomment below to declare an instance variable for Cat - //private Cat instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Cat - //instance = new Cat(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Cat - /// - [Test] - public void CatInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Cat - //Assert.IsInstanceOf(typeof(Cat), instance); - } - - - /// - /// Test the property 'Declawed' - /// - [Test] - public void DeclawedTest() - { - // TODO unit test for the property 'Declawed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/CategoryTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/CategoryTests.cs deleted file mode 100644 index e65b9ab1c01..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/CategoryTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Category - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CategoryTests - { - // TODO uncomment below to declare an instance variable for Category - //private Category instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Category - //instance = new Category(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Category - /// - [Test] - public void CategoryInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Category - //Assert.IsInstanceOf(typeof(Category), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs deleted file mode 100644 index 6302a4d8dd9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ClassModel - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ClassModelTests - { - // TODO uncomment below to declare an instance variable for ClassModel - //private ClassModel instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ClassModel - //instance = new ClassModel(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ClassModel - /// - [Test] - public void ClassModelInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ClassModel - //Assert.IsInstanceOf(typeof(ClassModel), instance); - } - - - /// - /// Test the property 'Class' - /// - [Test] - public void ClassTest() - { - // TODO unit test for the property 'Class' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs deleted file mode 100644 index 30f5bed38e1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing DogAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class DogAllOfTests - { - // TODO uncomment below to declare an instance variable for DogAllOf - //private DogAllOf instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of DogAllOf - //instance = new DogAllOf(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of DogAllOf - /// - [Test] - public void DogAllOfInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" DogAllOf - //Assert.IsInstanceOf(typeof(DogAllOf), instance); - } - - - /// - /// Test the property 'Breed' - /// - [Test] - public void BreedTest() - { - // TODO unit test for the property 'Breed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/DogTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/DogTests.cs deleted file mode 100644 index fba682a3f9e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/DogTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Dog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class DogTests - { - // TODO uncomment below to declare an instance variable for Dog - //private Dog instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Dog - //instance = new Dog(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Dog - /// - [Test] - public void DogInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Dog - //Assert.IsInstanceOf(typeof(Dog), instance); - } - - - /// - /// Test the property 'Breed' - /// - [Test] - public void BreedTest() - { - // TODO unit test for the property 'Breed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs deleted file mode 100644 index 065ae99b613..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing EnumArrays - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class EnumArraysTests - { - // TODO uncomment below to declare an instance variable for EnumArrays - //private EnumArrays instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of EnumArrays - //instance = new EnumArrays(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of EnumArrays - /// - [Test] - public void EnumArraysInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" EnumArrays - //Assert.IsInstanceOf(typeof(EnumArrays), instance); - } - - - /// - /// Test the property 'JustSymbol' - /// - [Test] - public void JustSymbolTest() - { - // TODO unit test for the property 'JustSymbol' - } - /// - /// Test the property 'ArrayEnum' - /// - [Test] - public void ArrayEnumTest() - { - // TODO unit test for the property 'ArrayEnum' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs deleted file mode 100644 index 2ff4f5ab8b0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing EnumClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class EnumClassTests - { - // TODO uncomment below to declare an instance variable for EnumClass - //private EnumClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of EnumClass - //instance = new EnumClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of EnumClass - /// - [Test] - public void EnumClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" EnumClass - //Assert.IsInstanceOf(typeof(EnumClass), instance); - } - - - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs deleted file mode 100644 index 0ea4d901d50..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs +++ /dev/null @@ -1,111 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing EnumTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class EnumTestTests - { - // TODO uncomment below to declare an instance variable for EnumTest - //private EnumTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of EnumTest - //instance = new EnumTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of EnumTest - /// - [Test] - public void EnumTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" EnumTest - //Assert.IsInstanceOf(typeof(EnumTest), instance); - } - - - /// - /// Test the property 'EnumString' - /// - [Test] - public void EnumStringTest() - { - // TODO unit test for the property 'EnumString' - } - /// - /// Test the property 'EnumStringRequired' - /// - [Test] - public void EnumStringRequiredTest() - { - // TODO unit test for the property 'EnumStringRequired' - } - /// - /// Test the property 'EnumInteger' - /// - [Test] - public void EnumIntegerTest() - { - // TODO unit test for the property 'EnumInteger' - } - /// - /// Test the property 'EnumNumber' - /// - [Test] - public void EnumNumberTest() - { - // TODO unit test for the property 'EnumNumber' - } - /// - /// Test the property 'OuterEnum' - /// - [Test] - public void OuterEnumTest() - { - // TODO unit test for the property 'OuterEnum' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs deleted file mode 100644 index 02ae51ce37e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing FileSchemaTestClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class FileSchemaTestClassTests - { - // TODO uncomment below to declare an instance variable for FileSchemaTestClass - //private FileSchemaTestClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of FileSchemaTestClass - //instance = new FileSchemaTestClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FileSchemaTestClass - /// - [Test] - public void FileSchemaTestClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" FileSchemaTestClass - //Assert.IsInstanceOf(typeof(FileSchemaTestClass), instance); - } - - - /// - /// Test the property 'File' - /// - [Test] - public void FileTest() - { - // TODO unit test for the property 'File' - } - /// - /// Test the property 'Files' - /// - [Test] - public void FilesTest() - { - // TODO unit test for the property 'Files' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/FileTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/FileTests.cs deleted file mode 100644 index b18213afe49..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/FileTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing File - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class FileTests - { - // TODO uncomment below to declare an instance variable for File - //private File instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of File - //instance = new File(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of File - /// - [Test] - public void FileInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" File - //Assert.IsInstanceOf(typeof(File), instance); - } - - - /// - /// Test the property 'SourceURI' - /// - [Test] - public void SourceURITest() - { - // TODO unit test for the property 'SourceURI' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs deleted file mode 100644 index d5b7b0ba885..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing FormatTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class FormatTestTests - { - // TODO uncomment below to declare an instance variable for FormatTest - //private FormatTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of FormatTest - //instance = new FormatTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FormatTest - /// - [Test] - public void FormatTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" FormatTest - //Assert.IsInstanceOf(typeof(FormatTest), instance); - } - - - /// - /// Test the property 'Integer' - /// - [Test] - public void IntegerTest() - { - // TODO unit test for the property 'Integer' - } - /// - /// Test the property 'Int32' - /// - [Test] - public void Int32Test() - { - // TODO unit test for the property 'Int32' - } - /// - /// Test the property 'Int64' - /// - [Test] - public void Int64Test() - { - // TODO unit test for the property 'Int64' - } - /// - /// Test the property 'Number' - /// - [Test] - public void NumberTest() - { - // TODO unit test for the property 'Number' - } - /// - /// Test the property 'Float' - /// - [Test] - public void FloatTest() - { - // TODO unit test for the property 'Float' - } - /// - /// Test the property 'Double' - /// - [Test] - public void DoubleTest() - { - // TODO unit test for the property 'Double' - } - /// - /// Test the property 'String' - /// - [Test] - public void StringTest() - { - // TODO unit test for the property 'String' - } - /// - /// Test the property 'Byte' - /// - [Test] - public void ByteTest() - { - // TODO unit test for the property 'Byte' - } - /// - /// Test the property 'Binary' - /// - [Test] - public void BinaryTest() - { - // TODO unit test for the property 'Binary' - } - /// - /// Test the property 'Date' - /// - [Test] - public void DateTest() - { - // TODO unit test for the property 'Date' - } - /// - /// Test the property 'DateTime' - /// - [Test] - public void DateTimeTest() - { - // TODO unit test for the property 'DateTime' - } - /// - /// Test the property 'Uuid' - /// - [Test] - public void UuidTest() - { - // TODO unit test for the property 'Uuid' - } - /// - /// Test the property 'Password' - /// - [Test] - public void PasswordTest() - { - // TODO unit test for the property 'Password' - } - /// - /// Test the property 'BigDecimal' - /// - [Test] - public void BigDecimalTest() - { - // TODO unit test for the property 'BigDecimal' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs deleted file mode 100644 index 0c1ec60ef46..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing HasOnlyReadOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HasOnlyReadOnlyTests - { - // TODO uncomment below to declare an instance variable for HasOnlyReadOnly - //private HasOnlyReadOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of HasOnlyReadOnly - //instance = new HasOnlyReadOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of HasOnlyReadOnly - /// - [Test] - public void HasOnlyReadOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" HasOnlyReadOnly - //Assert.IsInstanceOf(typeof(HasOnlyReadOnly), instance); - } - - - /// - /// Test the property 'Bar' - /// - [Test] - public void BarTest() - { - // TODO unit test for the property 'Bar' - } - /// - /// Test the property 'Foo' - /// - [Test] - public void FooTest() - { - // TODO unit test for the property 'Foo' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ListTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ListTests.cs deleted file mode 100644 index 57f55da25ed..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ListTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing List - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ListTests - { - // TODO uncomment below to declare an instance variable for List - //private List instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of List - //instance = new List(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of List - /// - [Test] - public void ListInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" List - //Assert.IsInstanceOf(typeof(List), instance); - } - - - /// - /// Test the property '_123List' - /// - [Test] - public void _123ListTest() - { - // TODO unit test for the property '_123List' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/MapTestTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/MapTestTests.cs deleted file mode 100644 index 53220cdd78a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/MapTestTests.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing MapTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MapTestTests - { - // TODO uncomment below to declare an instance variable for MapTest - //private MapTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of MapTest - //instance = new MapTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of MapTest - /// - [Test] - public void MapTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" MapTest - //Assert.IsInstanceOf(typeof(MapTest), instance); - } - - - /// - /// Test the property 'MapMapOfString' - /// - [Test] - public void MapMapOfStringTest() - { - // TODO unit test for the property 'MapMapOfString' - } - /// - /// Test the property 'MapOfEnumString' - /// - [Test] - public void MapOfEnumStringTest() - { - // TODO unit test for the property 'MapOfEnumString' - } - /// - /// Test the property 'DirectMap' - /// - [Test] - public void DirectMapTest() - { - // TODO unit test for the property 'DirectMap' - } - /// - /// Test the property 'IndirectMap' - /// - [Test] - public void IndirectMapTest() - { - // TODO unit test for the property 'IndirectMap' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs deleted file mode 100644 index 792db793c52..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing MixedPropertiesAndAdditionalPropertiesClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixedPropertiesAndAdditionalPropertiesClassTests - { - // TODO uncomment below to declare an instance variable for MixedPropertiesAndAdditionalPropertiesClass - //private MixedPropertiesAndAdditionalPropertiesClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of MixedPropertiesAndAdditionalPropertiesClass - //instance = new MixedPropertiesAndAdditionalPropertiesClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of MixedPropertiesAndAdditionalPropertiesClass - /// - [Test] - public void MixedPropertiesAndAdditionalPropertiesClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" MixedPropertiesAndAdditionalPropertiesClass - //Assert.IsInstanceOf(typeof(MixedPropertiesAndAdditionalPropertiesClass), instance); - } - - - /// - /// Test the property 'Uuid' - /// - [Test] - public void UuidTest() - { - // TODO unit test for the property 'Uuid' - } - /// - /// Test the property 'DateTime' - /// - [Test] - public void DateTimeTest() - { - // TODO unit test for the property 'DateTime' - } - /// - /// Test the property 'Map' - /// - [Test] - public void MapTest() - { - // TODO unit test for the property 'Map' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs deleted file mode 100644 index 68ed58223de..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Model200Response - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class Model200ResponseTests - { - // TODO uncomment below to declare an instance variable for Model200Response - //private Model200Response instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Model200Response - //instance = new Model200Response(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Model200Response - /// - [Test] - public void Model200ResponseInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Model200Response - //Assert.IsInstanceOf(typeof(Model200Response), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'Class' - /// - [Test] - public void ClassTest() - { - // TODO unit test for the property 'Class' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs deleted file mode 100644 index 0313c8fd1a6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ModelClient - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ModelClientTests - { - // TODO uncomment below to declare an instance variable for ModelClient - //private ModelClient instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ModelClient - //instance = new ModelClient(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ModelClient - /// - [Test] - public void ModelClientInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ModelClient - //Assert.IsInstanceOf(typeof(ModelClient), instance); - } - - - /// - /// Test the property '__Client' - /// - [Test] - public void __ClientTest() - { - // TODO unit test for the property '__Client' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/NameTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/NameTests.cs deleted file mode 100644 index eb5fb91b0f5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/NameTests.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Name - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class NameTests - { - // TODO uncomment below to declare an instance variable for Name - //private Name instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Name - //instance = new Name(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Name - /// - [Test] - public void NameInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Name - //Assert.IsInstanceOf(typeof(Name), instance); - } - - - /// - /// Test the property '_Name' - /// - [Test] - public void _NameTest() - { - // TODO unit test for the property '_Name' - } - /// - /// Test the property 'SnakeCase' - /// - [Test] - public void SnakeCaseTest() - { - // TODO unit test for the property 'SnakeCase' - } - /// - /// Test the property 'Property' - /// - [Test] - public void PropertyTest() - { - // TODO unit test for the property 'Property' - } - /// - /// Test the property '_123Number' - /// - [Test] - public void _123NumberTest() - { - // TODO unit test for the property '_123Number' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs deleted file mode 100644 index 5f90f85f79c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing NumberOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class NumberOnlyTests - { - // TODO uncomment below to declare an instance variable for NumberOnly - //private NumberOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of NumberOnly - //instance = new NumberOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of NumberOnly - /// - [Test] - public void NumberOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" NumberOnly - //Assert.IsInstanceOf(typeof(NumberOnly), instance); - } - - - /// - /// Test the property 'JustNumber' - /// - [Test] - public void JustNumberTest() - { - // TODO unit test for the property 'JustNumber' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/OrderTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/OrderTests.cs deleted file mode 100644 index 7d155bb54cd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/OrderTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Order - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OrderTests - { - // TODO uncomment below to declare an instance variable for Order - //private Order instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Order - //instance = new Order(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Order - /// - [Test] - public void OrderInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Order - //Assert.IsInstanceOf(typeof(Order), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'PetId' - /// - [Test] - public void PetIdTest() - { - // TODO unit test for the property 'PetId' - } - /// - /// Test the property 'Quantity' - /// - [Test] - public void QuantityTest() - { - // TODO unit test for the property 'Quantity' - } - /// - /// Test the property 'ShipDate' - /// - [Test] - public void ShipDateTest() - { - // TODO unit test for the property 'ShipDate' - } - /// - /// Test the property 'Status' - /// - [Test] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } - /// - /// Test the property 'Complete' - /// - [Test] - public void CompleteTest() - { - // TODO unit test for the property 'Complete' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs deleted file mode 100644 index 6dd51d6f49e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing OuterComposite - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OuterCompositeTests - { - // TODO uncomment below to declare an instance variable for OuterComposite - //private OuterComposite instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of OuterComposite - //instance = new OuterComposite(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of OuterComposite - /// - [Test] - public void OuterCompositeInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" OuterComposite - //Assert.IsInstanceOf(typeof(OuterComposite), instance); - } - - - /// - /// Test the property 'MyNumber' - /// - [Test] - public void MyNumberTest() - { - // TODO unit test for the property 'MyNumber' - } - /// - /// Test the property 'MyString' - /// - [Test] - public void MyStringTest() - { - // TODO unit test for the property 'MyString' - } - /// - /// Test the property 'MyBoolean' - /// - [Test] - public void MyBooleanTest() - { - // TODO unit test for the property 'MyBoolean' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs deleted file mode 100644 index eb7688835a0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing OuterEnum - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OuterEnumTests - { - // TODO uncomment below to declare an instance variable for OuterEnum - //private OuterEnum instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of OuterEnum - //instance = new OuterEnum(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of OuterEnum - /// - [Test] - public void OuterEnumInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" OuterEnum - //Assert.IsInstanceOf(typeof(OuterEnum), instance); - } - - - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/PetTests.cs deleted file mode 100644 index 37f2c09d2d3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/PetTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Pet - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class PetTests - { - // TODO uncomment below to declare an instance variable for Pet - //private Pet instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Pet - //instance = new Pet(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Pet - /// - [Test] - public void PetInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Pet - //Assert.IsInstanceOf(typeof(Pet), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Category' - /// - [Test] - public void CategoryTest() - { - // TODO unit test for the property 'Category' - } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'PhotoUrls' - /// - [Test] - public void PhotoUrlsTest() - { - // TODO unit test for the property 'PhotoUrls' - } - /// - /// Test the property 'Tags' - /// - [Test] - public void TagsTest() - { - // TODO unit test for the property 'Tags' - } - /// - /// Test the property 'Status' - /// - [Test] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs deleted file mode 100644 index c870caf786c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ReadOnlyFirst - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ReadOnlyFirstTests - { - // TODO uncomment below to declare an instance variable for ReadOnlyFirst - //private ReadOnlyFirst instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ReadOnlyFirst - //instance = new ReadOnlyFirst(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ReadOnlyFirst - /// - [Test] - public void ReadOnlyFirstInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ReadOnlyFirst - //Assert.IsInstanceOf(typeof(ReadOnlyFirst), instance); - } - - - /// - /// Test the property 'Bar' - /// - [Test] - public void BarTest() - { - // TODO unit test for the property 'Bar' - } - /// - /// Test the property 'Baz' - /// - [Test] - public void BazTest() - { - // TODO unit test for the property 'Baz' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ReturnTests.cs deleted file mode 100644 index e744ff4f711..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/ReturnTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Return - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ReturnTests - { - // TODO uncomment below to declare an instance variable for Return - //private Return instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Return - //instance = new Return(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Return - /// - [Test] - public void ReturnInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Return - //Assert.IsInstanceOf(typeof(Return), instance); - } - - - /// - /// Test the property '_Return' - /// - [Test] - public void _ReturnTest() - { - // TODO unit test for the property '_Return' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs deleted file mode 100644 index 274d9db265d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing SpecialModelName - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SpecialModelNameTests - { - // TODO uncomment below to declare an instance variable for SpecialModelName - //private SpecialModelName instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of SpecialModelName - //instance = new SpecialModelName(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of SpecialModelName - /// - [Test] - public void SpecialModelNameInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" SpecialModelName - //Assert.IsInstanceOf(typeof(SpecialModelName), instance); - } - - - /// - /// Test the property 'SpecialPropertyName' - /// - [Test] - public void SpecialPropertyNameTest() - { - // TODO unit test for the property 'SpecialPropertyName' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/TagTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/TagTests.cs deleted file mode 100644 index 22c9058e65d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/TagTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Tag - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TagTests - { - // TODO uncomment below to declare an instance variable for Tag - //private Tag instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Tag - //instance = new Tag(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Tag - /// - [Test] - public void TagInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Tag - //Assert.IsInstanceOf(typeof(Tag), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs deleted file mode 100644 index 18c3dc5d60e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs +++ /dev/null @@ -1,111 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing TypeHolderDefault - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TypeHolderDefaultTests - { - // TODO uncomment below to declare an instance variable for TypeHolderDefault - //private TypeHolderDefault instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of TypeHolderDefault - //instance = new TypeHolderDefault(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of TypeHolderDefault - /// - [Test] - public void TypeHolderDefaultInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" TypeHolderDefault - //Assert.IsInstanceOf(typeof(TypeHolderDefault), instance); - } - - - /// - /// Test the property 'StringItem' - /// - [Test] - public void StringItemTest() - { - // TODO unit test for the property 'StringItem' - } - /// - /// Test the property 'NumberItem' - /// - [Test] - public void NumberItemTest() - { - // TODO unit test for the property 'NumberItem' - } - /// - /// Test the property 'IntegerItem' - /// - [Test] - public void IntegerItemTest() - { - // TODO unit test for the property 'IntegerItem' - } - /// - /// Test the property 'BoolItem' - /// - [Test] - public void BoolItemTest() - { - // TODO unit test for the property 'BoolItem' - } - /// - /// Test the property 'ArrayItem' - /// - [Test] - public void ArrayItemTest() - { - // TODO unit test for the property 'ArrayItem' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs deleted file mode 100644 index b1e63784346..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing TypeHolderExample - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TypeHolderExampleTests - { - // TODO uncomment below to declare an instance variable for TypeHolderExample - //private TypeHolderExample instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of TypeHolderExample - //instance = new TypeHolderExample(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of TypeHolderExample - /// - [Test] - public void TypeHolderExampleInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" TypeHolderExample - //Assert.IsInstanceOf(typeof(TypeHolderExample), instance); - } - - - /// - /// Test the property 'StringItem' - /// - [Test] - public void StringItemTest() - { - // TODO unit test for the property 'StringItem' - } - /// - /// Test the property 'NumberItem' - /// - [Test] - public void NumberItemTest() - { - // TODO unit test for the property 'NumberItem' - } - /// - /// Test the property 'FloatItem' - /// - [Test] - public void FloatItemTest() - { - // TODO unit test for the property 'FloatItem' - } - /// - /// Test the property 'IntegerItem' - /// - [Test] - public void IntegerItemTest() - { - // TODO unit test for the property 'IntegerItem' - } - /// - /// Test the property 'BoolItem' - /// - [Test] - public void BoolItemTest() - { - // TODO unit test for the property 'BoolItem' - } - /// - /// Test the property 'ArrayItem' - /// - [Test] - public void ArrayItemTest() - { - // TODO unit test for the property 'ArrayItem' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/UserTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/UserTests.cs deleted file mode 100644 index 0f37935e9a2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/UserTests.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing User - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class UserTests - { - // TODO uncomment below to declare an instance variable for User - //private User instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of User - //instance = new User(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of User - /// - [Test] - public void UserInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" User - //Assert.IsInstanceOf(typeof(User), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Username' - /// - [Test] - public void UsernameTest() - { - // TODO unit test for the property 'Username' - } - /// - /// Test the property 'FirstName' - /// - [Test] - public void FirstNameTest() - { - // TODO unit test for the property 'FirstName' - } - /// - /// Test the property 'LastName' - /// - [Test] - public void LastNameTest() - { - // TODO unit test for the property 'LastName' - } - /// - /// Test the property 'Email' - /// - [Test] - public void EmailTest() - { - // TODO unit test for the property 'Email' - } - /// - /// Test the property 'Password' - /// - [Test] - public void PasswordTest() - { - // TODO unit test for the property 'Password' - } - /// - /// Test the property 'Phone' - /// - [Test] - public void PhoneTest() - { - // TODO unit test for the property 'Phone' - } - /// - /// Test the property 'UserStatus' - /// - [Test] - public void UserStatusTest() - { - // TODO unit test for the property 'UserStatus' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs deleted file mode 100644 index 5ab42bab1c6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs +++ /dev/null @@ -1,303 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing XmlItem - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class XmlItemTests - { - // TODO uncomment below to declare an instance variable for XmlItem - //private XmlItem instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of XmlItem - //instance = new XmlItem(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of XmlItem - /// - [Test] - public void XmlItemInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" XmlItem - //Assert.IsInstanceOf(typeof(XmlItem), instance); - } - - - /// - /// Test the property 'AttributeString' - /// - [Test] - public void AttributeStringTest() - { - // TODO unit test for the property 'AttributeString' - } - /// - /// Test the property 'AttributeNumber' - /// - [Test] - public void AttributeNumberTest() - { - // TODO unit test for the property 'AttributeNumber' - } - /// - /// Test the property 'AttributeInteger' - /// - [Test] - public void AttributeIntegerTest() - { - // TODO unit test for the property 'AttributeInteger' - } - /// - /// Test the property 'AttributeBoolean' - /// - [Test] - public void AttributeBooleanTest() - { - // TODO unit test for the property 'AttributeBoolean' - } - /// - /// Test the property 'WrappedArray' - /// - [Test] - public void WrappedArrayTest() - { - // TODO unit test for the property 'WrappedArray' - } - /// - /// Test the property 'NameString' - /// - [Test] - public void NameStringTest() - { - // TODO unit test for the property 'NameString' - } - /// - /// Test the property 'NameNumber' - /// - [Test] - public void NameNumberTest() - { - // TODO unit test for the property 'NameNumber' - } - /// - /// Test the property 'NameInteger' - /// - [Test] - public void NameIntegerTest() - { - // TODO unit test for the property 'NameInteger' - } - /// - /// Test the property 'NameBoolean' - /// - [Test] - public void NameBooleanTest() - { - // TODO unit test for the property 'NameBoolean' - } - /// - /// Test the property 'NameArray' - /// - [Test] - public void NameArrayTest() - { - // TODO unit test for the property 'NameArray' - } - /// - /// Test the property 'NameWrappedArray' - /// - [Test] - public void NameWrappedArrayTest() - { - // TODO unit test for the property 'NameWrappedArray' - } - /// - /// Test the property 'PrefixString' - /// - [Test] - public void PrefixStringTest() - { - // TODO unit test for the property 'PrefixString' - } - /// - /// Test the property 'PrefixNumber' - /// - [Test] - public void PrefixNumberTest() - { - // TODO unit test for the property 'PrefixNumber' - } - /// - /// Test the property 'PrefixInteger' - /// - [Test] - public void PrefixIntegerTest() - { - // TODO unit test for the property 'PrefixInteger' - } - /// - /// Test the property 'PrefixBoolean' - /// - [Test] - public void PrefixBooleanTest() - { - // TODO unit test for the property 'PrefixBoolean' - } - /// - /// Test the property 'PrefixArray' - /// - [Test] - public void PrefixArrayTest() - { - // TODO unit test for the property 'PrefixArray' - } - /// - /// Test the property 'PrefixWrappedArray' - /// - [Test] - public void PrefixWrappedArrayTest() - { - // TODO unit test for the property 'PrefixWrappedArray' - } - /// - /// Test the property 'NamespaceString' - /// - [Test] - public void NamespaceStringTest() - { - // TODO unit test for the property 'NamespaceString' - } - /// - /// Test the property 'NamespaceNumber' - /// - [Test] - public void NamespaceNumberTest() - { - // TODO unit test for the property 'NamespaceNumber' - } - /// - /// Test the property 'NamespaceInteger' - /// - [Test] - public void NamespaceIntegerTest() - { - // TODO unit test for the property 'NamespaceInteger' - } - /// - /// Test the property 'NamespaceBoolean' - /// - [Test] - public void NamespaceBooleanTest() - { - // TODO unit test for the property 'NamespaceBoolean' - } - /// - /// Test the property 'NamespaceArray' - /// - [Test] - public void NamespaceArrayTest() - { - // TODO unit test for the property 'NamespaceArray' - } - /// - /// Test the property 'NamespaceWrappedArray' - /// - [Test] - public void NamespaceWrappedArrayTest() - { - // TODO unit test for the property 'NamespaceWrappedArray' - } - /// - /// Test the property 'PrefixNsString' - /// - [Test] - public void PrefixNsStringTest() - { - // TODO unit test for the property 'PrefixNsString' - } - /// - /// Test the property 'PrefixNsNumber' - /// - [Test] - public void PrefixNsNumberTest() - { - // TODO unit test for the property 'PrefixNsNumber' - } - /// - /// Test the property 'PrefixNsInteger' - /// - [Test] - public void PrefixNsIntegerTest() - { - // TODO unit test for the property 'PrefixNsInteger' - } - /// - /// Test the property 'PrefixNsBoolean' - /// - [Test] - public void PrefixNsBooleanTest() - { - // TODO unit test for the property 'PrefixNsBoolean' - } - /// - /// Test the property 'PrefixNsArray' - /// - [Test] - public void PrefixNsArrayTest() - { - // TODO unit test for the property 'PrefixNsArray' - } - /// - /// Test the property 'PrefixNsWrappedArray' - /// - [Test] - public void PrefixNsWrappedArrayTest() - { - // TODO unit test for the property 'PrefixNsWrappedArray' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj deleted file mode 100644 index 41afd0c9247..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ /dev/null @@ -1,89 +0,0 @@ - - - - - Debug - AnyCPU - {19F1DEBC-DE5E-4517-8062-F000CD499087} - Library - Properties - Org.OpenAPITools.Test - Org.OpenAPITools.Test - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\JsonSubTypes.1.6.0\lib\net40\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.6.0\lib\net40\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.6.0\lib\net40\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.6.0\lib\net40\JsonSubTypes.dll - - - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net4\RestSharp.dll - - - $(SolutionDir)\packages\NUnit.3.11.0\lib\net40\nunit.framework.dll - ..\packages\NUnit.3.11.0\lib\net40\nunit.framework.dll - ..\..\packages\NUnit.3.11.0\lib\net40\nunit.framework.dll - ..\..\vendor\NUnit.3.11.0\lib\net40\nunit.framework.dll - - - - - - - - - - - - {321C8C3F-0156-40C1-AE42-D59761FB9B6C} - Org.OpenAPITools - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/packages.config deleted file mode 100644 index d608f2758ce..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools.Test/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/AnotherFakeApi.cs deleted file mode 100644 index 2eeceb3765a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ /dev/null @@ -1,235 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IAnotherFakeApi : IApiAccessor - { - #region Synchronous Operations - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient Call123TestSpecialTags (ModelClient body); - - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse Call123TestSpecialTagsWithHttpInfo (ModelClient body); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class AnotherFakeApi : IAnotherFakeApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public AnotherFakeApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public AnotherFakeApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public AnotherFakeApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient Call123TestSpecialTags (ModelClient body) - { - ApiResponse localVarResponse = Call123TestSpecialTagsWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse Call123TestSpecialTagsWithHttpInfo (ModelClient body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->Call123TestSpecialTags"); - - var localVarPath = "/another-fake/dummy"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Call123TestSpecialTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeApi.cs deleted file mode 100644 index d4ea2c2e6d3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeApi.cs +++ /dev/null @@ -1,1595 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IFakeApi : IApiAccessor - { - #region Synchronous Operations - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// - void CreateXmlItem (XmlItem xmlItem); - - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// ApiResponse of Object(void) - ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem); - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// bool - bool FakeOuterBooleanSerialize (bool? body = default(bool?)); - - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)); - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// OuterComposite - OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)); - - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)); - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// decimal - decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)); - - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)); - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// string - string FakeOuterStringSerialize (string body = default(string)); - - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)); - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// - void TestBodyWithFileSchema (FileSchemaTestClass body); - - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass body); - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void TestBodyWithQueryParams (string query, User body); - - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, User body); - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient TestClientModel (ModelClient body); - - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse TestClientModelWithHttpInfo (ModelClient body); - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// - void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), 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 test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// - void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); - - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// - void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); - - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// - void TestInlineAdditionalProperties (Dictionary param); - - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// ApiResponse of Object(void) - ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Dictionary param); - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// - void TestJsonFormData (string param, string param2); - - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// ApiResponse of Object(void) - ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2); - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context); - - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class FakeApi : IFakeApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public FakeApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public FakeApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public FakeApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// - public void CreateXmlItem (XmlItem xmlItem) - { - CreateXmlItemWithHttpInfo(xmlItem); - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// ApiResponse of Object(void) - public ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem) - { - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) - throw new ApiException(400, "Missing required parameter 'xmlItem' when calling FakeApi->CreateXmlItem"); - - var localVarPath = "/fake/create_xml_item"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/xml", - "application/xml; charset=utf-8", - "application/xml; charset=utf-16", - "text/xml", - "text/xml; charset=utf-8", - "text/xml; charset=utf-16" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (xmlItem != null && xmlItem.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(xmlItem); // http body (model) parameter - } - else - { - localVarPostBody = xmlItem; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateXmlItem", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// bool - public bool FakeOuterBooleanSerialize (bool? body = default(bool?)) - { - ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// ApiResponse of bool - public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)) - { - - var localVarPath = "/fake/outer/boolean"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (bool) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(bool))); - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)) - { - ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// ApiResponse of OuterComposite - public ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)) - { - - var localVarPath = "/fake/outer/composite"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (OuterComposite) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite))); - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// decimal - public decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)) - { - ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// ApiResponse of decimal - public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)) - { - - var localVarPath = "/fake/outer/number"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (decimal) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(decimal))); - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// string - public string FakeOuterStringSerialize (string body = default(string)) - { - ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// ApiResponse of string - public ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)) - { - - var localVarPath = "/fake/outer/string"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// - public void TestBodyWithFileSchema (FileSchemaTestClass body) - { - TestBodyWithFileSchemaWithHttpInfo(body); - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithFileSchema"); - - var localVarPath = "/fake/body-with-file-schema"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithFileSchema", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - public void TestBodyWithQueryParams (string query, User body) - { - TestBodyWithQueryParamsWithHttpInfo(query, body); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - public ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, User body) - { - // verify the required parameter 'query' is set - if (query == null) - throw new ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams"); - - var localVarPath = "/fake/body-with-query-params"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithQueryParams", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient TestClientModel (ModelClient body) - { - ApiResponse localVarResponse = TestClientModelWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse TestClientModelWithHttpInfo (ModelClient body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClientModel", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// - public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) - { - TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) - { - // verify the required parameter 'number' is set - if (number == null) - throw new ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_double' is set - if (_double == null) - throw new ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'patternWithoutDelimiter' is set - if (patternWithoutDelimiter == null) - throw new ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_byte' is set - if (_byte == null) - throw new ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (integer != null) localVarFormParams.Add("integer", this.Configuration.ApiClient.ParameterToString(integer)); // form parameter - if (int32 != null) localVarFormParams.Add("int32", this.Configuration.ApiClient.ParameterToString(int32)); // form parameter - if (int64 != null) localVarFormParams.Add("int64", this.Configuration.ApiClient.ParameterToString(int64)); // form parameter - if (number != null) localVarFormParams.Add("number", this.Configuration.ApiClient.ParameterToString(number)); // form parameter - if (_float != null) localVarFormParams.Add("float", this.Configuration.ApiClient.ParameterToString(_float)); // form parameter - if (_double != null) localVarFormParams.Add("double", this.Configuration.ApiClient.ParameterToString(_double)); // form parameter - if (_string != null) localVarFormParams.Add("string", this.Configuration.ApiClient.ParameterToString(_string)); // form parameter - if (patternWithoutDelimiter != null) localVarFormParams.Add("pattern_without_delimiter", this.Configuration.ApiClient.ParameterToString(patternWithoutDelimiter)); // form parameter - if (_byte != null) localVarFormParams.Add("byte", this.Configuration.ApiClient.ParameterToString(_byte)); // form parameter - if (binary != null) localVarFileParams.Add("binary", this.Configuration.ApiClient.ParameterToFile("binary", binary)); - if (date != null) localVarFormParams.Add("date", this.Configuration.ApiClient.ParameterToString(date)); // form parameter - if (dateTime != null) localVarFormParams.Add("dateTime", this.Configuration.ApiClient.ParameterToString(dateTime)); // form parameter - if (password != null) localVarFormParams.Add("password", this.Configuration.ApiClient.ParameterToString(password)); // form parameter - if (callback != null) localVarFormParams.Add("callback", this.Configuration.ApiClient.ParameterToString(callback)); // form parameter - - // authentication (http_basic_test) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestEndpointParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// - public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) - { - TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// ApiResponse of Object(void) - public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) - { - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter - if (enumQueryString != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_string", enumQueryString)); // query parameter - if (enumQueryInteger != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_integer", enumQueryInteger)); // query parameter - if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter - if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter - if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter - if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter - if (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter - - - // 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("TestEnumParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// - public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) - { - TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// ApiResponse of Object(void) - public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) - { - // verify the required parameter 'requiredStringGroup' is set - if (requiredStringGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredBooleanGroup' is set - if (requiredBooleanGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredInt64Group' is set - if (requiredInt64Group == null) - throw new ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (requiredStringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_string_group", requiredStringGroup)); // query parameter - if (requiredInt64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_int64_group", requiredInt64Group)); // query parameter - if (stringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "string_group", stringGroup)); // query parameter - if (int64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "int64_group", int64Group)); // query parameter - if (requiredBooleanGroup != null) localVarHeaderParams.Add("required_boolean_group", this.Configuration.ApiClient.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) localVarHeaderParams.Add("boolean_group", this.Configuration.ApiClient.ParameterToString(booleanGroup)); // header parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestGroupParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// - public void TestInlineAdditionalProperties (Dictionary param) - { - TestInlineAdditionalPropertiesWithHttpInfo(param); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// ApiResponse of Object(void) - public ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Dictionary param) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties"); - - var localVarPath = "/fake/inline-additionalProperties"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null && param.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(param); // http body (model) parameter - } - else - { - localVarPostBody = param; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// - public void TestJsonFormData (string param, string param2) - { - TestJsonFormDataWithHttpInfo(param, param2); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// ApiResponse of Object(void) - public ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - // verify the required parameter 'param2' is set - if (param2 == null) - throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - - var localVarPath = "/fake/jsonFormData"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null) localVarFormParams.Add("param", this.Configuration.ApiClient.ParameterToString(param)); // form parameter - if (param2 != null) localVarFormParams.Add("param2", this.Configuration.ApiClient.ParameterToString(param2)); // form parameter - - - // 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("TestJsonFormData", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - public void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) - { - TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// ApiResponse of Object(void) - public ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context) - { - // verify the required parameter 'pipe' is set - if (pipe == null) - throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'ioutil' is set - if (ioutil == null) - throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'http' is set - if (http == null) - throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'url' is set - if (url == null) - throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'context' is set - if (context == null) - throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - - var localVarPath = "/fake/test-query-parameters"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter - if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter - if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("ssv", "http", http)); // query parameter - if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter - if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs deleted file mode 100644 index 299f277e874..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ /dev/null @@ -1,240 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IFakeClassnameTags123Api : IApiAccessor - { - #region Synchronous Operations - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient TestClassname (ModelClient body); - - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse TestClassnameWithHttpInfo (ModelClient body); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public FakeClassnameTags123Api(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public FakeClassnameTags123Api() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public FakeClassnameTags123Api(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient TestClassname (ModelClient body) - { - ApiResponse localVarResponse = TestClassnameWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse TestClassnameWithHttpInfo (ModelClient body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname"); - - var localVarPath = "/fake_classname_test"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (api_key_query) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClassname", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/PetApi.cs deleted file mode 100644 index 07a049f28c8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/PetApi.cs +++ /dev/null @@ -1,1034 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IPetApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - void AddPet (Pet body); - - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - ApiResponse AddPetWithHttpInfo (Pet body); - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// - void DeletePet (long petId, string apiKey = default(string)); - - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)); - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// List<Pet> - List FindPetsByStatus (List status); - - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// ApiResponse of List<Pet> - ApiResponse> FindPetsByStatusWithHttpInfo (List status); - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// List<Pet> - [Obsolete] - List FindPetsByTags (List tags); - - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// ApiResponse of List<Pet> - [Obsolete] - ApiResponse> FindPetsByTagsWithHttpInfo (List tags); - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Pet - Pet GetPetById (long petId); - - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// ApiResponse of Pet - ApiResponse GetPetByIdWithHttpInfo (long petId); - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - void UpdatePet (Pet body); - - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - ApiResponse UpdatePetWithHttpInfo (Pet body); - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)); - - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); - - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class PetApi : IPetApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public PetApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public PetApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public PetApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - public void AddPet (Pet body) - { - AddPetWithHttpInfo(body); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - public ApiResponse AddPetWithHttpInfo (Pet body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet"); - - var localVarPath = "/pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("AddPet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// - public void DeletePet (long petId, string apiKey = default(string)) - { - DeletePetWithHttpInfo(petId, apiKey); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (apiKey != null) localVarHeaderParams.Add("api_key", this.Configuration.ApiClient.ParameterToString(apiKey)); // header parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeletePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// List<Pet> - public List FindPetsByStatus (List status) - { - ApiResponse> localVarResponse = FindPetsByStatusWithHttpInfo(status); - return localVarResponse.Data; - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// ApiResponse of List<Pet> - public ApiResponse> FindPetsByStatusWithHttpInfo (List status) - { - // verify the required parameter 'status' is set - if (status == null) - throw new ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - - var localVarPath = "/pet/findByStatus"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "status", status)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // 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("FindPetsByStatus", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// List<Pet> - [Obsolete] - public List FindPetsByTags (List tags) - { - ApiResponse> localVarResponse = FindPetsByTagsWithHttpInfo(tags); - return localVarResponse.Data; - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// ApiResponse of List<Pet> - [Obsolete] - public ApiResponse> FindPetsByTagsWithHttpInfo (List tags) - { - // verify the required parameter 'tags' is set - if (tags == null) - throw new ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - - var localVarPath = "/pet/findByTags"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (tags != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "tags", tags)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // 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("FindPetsByTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Pet - public Pet GetPetById (long petId) - { - ApiResponse localVarResponse = GetPetByIdWithHttpInfo(petId); - return localVarResponse.Data; - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// ApiResponse of Pet - public ApiResponse GetPetByIdWithHttpInfo (long petId) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // 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("GetPetById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Pet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet))); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - public void UpdatePet (Pet body) - { - UpdatePetWithHttpInfo(body); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - public ApiResponse UpdatePetWithHttpInfo (Pet body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet"); - - var localVarPath = "/pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - public void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)) - { - UpdatePetWithFormWithHttpInfo(petId, name, status); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// ApiResponse of Object(void) - public ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (name != null) localVarFormParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // form parameter - if (status != null) localVarFormParams.Add("status", this.Configuration.ApiClient.ParameterToString(status)); // form parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePetWithForm", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - public ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) - { - ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); - return localVarResponse.Data; - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse of ApiResponse - public ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - - var localVarPath = "/pet/{petId}/uploadImage"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) - { - ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); - return localVarResponse.Data; - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - public ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'requiredFile' is set - if (requiredFile == null) - throw new ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (requiredFile != null) localVarFileParams.Add("requiredFile", this.Configuration.ApiClient.ParameterToFile("requiredFile", requiredFile)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/StoreApi.cs deleted file mode 100644 index a8b3b38b021..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/StoreApi.cs +++ /dev/null @@ -1,492 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IStoreApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// - void DeleteOrder (string orderId); - - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// ApiResponse of Object(void) - ApiResponse DeleteOrderWithHttpInfo (string orderId); - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Dictionary<string, int> - Dictionary GetInventory (); - - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, int> - ApiResponse> GetInventoryWithHttpInfo (); - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Order - Order GetOrderById (long orderId); - - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// ApiResponse of Order - ApiResponse GetOrderByIdWithHttpInfo (long orderId); - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Order - Order PlaceOrder (Order body); - - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// ApiResponse of Order - ApiResponse PlaceOrderWithHttpInfo (Order body); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class StoreApi : IStoreApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public StoreApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public StoreApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public StoreApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// - public void DeleteOrder (string orderId) - { - DeleteOrderWithHttpInfo(orderId); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// ApiResponse of Object(void) - public ApiResponse DeleteOrderWithHttpInfo (string orderId) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - - var localVarPath = "/store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Dictionary<string, int> - public Dictionary GetInventory () - { - ApiResponse> localVarResponse = GetInventoryWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, int> - public ApiResponse> GetInventoryWithHttpInfo () - { - - var localVarPath = "/store/inventory"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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); - - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // 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("GetInventory", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Order - public Order GetOrderById (long orderId) - { - ApiResponse localVarResponse = GetOrderByIdWithHttpInfo(orderId); - return localVarResponse.Data; - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// ApiResponse of Order - public ApiResponse GetOrderByIdWithHttpInfo (long orderId) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - - var localVarPath = "/store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // 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("GetOrderById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Order - public Order PlaceOrder (Order body) - { - ApiResponse localVarResponse = PlaceOrderWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// ApiResponse of Order - public ApiResponse PlaceOrderWithHttpInfo (Order body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder"); - - var localVarPath = "/store/order"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("PlaceOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/UserApi.cs deleted file mode 100644 index aff00bb3267..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Api/UserApi.cs +++ /dev/null @@ -1,862 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IUserApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// - void CreateUser (User body); - - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// ApiResponse of Object(void) - ApiResponse CreateUserWithHttpInfo (User body); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// - void CreateUsersWithArrayInput (List body); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - ApiResponse CreateUsersWithArrayInputWithHttpInfo (List body); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// - void CreateUsersWithListInput (List body); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - ApiResponse CreateUsersWithListInputWithHttpInfo (List body); - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// - void DeleteUser (string username); - - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// ApiResponse of Object(void) - ApiResponse DeleteUserWithHttpInfo (string username); - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// User - User GetUserByName (string username); - - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// ApiResponse of User - ApiResponse GetUserByNameWithHttpInfo (string username); - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// string - string LoginUser (string username, string password); - - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// ApiResponse of string - ApiResponse LoginUserWithHttpInfo (string username, string password); - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - void LogoutUser (); - - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - ApiResponse LogoutUserWithHttpInfo (); - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// - void UpdateUser (string username, User body); - - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// ApiResponse of Object(void) - ApiResponse UpdateUserWithHttpInfo (string username, User body); - #endregion Synchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class UserApi : IUserApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public UserApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public UserApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public UserApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// - public void CreateUser (User body) - { - CreateUserWithHttpInfo(body); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// ApiResponse of Object(void) - public ApiResponse CreateUserWithHttpInfo (User body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser"); - - var localVarPath = "/user"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// - public void CreateUsersWithArrayInput (List body) - { - CreateUsersWithArrayInputWithHttpInfo(body); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - public ApiResponse CreateUsersWithArrayInputWithHttpInfo (List body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput"); - - var localVarPath = "/user/createWithArray"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithArrayInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// - public void CreateUsersWithListInput (List body) - { - CreateUsersWithListInputWithHttpInfo(body); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - public ApiResponse CreateUsersWithListInputWithHttpInfo (List body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput"); - - var localVarPath = "/user/createWithList"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithListInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// - public void DeleteUser (string username) - { - DeleteUserWithHttpInfo(username); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// ApiResponse of Object(void) - public ApiResponse DeleteUserWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// User - public User GetUserByName (string username) - { - ApiResponse localVarResponse = GetUserByNameWithHttpInfo(username); - return localVarResponse.Data; - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// ApiResponse of User - public ApiResponse GetUserByNameWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // 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("GetUserByName", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User))); - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// string - public string LoginUser (string username, string password) - { - ApiResponse localVarResponse = LoginUserWithHttpInfo(username, password); - return localVarResponse.Data; - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// ApiResponse of string - public ApiResponse LoginUserWithHttpInfo (string username, string password) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - // verify the required parameter 'password' is set - if (password == null) - throw new ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - - var localVarPath = "/user/login"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "username", username)); // query parameter - if (password != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "password", password)); // query parameter - - - // 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("LoginUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// - public void LogoutUser () - { - LogoutUserWithHttpInfo(); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - public ApiResponse LogoutUserWithHttpInfo () - { - - var localVarPath = "/user/logout"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - 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("LogoutUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// - public void UpdateUser (string username, User body) - { - UpdateUserWithHttpInfo(username, body); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// ApiResponse of Object(void) - public ApiResponse UpdateUserWithHttpInfo (string username, User body) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiClient.cs deleted file mode 100644 index 8816f4fffc0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiClient.cs +++ /dev/null @@ -1,508 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Text.RegularExpressions; -using System.IO; -using System.Threading; -using System.Web; -using System.Linq; -using System.Net; -using System.Text; -using Newtonsoft.Json; -using RestSharp; - -namespace Org.OpenAPITools.Client -{ - /// - /// API client is mainly responsible for making the HTTP call to the API backend. - /// - public partial class ApiClient - { - private JsonSerializerSettings serializerSettings = new JsonSerializerSettings - { - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor - }; - - /// - /// Allows for extending request processing for generated code. - /// - /// The RestSharp request object - partial void InterceptRequest(IRestRequest request); - - /// - /// Allows for extending response processing for generated code. - /// - /// The RestSharp request object - /// The RestSharp response object - partial void InterceptResponse(IRestRequest request, IRestResponse response); - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - public ApiClient() - { - Configuration = Org.OpenAPITools.Client.Configuration.Default; - RestClient = new RestClient("http://petstore.swagger.io:80/v2"); - } - - /// - /// Initializes a new instance of the class - /// with default base path (http://petstore.swagger.io:80/v2). - /// - /// An instance of Configuration. - public ApiClient(Configuration config) - { - Configuration = config ?? Org.OpenAPITools.Client.Configuration.Default; - - RestClient = new RestClient(Configuration.BasePath); - } - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - /// The base path. - public ApiClient(String basePath = "http://petstore.swagger.io:80/v2") - { - if (String.IsNullOrEmpty(basePath)) - throw new ArgumentException("basePath cannot be empty"); - - RestClient = new RestClient(basePath); - Configuration = Client.Configuration.Default; - } - - /// - /// Gets or sets the default API client for making HTTP calls. - /// - /// The default API client. - [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] - public static ApiClient Default; - - /// - /// Gets or sets an instance of the IReadableConfiguration. - /// - /// An instance of the IReadableConfiguration. - /// - /// helps us to avoid modifying possibly global - /// configuration values from within a given client. It does not guarantee thread-safety - /// of the instance in any way. - /// - public IReadableConfiguration Configuration { get; set; } - - /// - /// Gets or sets the RestClient. - /// - /// An instance of the RestClient - public RestClient RestClient { get; set; } - - // Creates and sets up a RestRequest prior to a call. - private RestRequest PrepareRequest( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = new RestRequest(path, method); - - // add path parameter, if any - foreach(var param in pathParams) - request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); - - // add header parameter, if any - foreach(var param in headerParams) - request.AddHeader(param.Key, param.Value); - - // add query parameter, if any - foreach(var param in queryParams) - request.AddQueryParameter(param.Key, param.Value); - - // add form parameter, if any - foreach(var param in formParams) - request.AddParameter(param.Key, param.Value); - - // add file parameter, if any - foreach(var param in fileParams) - { - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); - } - - if (postBody != null) // http body (model or byte[]) parameter - { - request.AddParameter(contentType, postBody, ParameterType.RequestBody); - } - - return request; - } - - /// - /// Makes the HTTP request (Sync). - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content Type of the request - /// Object - public Object CallApi( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - - // set timeout - - RestClient.Timeout = Configuration.Timeout; - // set user agent - RestClient.UserAgent = Configuration.UserAgent; - - InterceptRequest(request); - var response = RestClient.Execute(request); - InterceptResponse(request, response); - - return (Object) response; - } - - - /// - /// Escape string (url-encoded). - /// - /// String to be escaped. - /// Escaped string. - public string EscapeString(string str) - { - return UrlEncode(str); - } - - /// - /// Create FileParameter based on Stream. - /// - /// Parameter name. - /// Input stream. - /// FileParameter. - public FileParameter ParameterToFile(string name, Stream stream) - { - if (stream is FileStream) - return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); - else - return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// Formatted string. - public string ParameterToString(object obj) - { - if (obj is DateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTime)obj).ToString (Configuration.DateTimeFormat); - else if (obj is DateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); - else if (obj is bool) - return (bool)obj ? "true" : "false"; - else if (obj is IList) - { - var flattenedString = new StringBuilder(); - foreach (var param in (IList)obj) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } - else - return Convert.ToString (obj); - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The HTTP response. - /// Object type. - /// Object representation of the JSON string. - public object Deserialize(IRestResponse response, Type type) - { - IList headers = response.Headers; - if (type == typeof(byte[])) // return byte array - { - return response.RawBytes; - } - - // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) - if (type == typeof(Stream)) - { - if (headers != null) - { - var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) - ? Path.GetTempPath() - : Configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); - foreach (var header in headers) - { - var match = regex.Match(header.ToString()); - if (match.Success) - { - string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); - } - } - } - var stream = new MemoryStream(response.RawBytes); - return stream; - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return ConvertType(response.Content, type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Serialize an input (model) into JSON string - /// - /// Object. - /// JSON string. - public String Serialize(object obj) - { - try - { - return obj != null ? JsonConvert.SerializeObject(obj) : null; - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - ///Check if the given MIME is a JSON MIME. - ///JSON MIME examples: - /// application/json - /// application/json; charset=UTF8 - /// APPLICATION/JSON - /// application/vnd.company+json - /// - /// MIME - /// Returns True if MIME type is json. - public bool IsJsonMime(String mime) - { - var jsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); - return mime != null && (jsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json")); - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON type exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public String SelectHeaderContentType(String[] contentTypes) - { - if (contentTypes.Length == 0) - return "application/json"; - - foreach (var contentType in contentTypes) - { - if (IsJsonMime(contentType.ToLower())) - return contentType; - } - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public String SelectHeaderAccept(String[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return String.Join(",", accepts); - } - - /// - /// Encode string in base64 format. - /// - /// String to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Dynamically cast the object into target type. - /// - /// Object to be casted - /// Target type - /// Casted object - public static object ConvertType(T fromObject, Type toObject) where T : class - { - return Convert.ChangeType(fromObject, toObject); - } - - /// - /// Convert stream to byte array - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream inputStream) - { - byte[] buf = new byte[16*1024]; - using (MemoryStream ms = new MemoryStream()) - { - int count; - while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) - { - ms.Write(buf, 0, count); - } - return ms.ToArray(); - } - } - - /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 - /// - /// String to be URL encoded - /// Byte array - public static string UrlEncode(string input) - { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); - } - - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - - if (match.Success) - { - return match.Groups[1].Value; - } - else - { - return filename; - } - } - - /// - /// Convert params to key/value pairs. - /// Use collectionFormat to properly format lists and collections. - /// - /// Collection format. - /// Key name. - /// Value object. - /// A list of KeyValuePairs - public IEnumerable> ParameterToKeyValuePairs(string collectionFormat, string name, object value) - { - var parameters = new List>(); - - if (IsCollection(value) && collectionFormat == "multi") - { - var valueCollection = value as IEnumerable; - parameters.AddRange(from object item in valueCollection select new KeyValuePair(name, ParameterToString(item))); - } - else - { - parameters.Add(new KeyValuePair(name, ParameterToString(value))); - } - - return parameters; - } - - /// - /// Check if generic object is a collection. - /// - /// - /// True if object is a collection type - private static bool IsCollection(object value) - { - return value is IList || value is ICollection; - } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiException.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiException.cs deleted file mode 100644 index 31d7a6c635c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiException.cs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; - -namespace Org.OpenAPITools.Client -{ - /// - /// API Exception - /// - public class ApiException : Exception - { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public object ErrorContent { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() {} - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) - { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - public ApiException(int errorCode, string message, object errorContent = null) : base(message) - { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiResponse.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiResponse.cs deleted file mode 100644 index 4b462cf5424..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ApiResponse.cs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; - -namespace Org.OpenAPITools.Client -{ - /// - /// API Response - /// - public class ApiResponse - { - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - public int StatusCode { get; private set; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public IDictionary Headers { get; private set; } - - /// - /// Gets or sets the data (parsed HTTP body) - /// - /// The data. - public T Data { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - public ApiResponse(int statusCode, IDictionary headers, T data) - { - this.StatusCode= statusCode; - this.Headers = headers; - this.Data = data; - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/Configuration.cs deleted file mode 100644 index 926007e22ca..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/Configuration.cs +++ /dev/null @@ -1,452 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Reflection; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents a set of configuration settings - /// - public class Configuration : IReadableConfiguration - { - #region Constants - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "1.0.0"; - - /// - /// Identifier for ISO 8601 DateTime Format - /// - /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. - // ReSharper disable once InconsistentNaming - public const string ISO8601_DATETIME_FORMAT = "o"; - - #endregion Constants - - #region Static Members - - private static readonly object GlobalConfigSync = new { }; - private static Configuration _globalConfiguration; - - /// - /// Default creation of exceptions for a given method name and response object - /// - public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => - { - var status = (int)response.StatusCode; - if (status >= 400) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.Content), - response.Content); - } - if (status == 0) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage); - } - return null; - }; - - /// - /// Gets or sets the default Configuration. - /// - /// Configuration. - public static Configuration Default - { - get { return _globalConfiguration; } - set - { - lock (GlobalConfigSync) - { - _globalConfiguration = value; - } - } - } - - #endregion Static Members - - #region Private Members - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - private IDictionary _apiKey = null; - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - private IDictionary _apiKeyPrefix = null; - - private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - private string _tempFolderPath = Path.GetTempPath(); - - #endregion Private Members - - #region Constructors - - static Configuration() - { - _globalConfiguration = new GlobalConfiguration(); - } - - /// - /// Initializes a new instance of the class - /// - public Configuration() - { - UserAgent = "OpenAPI-Generator/1.0.0/csharp"; - BasePath = "http://petstore.swagger.io:80/v2"; - DefaultHeader = new ConcurrentDictionary(); - ApiKey = new ConcurrentDictionary(); - ApiKeyPrefix = new ConcurrentDictionary(); - - // Setting Timeout has side effects (forces ApiClient creation). - Timeout = 100000; - } - - /// - /// Initializes a new instance of the class - /// - public Configuration( - IDictionary defaultHeader, - IDictionary apiKey, - IDictionary apiKeyPrefix, - string basePath = "http://petstore.swagger.io:80/v2") : this() - { - if (string.IsNullOrWhiteSpace(basePath)) - throw new ArgumentException("The provided basePath is invalid.", "basePath"); - if (defaultHeader == null) - throw new ArgumentNullException("defaultHeader"); - if (apiKey == null) - throw new ArgumentNullException("apiKey"); - if (apiKeyPrefix == null) - throw new ArgumentNullException("apiKeyPrefix"); - - BasePath = basePath; - - foreach (var keyValuePair in defaultHeader) - { - DefaultHeader.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKey) - { - ApiKey.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKeyPrefix) - { - ApiKeyPrefix.Add(keyValuePair); - } - } - - /// - /// Initializes a new instance of the class with different settings - /// - /// Api client - /// Dictionary of default HTTP header - /// Username - /// Password - /// accessToken - /// Dictionary of API key - /// Dictionary of API key prefix - /// Temp folder path - /// DateTime format string - /// HTTP connection timeout (in milliseconds) - /// HTTP user agent - [Obsolete("Use explicit object construction and setting of properties.", true)] - public Configuration( - // ReSharper disable UnusedParameter.Local - ApiClient apiClient = null, - IDictionary defaultHeader = null, - string username = null, - string password = null, - string accessToken = null, - IDictionary apiKey = null, - IDictionary apiKeyPrefix = null, - string tempFolderPath = null, - string dateTimeFormat = null, - int timeout = 100000, - string userAgent = "OpenAPI-Generator/1.0.0/csharp" - // ReSharper restore UnusedParameter.Local - ) - { - - } - - /// - /// Initializes a new instance of the Configuration class. - /// - /// Api client. - [Obsolete("This constructor caused unexpected sharing of static data. It is no longer supported.", true)] - // ReSharper disable once UnusedParameter.Local - public Configuration(ApiClient apiClient) - { - - } - - #endregion Constructors - - - #region Properties - - private ApiClient _apiClient = null; - /// - /// Gets an instance of an ApiClient for this configuration - /// - public virtual ApiClient ApiClient - { - get - { - if (_apiClient == null) _apiClient = CreateApiClient(); - return _apiClient; - } - } - - private String _basePath = null; - /// - /// Gets or sets the base path for API access. - /// - public virtual string BasePath { - get { return _basePath; } - set { - _basePath = value; - // pass-through to ApiClient if it's set. - if(_apiClient != null) { - _apiClient.RestClient.BaseUrl = new Uri(_basePath); - } - } - } - - /// - /// Gets or sets the default header. - /// - public virtual IDictionary DefaultHeader { get; set; } - - /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. - /// - public virtual int Timeout - { - - get { return ApiClient.RestClient.Timeout; } - set { ApiClient.RestClient.Timeout = value; } - } - - /// - /// Gets or sets the HTTP user agent. - /// - /// Http user agent. - public virtual string UserAgent { get; set; } - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public virtual string Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public virtual string Password { get; set; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix(string apiKeyIdentifier) - { - var apiKeyValue = ""; - ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); - var apiKeyPrefix = ""; - if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) - return apiKeyPrefix + " " + apiKeyValue; - else - return apiKeyValue; - } - - /// - /// Gets or sets the access token for OAuth2 authentication. - /// - /// The access token. - public virtual string AccessToken { get; set; } - - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public virtual string TempFolderPath - { - get { return _tempFolderPath; } - - set - { - if (string.IsNullOrEmpty(value)) - { - _tempFolderPath = Path.GetTempPath(); - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - { - Directory.CreateDirectory(value); - } - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - { - _tempFolderPath = value; - } - else - { - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - } - - /// - /// Gets or sets the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public virtual string DateTimeFormat - { - get { return _dateTimeFormat; } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - public virtual IDictionary ApiKeyPrefix - { - get { return _apiKeyPrefix; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); - } - _apiKeyPrefix = value; - } - } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public virtual IDictionary ApiKey - { - get { return _apiKey; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKey collection may not be null."); - } - _apiKey = value; - } - } - - #endregion Properties - - #region Methods - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - public void AddDefaultHeader(string key, string value) - { - DefaultHeader[key] = value; - } - - /// - /// Creates a new based on this instance. - /// - /// - public ApiClient CreateApiClient() - { - return new ApiClient(BasePath) { Configuration = this }; - } - - - /// - /// Returns a string with essential information for debugging. - /// - public static String ToDebugReport() - { - String report = "C# SDK (Org.OpenAPITools) Debug Report:\n"; - report += " OS: " + System.Environment.OSVersion + "\n"; - report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 1.0.0\n"; - report += " SDK Package Version: 1.0.0\n"; - - return report; - } - - /// - /// Add Api Key Header. - /// - /// Api Key name. - /// Api Key value. - /// - public void AddApiKey(string key, string value) - { - ApiKey[key] = value; - } - - /// - /// Sets the API key prefix. - /// - /// Api Key name. - /// Api Key value. - public void AddApiKeyPrefix(string key, string value) - { - ApiKeyPrefix[key] = value; - } - - #endregion Methods - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ExceptionFactory.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ExceptionFactory.cs deleted file mode 100644 index d855d96821f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ExceptionFactory.cs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using RestSharp; - -namespace Org.OpenAPITools.Client -{ - /// - /// A delegate to ExceptionFactory method - /// - /// Method name - /// Response - /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/GlobalConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/GlobalConfiguration.cs deleted file mode 100644 index a79bea966bd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/GlobalConfiguration.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Reflection; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; - -namespace Org.OpenAPITools.Client -{ - /// - /// provides a compile-time extension point for globally configuring - /// API Clients. - /// - /// - /// A customized implementation via partial class may reside in another file and may - /// be excluded from automatic generation via a .openapi-generator-ignore file. - /// - public partial class GlobalConfiguration : Configuration - { - - } -} \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/IApiAccessor.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/IApiAccessor.cs deleted file mode 100644 index cd03e8c1f97..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/IApiAccessor.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents configuration aspects required to interact with the API endpoints. - /// - public interface IApiAccessor - { - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - Configuration Configuration {get; set;} - - /// - /// Gets the base path of the API client. - /// - /// The base path - String GetBasePath(); - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - ExceptionFactory ExceptionFactory { get; set; } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/IReadableConfiguration.cs deleted file mode 100644 index 43ed169c6a1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System.Collections.Generic; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents a readable-only configuration contract. - /// - public interface IReadableConfiguration - { - /// - /// Gets the access token. - /// - /// Access token. - string AccessToken { get; } - - /// - /// Gets the API key. - /// - /// API key. - IDictionary ApiKey { get; } - - /// - /// Gets the API key prefix. - /// - /// API key prefix. - IDictionary ApiKeyPrefix { get; } - - /// - /// Gets the base path. - /// - /// Base path. - string BasePath { get; } - - /// - /// Gets the date time format. - /// - /// Date time format. - string DateTimeFormat { get; } - - /// - /// Gets the default header. - /// - /// Default header. - IDictionary DefaultHeader { get; } - - /// - /// Gets the temp folder path. - /// - /// Temp folder path. - string TempFolderPath { get; } - - /// - /// Gets the HTTP connection timeout (in milliseconds) - /// - /// HTTP connection timeout. - int Timeout { get; } - - /// - /// Gets the user agent. - /// - /// User agent. - string UserAgent { get; } - - /// - /// Gets the username. - /// - /// Username. - string Username { get; } - - /// - /// Gets the password. - /// - /// Password. - string Password { get; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - string GetApiKeyWithPrefix(string apiKeyIdentifier); - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs deleted file mode 100644 index a1bd6b08f3b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using Newtonsoft.Json.Converters; - -namespace Org.OpenAPITools.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public OpenAPIDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ReadOnlyDictionary.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ReadOnlyDictionary.cs deleted file mode 100644 index a9d37e84063..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Client/ReadOnlyDictionary.cs +++ /dev/null @@ -1,146 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Runtime.Serialization; - -namespace Org.OpenAPITools.Client -{ - public class ReadOnlyDictionary : IDictionary - { - private IDictionary _dictionaryImplementation; - public IEnumerator> GetEnumerator() - { - return _dictionaryImplementation.GetEnumerator(); - } - - public ReadOnlyDictionary() - { - _dictionaryImplementation = new Dictionary(); - } - - public ReadOnlyDictionary(IDictionary dictionaryImplementation) - { - if (dictionaryImplementation == null) throw new ArgumentNullException("dictionaryImplementation"); - _dictionaryImplementation = dictionaryImplementation; - } - - IEnumerator IEnumerable.GetEnumerator() - { - return ((IEnumerable) _dictionaryImplementation).GetEnumerator(); - } - - public void Add(KeyValuePair item) - { - throw new ReadonlyOperationException("This instance is readonly."); - } - - public void Clear() - { - throw new ReadonlyOperationException("This instance is readonly."); - } - - public bool Contains(KeyValuePair item) - { - return _dictionaryImplementation.Contains(item); - } - - public void CopyTo(KeyValuePair[] array, int arrayIndex) - { - _dictionaryImplementation.CopyTo(array, arrayIndex); - } - - public bool Remove(KeyValuePair item) - { - throw new ReadonlyOperationException("This instance is readonly."); - } - - public int Count - { - get { return _dictionaryImplementation.Count; } - } - - public bool IsReadOnly - { - get { return true; } - } - - public void Add(T key, K value) - { - throw new ReadonlyOperationException("This instance is readonly."); - } - - public bool ContainsKey(T key) - { - return _dictionaryImplementation.ContainsKey(key); - } - - public bool Remove(T key) - { - throw new ReadonlyOperationException("This instance is readonly."); - } - - public bool TryGetValue(T key, out K value) - { - return _dictionaryImplementation.TryGetValue(key, out value); - } - - public K this[T key] - { - get { return _dictionaryImplementation[key]; } - set - { - throw new ReadonlyOperationException("This instance is readonly."); - - } - } - - public ICollection Keys - { - get { return _dictionaryImplementation.Keys; } - } - - public ICollection Values - { - get { return _dictionaryImplementation.Values; } - } - } - - [Serializable] - public class ReadonlyOperationException : Exception - { - // - // For guidelines regarding the creation of new exception types, see - // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/cpconerrorraisinghandlingguidelines.asp - // and - // http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dncscol/html/csharp07192001.asp - // - - public ReadonlyOperationException() - { - } - - public ReadonlyOperationException(string message) : base(message) - { - } - - public ReadonlyOperationException(string message, Exception inner) : base(message, inner) - { - } - - protected ReadonlyOperationException( - SerializationInfo info, - StreamingContext context) : base(info, context) - { - } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs deleted file mode 100644 index acdc11b54b7..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesAnyType - /// - [DataContract] - public partial class AdditionalPropertiesAnyType : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesAnyType(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesAnyType {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesAnyType); - } - - /// - /// Returns true if AdditionalPropertiesAnyType instances are equal - /// - /// Instance of AdditionalPropertiesAnyType to be compared - /// Boolean - public bool Equals(AdditionalPropertiesAnyType input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs deleted file mode 100644 index f317c15537a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesArray - /// - [DataContract] - public partial class AdditionalPropertiesArray : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesArray(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesArray {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesArray); - } - - /// - /// Returns true if AdditionalPropertiesArray instances are equal - /// - /// Instance of AdditionalPropertiesArray to be compared - /// Boolean - public bool Equals(AdditionalPropertiesArray input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs deleted file mode 100644 index 239289ffaba..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesBoolean - /// - [DataContract] - public partial class AdditionalPropertiesBoolean : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesBoolean(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesBoolean {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesBoolean); - } - - /// - /// Returns true if AdditionalPropertiesBoolean instances are equal - /// - /// Instance of AdditionalPropertiesBoolean to be compared - /// Boolean - public bool Equals(AdditionalPropertiesBoolean input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs deleted file mode 100644 index 8a4e6b78b30..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ /dev/null @@ -1,292 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesClass - /// - [DataContract] - public partial class AdditionalPropertiesClass : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// mapString. - /// mapNumber. - /// mapInteger. - /// mapBoolean. - /// mapArrayInteger. - /// mapArrayAnytype. - /// mapMapString. - /// mapMapAnytype. - /// anytype1. - /// anytype2. - /// anytype3. - public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) - { - this.MapString = mapString; - this.MapNumber = mapNumber; - this.MapInteger = mapInteger; - this.MapBoolean = mapBoolean; - this.MapArrayInteger = mapArrayInteger; - this.MapArrayAnytype = mapArrayAnytype; - this.MapMapString = mapMapString; - this.MapMapAnytype = mapMapAnytype; - this.Anytype1 = anytype1; - this.Anytype2 = anytype2; - this.Anytype3 = anytype3; - } - - /// - /// Gets or Sets MapString - /// - [DataMember(Name="map_string", EmitDefaultValue=false)] - public Dictionary MapString { get; set; } - - /// - /// Gets or Sets MapNumber - /// - [DataMember(Name="map_number", EmitDefaultValue=false)] - public Dictionary MapNumber { get; set; } - - /// - /// Gets or Sets MapInteger - /// - [DataMember(Name="map_integer", EmitDefaultValue=false)] - public Dictionary MapInteger { get; set; } - - /// - /// Gets or Sets MapBoolean - /// - [DataMember(Name="map_boolean", EmitDefaultValue=false)] - public Dictionary MapBoolean { get; set; } - - /// - /// Gets or Sets MapArrayInteger - /// - [DataMember(Name="map_array_integer", EmitDefaultValue=false)] - public Dictionary> MapArrayInteger { get; set; } - - /// - /// Gets or Sets MapArrayAnytype - /// - [DataMember(Name="map_array_anytype", EmitDefaultValue=false)] - public Dictionary> MapArrayAnytype { get; set; } - - /// - /// Gets or Sets MapMapString - /// - [DataMember(Name="map_map_string", EmitDefaultValue=false)] - public Dictionary> MapMapString { get; set; } - - /// - /// Gets or Sets MapMapAnytype - /// - [DataMember(Name="map_map_anytype", EmitDefaultValue=false)] - public Dictionary> MapMapAnytype { get; set; } - - /// - /// Gets or Sets Anytype1 - /// - [DataMember(Name="anytype_1", EmitDefaultValue=false)] - public Object Anytype1 { get; set; } - - /// - /// Gets or Sets Anytype2 - /// - [DataMember(Name="anytype_2", EmitDefaultValue=false)] - public Object Anytype2 { get; set; } - - /// - /// Gets or Sets Anytype3 - /// - [DataMember(Name="anytype_3", EmitDefaultValue=false)] - public Object Anytype3 { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapString: ").Append(MapString).Append("\n"); - sb.Append(" MapNumber: ").Append(MapNumber).Append("\n"); - sb.Append(" MapInteger: ").Append(MapInteger).Append("\n"); - sb.Append(" MapBoolean: ").Append(MapBoolean).Append("\n"); - sb.Append(" MapArrayInteger: ").Append(MapArrayInteger).Append("\n"); - sb.Append(" MapArrayAnytype: ").Append(MapArrayAnytype).Append("\n"); - sb.Append(" MapMapString: ").Append(MapMapString).Append("\n"); - sb.Append(" MapMapAnytype: ").Append(MapMapAnytype).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); - sb.Append(" Anytype2: ").Append(Anytype2).Append("\n"); - sb.Append(" Anytype3: ").Append(Anytype3).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesClass); - } - - /// - /// Returns true if AdditionalPropertiesClass instances are equal - /// - /// Instance of AdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(AdditionalPropertiesClass input) - { - if (input == null) - return false; - - return - ( - this.MapString == input.MapString || - this.MapString != null && - input.MapString != null && - this.MapString.SequenceEqual(input.MapString) - ) && - ( - this.MapNumber == input.MapNumber || - this.MapNumber != null && - input.MapNumber != null && - this.MapNumber.SequenceEqual(input.MapNumber) - ) && - ( - this.MapInteger == input.MapInteger || - this.MapInteger != null && - input.MapInteger != null && - this.MapInteger.SequenceEqual(input.MapInteger) - ) && - ( - this.MapBoolean == input.MapBoolean || - this.MapBoolean != null && - input.MapBoolean != null && - this.MapBoolean.SequenceEqual(input.MapBoolean) - ) && - ( - this.MapArrayInteger == input.MapArrayInteger || - this.MapArrayInteger != null && - input.MapArrayInteger != null && - this.MapArrayInteger.SequenceEqual(input.MapArrayInteger) - ) && - ( - this.MapArrayAnytype == input.MapArrayAnytype || - this.MapArrayAnytype != null && - input.MapArrayAnytype != null && - this.MapArrayAnytype.SequenceEqual(input.MapArrayAnytype) - ) && - ( - this.MapMapString == input.MapMapString || - this.MapMapString != null && - input.MapMapString != null && - this.MapMapString.SequenceEqual(input.MapMapString) - ) && - ( - this.MapMapAnytype == input.MapMapAnytype || - this.MapMapAnytype != null && - input.MapMapAnytype != null && - this.MapMapAnytype.SequenceEqual(input.MapMapAnytype) - ) && - ( - this.Anytype1 == input.Anytype1 || - (this.Anytype1 != null && - this.Anytype1.Equals(input.Anytype1)) - ) && - ( - this.Anytype2 == input.Anytype2 || - (this.Anytype2 != null && - this.Anytype2.Equals(input.Anytype2)) - ) && - ( - this.Anytype3 == input.Anytype3 || - (this.Anytype3 != null && - this.Anytype3.Equals(input.Anytype3)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapString != null) - hashCode = hashCode * 59 + this.MapString.GetHashCode(); - if (this.MapNumber != null) - hashCode = hashCode * 59 + this.MapNumber.GetHashCode(); - if (this.MapInteger != null) - hashCode = hashCode * 59 + this.MapInteger.GetHashCode(); - if (this.MapBoolean != null) - hashCode = hashCode * 59 + this.MapBoolean.GetHashCode(); - if (this.MapArrayInteger != null) - hashCode = hashCode * 59 + this.MapArrayInteger.GetHashCode(); - if (this.MapArrayAnytype != null) - hashCode = hashCode * 59 + this.MapArrayAnytype.GetHashCode(); - if (this.MapMapString != null) - hashCode = hashCode * 59 + this.MapMapString.GetHashCode(); - if (this.MapMapAnytype != null) - hashCode = hashCode * 59 + this.MapMapAnytype.GetHashCode(); - if (this.Anytype1 != null) - hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); - if (this.Anytype2 != null) - hashCode = hashCode * 59 + this.Anytype2.GetHashCode(); - if (this.Anytype3 != null) - hashCode = hashCode * 59 + this.Anytype3.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs deleted file mode 100644 index c714e994e26..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesInteger - /// - [DataContract] - public partial class AdditionalPropertiesInteger : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesInteger(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesInteger {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesInteger); - } - - /// - /// Returns true if AdditionalPropertiesInteger instances are equal - /// - /// Instance of AdditionalPropertiesInteger to be compared - /// Boolean - public bool Equals(AdditionalPropertiesInteger input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs deleted file mode 100644 index d727b2f68f1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesNumber - /// - [DataContract] - public partial class AdditionalPropertiesNumber : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesNumber(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesNumber {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesNumber); - } - - /// - /// Returns true if AdditionalPropertiesNumber instances are equal - /// - /// Instance of AdditionalPropertiesNumber to be compared - /// Boolean - public bool Equals(AdditionalPropertiesNumber input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs deleted file mode 100644 index cb6e05daeb5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesObject - /// - [DataContract] - public partial class AdditionalPropertiesObject : Dictionary>, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesObject(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesObject {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesObject); - } - - /// - /// Returns true if AdditionalPropertiesObject instances are equal - /// - /// Instance of AdditionalPropertiesObject to be compared - /// Boolean - public bool Equals(AdditionalPropertiesObject input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs deleted file mode 100644 index 677c32fde05..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesString - /// - [DataContract] - public partial class AdditionalPropertiesString : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesString(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesString {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesString); - } - - /// - /// Returns true if AdditionalPropertiesString instances are equal - /// - /// Instance of AdditionalPropertiesString to be compared - /// Boolean - public bool Equals(AdditionalPropertiesString input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Animal.cs deleted file mode 100644 index f3c0d8a79e8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Animal.cs +++ /dev/null @@ -1,177 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using JsonSubTypes; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Animal - /// - [DataContract] - [JsonConverter(typeof(JsonSubtypes), "className")] - [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] - [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] - [JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")] - public partial class Animal : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Animal() { } - /// - /// Initializes a new instance of the class. - /// - /// className (required). - /// color (default to "red"). - public Animal(string className = default(string), string color = "red") - { - // to ensure "className" is required (not null) - if (className == null) - { - throw new InvalidDataException("className is a required property for Animal and cannot be null"); - } - else - { - this.ClassName = className; - } - - // use default value if no "color" provided - if (color == null) - { - this.Color = "red"; - } - else - { - this.Color = color; - } - } - - /// - /// Gets or Sets ClassName - /// - [DataMember(Name="className", EmitDefaultValue=true)] - public string ClassName { get; set; } - - /// - /// Gets or Sets Color - /// - [DataMember(Name="color", EmitDefaultValue=false)] - public string Color { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Animal {\n"); - sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Animal); - } - - /// - /// Returns true if Animal instances are equal - /// - /// Instance of Animal to be compared - /// Boolean - public bool Equals(Animal input) - { - if (input == null) - return false; - - return - ( - this.ClassName == input.ClassName || - (this.ClassName != null && - this.ClassName.Equals(input.ClassName)) - ) && - ( - this.Color == input.Color || - (this.Color != null && - this.Color.Equals(input.Color)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - hashCode = hashCode * 59 + this.ClassName.GetHashCode(); - if (this.Color != null) - hashCode = hashCode * 59 + this.Color.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ApiResponse.cs deleted file mode 100644 index 8f5a5a0e5a9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ApiResponse.cs +++ /dev/null @@ -1,156 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ApiResponse - /// - [DataContract] - public partial class ApiResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// code. - /// type. - /// message. - public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) - { - this.Code = code; - this.Type = type; - this.Message = message; - } - - /// - /// Gets or Sets Code - /// - [DataMember(Name="code", EmitDefaultValue=false)] - public int Code { get; set; } - - /// - /// Gets or Sets Type - /// - [DataMember(Name="type", EmitDefaultValue=false)] - public string Type { get; set; } - - /// - /// Gets or Sets Message - /// - [DataMember(Name="message", EmitDefaultValue=false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ApiResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApiResponse); - } - - /// - /// Returns true if ApiResponse instances are equal - /// - /// Instance of ApiResponse to be compared - /// Boolean - public bool Equals(ApiResponse input) - { - if (input == null) - return false; - - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - hashCode = hashCode * 59 + this.Code.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs deleted file mode 100644 index 0342fb2ce66..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ArrayOfArrayOfNumberOnly - /// - [DataContract] - public partial class ArrayOfArrayOfNumberOnly : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// arrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) - { - this.ArrayArrayNumber = arrayArrayNumber; - } - - /// - /// Gets or Sets ArrayArrayNumber - /// - [DataMember(Name="ArrayArrayNumber", EmitDefaultValue=false)] - public List> ArrayArrayNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayOfArrayOfNumberOnly {\n"); - sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayOfArrayOfNumberOnly); - } - - /// - /// Returns true if ArrayOfArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfArrayOfNumberOnly input) - { - if (input == null) - return false; - - return - ( - this.ArrayArrayNumber == input.ArrayArrayNumber || - this.ArrayArrayNumber != null && - input.ArrayArrayNumber != null && - this.ArrayArrayNumber.SequenceEqual(input.ArrayArrayNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayArrayNumber != null) - hashCode = hashCode * 59 + this.ArrayArrayNumber.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs deleted file mode 100644 index 1b87d630d20..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ArrayOfNumberOnly - /// - [DataContract] - public partial class ArrayOfNumberOnly : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// arrayNumber. - public ArrayOfNumberOnly(List arrayNumber = default(List)) - { - this.ArrayNumber = arrayNumber; - } - - /// - /// Gets or Sets ArrayNumber - /// - [DataMember(Name="ArrayNumber", EmitDefaultValue=false)] - public List ArrayNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayOfNumberOnly {\n"); - sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayOfNumberOnly); - } - - /// - /// Returns true if ArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfNumberOnly input) - { - if (input == null) - return false; - - return - ( - this.ArrayNumber == input.ArrayNumber || - this.ArrayNumber != null && - input.ArrayNumber != null && - this.ArrayNumber.SequenceEqual(input.ArrayNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayNumber != null) - hashCode = hashCode * 59 + this.ArrayNumber.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ArrayTest.cs deleted file mode 100644 index 10886bb6af6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ArrayTest.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ArrayTest - /// - [DataContract] - public partial class ArrayTest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// arrayOfString. - /// arrayArrayOfInteger. - /// arrayArrayOfModel. - public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) - { - this.ArrayOfString = arrayOfString; - this.ArrayArrayOfInteger = arrayArrayOfInteger; - this.ArrayArrayOfModel = arrayArrayOfModel; - } - - /// - /// Gets or Sets ArrayOfString - /// - [DataMember(Name="array_of_string", EmitDefaultValue=false)] - public List ArrayOfString { get; set; } - - /// - /// Gets or Sets ArrayArrayOfInteger - /// - [DataMember(Name="array_array_of_integer", EmitDefaultValue=false)] - public List> ArrayArrayOfInteger { get; set; } - - /// - /// Gets or Sets ArrayArrayOfModel - /// - [DataMember(Name="array_array_of_model", EmitDefaultValue=false)] - public List> ArrayArrayOfModel { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); - sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); - sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayTest); - } - - /// - /// Returns true if ArrayTest instances are equal - /// - /// Instance of ArrayTest to be compared - /// Boolean - public bool Equals(ArrayTest input) - { - if (input == null) - return false; - - return - ( - this.ArrayOfString == input.ArrayOfString || - this.ArrayOfString != null && - input.ArrayOfString != null && - this.ArrayOfString.SequenceEqual(input.ArrayOfString) - ) && - ( - this.ArrayArrayOfInteger == input.ArrayArrayOfInteger || - this.ArrayArrayOfInteger != null && - input.ArrayArrayOfInteger != null && - this.ArrayArrayOfInteger.SequenceEqual(input.ArrayArrayOfInteger) - ) && - ( - this.ArrayArrayOfModel == input.ArrayArrayOfModel || - this.ArrayArrayOfModel != null && - input.ArrayArrayOfModel != null && - this.ArrayArrayOfModel.SequenceEqual(input.ArrayArrayOfModel) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayOfString != null) - hashCode = hashCode * 59 + this.ArrayOfString.GetHashCode(); - if (this.ArrayArrayOfInteger != null) - hashCode = hashCode * 59 + this.ArrayArrayOfInteger.GetHashCode(); - if (this.ArrayArrayOfModel != null) - hashCode = hashCode * 59 + this.ArrayArrayOfModel.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/BigCat.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/BigCat.cs deleted file mode 100644 index ffdab926c34..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/BigCat.cs +++ /dev/null @@ -1,163 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// BigCat - /// - [DataContract] - public partial class BigCat : Cat, IEquatable, IValidatableObject - { - /// - /// Defines Kind - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum KindEnum - { - /// - /// Enum Lions for value: lions - /// - [EnumMember(Value = "lions")] - Lions = 1, - - /// - /// Enum Tigers for value: tigers - /// - [EnumMember(Value = "tigers")] - Tigers = 2, - - /// - /// Enum Leopards for value: leopards - /// - [EnumMember(Value = "leopards")] - Leopards = 3, - - /// - /// Enum Jaguars for value: jaguars - /// - [EnumMember(Value = "jaguars")] - Jaguars = 4 - - } - - /// - /// Gets or Sets Kind - /// - [DataMember(Name="kind", EmitDefaultValue=false)] - public KindEnum? Kind { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BigCat() { } - /// - /// Initializes a new instance of the class. - /// - /// kind. - public BigCat(KindEnum? kind = default(KindEnum?), string className = default(string), string color = "red", bool declawed = default(bool)) : base(declawed) - { - this.Kind = kind; - } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BigCat {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Kind: ").Append(Kind).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BigCat); - } - - /// - /// Returns true if BigCat instances are equal - /// - /// Instance of BigCat to be compared - /// Boolean - public bool Equals(BigCat input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Kind == input.Kind || - (this.Kind != null && - this.Kind.Equals(input.Kind)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Kind != null) - hashCode = hashCode * 59 + this.Kind.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/BigCatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/BigCatAllOf.cs deleted file mode 100644 index 79871b557ba..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/BigCatAllOf.cs +++ /dev/null @@ -1,156 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// BigCatAllOf - /// - [DataContract] - public partial class BigCatAllOf : IEquatable, IValidatableObject - { - /// - /// Defines Kind - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum KindEnum - { - /// - /// Enum Lions for value: lions - /// - [EnumMember(Value = "lions")] - Lions = 1, - - /// - /// Enum Tigers for value: tigers - /// - [EnumMember(Value = "tigers")] - Tigers = 2, - - /// - /// Enum Leopards for value: leopards - /// - [EnumMember(Value = "leopards")] - Leopards = 3, - - /// - /// Enum Jaguars for value: jaguars - /// - [EnumMember(Value = "jaguars")] - Jaguars = 4 - - } - - /// - /// Gets or Sets Kind - /// - [DataMember(Name="kind", EmitDefaultValue=false)] - public KindEnum? Kind { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// kind. - public BigCatAllOf(KindEnum? kind = default(KindEnum?)) - { - this.Kind = kind; - } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BigCatAllOf {\n"); - sb.Append(" Kind: ").Append(Kind).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BigCatAllOf); - } - - /// - /// Returns true if BigCatAllOf instances are equal - /// - /// Instance of BigCatAllOf to be compared - /// Boolean - public bool Equals(BigCatAllOf input) - { - if (input == null) - return false; - - return - ( - this.Kind == input.Kind || - (this.Kind != null && - this.Kind.Equals(input.Kind)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Kind != null) - hashCode = hashCode * 59 + this.Kind.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Capitalization.cs deleted file mode 100644 index 058ce89df0d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Capitalization.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Capitalization - /// - [DataContract] - public partial class Capitalization : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// smallCamel. - /// capitalCamel. - /// smallSnake. - /// capitalSnake. - /// sCAETHFlowPoints. - /// Name of the pet . - public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) - { - this.SmallCamel = smallCamel; - this.CapitalCamel = capitalCamel; - this.SmallSnake = smallSnake; - this.CapitalSnake = capitalSnake; - this.SCAETHFlowPoints = sCAETHFlowPoints; - this.ATT_NAME = aTTNAME; - } - - /// - /// Gets or Sets SmallCamel - /// - [DataMember(Name="smallCamel", EmitDefaultValue=false)] - public string SmallCamel { get; set; } - - /// - /// Gets or Sets CapitalCamel - /// - [DataMember(Name="CapitalCamel", EmitDefaultValue=false)] - public string CapitalCamel { get; set; } - - /// - /// Gets or Sets SmallSnake - /// - [DataMember(Name="small_Snake", EmitDefaultValue=false)] - public string SmallSnake { get; set; } - - /// - /// Gets or Sets CapitalSnake - /// - [DataMember(Name="Capital_Snake", EmitDefaultValue=false)] - public string CapitalSnake { get; set; } - - /// - /// Gets or Sets SCAETHFlowPoints - /// - [DataMember(Name="SCA_ETH_Flow_Points", EmitDefaultValue=false)] - public string SCAETHFlowPoints { get; set; } - - /// - /// Name of the pet - /// - /// Name of the pet - [DataMember(Name="ATT_NAME", EmitDefaultValue=false)] - public string ATT_NAME { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); - sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); - sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); - sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Capitalization); - } - - /// - /// Returns true if Capitalization instances are equal - /// - /// Instance of Capitalization to be compared - /// Boolean - public bool Equals(Capitalization input) - { - if (input == null) - return false; - - return - ( - this.SmallCamel == input.SmallCamel || - (this.SmallCamel != null && - this.SmallCamel.Equals(input.SmallCamel)) - ) && - ( - this.CapitalCamel == input.CapitalCamel || - (this.CapitalCamel != null && - this.CapitalCamel.Equals(input.CapitalCamel)) - ) && - ( - this.SmallSnake == input.SmallSnake || - (this.SmallSnake != null && - this.SmallSnake.Equals(input.SmallSnake)) - ) && - ( - this.CapitalSnake == input.CapitalSnake || - (this.CapitalSnake != null && - this.CapitalSnake.Equals(input.CapitalSnake)) - ) && - ( - this.SCAETHFlowPoints == input.SCAETHFlowPoints || - (this.SCAETHFlowPoints != null && - this.SCAETHFlowPoints.Equals(input.SCAETHFlowPoints)) - ) && - ( - this.ATT_NAME == input.ATT_NAME || - (this.ATT_NAME != null && - this.ATT_NAME.Equals(input.ATT_NAME)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SmallCamel != null) - hashCode = hashCode * 59 + this.SmallCamel.GetHashCode(); - if (this.CapitalCamel != null) - hashCode = hashCode * 59 + this.CapitalCamel.GetHashCode(); - if (this.SmallSnake != null) - hashCode = hashCode * 59 + this.SmallSnake.GetHashCode(); - if (this.CapitalSnake != null) - hashCode = hashCode * 59 + this.CapitalSnake.GetHashCode(); - if (this.SCAETHFlowPoints != null) - hashCode = hashCode * 59 + this.SCAETHFlowPoints.GetHashCode(); - if (this.ATT_NAME != null) - hashCode = hashCode * 59 + this.ATT_NAME.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Cat.cs deleted file mode 100644 index 2326d55ac48..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Cat.cs +++ /dev/null @@ -1,141 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Cat - /// - [DataContract] - public partial class Cat : Animal, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Cat() { } - /// - /// Initializes a new instance of the class. - /// - /// declawed. - public Cat(bool declawed = default(bool), string className = "Cat", string color = "red") : base(className, color) - { - this.Declawed = declawed; - } - - /// - /// Gets or Sets Declawed - /// - [DataMember(Name="declawed", EmitDefaultValue=false)] - public bool Declawed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Cat {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Cat); - } - - /// - /// Returns true if Cat instances are equal - /// - /// Instance of Cat to be compared - /// Boolean - public bool Equals(Cat input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Declawed == input.Declawed || - (this.Declawed != null && - this.Declawed.Equals(input.Declawed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Declawed != null) - hashCode = hashCode * 59 + this.Declawed.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/CatAllOf.cs deleted file mode 100644 index 3d452f64b38..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/CatAllOf.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// CatAllOf - /// - [DataContract] - public partial class CatAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// declawed. - public CatAllOf(bool declawed = default(bool)) - { - this.Declawed = declawed; - } - - /// - /// Gets or Sets Declawed - /// - [DataMember(Name="declawed", EmitDefaultValue=false)] - public bool Declawed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class CatAllOf {\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CatAllOf); - } - - /// - /// Returns true if CatAllOf instances are equal - /// - /// Instance of CatAllOf to be compared - /// Boolean - public bool Equals(CatAllOf input) - { - if (input == null) - return false; - - return - ( - this.Declawed == input.Declawed || - (this.Declawed != null && - this.Declawed.Equals(input.Declawed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Declawed != null) - hashCode = hashCode * 59 + this.Declawed.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Category.cs deleted file mode 100644 index 2901d8bf67c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Category.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Category - /// - [DataContract] - public partial class Category : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Category() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required) (default to "default-name"). - 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; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Category); - } - - /// - /// Returns true if Category instances are equal - /// - /// Instance of Category to be compared - /// Boolean - public bool Equals(Category input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ClassModel.cs deleted file mode 100644 index 4a7d5372a1a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ClassModel.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing model with \"_class\" property - /// - [DataContract] - public partial class ClassModel : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// _class. - public ClassModel(string _class = default(string)) - { - this.Class = _class; - } - - /// - /// Gets or Sets Class - /// - [DataMember(Name="_class", EmitDefaultValue=false)] - public string Class { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ClassModel); - } - - /// - /// Returns true if ClassModel instances are equal - /// - /// Instance of ClassModel to be compared - /// Boolean - public bool Equals(ClassModel input) - { - if (input == null) - return false; - - return - ( - this.Class == input.Class || - (this.Class != null && - this.Class.Equals(input.Class)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Class != null) - hashCode = hashCode * 59 + this.Class.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Dog.cs deleted file mode 100644 index b925fb99c32..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Dog.cs +++ /dev/null @@ -1,131 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Dog - /// - [DataContract] - public partial class Dog : Animal, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Dog() { } - /// - /// Initializes a new instance of the class. - /// - /// breed. - public Dog(string breed = default(string), string className = "Dog", string color = "red") : base(className, color) - { - this.Breed = breed; - } - - /// - /// Gets or Sets Breed - /// - [DataMember(Name="breed", EmitDefaultValue=false)] - public string Breed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Dog {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Dog); - } - - /// - /// Returns true if Dog instances are equal - /// - /// Instance of Dog to be compared - /// Boolean - public bool Equals(Dog input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Breed == input.Breed || - (this.Breed != null && - this.Breed.Equals(input.Breed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Breed != null) - hashCode = hashCode * 59 + this.Breed.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/DogAllOf.cs deleted file mode 100644 index 24d4b43de85..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/DogAllOf.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// DogAllOf - /// - [DataContract] - public partial class DogAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// breed. - public DogAllOf(string breed = default(string)) - { - this.Breed = breed; - } - - /// - /// Gets or Sets Breed - /// - [DataMember(Name="breed", EmitDefaultValue=false)] - public string Breed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class DogAllOf {\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DogAllOf); - } - - /// - /// Returns true if DogAllOf instances are equal - /// - /// Instance of DogAllOf to be compared - /// Boolean - public bool Equals(DogAllOf input) - { - if (input == null) - return false; - - return - ( - this.Breed == input.Breed || - (this.Breed != null && - this.Breed.Equals(input.Breed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Breed != null) - hashCode = hashCode * 59 + this.Breed.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/EnumArrays.cs deleted file mode 100644 index 6887c901d11..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/EnumArrays.cs +++ /dev/null @@ -1,182 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// EnumArrays - /// - [DataContract] - public partial class EnumArrays : IEquatable, IValidatableObject - { - /// - /// Defines JustSymbol - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum JustSymbolEnum - { - /// - /// Enum GreaterThanOrEqualTo for value: >= - /// - [EnumMember(Value = ">=")] - GreaterThanOrEqualTo = 1, - - /// - /// Enum Dollar for value: $ - /// - [EnumMember(Value = "$")] - Dollar = 2 - - } - - /// - /// Gets or Sets JustSymbol - /// - [DataMember(Name="just_symbol", EmitDefaultValue=false)] - public JustSymbolEnum? JustSymbol { get; set; } - /// - /// Defines ArrayEnum - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ArrayEnumEnum - { - /// - /// Enum Fish for value: fish - /// - [EnumMember(Value = "fish")] - Fish = 1, - - /// - /// Enum Crab for value: crab - /// - [EnumMember(Value = "crab")] - Crab = 2 - - } - - - /// - /// Gets or Sets ArrayEnum - /// - [DataMember(Name="array_enum", EmitDefaultValue=false)] - public List ArrayEnum { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// justSymbol. - /// arrayEnum. - public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) - { - this.JustSymbol = justSymbol; - this.ArrayEnum = arrayEnum; - } - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); - sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EnumArrays); - } - - /// - /// Returns true if EnumArrays instances are equal - /// - /// Instance of EnumArrays to be compared - /// Boolean - public bool Equals(EnumArrays input) - { - if (input == null) - return false; - - return - ( - this.JustSymbol == input.JustSymbol || - (this.JustSymbol != null && - this.JustSymbol.Equals(input.JustSymbol)) - ) && - ( - this.ArrayEnum == input.ArrayEnum || - this.ArrayEnum != null && - input.ArrayEnum != null && - this.ArrayEnum.SequenceEqual(input.ArrayEnum) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.JustSymbol != null) - hashCode = hashCode * 59 + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) - hashCode = hashCode * 59 + this.ArrayEnum.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/EnumClass.cs deleted file mode 100644 index 96e427f9b32..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/EnumClass.cs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Defines EnumClass - /// - - [JsonConverter(typeof(StringEnumConverter))] - - public enum EnumClass - { - /// - /// Enum Abc for value: _abc - /// - [EnumMember(Value = "_abc")] - Abc = 1, - - /// - /// Enum Efg for value: -efg - /// - [EnumMember(Value = "-efg")] - Efg = 2, - - /// - /// Enum Xyz for value: (xyz) - /// - [EnumMember(Value = "(xyz)")] - Xyz = 3 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/EnumTest.cs deleted file mode 100644 index fe1b1e00aa1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/EnumTest.cs +++ /dev/null @@ -1,291 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// EnumTest - /// - [DataContract] - public partial class EnumTest : IEquatable, IValidatableObject - { - /// - /// Defines EnumString - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumStringEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumString - /// - [DataMember(Name="enum_string", EmitDefaultValue=false)] - public EnumStringEnum? EnumString { get; set; } - /// - /// Defines EnumStringRequired - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumStringRequiredEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumStringRequired - /// - [DataMember(Name="enum_string_required", EmitDefaultValue=true)] - public EnumStringRequiredEnum EnumStringRequired { get; set; } - /// - /// Defines EnumInteger - /// - public enum EnumIntegerEnum - { - /// - /// Enum NUMBER_1 for value: 1 - /// - NUMBER_1 = 1, - - /// - /// Enum NUMBER_MINUS_1 for value: -1 - /// - NUMBER_MINUS_1 = -1 - - } - - /// - /// Gets or Sets EnumInteger - /// - [DataMember(Name="enum_integer", EmitDefaultValue=false)] - public EnumIntegerEnum? EnumInteger { get; set; } - /// - /// Defines EnumNumber - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumNumberEnum - { - /// - /// Enum NUMBER_1_DOT_1 for value: 1.1 - /// - [EnumMember(Value = "1.1")] - NUMBER_1_DOT_1 = 1, - - /// - /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2 - /// - [EnumMember(Value = "-1.2")] - NUMBER_MINUS_1_DOT_2 = 2 - - } - - /// - /// Gets or Sets EnumNumber - /// - [DataMember(Name="enum_number", EmitDefaultValue=false)] - public EnumNumberEnum? EnumNumber { get; set; } - /// - /// Gets or Sets OuterEnum - /// - [DataMember(Name="outerEnum", EmitDefaultValue=false)] - public OuterEnum? OuterEnum { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EnumTest() { } - /// - /// Initializes a new instance of the class. - /// - /// enumString. - /// enumStringRequired (required). - /// enumInteger. - /// enumNumber. - /// outerEnum. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?)) - { - // to ensure "enumStringRequired" is required (not null) - if (enumStringRequired == null) - { - throw new InvalidDataException("enumStringRequired is a required property for EnumTest and cannot be null"); - } - else - { - this.EnumStringRequired = enumStringRequired; - } - - this.EnumString = enumString; - this.EnumInteger = enumInteger; - this.EnumNumber = enumNumber; - this.OuterEnum = outerEnum; - } - - - - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class EnumTest {\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); - sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); - sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EnumTest); - } - - /// - /// Returns true if EnumTest instances are equal - /// - /// Instance of EnumTest to be compared - /// Boolean - public bool Equals(EnumTest input) - { - if (input == null) - return false; - - return - ( - this.EnumString == input.EnumString || - (this.EnumString != null && - this.EnumString.Equals(input.EnumString)) - ) && - ( - this.EnumStringRequired == input.EnumStringRequired || - (this.EnumStringRequired != null && - this.EnumStringRequired.Equals(input.EnumStringRequired)) - ) && - ( - this.EnumInteger == input.EnumInteger || - (this.EnumInteger != null && - this.EnumInteger.Equals(input.EnumInteger)) - ) && - ( - this.EnumNumber == input.EnumNumber || - (this.EnumNumber != null && - this.EnumNumber.Equals(input.EnumNumber)) - ) && - ( - this.OuterEnum == input.OuterEnum || - (this.OuterEnum != null && - this.OuterEnum.Equals(input.OuterEnum)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EnumString != null) - hashCode = hashCode * 59 + this.EnumString.GetHashCode(); - if (this.EnumStringRequired != null) - hashCode = hashCode * 59 + this.EnumStringRequired.GetHashCode(); - if (this.EnumInteger != null) - hashCode = hashCode * 59 + this.EnumInteger.GetHashCode(); - if (this.EnumNumber != null) - hashCode = hashCode * 59 + this.EnumNumber.GetHashCode(); - if (this.OuterEnum != null) - hashCode = hashCode * 59 + this.OuterEnum.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/File.cs deleted file mode 100644 index 3cf268524f9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/File.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Must be named `File` for test. - /// - [DataContract] - public partial class File : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Test capitalization. - public File(string sourceURI = default(string)) - { - this.SourceURI = sourceURI; - } - - /// - /// Test capitalization - /// - /// Test capitalization - [DataMember(Name="sourceURI", EmitDefaultValue=false)] - public string SourceURI { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class File {\n"); - sb.Append(" SourceURI: ").Append(SourceURI).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as File); - } - - /// - /// Returns true if File instances are equal - /// - /// Instance of File to be compared - /// Boolean - public bool Equals(File input) - { - if (input == null) - return false; - - return - ( - this.SourceURI == input.SourceURI || - (this.SourceURI != null && - this.SourceURI.Equals(input.SourceURI)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SourceURI != null) - hashCode = hashCode * 59 + this.SourceURI.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs deleted file mode 100644 index 73a8b61aa75..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ /dev/null @@ -1,141 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// FileSchemaTestClass - /// - [DataContract] - public partial class FileSchemaTestClass : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// file. - /// files. - public FileSchemaTestClass(File file = default(File), List files = default(List)) - { - this.File = file; - this.Files = files; - } - - /// - /// Gets or Sets File - /// - [DataMember(Name="file", EmitDefaultValue=false)] - public File File { get; set; } - - /// - /// Gets or Sets Files - /// - [DataMember(Name="files", EmitDefaultValue=false)] - public List Files { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class FileSchemaTestClass {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FileSchemaTestClass); - } - - /// - /// Returns true if FileSchemaTestClass instances are equal - /// - /// Instance of FileSchemaTestClass to be compared - /// Boolean - public bool Equals(FileSchemaTestClass input) - { - if (input == null) - return false; - - return - ( - this.File == input.File || - (this.File != null && - this.File.Equals(input.File)) - ) && - ( - this.Files == input.Files || - this.Files != null && - input.Files != null && - this.Files.SequenceEqual(input.Files) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.File != null) - hashCode = hashCode * 59 + this.File.GetHashCode(); - if (this.Files != null) - hashCode = hashCode * 59 + this.Files.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FormatTest.cs deleted file mode 100644 index 0346d447e43..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/FormatTest.cs +++ /dev/null @@ -1,467 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// FormatTest - /// - [DataContract] - public partial class FormatTest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FormatTest() { } - /// - /// Initializes a new instance of the class. - /// - /// integer. - /// int32. - /// int64. - /// number (required). - /// _float. - /// _double. - /// _string. - /// _byte (required). - /// binary. - /// date (required). - /// dateTime. - /// uuid. - /// password (required). - /// bigDecimal. - public FormatTest(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), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), decimal bigDecimal = default(decimal)) - { - // to ensure "number" is required (not null) - if (number == null) - { - throw new InvalidDataException("number is a required property for FormatTest and cannot be null"); - } - else - { - this.Number = number; - } - - // to ensure "_byte" is required (not null) - if (_byte == null) - { - throw new InvalidDataException("_byte is a required property for FormatTest and cannot be null"); - } - else - { - this.Byte = _byte; - } - - // to ensure "date" is required (not null) - if (date == null) - { - throw new InvalidDataException("date is a required property for FormatTest and cannot be null"); - } - else - { - this.Date = date; - } - - // to ensure "password" is required (not null) - if (password == null) - { - throw new InvalidDataException("password is a required property for FormatTest and cannot be null"); - } - else - { - this.Password = password; - } - - this.Integer = integer; - this.Int32 = int32; - this.Int64 = int64; - this.Float = _float; - this.Double = _double; - this.String = _string; - this.Binary = binary; - this.DateTime = dateTime; - this.Uuid = uuid; - this.BigDecimal = bigDecimal; - } - - /// - /// Gets or Sets Integer - /// - [DataMember(Name="integer", EmitDefaultValue=false)] - public int Integer { get; set; } - - /// - /// Gets or Sets Int32 - /// - [DataMember(Name="int32", EmitDefaultValue=false)] - public int Int32 { get; set; } - - /// - /// Gets or Sets Int64 - /// - [DataMember(Name="int64", EmitDefaultValue=false)] - public long Int64 { get; set; } - - /// - /// Gets or Sets Number - /// - [DataMember(Name="number", EmitDefaultValue=true)] - public decimal Number { get; set; } - - /// - /// Gets or Sets Float - /// - [DataMember(Name="float", EmitDefaultValue=false)] - public float Float { get; set; } - - /// - /// Gets or Sets Double - /// - [DataMember(Name="double", EmitDefaultValue=false)] - public double Double { get; set; } - - /// - /// Gets or Sets String - /// - [DataMember(Name="string", EmitDefaultValue=false)] - public string String { get; set; } - - /// - /// Gets or Sets Byte - /// - [DataMember(Name="byte", EmitDefaultValue=true)] - public byte[] Byte { get; set; } - - /// - /// Gets or Sets Binary - /// - [DataMember(Name="binary", EmitDefaultValue=false)] - public System.IO.Stream Binary { get; set; } - - /// - /// Gets or Sets Date - /// - [DataMember(Name="date", EmitDefaultValue=true)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime Date { get; set; } - - /// - /// Gets or Sets DateTime - /// - [DataMember(Name="dateTime", EmitDefaultValue=false)] - public DateTime DateTime { get; set; } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name="uuid", EmitDefaultValue=false)] - public Guid Uuid { get; set; } - - /// - /// Gets or Sets Password - /// - [DataMember(Name="password", EmitDefaultValue=true)] - public string Password { get; set; } - - /// - /// Gets or Sets BigDecimal - /// - [DataMember(Name="BigDecimal", EmitDefaultValue=false)] - public decimal BigDecimal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class FormatTest {\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(" 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(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" BigDecimal: ").Append(BigDecimal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FormatTest); - } - - /// - /// Returns true if FormatTest instances are equal - /// - /// Instance of FormatTest to be compared - /// Boolean - public bool Equals(FormatTest 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.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.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.BigDecimal == input.BigDecimal || - (this.BigDecimal != null && - this.BigDecimal.Equals(input.BigDecimal)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.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.Uuid != null) - hashCode = hashCode * 59 + this.Uuid.GetHashCode(); - if (this.Password != null) - hashCode = hashCode * 59 + this.Password.GetHashCode(); - if (this.BigDecimal != null) - hashCode = hashCode * 59 + this.BigDecimal.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable 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" }); - } - - // Float (float) minimum - if(this.Float < (float)54.3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", 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" }); - } - - - - // 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; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs deleted file mode 100644 index 10b9939f5ad..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ /dev/null @@ -1,137 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// HasOnlyReadOnly - /// - [DataContract] - public partial class HasOnlyReadOnly : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - public HasOnlyReadOnly() - { - } - - /// - /// Gets or Sets Bar - /// - [DataMember(Name="bar", EmitDefaultValue=false)] - public string Bar { get; private set; } - - /// - /// Gets or Sets Foo - /// - [DataMember(Name="foo", EmitDefaultValue=false)] - public string Foo { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class HasOnlyReadOnly {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Foo: ").Append(Foo).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HasOnlyReadOnly); - } - - /// - /// Returns true if HasOnlyReadOnly instances are equal - /// - /// Instance of HasOnlyReadOnly to be compared - /// Boolean - public bool Equals(HasOnlyReadOnly input) - { - if (input == null) - return false; - - return - ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) - ) && - ( - this.Foo == input.Foo || - (this.Foo != null && - this.Foo.Equals(input.Foo)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bar != null) - hashCode = hashCode * 59 + this.Bar.GetHashCode(); - if (this.Foo != null) - hashCode = hashCode * 59 + this.Foo.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/List.cs deleted file mode 100644 index 6b3ace11cf4..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/List.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// List - /// - [DataContract] - public partial class List : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// _123list. - public List(string _123list = default(string)) - { - this._123List = _123list; - } - - /// - /// Gets or Sets _123List - /// - [DataMember(Name="123-list", EmitDefaultValue=false)] - public string _123List { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class List {\n"); - sb.Append(" _123List: ").Append(_123List).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as List); - } - - /// - /// Returns true if List instances are equal - /// - /// Instance of List to be compared - /// Boolean - public bool Equals(List input) - { - if (input == null) - return false; - - return - ( - this._123List == input._123List || - (this._123List != null && - this._123List.Equals(input._123List)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._123List != null) - hashCode = hashCode * 59 + this._123List.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/MapTest.cs deleted file mode 100644 index 71368b4b44d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/MapTest.cs +++ /dev/null @@ -1,197 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// MapTest - /// - [DataContract] - public partial class MapTest : IEquatable, IValidatableObject - { - /// - /// Defines Inner - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum InnerEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2 - - } - - - /// - /// Gets or Sets MapOfEnumString - /// - [DataMember(Name="map_of_enum_string", EmitDefaultValue=false)] - public Dictionary MapOfEnumString { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// mapMapOfString. - /// mapOfEnumString. - /// directMap. - /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) - { - this.MapMapOfString = mapMapOfString; - this.MapOfEnumString = mapOfEnumString; - this.DirectMap = directMap; - this.IndirectMap = indirectMap; - } - - /// - /// Gets or Sets MapMapOfString - /// - [DataMember(Name="map_map_of_string", EmitDefaultValue=false)] - public Dictionary> MapMapOfString { get; set; } - - - /// - /// Gets or Sets DirectMap - /// - [DataMember(Name="direct_map", EmitDefaultValue=false)] - public Dictionary DirectMap { get; set; } - - /// - /// Gets or Sets IndirectMap - /// - [DataMember(Name="indirect_map", EmitDefaultValue=false)] - public Dictionary IndirectMap { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); - sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); - sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MapTest); - } - - /// - /// Returns true if MapTest instances are equal - /// - /// Instance of MapTest to be compared - /// Boolean - public bool Equals(MapTest input) - { - if (input == null) - return false; - - return - ( - this.MapMapOfString == input.MapMapOfString || - this.MapMapOfString != null && - input.MapMapOfString != null && - this.MapMapOfString.SequenceEqual(input.MapMapOfString) - ) && - ( - this.MapOfEnumString == input.MapOfEnumString || - this.MapOfEnumString != null && - input.MapOfEnumString != null && - this.MapOfEnumString.SequenceEqual(input.MapOfEnumString) - ) && - ( - this.DirectMap == input.DirectMap || - this.DirectMap != null && - input.DirectMap != null && - this.DirectMap.SequenceEqual(input.DirectMap) - ) && - ( - this.IndirectMap == input.IndirectMap || - this.IndirectMap != null && - input.IndirectMap != null && - this.IndirectMap.SequenceEqual(input.IndirectMap) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapMapOfString != null) - hashCode = hashCode * 59 + this.MapMapOfString.GetHashCode(); - if (this.MapOfEnumString != null) - hashCode = hashCode * 59 + this.MapOfEnumString.GetHashCode(); - if (this.DirectMap != null) - hashCode = hashCode * 59 + this.DirectMap.GetHashCode(); - if (this.IndirectMap != null) - hashCode = hashCode * 59 + this.IndirectMap.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs deleted file mode 100644 index 627a4d358b7..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ /dev/null @@ -1,157 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixedPropertiesAndAdditionalPropertiesClass - /// - [DataContract] - public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// uuid. - /// dateTime. - /// map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) - { - this.Uuid = uuid; - this.DateTime = dateTime; - this.Map = map; - } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name="uuid", EmitDefaultValue=false)] - public Guid Uuid { get; set; } - - /// - /// Gets or Sets DateTime - /// - [DataMember(Name="dateTime", EmitDefaultValue=false)] - public DateTime DateTime { get; set; } - - /// - /// Gets or Sets Map - /// - [DataMember(Name="map", EmitDefaultValue=false)] - public Dictionary Map { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Map: ").Append(Map).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MixedPropertiesAndAdditionalPropertiesClass); - } - - /// - /// Returns true if MixedPropertiesAndAdditionalPropertiesClass instances are equal - /// - /// Instance of MixedPropertiesAndAdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(MixedPropertiesAndAdditionalPropertiesClass input) - { - if (input == null) - return false; - - return - ( - this.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) - ) && - ( - this.DateTime == input.DateTime || - (this.DateTime != null && - this.DateTime.Equals(input.DateTime)) - ) && - ( - this.Map == input.Map || - this.Map != null && - input.Map != null && - this.Map.SequenceEqual(input.Map) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uuid != null) - hashCode = hashCode * 59 + this.Uuid.GetHashCode(); - if (this.DateTime != null) - hashCode = hashCode * 59 + this.DateTime.GetHashCode(); - if (this.Map != null) - hashCode = hashCode * 59 + this.Map.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Model200Response.cs deleted file mode 100644 index 58853af412d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Model200Response.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing model name starting with number - /// - [DataContract] - public partial class Model200Response : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - /// _class. - public Model200Response(int name = default(int), string _class = default(string)) - { - this.Name = name; - this.Class = _class; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public int Name { get; set; } - - /// - /// Gets or Sets Class - /// - [DataMember(Name="class", EmitDefaultValue=false)] - public string Class { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Model200Response {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Model200Response); - } - - /// - /// Returns true if Model200Response instances are equal - /// - /// Instance of Model200Response to be compared - /// Boolean - public bool Equals(Model200Response input) - { - if (input == null) - return false; - - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Class == input.Class || - (this.Class != null && - this.Class.Equals(input.Class)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.Class != null) - hashCode = hashCode * 59 + this.Class.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ModelClient.cs deleted file mode 100644 index 2d93513c768..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ModelClient.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ModelClient - /// - [DataContract] - public partial class ModelClient : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// _client. - public ModelClient(string _client = default(string)) - { - this.__Client = _client; - } - - /// - /// Gets or Sets __Client - /// - [DataMember(Name="client", EmitDefaultValue=false)] - public string __Client { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ModelClient {\n"); - sb.Append(" __Client: ").Append(__Client).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ModelClient); - } - - /// - /// Returns true if ModelClient instances are equal - /// - /// Instance of ModelClient to be compared - /// Boolean - public bool Equals(ModelClient input) - { - if (input == null) - return false; - - return - ( - this.__Client == input.__Client || - (this.__Client != null && - this.__Client.Equals(input.__Client)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.__Client != null) - hashCode = hashCode * 59 + this.__Client.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Name.cs deleted file mode 100644 index c22d454e1ea..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Name.cs +++ /dev/null @@ -1,182 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing model name same as property name - /// - [DataContract] - public partial class Name : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Name() { } - /// - /// Initializes a new instance of the class. - /// - /// name (required). - /// property. - public Name(int name = default(int), string property = default(string)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Name and cannot be null"); - } - else - { - this._Name = name; - } - - this.Property = property; - } - - /// - /// Gets or Sets _Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public int _Name { get; set; } - - /// - /// Gets or Sets SnakeCase - /// - [DataMember(Name="snake_case", EmitDefaultValue=false)] - public int SnakeCase { get; private set; } - - /// - /// Gets or Sets Property - /// - [DataMember(Name="property", EmitDefaultValue=false)] - public string Property { get; set; } - - /// - /// Gets or Sets _123Number - /// - [DataMember(Name="123Number", EmitDefaultValue=false)] - public int _123Number { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Name {\n"); - sb.Append(" _Name: ").Append(_Name).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); - sb.Append(" Property: ").Append(Property).Append("\n"); - sb.Append(" _123Number: ").Append(_123Number).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Name); - } - - /// - /// Returns true if Name instances are equal - /// - /// Instance of Name to be compared - /// Boolean - public bool Equals(Name input) - { - if (input == null) - return false; - - return - ( - this._Name == input._Name || - (this._Name != null && - this._Name.Equals(input._Name)) - ) && - ( - this.SnakeCase == input.SnakeCase || - (this.SnakeCase != null && - this.SnakeCase.Equals(input.SnakeCase)) - ) && - ( - this.Property == input.Property || - (this.Property != null && - this.Property.Equals(input.Property)) - ) && - ( - this._123Number == input._123Number || - (this._123Number != null && - this._123Number.Equals(input._123Number)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.SnakeCase != null) - hashCode = hashCode * 59 + this.SnakeCase.GetHashCode(); - if (this.Property != null) - hashCode = hashCode * 59 + this.Property.GetHashCode(); - if (this._123Number != null) - hashCode = hashCode * 59 + this._123Number.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/NumberOnly.cs deleted file mode 100644 index 62f401d8785..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/NumberOnly.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// NumberOnly - /// - [DataContract] - public partial class NumberOnly : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// justNumber. - public NumberOnly(decimal justNumber = default(decimal)) - { - this.JustNumber = justNumber; - } - - /// - /// Gets or Sets JustNumber - /// - [DataMember(Name="JustNumber", EmitDefaultValue=false)] - public decimal JustNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class NumberOnly {\n"); - sb.Append(" JustNumber: ").Append(JustNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NumberOnly); - } - - /// - /// Returns true if NumberOnly instances are equal - /// - /// Instance of NumberOnly to be compared - /// Boolean - public bool Equals(NumberOnly input) - { - if (input == null) - return false; - - return - ( - this.JustNumber == input.JustNumber || - (this.JustNumber != null && - this.JustNumber.Equals(input.JustNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.JustNumber != null) - hashCode = hashCode * 59 + this.JustNumber.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Order.cs deleted file mode 100644 index c46c951fd30..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Order.cs +++ /dev/null @@ -1,240 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Order - /// - [DataContract] - public partial class Order : IEquatable, IValidatableObject - { - /// - /// Order Status - /// - /// Order Status - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Placed for value: placed - /// - [EnumMember(Value = "placed")] - Placed = 1, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 2, - - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 3 - - } - - /// - /// Order Status - /// - /// Order Status - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// petId. - /// quantity. - /// shipDate. - /// Order Status. - /// complete (default to false). - public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) - { - this.Id = id; - this.PetId = petId; - this.Quantity = quantity; - this.ShipDate = shipDate; - this.Status = status; - // use default value if no "complete" provided - if (complete == null) - { - this.Complete = false; - } - else - { - this.Complete = complete; - } - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets PetId - /// - [DataMember(Name="petId", EmitDefaultValue=false)] - public long PetId { get; set; } - - /// - /// Gets or Sets Quantity - /// - [DataMember(Name="quantity", EmitDefaultValue=false)] - public int Quantity { get; set; } - - /// - /// Gets or Sets ShipDate - /// - [DataMember(Name="shipDate", EmitDefaultValue=false)] - public DateTime ShipDate { get; set; } - - - /// - /// Gets or Sets Complete - /// - [DataMember(Name="complete", EmitDefaultValue=false)] - public bool Complete { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Order {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Order); - } - - /// - /// Returns true if Order instances are equal - /// - /// Instance of Order to be compared - /// Boolean - public bool Equals(Order input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PetId == input.PetId || - (this.PetId != null && - this.PetId.Equals(input.PetId)) - ) && - ( - this.Quantity == input.Quantity || - (this.Quantity != null && - this.Quantity.Equals(input.Quantity)) - ) && - ( - this.ShipDate == input.ShipDate || - (this.ShipDate != null && - this.ShipDate.Equals(input.ShipDate)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.Complete == input.Complete || - (this.Complete != null && - this.Complete.Equals(input.Complete)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.PetId != null) - hashCode = hashCode * 59 + this.PetId.GetHashCode(); - if (this.Quantity != null) - hashCode = hashCode * 59 + this.Quantity.GetHashCode(); - if (this.ShipDate != null) - hashCode = hashCode * 59 + this.ShipDate.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - if (this.Complete != null) - hashCode = hashCode * 59 + this.Complete.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/OuterComposite.cs deleted file mode 100644 index eef811e7299..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/OuterComposite.cs +++ /dev/null @@ -1,156 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// OuterComposite - /// - [DataContract] - public partial class OuterComposite : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// myNumber. - /// myString. - /// myBoolean. - public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) - { - this.MyNumber = myNumber; - this.MyString = myString; - this.MyBoolean = myBoolean; - } - - /// - /// Gets or Sets MyNumber - /// - [DataMember(Name="my_number", EmitDefaultValue=false)] - public decimal MyNumber { get; set; } - - /// - /// Gets or Sets MyString - /// - [DataMember(Name="my_string", EmitDefaultValue=false)] - public string MyString { get; set; } - - /// - /// Gets or Sets MyBoolean - /// - [DataMember(Name="my_boolean", EmitDefaultValue=false)] - public bool MyBoolean { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class OuterComposite {\n"); - sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); - sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OuterComposite); - } - - /// - /// Returns true if OuterComposite instances are equal - /// - /// Instance of OuterComposite to be compared - /// Boolean - public bool Equals(OuterComposite input) - { - if (input == null) - return false; - - return - ( - this.MyNumber == input.MyNumber || - (this.MyNumber != null && - this.MyNumber.Equals(input.MyNumber)) - ) && - ( - this.MyString == input.MyString || - (this.MyString != null && - this.MyString.Equals(input.MyString)) - ) && - ( - this.MyBoolean == input.MyBoolean || - (this.MyBoolean != null && - this.MyBoolean.Equals(input.MyBoolean)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MyNumber != null) - hashCode = hashCode * 59 + this.MyNumber.GetHashCode(); - if (this.MyString != null) - hashCode = hashCode * 59 + this.MyString.GetHashCode(); - if (this.MyBoolean != null) - hashCode = hashCode * 59 + this.MyBoolean.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/OuterEnum.cs deleted file mode 100644 index e902802e0d6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/OuterEnum.cs +++ /dev/null @@ -1,55 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Defines OuterEnum - /// - - [JsonConverter(typeof(StringEnumConverter))] - - public enum OuterEnum - { - /// - /// Enum Placed for value: placed - /// - [EnumMember(Value = "placed")] - Placed = 1, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 2, - - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 3 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Pet.cs deleted file mode 100644 index 681dccedc28..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Pet.cs +++ /dev/null @@ -1,257 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Pet - /// - [DataContract] - public partial class Pet : IEquatable, IValidatableObject - { - /// - /// pet status in the store - /// - /// pet status in the store - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Available for value: available - /// - [EnumMember(Value = "available")] - Available = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2, - - /// - /// Enum Sold for value: sold - /// - [EnumMember(Value = "sold")] - Sold = 3 - - } - - /// - /// pet status in the store - /// - /// pet status in the store - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Pet() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// category. - /// name (required). - /// photoUrls (required). - /// tags. - /// pet status in the store. - public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Pet and cannot be null"); - } - else - { - this.Name = name; - } - - // to ensure "photoUrls" is required (not null) - if (photoUrls == null) - { - throw new InvalidDataException("photoUrls is a required property for Pet and cannot be null"); - } - else - { - this.PhotoUrls = photoUrls; - } - - this.Id = id; - this.Category = category; - this.Tags = tags; - this.Status = status; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Category - /// - [DataMember(Name="category", EmitDefaultValue=false)] - public Category Category { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Gets or Sets PhotoUrls - /// - [DataMember(Name="photoUrls", EmitDefaultValue=true)] - public List PhotoUrls { get; set; } - - /// - /// Gets or Sets Tags - /// - [DataMember(Name="tags", EmitDefaultValue=false)] - public List Tags { get; set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Pet); - } - - /// - /// Returns true if Pet instances are equal - /// - /// Instance of Pet to be compared - /// Boolean - public bool Equals(Pet input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Category == input.Category || - (this.Category != null && - this.Category.Equals(input.Category)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PhotoUrls == input.PhotoUrls || - this.PhotoUrls != null && - input.PhotoUrls != null && - this.PhotoUrls.SequenceEqual(input.PhotoUrls) - ) && - ( - this.Tags == input.Tags || - this.Tags != null && - input.Tags != null && - this.Tags.SequenceEqual(input.Tags) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Category != null) - hashCode = hashCode * 59 + this.Category.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.PhotoUrls != null) - hashCode = hashCode * 59 + this.PhotoUrls.GetHashCode(); - if (this.Tags != null) - hashCode = hashCode * 59 + this.Tags.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs deleted file mode 100644 index bb1c7edde08..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ /dev/null @@ -1,138 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ReadOnlyFirst - /// - [DataContract] - public partial class ReadOnlyFirst : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// baz. - public ReadOnlyFirst(string baz = default(string)) - { - this.Baz = baz; - } - - /// - /// Gets or Sets Bar - /// - [DataMember(Name="bar", EmitDefaultValue=false)] - public string Bar { get; private set; } - - /// - /// Gets or Sets Baz - /// - [DataMember(Name="baz", EmitDefaultValue=false)] - public string Baz { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ReadOnlyFirst {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Baz: ").Append(Baz).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReadOnlyFirst); - } - - /// - /// Returns true if ReadOnlyFirst instances are equal - /// - /// Instance of ReadOnlyFirst to be compared - /// Boolean - public bool Equals(ReadOnlyFirst input) - { - if (input == null) - return false; - - return - ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) - ) && - ( - this.Baz == input.Baz || - (this.Baz != null && - this.Baz.Equals(input.Baz)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bar != null) - hashCode = hashCode * 59 + this.Bar.GetHashCode(); - if (this.Baz != null) - hashCode = hashCode * 59 + this.Baz.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Return.cs deleted file mode 100644 index c12d15c0a65..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Return.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing reserved words - /// - [DataContract] - public partial class Return : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// _return. - public Return(int _return = default(int)) - { - this._Return = _return; - } - - /// - /// Gets or Sets _Return - /// - [DataMember(Name="return", EmitDefaultValue=false)] - public int _Return { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Return {\n"); - sb.Append(" _Return: ").Append(_Return).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Return); - } - - /// - /// Returns true if Return instances are equal - /// - /// Instance of Return to be compared - /// Boolean - public bool Equals(Return input) - { - if (input == null) - return false; - - return - ( - this._Return == input._Return || - (this._Return != null && - this._Return.Equals(input._Return)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._Return != null) - hashCode = hashCode * 59 + this._Return.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/SpecialModelName.cs deleted file mode 100644 index 0cd2939c9e1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// SpecialModelName - /// - [DataContract] - public partial class SpecialModelName : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// specialPropertyName. - public SpecialModelName(long specialPropertyName = default(long)) - { - this.SpecialPropertyName = specialPropertyName; - } - - /// - /// Gets or Sets SpecialPropertyName - /// - [DataMember(Name="$special[property.name]", EmitDefaultValue=false)] - public long SpecialPropertyName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SpecialModelName); - } - - /// - /// Returns true if SpecialModelName instances are equal - /// - /// Instance of SpecialModelName to be compared - /// Boolean - public bool Equals(SpecialModelName input) - { - if (input == null) - return false; - - return - ( - this.SpecialPropertyName == input.SpecialPropertyName || - (this.SpecialPropertyName != null && - this.SpecialPropertyName.Equals(input.SpecialPropertyName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SpecialPropertyName != null) - hashCode = hashCode * 59 + this.SpecialPropertyName.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Tag.cs deleted file mode 100644 index 4ed40c915d2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/Tag.cs +++ /dev/null @@ -1,140 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Tag - /// - [DataContract] - public partial class Tag : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - public Tag(long id = default(long), string name = default(string)) - { - this.Id = id; - this.Name = name; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Tag); - } - - /// - /// Returns true if Tag instances are equal - /// - /// Instance of Tag to be compared - /// Boolean - public bool Equals(Tag input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderDefault.cs deleted file mode 100644 index dbcea03c41e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderDefault.cs +++ /dev/null @@ -1,239 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// TypeHolderDefault - /// - [DataContract] - public partial class TypeHolderDefault : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TypeHolderDefault() { } - /// - /// Initializes a new instance of the class. - /// - /// stringItem (required) (default to "what"). - /// numberItem (required). - /// integerItem (required). - /// boolItem (required) (default to true). - /// arrayItem (required). - public TypeHolderDefault(string stringItem = "what", decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = true, List arrayItem = default(List)) - { - // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - - // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - - } - - /// - /// Gets or Sets StringItem - /// - [DataMember(Name="string_item", EmitDefaultValue=true)] - public string StringItem { get; set; } - - /// - /// Gets or Sets NumberItem - /// - [DataMember(Name="number_item", EmitDefaultValue=true)] - public decimal NumberItem { get; set; } - - /// - /// Gets or Sets IntegerItem - /// - [DataMember(Name="integer_item", EmitDefaultValue=true)] - public int IntegerItem { get; set; } - - /// - /// Gets or Sets BoolItem - /// - [DataMember(Name="bool_item", EmitDefaultValue=true)] - public bool BoolItem { get; set; } - - /// - /// Gets or Sets ArrayItem - /// - [DataMember(Name="array_item", EmitDefaultValue=true)] - public List ArrayItem { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TypeHolderDefault {\n"); - sb.Append(" StringItem: ").Append(StringItem).Append("\n"); - sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); - sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); - sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); - sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TypeHolderDefault); - } - - /// - /// Returns true if TypeHolderDefault instances are equal - /// - /// Instance of TypeHolderDefault to be compared - /// Boolean - public bool Equals(TypeHolderDefault input) - { - if (input == null) - return false; - - return - ( - this.StringItem == input.StringItem || - (this.StringItem != null && - this.StringItem.Equals(input.StringItem)) - ) && - ( - this.NumberItem == input.NumberItem || - (this.NumberItem != null && - this.NumberItem.Equals(input.NumberItem)) - ) && - ( - this.IntegerItem == input.IntegerItem || - (this.IntegerItem != null && - this.IntegerItem.Equals(input.IntegerItem)) - ) && - ( - this.BoolItem == input.BoolItem || - (this.BoolItem != null && - this.BoolItem.Equals(input.BoolItem)) - ) && - ( - this.ArrayItem == input.ArrayItem || - this.ArrayItem != null && - input.ArrayItem != null && - this.ArrayItem.SequenceEqual(input.ArrayItem) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.StringItem != null) - hashCode = hashCode * 59 + this.StringItem.GetHashCode(); - if (this.NumberItem != null) - hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); - if (this.IntegerItem != null) - hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); - if (this.BoolItem != null) - hashCode = hashCode * 59 + this.BoolItem.GetHashCode(); - if (this.ArrayItem != null) - hashCode = hashCode * 59 + this.ArrayItem.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderExample.cs deleted file mode 100644 index 0a71dbe00b8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ /dev/null @@ -1,264 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// TypeHolderExample - /// - [DataContract] - public partial class TypeHolderExample : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TypeHolderExample() { } - /// - /// Initializes a new instance of the class. - /// - /// stringItem (required). - /// numberItem (required). - /// floatItem (required). - /// integerItem (required). - /// boolItem (required). - /// arrayItem (required). - public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) - { - // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "floatItem" is required (not null) - if (floatItem == null) - { - throw new InvalidDataException("floatItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.FloatItem = floatItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - - // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - - } - - /// - /// Gets or Sets StringItem - /// - [DataMember(Name="string_item", EmitDefaultValue=true)] - public string StringItem { get; set; } - - /// - /// Gets or Sets NumberItem - /// - [DataMember(Name="number_item", EmitDefaultValue=true)] - public decimal NumberItem { get; set; } - - /// - /// Gets or Sets FloatItem - /// - [DataMember(Name="float_item", EmitDefaultValue=true)] - public float FloatItem { get; set; } - - /// - /// Gets or Sets IntegerItem - /// - [DataMember(Name="integer_item", EmitDefaultValue=true)] - public int IntegerItem { get; set; } - - /// - /// Gets or Sets BoolItem - /// - [DataMember(Name="bool_item", EmitDefaultValue=true)] - public bool BoolItem { get; set; } - - /// - /// Gets or Sets ArrayItem - /// - [DataMember(Name="array_item", EmitDefaultValue=true)] - public List ArrayItem { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TypeHolderExample {\n"); - sb.Append(" StringItem: ").Append(StringItem).Append("\n"); - sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); - sb.Append(" FloatItem: ").Append(FloatItem).Append("\n"); - sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); - sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); - sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TypeHolderExample); - } - - /// - /// Returns true if TypeHolderExample instances are equal - /// - /// Instance of TypeHolderExample to be compared - /// Boolean - public bool Equals(TypeHolderExample input) - { - if (input == null) - return false; - - return - ( - this.StringItem == input.StringItem || - (this.StringItem != null && - this.StringItem.Equals(input.StringItem)) - ) && - ( - this.NumberItem == input.NumberItem || - (this.NumberItem != null && - this.NumberItem.Equals(input.NumberItem)) - ) && - ( - this.FloatItem == input.FloatItem || - (this.FloatItem != null && - this.FloatItem.Equals(input.FloatItem)) - ) && - ( - this.IntegerItem == input.IntegerItem || - (this.IntegerItem != null && - this.IntegerItem.Equals(input.IntegerItem)) - ) && - ( - this.BoolItem == input.BoolItem || - (this.BoolItem != null && - this.BoolItem.Equals(input.BoolItem)) - ) && - ( - this.ArrayItem == input.ArrayItem || - this.ArrayItem != null && - input.ArrayItem != null && - this.ArrayItem.SequenceEqual(input.ArrayItem) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.StringItem != null) - hashCode = hashCode * 59 + this.StringItem.GetHashCode(); - if (this.NumberItem != null) - hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); - if (this.FloatItem != null) - hashCode = hashCode * 59 + this.FloatItem.GetHashCode(); - if (this.IntegerItem != null) - hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); - if (this.BoolItem != null) - hashCode = hashCode * 59 + this.BoolItem.GetHashCode(); - if (this.ArrayItem != null) - hashCode = hashCode * 59 + this.ArrayItem.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/User.cs deleted file mode 100644 index d59b7b04132..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/User.cs +++ /dev/null @@ -1,237 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// User - /// - [DataContract] - public partial class User : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// username. - /// firstName. - /// lastName. - /// email. - /// password. - /// phone. - /// User Status. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int)) - { - this.Id = id; - this.Username = username; - this.FirstName = firstName; - this.LastName = lastName; - this.Email = email; - this.Password = password; - this.Phone = phone; - this.UserStatus = userStatus; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Username - /// - [DataMember(Name="username", EmitDefaultValue=false)] - public string Username { get; set; } - - /// - /// Gets or Sets FirstName - /// - [DataMember(Name="firstName", EmitDefaultValue=false)] - public string FirstName { get; set; } - - /// - /// Gets or Sets LastName - /// - [DataMember(Name="lastName", EmitDefaultValue=false)] - public string LastName { get; set; } - - /// - /// Gets or Sets Email - /// - [DataMember(Name="email", EmitDefaultValue=false)] - public string Email { get; set; } - - /// - /// Gets or Sets Password - /// - [DataMember(Name="password", EmitDefaultValue=false)] - public string Password { get; set; } - - /// - /// Gets or Sets Phone - /// - [DataMember(Name="phone", EmitDefaultValue=false)] - public string Phone { get; set; } - - /// - /// User Status - /// - /// User Status - [DataMember(Name="userStatus", EmitDefaultValue=false)] - public int UserStatus { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as User); - } - - /// - /// Returns true if User instances are equal - /// - /// Instance of User to be compared - /// Boolean - public bool Equals(User input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.UserStatus == input.UserStatus || - (this.UserStatus != null && - this.UserStatus.Equals(input.UserStatus)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Username != null) - hashCode = hashCode * 59 + this.Username.GetHashCode(); - if (this.FirstName != null) - hashCode = hashCode * 59 + this.FirstName.GetHashCode(); - if (this.LastName != null) - hashCode = hashCode * 59 + this.LastName.GetHashCode(); - if (this.Email != null) - hashCode = hashCode * 59 + this.Email.GetHashCode(); - if (this.Password != null) - hashCode = hashCode * 59 + this.Password.GetHashCode(); - if (this.Phone != null) - hashCode = hashCode * 59 + this.Phone.GetHashCode(); - if (this.UserStatus != null) - hashCode = hashCode * 59 + this.UserStatus.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/XmlItem.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/XmlItem.cs deleted file mode 100644 index 5cebfb5f5a2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Model/XmlItem.cs +++ /dev/null @@ -1,581 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// XmlItem - /// - [DataContract] - public partial class XmlItem : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// attributeString. - /// attributeNumber. - /// attributeInteger. - /// attributeBoolean. - /// wrappedArray. - /// nameString. - /// nameNumber. - /// nameInteger. - /// nameBoolean. - /// nameArray. - /// nameWrappedArray. - /// prefixString. - /// prefixNumber. - /// prefixInteger. - /// prefixBoolean. - /// prefixArray. - /// prefixWrappedArray. - /// namespaceString. - /// namespaceNumber. - /// namespaceInteger. - /// namespaceBoolean. - /// namespaceArray. - /// namespaceWrappedArray. - /// prefixNsString. - /// prefixNsNumber. - /// prefixNsInteger. - /// prefixNsBoolean. - /// prefixNsArray. - /// prefixNsWrappedArray. - public XmlItem(string attributeString = default(string), decimal attributeNumber = default(decimal), int attributeInteger = default(int), bool attributeBoolean = default(bool), List wrappedArray = default(List), string nameString = default(string), decimal nameNumber = default(decimal), int nameInteger = default(int), bool nameBoolean = default(bool), List nameArray = default(List), List nameWrappedArray = default(List), string prefixString = default(string), decimal prefixNumber = default(decimal), int prefixInteger = default(int), bool prefixBoolean = default(bool), List prefixArray = default(List), List prefixWrappedArray = default(List), string namespaceString = default(string), decimal namespaceNumber = default(decimal), int namespaceInteger = default(int), bool namespaceBoolean = default(bool), List namespaceArray = default(List), List namespaceWrappedArray = default(List), string prefixNsString = default(string), decimal prefixNsNumber = default(decimal), int prefixNsInteger = default(int), bool prefixNsBoolean = default(bool), List prefixNsArray = default(List), List prefixNsWrappedArray = default(List)) - { - this.AttributeString = attributeString; - this.AttributeNumber = attributeNumber; - this.AttributeInteger = attributeInteger; - this.AttributeBoolean = attributeBoolean; - this.WrappedArray = wrappedArray; - this.NameString = nameString; - this.NameNumber = nameNumber; - this.NameInteger = nameInteger; - this.NameBoolean = nameBoolean; - this.NameArray = nameArray; - this.NameWrappedArray = nameWrappedArray; - this.PrefixString = prefixString; - this.PrefixNumber = prefixNumber; - this.PrefixInteger = prefixInteger; - this.PrefixBoolean = prefixBoolean; - this.PrefixArray = prefixArray; - this.PrefixWrappedArray = prefixWrappedArray; - this.NamespaceString = namespaceString; - this.NamespaceNumber = namespaceNumber; - this.NamespaceInteger = namespaceInteger; - this.NamespaceBoolean = namespaceBoolean; - this.NamespaceArray = namespaceArray; - this.NamespaceWrappedArray = namespaceWrappedArray; - this.PrefixNsString = prefixNsString; - this.PrefixNsNumber = prefixNsNumber; - this.PrefixNsInteger = prefixNsInteger; - this.PrefixNsBoolean = prefixNsBoolean; - this.PrefixNsArray = prefixNsArray; - this.PrefixNsWrappedArray = prefixNsWrappedArray; - } - - /// - /// Gets or Sets AttributeString - /// - [DataMember(Name="attribute_string", EmitDefaultValue=false)] - public string AttributeString { get; set; } - - /// - /// Gets or Sets AttributeNumber - /// - [DataMember(Name="attribute_number", EmitDefaultValue=false)] - public decimal AttributeNumber { get; set; } - - /// - /// Gets or Sets AttributeInteger - /// - [DataMember(Name="attribute_integer", EmitDefaultValue=false)] - public int AttributeInteger { get; set; } - - /// - /// Gets or Sets AttributeBoolean - /// - [DataMember(Name="attribute_boolean", EmitDefaultValue=false)] - public bool AttributeBoolean { get; set; } - - /// - /// Gets or Sets WrappedArray - /// - [DataMember(Name="wrapped_array", EmitDefaultValue=false)] - public List WrappedArray { get; set; } - - /// - /// Gets or Sets NameString - /// - [DataMember(Name="name_string", EmitDefaultValue=false)] - public string NameString { get; set; } - - /// - /// Gets or Sets NameNumber - /// - [DataMember(Name="name_number", EmitDefaultValue=false)] - public decimal NameNumber { get; set; } - - /// - /// Gets or Sets NameInteger - /// - [DataMember(Name="name_integer", EmitDefaultValue=false)] - public int NameInteger { get; set; } - - /// - /// Gets or Sets NameBoolean - /// - [DataMember(Name="name_boolean", EmitDefaultValue=false)] - public bool NameBoolean { get; set; } - - /// - /// Gets or Sets NameArray - /// - [DataMember(Name="name_array", EmitDefaultValue=false)] - public List NameArray { get; set; } - - /// - /// Gets or Sets NameWrappedArray - /// - [DataMember(Name="name_wrapped_array", EmitDefaultValue=false)] - public List NameWrappedArray { get; set; } - - /// - /// Gets or Sets PrefixString - /// - [DataMember(Name="prefix_string", EmitDefaultValue=false)] - public string PrefixString { get; set; } - - /// - /// Gets or Sets PrefixNumber - /// - [DataMember(Name="prefix_number", EmitDefaultValue=false)] - public decimal PrefixNumber { get; set; } - - /// - /// Gets or Sets PrefixInteger - /// - [DataMember(Name="prefix_integer", EmitDefaultValue=false)] - public int PrefixInteger { get; set; } - - /// - /// Gets or Sets PrefixBoolean - /// - [DataMember(Name="prefix_boolean", EmitDefaultValue=false)] - public bool PrefixBoolean { get; set; } - - /// - /// Gets or Sets PrefixArray - /// - [DataMember(Name="prefix_array", EmitDefaultValue=false)] - public List PrefixArray { get; set; } - - /// - /// Gets or Sets PrefixWrappedArray - /// - [DataMember(Name="prefix_wrapped_array", EmitDefaultValue=false)] - public List PrefixWrappedArray { get; set; } - - /// - /// Gets or Sets NamespaceString - /// - [DataMember(Name="namespace_string", EmitDefaultValue=false)] - public string NamespaceString { get; set; } - - /// - /// Gets or Sets NamespaceNumber - /// - [DataMember(Name="namespace_number", EmitDefaultValue=false)] - public decimal NamespaceNumber { get; set; } - - /// - /// Gets or Sets NamespaceInteger - /// - [DataMember(Name="namespace_integer", EmitDefaultValue=false)] - public int NamespaceInteger { get; set; } - - /// - /// Gets or Sets NamespaceBoolean - /// - [DataMember(Name="namespace_boolean", EmitDefaultValue=false)] - public bool NamespaceBoolean { get; set; } - - /// - /// Gets or Sets NamespaceArray - /// - [DataMember(Name="namespace_array", EmitDefaultValue=false)] - public List NamespaceArray { get; set; } - - /// - /// Gets or Sets NamespaceWrappedArray - /// - [DataMember(Name="namespace_wrapped_array", EmitDefaultValue=false)] - public List NamespaceWrappedArray { get; set; } - - /// - /// Gets or Sets PrefixNsString - /// - [DataMember(Name="prefix_ns_string", EmitDefaultValue=false)] - public string PrefixNsString { get; set; } - - /// - /// Gets or Sets PrefixNsNumber - /// - [DataMember(Name="prefix_ns_number", EmitDefaultValue=false)] - public decimal PrefixNsNumber { get; set; } - - /// - /// Gets or Sets PrefixNsInteger - /// - [DataMember(Name="prefix_ns_integer", EmitDefaultValue=false)] - public int PrefixNsInteger { get; set; } - - /// - /// Gets or Sets PrefixNsBoolean - /// - [DataMember(Name="prefix_ns_boolean", EmitDefaultValue=false)] - public bool PrefixNsBoolean { get; set; } - - /// - /// Gets or Sets PrefixNsArray - /// - [DataMember(Name="prefix_ns_array", EmitDefaultValue=false)] - public List PrefixNsArray { get; set; } - - /// - /// Gets or Sets PrefixNsWrappedArray - /// - [DataMember(Name="prefix_ns_wrapped_array", EmitDefaultValue=false)] - public List PrefixNsWrappedArray { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class XmlItem {\n"); - sb.Append(" AttributeString: ").Append(AttributeString).Append("\n"); - sb.Append(" AttributeNumber: ").Append(AttributeNumber).Append("\n"); - sb.Append(" AttributeInteger: ").Append(AttributeInteger).Append("\n"); - sb.Append(" AttributeBoolean: ").Append(AttributeBoolean).Append("\n"); - sb.Append(" WrappedArray: ").Append(WrappedArray).Append("\n"); - sb.Append(" NameString: ").Append(NameString).Append("\n"); - sb.Append(" NameNumber: ").Append(NameNumber).Append("\n"); - sb.Append(" NameInteger: ").Append(NameInteger).Append("\n"); - sb.Append(" NameBoolean: ").Append(NameBoolean).Append("\n"); - sb.Append(" NameArray: ").Append(NameArray).Append("\n"); - sb.Append(" NameWrappedArray: ").Append(NameWrappedArray).Append("\n"); - sb.Append(" PrefixString: ").Append(PrefixString).Append("\n"); - sb.Append(" PrefixNumber: ").Append(PrefixNumber).Append("\n"); - sb.Append(" PrefixInteger: ").Append(PrefixInteger).Append("\n"); - sb.Append(" PrefixBoolean: ").Append(PrefixBoolean).Append("\n"); - sb.Append(" PrefixArray: ").Append(PrefixArray).Append("\n"); - sb.Append(" PrefixWrappedArray: ").Append(PrefixWrappedArray).Append("\n"); - sb.Append(" NamespaceString: ").Append(NamespaceString).Append("\n"); - sb.Append(" NamespaceNumber: ").Append(NamespaceNumber).Append("\n"); - sb.Append(" NamespaceInteger: ").Append(NamespaceInteger).Append("\n"); - sb.Append(" NamespaceBoolean: ").Append(NamespaceBoolean).Append("\n"); - sb.Append(" NamespaceArray: ").Append(NamespaceArray).Append("\n"); - sb.Append(" NamespaceWrappedArray: ").Append(NamespaceWrappedArray).Append("\n"); - sb.Append(" PrefixNsString: ").Append(PrefixNsString).Append("\n"); - sb.Append(" PrefixNsNumber: ").Append(PrefixNsNumber).Append("\n"); - sb.Append(" PrefixNsInteger: ").Append(PrefixNsInteger).Append("\n"); - sb.Append(" PrefixNsBoolean: ").Append(PrefixNsBoolean).Append("\n"); - sb.Append(" PrefixNsArray: ").Append(PrefixNsArray).Append("\n"); - sb.Append(" PrefixNsWrappedArray: ").Append(PrefixNsWrappedArray).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as XmlItem); - } - - /// - /// Returns true if XmlItem instances are equal - /// - /// Instance of XmlItem to be compared - /// Boolean - public bool Equals(XmlItem input) - { - if (input == null) - return false; - - return - ( - this.AttributeString == input.AttributeString || - (this.AttributeString != null && - this.AttributeString.Equals(input.AttributeString)) - ) && - ( - this.AttributeNumber == input.AttributeNumber || - (this.AttributeNumber != null && - this.AttributeNumber.Equals(input.AttributeNumber)) - ) && - ( - this.AttributeInteger == input.AttributeInteger || - (this.AttributeInteger != null && - this.AttributeInteger.Equals(input.AttributeInteger)) - ) && - ( - this.AttributeBoolean == input.AttributeBoolean || - (this.AttributeBoolean != null && - this.AttributeBoolean.Equals(input.AttributeBoolean)) - ) && - ( - this.WrappedArray == input.WrappedArray || - this.WrappedArray != null && - input.WrappedArray != null && - this.WrappedArray.SequenceEqual(input.WrappedArray) - ) && - ( - this.NameString == input.NameString || - (this.NameString != null && - this.NameString.Equals(input.NameString)) - ) && - ( - this.NameNumber == input.NameNumber || - (this.NameNumber != null && - this.NameNumber.Equals(input.NameNumber)) - ) && - ( - this.NameInteger == input.NameInteger || - (this.NameInteger != null && - this.NameInteger.Equals(input.NameInteger)) - ) && - ( - this.NameBoolean == input.NameBoolean || - (this.NameBoolean != null && - this.NameBoolean.Equals(input.NameBoolean)) - ) && - ( - this.NameArray == input.NameArray || - this.NameArray != null && - input.NameArray != null && - this.NameArray.SequenceEqual(input.NameArray) - ) && - ( - this.NameWrappedArray == input.NameWrappedArray || - this.NameWrappedArray != null && - input.NameWrappedArray != null && - this.NameWrappedArray.SequenceEqual(input.NameWrappedArray) - ) && - ( - this.PrefixString == input.PrefixString || - (this.PrefixString != null && - this.PrefixString.Equals(input.PrefixString)) - ) && - ( - this.PrefixNumber == input.PrefixNumber || - (this.PrefixNumber != null && - this.PrefixNumber.Equals(input.PrefixNumber)) - ) && - ( - this.PrefixInteger == input.PrefixInteger || - (this.PrefixInteger != null && - this.PrefixInteger.Equals(input.PrefixInteger)) - ) && - ( - this.PrefixBoolean == input.PrefixBoolean || - (this.PrefixBoolean != null && - this.PrefixBoolean.Equals(input.PrefixBoolean)) - ) && - ( - this.PrefixArray == input.PrefixArray || - this.PrefixArray != null && - input.PrefixArray != null && - this.PrefixArray.SequenceEqual(input.PrefixArray) - ) && - ( - this.PrefixWrappedArray == input.PrefixWrappedArray || - this.PrefixWrappedArray != null && - input.PrefixWrappedArray != null && - this.PrefixWrappedArray.SequenceEqual(input.PrefixWrappedArray) - ) && - ( - this.NamespaceString == input.NamespaceString || - (this.NamespaceString != null && - this.NamespaceString.Equals(input.NamespaceString)) - ) && - ( - this.NamespaceNumber == input.NamespaceNumber || - (this.NamespaceNumber != null && - this.NamespaceNumber.Equals(input.NamespaceNumber)) - ) && - ( - this.NamespaceInteger == input.NamespaceInteger || - (this.NamespaceInteger != null && - this.NamespaceInteger.Equals(input.NamespaceInteger)) - ) && - ( - this.NamespaceBoolean == input.NamespaceBoolean || - (this.NamespaceBoolean != null && - this.NamespaceBoolean.Equals(input.NamespaceBoolean)) - ) && - ( - this.NamespaceArray == input.NamespaceArray || - this.NamespaceArray != null && - input.NamespaceArray != null && - this.NamespaceArray.SequenceEqual(input.NamespaceArray) - ) && - ( - this.NamespaceWrappedArray == input.NamespaceWrappedArray || - this.NamespaceWrappedArray != null && - input.NamespaceWrappedArray != null && - this.NamespaceWrappedArray.SequenceEqual(input.NamespaceWrappedArray) - ) && - ( - this.PrefixNsString == input.PrefixNsString || - (this.PrefixNsString != null && - this.PrefixNsString.Equals(input.PrefixNsString)) - ) && - ( - this.PrefixNsNumber == input.PrefixNsNumber || - (this.PrefixNsNumber != null && - this.PrefixNsNumber.Equals(input.PrefixNsNumber)) - ) && - ( - this.PrefixNsInteger == input.PrefixNsInteger || - (this.PrefixNsInteger != null && - this.PrefixNsInteger.Equals(input.PrefixNsInteger)) - ) && - ( - this.PrefixNsBoolean == input.PrefixNsBoolean || - (this.PrefixNsBoolean != null && - this.PrefixNsBoolean.Equals(input.PrefixNsBoolean)) - ) && - ( - this.PrefixNsArray == input.PrefixNsArray || - this.PrefixNsArray != null && - input.PrefixNsArray != null && - this.PrefixNsArray.SequenceEqual(input.PrefixNsArray) - ) && - ( - this.PrefixNsWrappedArray == input.PrefixNsWrappedArray || - this.PrefixNsWrappedArray != null && - input.PrefixNsWrappedArray != null && - this.PrefixNsWrappedArray.SequenceEqual(input.PrefixNsWrappedArray) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AttributeString != null) - hashCode = hashCode * 59 + this.AttributeString.GetHashCode(); - if (this.AttributeNumber != null) - hashCode = hashCode * 59 + this.AttributeNumber.GetHashCode(); - if (this.AttributeInteger != null) - hashCode = hashCode * 59 + this.AttributeInteger.GetHashCode(); - if (this.AttributeBoolean != null) - hashCode = hashCode * 59 + this.AttributeBoolean.GetHashCode(); - if (this.WrappedArray != null) - hashCode = hashCode * 59 + this.WrappedArray.GetHashCode(); - if (this.NameString != null) - hashCode = hashCode * 59 + this.NameString.GetHashCode(); - if (this.NameNumber != null) - hashCode = hashCode * 59 + this.NameNumber.GetHashCode(); - if (this.NameInteger != null) - hashCode = hashCode * 59 + this.NameInteger.GetHashCode(); - if (this.NameBoolean != null) - hashCode = hashCode * 59 + this.NameBoolean.GetHashCode(); - if (this.NameArray != null) - hashCode = hashCode * 59 + this.NameArray.GetHashCode(); - if (this.NameWrappedArray != null) - hashCode = hashCode * 59 + this.NameWrappedArray.GetHashCode(); - if (this.PrefixString != null) - hashCode = hashCode * 59 + this.PrefixString.GetHashCode(); - if (this.PrefixNumber != null) - hashCode = hashCode * 59 + this.PrefixNumber.GetHashCode(); - if (this.PrefixInteger != null) - hashCode = hashCode * 59 + this.PrefixInteger.GetHashCode(); - if (this.PrefixBoolean != null) - hashCode = hashCode * 59 + this.PrefixBoolean.GetHashCode(); - if (this.PrefixArray != null) - hashCode = hashCode * 59 + this.PrefixArray.GetHashCode(); - if (this.PrefixWrappedArray != null) - hashCode = hashCode * 59 + this.PrefixWrappedArray.GetHashCode(); - if (this.NamespaceString != null) - hashCode = hashCode * 59 + this.NamespaceString.GetHashCode(); - if (this.NamespaceNumber != null) - hashCode = hashCode * 59 + this.NamespaceNumber.GetHashCode(); - if (this.NamespaceInteger != null) - hashCode = hashCode * 59 + this.NamespaceInteger.GetHashCode(); - if (this.NamespaceBoolean != null) - hashCode = hashCode * 59 + this.NamespaceBoolean.GetHashCode(); - if (this.NamespaceArray != null) - hashCode = hashCode * 59 + this.NamespaceArray.GetHashCode(); - if (this.NamespaceWrappedArray != null) - hashCode = hashCode * 59 + this.NamespaceWrappedArray.GetHashCode(); - if (this.PrefixNsString != null) - hashCode = hashCode * 59 + this.PrefixNsString.GetHashCode(); - if (this.PrefixNsNumber != null) - hashCode = hashCode * 59 + this.PrefixNsNumber.GetHashCode(); - if (this.PrefixNsInteger != null) - hashCode = hashCode * 59 + this.PrefixNsInteger.GetHashCode(); - if (this.PrefixNsBoolean != null) - hashCode = hashCode * 59 + this.PrefixNsBoolean.GetHashCode(); - if (this.PrefixNsArray != null) - hashCode = hashCode * 59 + this.PrefixNsArray.GetHashCode(); - if (this.PrefixNsWrappedArray != null) - hashCode = hashCode * 59 + this.PrefixNsWrappedArray.GetHashCode(); - return hashCode; - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.csproj deleted file mode 100644 index 43725ffa4dd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - Debug - AnyCPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C} - Library - Properties - Org.OpenAPITools - Org.OpenAPITools - v4.0 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Org.OpenAPITools.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Org.OpenAPITools.xml - - - - - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.12.0.3\lib\net40\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\JsonSubTypes.1.6.0\lib\net40\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.6.0\lib\net40\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.6.0\lib\net40\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.6.0\lib\net40\JsonSubTypes.dll - - - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net4\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net4\RestSharp.dll - - - - - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec deleted file mode 100644 index c2528caadb9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ /dev/null @@ -1,41 +0,0 @@ - - - - - $id$ - OpenAPI Library - - - $version$ - - - $author$ - - - $author$ - false - false - - - A library generated from a OpenAPI doc - https://www.apache.org/licenses/LICENSE-2.0.html - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Properties/AssemblyInfo.cs b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Properties/AssemblyInfo.cs deleted file mode 100644 index d1abdf7936a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenAPI Library")] -[assembly: AssemblyDescription("A library generated from a OpenAPI doc")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("OpenAPI")] -[assembly: AssemblyProduct("OpenAPILibrary")] -[assembly: AssemblyCopyright("No Copyright")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0")] -[assembly: AssemblyFileVersion("1.0.0")] diff --git a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/packages.config deleted file mode 100644 index d608f2758ce..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNet40/src/Org.OpenAPITools/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.gitignore b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.gitignore deleted file mode 100644 index 1ee53850b84..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.gitignore +++ /dev/null @@ -1,362 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator-ignore b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/FILES b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/FILES deleted file mode 100644 index 44a82f622d5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/FILES +++ /dev/null @@ -1,122 +0,0 @@ -.gitignore -Org.OpenAPITools.sln -README.md -docs/AdditionalPropertiesAnyType.md -docs/AdditionalPropertiesArray.md -docs/AdditionalPropertiesBoolean.md -docs/AdditionalPropertiesClass.md -docs/AdditionalPropertiesInteger.md -docs/AdditionalPropertiesNumber.md -docs/AdditionalPropertiesObject.md -docs/AdditionalPropertiesString.md -docs/Animal.md -docs/AnotherFakeApi.md -docs/ApiResponse.md -docs/ArrayOfArrayOfNumberOnly.md -docs/ArrayOfNumberOnly.md -docs/ArrayTest.md -docs/BigCat.md -docs/BigCatAllOf.md -docs/Capitalization.md -docs/Cat.md -docs/CatAllOf.md -docs/Category.md -docs/ClassModel.md -docs/Dog.md -docs/DogAllOf.md -docs/EnumArrays.md -docs/EnumClass.md -docs/EnumTest.md -docs/FakeApi.md -docs/FakeClassnameTags123Api.md -docs/File.md -docs/FileSchemaTestClass.md -docs/FormatTest.md -docs/HasOnlyReadOnly.md -docs/List.md -docs/MapTest.md -docs/MixedPropertiesAndAdditionalPropertiesClass.md -docs/Model200Response.md -docs/ModelClient.md -docs/Name.md -docs/NumberOnly.md -docs/Order.md -docs/OuterComposite.md -docs/OuterEnum.md -docs/Pet.md -docs/PetApi.md -docs/ReadOnlyFirst.md -docs/Return.md -docs/SpecialModelName.md -docs/StoreApi.md -docs/Tag.md -docs/TypeHolderDefault.md -docs/TypeHolderExample.md -docs/User.md -docs/UserApi.md -docs/XmlItem.md -git_push.sh -src/Org.OpenAPITools/Api/AnotherFakeApi.cs -src/Org.OpenAPITools/Api/FakeApi.cs -src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs -src/Org.OpenAPITools/Api/PetApi.cs -src/Org.OpenAPITools/Api/StoreApi.cs -src/Org.OpenAPITools/Api/UserApi.cs -src/Org.OpenAPITools/Client/ApiClient.cs -src/Org.OpenAPITools/Client/ApiException.cs -src/Org.OpenAPITools/Client/ApiResponse.cs -src/Org.OpenAPITools/Client/Configuration.cs -src/Org.OpenAPITools/Client/ExceptionFactory.cs -src/Org.OpenAPITools/Client/GlobalConfiguration.cs -src/Org.OpenAPITools/Client/IApiAccessor.cs -src/Org.OpenAPITools/Client/IReadableConfiguration.cs -src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs -src/Org.OpenAPITools/Model/Animal.cs -src/Org.OpenAPITools/Model/ApiResponse.cs -src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs -src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs -src/Org.OpenAPITools/Model/ArrayTest.cs -src/Org.OpenAPITools/Model/BigCat.cs -src/Org.OpenAPITools/Model/BigCatAllOf.cs -src/Org.OpenAPITools/Model/Capitalization.cs -src/Org.OpenAPITools/Model/Cat.cs -src/Org.OpenAPITools/Model/CatAllOf.cs -src/Org.OpenAPITools/Model/Category.cs -src/Org.OpenAPITools/Model/ClassModel.cs -src/Org.OpenAPITools/Model/Dog.cs -src/Org.OpenAPITools/Model/DogAllOf.cs -src/Org.OpenAPITools/Model/EnumArrays.cs -src/Org.OpenAPITools/Model/EnumClass.cs -src/Org.OpenAPITools/Model/EnumTest.cs -src/Org.OpenAPITools/Model/File.cs -src/Org.OpenAPITools/Model/FileSchemaTestClass.cs -src/Org.OpenAPITools/Model/FormatTest.cs -src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs -src/Org.OpenAPITools/Model/List.cs -src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs -src/Org.OpenAPITools/Model/Model200Response.cs -src/Org.OpenAPITools/Model/ModelClient.cs -src/Org.OpenAPITools/Model/Name.cs -src/Org.OpenAPITools/Model/NumberOnly.cs -src/Org.OpenAPITools/Model/Order.cs -src/Org.OpenAPITools/Model/OuterComposite.cs -src/Org.OpenAPITools/Model/OuterEnum.cs -src/Org.OpenAPITools/Model/Pet.cs -src/Org.OpenAPITools/Model/ReadOnlyFirst.cs -src/Org.OpenAPITools/Model/Return.cs -src/Org.OpenAPITools/Model/SpecialModelName.cs -src/Org.OpenAPITools/Model/Tag.cs -src/Org.OpenAPITools/Model/TypeHolderDefault.cs -src/Org.OpenAPITools/Model/TypeHolderExample.cs -src/Org.OpenAPITools/Model/User.cs -src/Org.OpenAPITools/Model/XmlItem.cs -src/Org.OpenAPITools/Org.OpenAPITools.csproj diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/Org.OpenAPITools.sln b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/Org.OpenAPITools.sln deleted file mode 100644 index e3f8cba8df6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/Org.OpenAPITools.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{67035b31-f8e5-41a4-9673-954035084f7d}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {67035b31-f8e5-41a4-9673-954035084f7d}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {67035b31-f8e5-41a4-9673-954035084f7d}.Debug|Any CPU.Build.0 = Debug|Any CPU - {67035b31-f8e5-41a4-9673-954035084f7d}.Release|Any CPU.ActiveCfg = Release|Any CPU - {67035b31-f8e5-41a4-9673-954035084f7d}.Release|Any CPU.Build.0 = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md deleted file mode 100644 index 569d82c8e20..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/README.md +++ /dev/null @@ -1,209 +0,0 @@ -# Org.OpenAPITools - the C# library for the 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: \" \\ - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- SDK version: 1.0.0 -- Build package: org.openapitools.codegen.languages.CSharpClientCodegen - -## Frameworks supported - - -- .NET Core >=1.0 -- .NET Framework >=4.6 -- Mono/Xamarin >=vNext -- UWP >=10.0 - -## Dependencies - - -- FubarCoder.RestSharp.Portable.Core >=4.0.7 -- FubarCoder.RestSharp.Portable.HttpClient >=4.0.7 -- Newtonsoft.Json >=10.0.3 - -## Installation - -Generate the DLL using your preferred tool - -Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: - -```csharp -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -``` - - -## Getting Started - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class Example - { - public static void Main() - { - - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test special tags - ModelClient result = apiInstance.Call123TestSpecialTags(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - - } - } -} -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*FakeApi* | [**CreateXmlItem**](docs/FakeApi.md#createxmlitem) | **POST** /fake/create_xml_item | creates an XmlItem -*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | -*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **POST** /user | Create user -*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation for Models - - - [Model.AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - - [Model.AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - - [Model.AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) - - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [Model.AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md) - - [Model.AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md) - - [Model.AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - - [Model.AdditionalPropertiesString](docs/AdditionalPropertiesString.md) - - [Model.Animal](docs/Animal.md) - - [Model.ApiResponse](docs/ApiResponse.md) - - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - - [Model.ArrayTest](docs/ArrayTest.md) - - [Model.BigCat](docs/BigCat.md) - - [Model.BigCatAllOf](docs/BigCatAllOf.md) - - [Model.Capitalization](docs/Capitalization.md) - - [Model.Cat](docs/Cat.md) - - [Model.CatAllOf](docs/CatAllOf.md) - - [Model.Category](docs/Category.md) - - [Model.ClassModel](docs/ClassModel.md) - - [Model.Dog](docs/Dog.md) - - [Model.DogAllOf](docs/DogAllOf.md) - - [Model.EnumArrays](docs/EnumArrays.md) - - [Model.EnumClass](docs/EnumClass.md) - - [Model.EnumTest](docs/EnumTest.md) - - [Model.File](docs/File.md) - - [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md) - - [Model.FormatTest](docs/FormatTest.md) - - [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - - [Model.List](docs/List.md) - - [Model.MapTest](docs/MapTest.md) - - [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model.Model200Response](docs/Model200Response.md) - - [Model.ModelClient](docs/ModelClient.md) - - [Model.Name](docs/Name.md) - - [Model.NumberOnly](docs/NumberOnly.md) - - [Model.Order](docs/Order.md) - - [Model.OuterComposite](docs/OuterComposite.md) - - [Model.OuterEnum](docs/OuterEnum.md) - - [Model.Pet](docs/Pet.md) - - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - - [Model.Return](docs/Return.md) - - [Model.SpecialModelName](docs/SpecialModelName.md) - - [Model.Tag](docs/Tag.md) - - [Model.TypeHolderDefault](docs/TypeHolderDefault.md) - - [Model.TypeHolderExample](docs/TypeHolderExample.md) - - [Model.User](docs/User.md) - - [Model.XmlItem](docs/XmlItem.md) - - -## Documentation for Authorization - - -### api_key - -- **Type**: API key - -- **API key parameter name**: api_key -- **Location**: HTTP header - - -### api_key_query - -- **Type**: API key - -- **API key parameter name**: api_key_query -- **Location**: URL query string - - -### http_basic_test - - -- **Type**: HTTP basic authentication - - -### petstore_auth - - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - write:pets: modify pets in your account - - read:pets: read your pets - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesAnyType.md deleted file mode 100644 index fd118d3bfc5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesAnyType.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesAnyType - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesArray.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesArray.md deleted file mode 100644 index 3d0606cea5f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesArray.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesArray - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesBoolean.md deleted file mode 100644 index bb4b2498263..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesBoolean.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesBoolean - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesClass.md deleted file mode 100644 index 12f3292db0b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesClass.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MapString** | **Dictionary<string, string>** | | [optional] -**MapNumber** | **Dictionary<string, decimal>** | | [optional] -**MapInteger** | **Dictionary<string, int>** | | [optional] -**MapBoolean** | **Dictionary<string, bool>** | | [optional] -**MapArrayInteger** | **Dictionary<string, List<int>>** | | [optional] -**MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] -**MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**Anytype1** | **Object** | | [optional] -**Anytype2** | **Object** | | [optional] -**Anytype3** | **Object** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesInteger.md deleted file mode 100644 index 86a6259ecc9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesInteger.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesInteger - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesNumber.md deleted file mode 100644 index 8dc46024e03..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesNumber.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesNumber - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesObject.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesObject.md deleted file mode 100644 index 455456fe6dd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesObject.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesString.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesString.md deleted file mode 100644 index 0f7cf804167..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AdditionalPropertiesString.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesString - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Animal.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Animal.md deleted file mode 100644 index 0a05bcdf061..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Animal.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Animal - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AnotherFakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AnotherFakeApi.md deleted file mode 100644 index 5af41a1862c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/AnotherFakeApi.md +++ /dev/null @@ -1,84 +0,0 @@ -# Org.OpenAPITools.Api.AnotherFakeApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**Call123TestSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags - - - -## Call123TestSpecialTags - -> ModelClient Call123TestSpecialTags (ModelClient body) - -To test special tags - -To test special tags and operation ID starting with number - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class Call123TestSpecialTagsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test special tags - ModelClient result = apiInstance.Call123TestSpecialTags(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ApiResponse.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ApiResponse.md deleted file mode 100644 index a3b916355fd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ApiResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.ApiResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Code** | **int** | | [optional] -**Type** | **string** | | [optional] -**Message** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index e05ea7dc240..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayOfArrayOfNumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayArrayNumber** | **List<List<decimal>>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ArrayOfNumberOnly.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ArrayOfNumberOnly.md deleted file mode 100644 index 5f593d42929..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ArrayOfNumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayOfNumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayNumber** | **List<decimal>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ArrayTest.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ArrayTest.md deleted file mode 100644 index 593bc2d7386..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ArrayTest.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayOfString** | **List<string>** | | [optional] -**ArrayArrayOfInteger** | **List<List<long>>** | | [optional] -**ArrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/BigCat.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/BigCat.md deleted file mode 100644 index 6247107ab35..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/BigCat.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.BigCat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Declawed** | **bool** | | [optional] -**Kind** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/BigCatAllOf.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/BigCatAllOf.md deleted file mode 100644 index 864c2298e03..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/BigCatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.BigCatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Kind** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Capitalization.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Capitalization.md deleted file mode 100644 index 0c66f2d2d44..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Capitalization.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Capitalization - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SmallCamel** | **string** | | [optional] -**CapitalCamel** | **string** | | [optional] -**SmallSnake** | **string** | | [optional] -**CapitalSnake** | **string** | | [optional] -**SCAETHFlowPoints** | **string** | | [optional] -**ATT_NAME** | **string** | Name 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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Cat.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Cat.md deleted file mode 100644 index 6609de8e12a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Cat.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.Cat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] -**Declawed** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/CatAllOf.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/CatAllOf.md deleted file mode 100644 index d623d2a0a6e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.CatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Declawed** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Category.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Category.md deleted file mode 100644 index 42102d4e508..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Category.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Category - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ClassModel.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ClassModel.md deleted file mode 100644 index b2b42407d2b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ClassModel.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ClassModel - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Class** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Dog.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Dog.md deleted file mode 100644 index 1f39769d2b9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Dog.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.Dog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] -**Breed** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/DogAllOf.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/DogAllOf.md deleted file mode 100644 index d72134a0f5f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.DogAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Breed** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/EnumArrays.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/EnumArrays.md deleted file mode 100644 index 9d58d25f972..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/EnumArrays.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.EnumArrays - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JustSymbol** | **string** | | [optional] -**ArrayEnum** | **List<string>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/EnumClass.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/EnumClass.md deleted file mode 100644 index 16d21587b4c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/EnumClass.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.EnumClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/EnumTest.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/EnumTest.md deleted file mode 100644 index f8bc67baa6a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/EnumTest.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Org.OpenAPITools.Model.EnumTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EnumString** | **string** | | [optional] -**EnumStringRequired** | **string** | | -**EnumInteger** | **int** | | [optional] -**EnumNumber** | **double** | | [optional] -**OuterEnum** | **OuterEnum** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md deleted file mode 100644 index 47853770985..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeApi.md +++ /dev/null @@ -1,1118 +0,0 @@ -# Org.OpenAPITools.Api.FakeApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateXmlItem**](FakeApi.md#createxmlitem) | **POST** /fake/create_xml_item | creates an XmlItem -[**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -[**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -[**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -[**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -[**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -[**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -[**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -[**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | - - - -## CreateXmlItem - -> void CreateXmlItem (XmlItem xmlItem) - -creates an XmlItem - -this route creates an XmlItem - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateXmlItemExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var xmlItem = new XmlItem(); // XmlItem | XmlItem Body - - try - { - // creates an XmlItem - apiInstance.CreateXmlItem(xmlItem); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.CreateXmlItem: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## FakeOuterBooleanSerialize - -> bool FakeOuterBooleanSerialize (bool? body = null) - - - -Test serialization of outer boolean types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterBooleanSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = true; // bool? | Input boolean as post body (optional) - - try - { - bool result = apiInstance.FakeOuterBooleanSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **bool?**| Input boolean as post body | [optional] - -### Return type - -**bool** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output boolean | - | - -[[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) - - -## FakeOuterCompositeSerialize - -> OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null) - - - -Test serialization of object with outer number type - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterCompositeSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional) - - try - { - OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output composite | - | - -[[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) - - -## FakeOuterNumberSerialize - -> decimal FakeOuterNumberSerialize (decimal? body = null) - - - -Test serialization of outer number types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterNumberSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = 8.14; // decimal? | Input number as post body (optional) - - try - { - decimal result = apiInstance.FakeOuterNumberSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **decimal?**| Input number as post body | [optional] - -### Return type - -**decimal** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output number | - | - -[[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) - - -## FakeOuterStringSerialize - -> string FakeOuterStringSerialize (string body = null) - - - -Test serialization of outer string types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterStringSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = body_example; // string | Input string as post body (optional) - - try - { - string result = apiInstance.FakeOuterStringSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **string**| Input string as post body | [optional] - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output string | - | - -[[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) - - -## TestBodyWithFileSchema - -> void TestBodyWithFileSchema (FileSchemaTestClass body) - - - -For this test, the body for this request much reference a schema named `File`. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestBodyWithFileSchemaExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new FileSchemaTestClass(); // FileSchemaTestClass | - - try - { - apiInstance.TestBodyWithFileSchema(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - - -## TestBodyWithQueryParams - -> void TestBodyWithQueryParams (string query, User body) - - - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestBodyWithQueryParamsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var query = query_example; // string | - var body = new User(); // User | - - try - { - apiInstance.TestBodyWithQueryParams(query, body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **string**| | - **body** | [**User**](User.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - - -## TestClientModel - -> ModelClient TestClientModel (ModelClient body) - -To test \"client\" model - -To test \"client\" model - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestClientModelExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test \"client\" model - ModelClient result = apiInstance.TestClientModel(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestEndpointParameters - -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestEndpointParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure HTTP basic authorization: http_basic_test - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - - var apiInstance = new FakeApi(Configuration.Default); - var number = 8.14; // decimal | None - var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None - var integer = 56; // int? | None (optional) - var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) - var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) - var password = password_example; // string | None (optional) - var callback = callback_example; // string | None (optional) - - try - { - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **decimal**| None | - **_double** | **double**| None | - **patternWithoutDelimiter** | **string**| None | - **_byte** | **byte[]**| None | - **integer** | **int?**| None | [optional] - **int32** | **int?**| None | [optional] - **int64** | **long?**| None | [optional] - **_float** | **float?**| None | [optional] - **_string** | **string**| None | [optional] - **binary** | **System.IO.Stream**| None | [optional] - **date** | **DateTime?**| None | [optional] - **dateTime** | **DateTime?**| None | [optional] - **password** | **string**| None | [optional] - **callback** | **string**| None | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## TestEnumParameters - -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) - -To test enum parameters - -To test enum parameters - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestEnumParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) - var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) - var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) - - try - { - // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional] - **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] - **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] - **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] - **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] - **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] - **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid request | - | -| **404** | Not found | - | - -[[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) - - -## TestGroupParameters - -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestGroupParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var requiredStringGroup = 56; // int | Required String in group parameters - var requiredBooleanGroup = true; // bool | Required Boolean in group parameters - var requiredInt64Group = 789; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) - var booleanGroup = true; // bool? | Boolean in group parameters (optional) - var int64Group = 789; // long? | Integer in group parameters (optional) - - try - { - // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **int**| Required String in group parameters | - **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | - **requiredInt64Group** | **long**| Required Integer in group parameters | - **stringGroup** | **int?**| String in group parameters | [optional] - **booleanGroup** | **bool?**| Boolean in group parameters | [optional] - **int64Group** | **long?**| Integer in group parameters | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Something wrong | - | - -[[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) - - -## TestInlineAdditionalProperties - -> void TestInlineAdditionalProperties (Dictionary param) - -test inline additionalProperties - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestInlineAdditionalPropertiesExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var param = new Dictionary(); // Dictionary | request body - - try - { - // test inline additionalProperties - apiInstance.TestInlineAdditionalProperties(param); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestInlineAdditionalProperties: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Dictionary<string, string>**](string.md)| request body | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestJsonFormData - -> void TestJsonFormData (string param, string param2) - -test json serialization of form data - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestJsonFormDataExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 - - try - { - // test json serialization of form data - apiInstance.TestJsonFormData(param, param2); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **string**| field1 | - **param2** | **string**| field2 | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestQueryParameterCollectionFormat - -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) - - - -To test the collection format in query parameters - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestQueryParameterCollectionFormatExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var pipe = new List(); // List | - var ioutil = new List(); // List | - var http = new List(); // List | - var url = new List(); // List | - var context = new List(); // List | - - try - { - apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormat: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<string>**](string.md)| | - **ioutil** | [**List<string>**](string.md)| | - **http** | [**List<string>**](string.md)| | - **url** | [**List<string>**](string.md)| | - **context** | [**List<string>**](string.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeClassnameTags123Api.md deleted file mode 100644 index deb97a27697..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FakeClassnameTags123Api.md +++ /dev/null @@ -1,89 +0,0 @@ -# Org.OpenAPITools.Api.FakeClassnameTags123Api - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**TestClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case - - - -## TestClassname - -> ModelClient TestClassname (ModelClient body) - -To test class name in snake case - -To test class name in snake case - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestClassnameExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key_query - Configuration.Default.AddApiKey("api_key_query", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key_query", "Bearer"); - - var apiInstance = new FakeClassnameTags123Api(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test class name in snake case - ModelClient result = apiInstance.TestClassname(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeClassnameTags123Api.TestClassname: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/File.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/File.md deleted file mode 100644 index b7105102579..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/File.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.File - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SourceURI** | **string** | Test capitalization | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FileSchemaTestClass.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FileSchemaTestClass.md deleted file mode 100644 index df1453f686b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FileSchemaTestClass.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.FileSchemaTestClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**File** | [**File**](File.md) | | [optional] -**Files** | [**List<File>**](File.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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FormatTest.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FormatTest.md deleted file mode 100644 index 92d7d1e0104..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/FormatTest.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Org.OpenAPITools.Model.FormatTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Integer** | **int** | | [optional] -**Int32** | **int** | | [optional] -**Int64** | **long** | | [optional] -**Number** | **decimal** | | -**Float** | **float** | | [optional] -**Double** | **double** | | [optional] -**String** | **string** | | [optional] -**Byte** | **byte[]** | | -**Binary** | **System.IO.Stream** | | [optional] -**Date** | **DateTime** | | -**DateTime** | **DateTime** | | [optional] -**Uuid** | **Guid** | | [optional] -**Password** | **string** | | -**BigDecimal** | **decimal** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/HasOnlyReadOnly.md deleted file mode 100644 index 043d2442b4e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/HasOnlyReadOnly.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.HasOnlyReadOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] [readonly] -**Foo** | **string** | | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/List.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/List.md deleted file mode 100644 index cb41193b43e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/List.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.List - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123List** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/MapTest.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/MapTest.md deleted file mode 100644 index 79d499e2cf9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/MapTest.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Org.OpenAPITools.Model.MapTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**MapOfEnumString** | **Dictionary<string, string>** | | [optional] -**DirectMap** | **Dictionary<string, bool>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index dd7b01e49fe..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.MixedPropertiesAndAdditionalPropertiesClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Uuid** | **Guid** | | [optional] -**DateTime** | **DateTime** | | [optional] -**Map** | [**Dictionary<string, Animal>**](Animal.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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Model200Response.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Model200Response.md deleted file mode 100644 index 7d826bca1ec..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Model200Response.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Model200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **int** | | [optional] -**Class** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ModelClient.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ModelClient.md deleted file mode 100644 index e36e1fad802..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ModelClient.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ModelClient - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**__Client** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Name.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Name.md deleted file mode 100644 index bfd7955e5b4..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Name.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Org.OpenAPITools.Model.Name - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_Name** | **int** | | -**SnakeCase** | **int** | | [optional] [readonly] -**Property** | **string** | | [optional] -**_123Number** | **int** | | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/NumberOnly.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/NumberOnly.md deleted file mode 100644 index e4b08467e08..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/NumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.NumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JustNumber** | **decimal** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Order.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Order.md deleted file mode 100644 index 875f43a30e5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Order.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Order - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**PetId** | **long** | | [optional] -**Quantity** | **int** | | [optional] -**ShipDate** | **DateTime** | | [optional] -**Status** | **string** | Order Status | [optional] -**Complete** | **bool** | | [optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/OuterComposite.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/OuterComposite.md deleted file mode 100644 index f381fb7fd28..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/OuterComposite.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.OuterComposite - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MyNumber** | **decimal** | | [optional] -**MyString** | **string** | | [optional] -**MyBoolean** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/OuterEnum.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/OuterEnum.md deleted file mode 100644 index edc2300684d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/OuterEnum.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.OuterEnum - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Pet.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Pet.md deleted file mode 100644 index 0bd5c40fc99..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Pet.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Pet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Category** | [**Category**](Category.md) | | [optional] -**Name** | **string** | | -**PhotoUrls** | **List<string>** | | -**Tags** | [**List<Tag>**](Tag.md) | | [optional] -**Status** | **string** | pet status in the store | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/PetApi.md deleted file mode 100644 index 1a9eba14868..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/PetApi.md +++ /dev/null @@ -1,728 +0,0 @@ -# Org.OpenAPITools.Api.PetApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -[**DeletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -[**FindPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -[**FindPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -[**GetPetById**](PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -[**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -[**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) - - - -## AddPet - -> void AddPet (Pet body) - -Add a new pet to the store - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class AddPetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var body = new Pet(); // Pet | Pet object that needs to be added to the store - - try - { - // Add a new pet to the store - apiInstance.AddPet(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.AddPet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **405** | Invalid input | - | - -[[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) - - -## DeletePet - -> void DeletePet (long petId, string apiKey = null) - -Deletes a pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeletePetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) - - try - { - // Deletes a pet - apiInstance.DeletePet(petId, apiKey); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| Pet id to delete | - **apiKey** | **string**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid pet value | - | - -[[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) - - -## FindPetsByStatus - -> List<Pet> FindPetsByStatus (List status) - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FindPetsByStatusExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var status = status_example; // List | Status values that need to be considered for filter - - try - { - // Finds Pets by status - List result = apiInstance.FindPetsByStatus(status); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **List<string>**| Status values that need to be considered for filter | - -### Return type - -[**List<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid status value | - | - -[[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) - - -## FindPetsByTags - -> List<Pet> FindPetsByTags (List tags) - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FindPetsByTagsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var tags = new List(); // List | Tags to filter by - - try - { - // Finds Pets by tags - List result = apiInstance.FindPetsByTags(tags); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**List<string>**](string.md)| Tags to filter by | - -### Return type - -[**List<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid tag value | - | - -[[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) - - -## GetPetById - -> Pet GetPetById (long petId) - -Find pet by ID - -Returns a single pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetPetByIdExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to return - - try - { - // Find pet by ID - Pet result = apiInstance.GetPetById(petId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to return | - -### Return type - -[**Pet**](Pet.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | - -[[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) - - -## UpdatePet - -> void UpdatePet (Pet body) - -Update an existing pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdatePetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var body = new Pet(); // Pet | Pet object that needs to be added to the store - - try - { - // Update an existing pet - apiInstance.UpdatePet(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | -| **405** | Validation exception | - | - -[[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) - - -## UpdatePetWithForm - -> void UpdatePetWithForm (long petId, string name = null, string status = null) - -Updates a pet in the store with form data - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdatePetWithFormExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet that needs to be updated - var name = name_example; // string | Updated name of the pet (optional) - var status = status_example; // string | Updated status of the pet (optional) - - try - { - // Updates a pet in the store with form data - apiInstance.UpdatePetWithForm(petId, name, status); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet that needs to be updated | - **name** | **string**| Updated name of the pet | [optional] - **status** | **string**| Updated status of the pet | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **405** | Invalid input | - | - -[[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) - - -## UploadFile - -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) - -uploads an image - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to update - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) - - try - { - // uploads an image - ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to update | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - **file** | **System.IO.Stream**| file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UploadFileWithRequiredFile - -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) - -uploads an image (required) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileWithRequiredFileExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to update - var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - - try - { - // uploads an image (required) - ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to update | - **requiredFile** | **System.IO.Stream**| file to upload | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ReadOnlyFirst.md deleted file mode 100644 index 8ea3b95919b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/ReadOnlyFirst.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.ReadOnlyFirst - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] [readonly] -**Baz** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Return.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Return.md deleted file mode 100644 index 4761c70748e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Return.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.Return - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_Return** | **int** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/SpecialModelName.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/SpecialModelName.md deleted file mode 100644 index ee6489524d0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/SpecialModelName.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.SpecialModelName - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SpecialPropertyName** | **long** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/StoreApi.md deleted file mode 100644 index ae123168a11..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/StoreApi.md +++ /dev/null @@ -1,314 +0,0 @@ -# Org.OpenAPITools.Api.StoreApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**GetInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[**PlaceOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet - - - -## DeleteOrder - -> void DeleteOrder (string orderId) - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeleteOrderExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var orderId = orderId_example; // string | ID of the order that needs to be deleted - - try - { - // Delete purchase order by ID - apiInstance.DeleteOrder(orderId); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **string**| ID of the order that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - -[[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) - - -## GetInventory - -> Dictionary<string, int> GetInventory () - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetInventoryExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - - var apiInstance = new StoreApi(Configuration.Default); - - try - { - // Returns pet inventories by status - Dictionary result = apiInstance.GetInventory(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**Dictionary** - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetOrderById - -> Order GetOrderById (long orderId) - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetOrderByIdExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var orderId = 789; // long | ID of pet that needs to be fetched - - try - { - // Find purchase order by ID - Order result = apiInstance.GetOrderById(orderId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **long**| ID of pet that needs to be fetched | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - -[[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) - - -## PlaceOrder - -> Order PlaceOrder (Order body) - -Place an order for a pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class PlaceOrderExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var body = new Order(); // Order | order placed for purchasing the pet - - try - { - // Place an order for a pet - Order result = apiInstance.PlaceOrder(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid Order | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Tag.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Tag.md deleted file mode 100644 index f781c26f017..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/Tag.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Tag - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/TypeHolderDefault.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/TypeHolderDefault.md deleted file mode 100644 index 0945245b213..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/TypeHolderDefault.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Org.OpenAPITools.Model.TypeHolderDefault - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StringItem** | **string** | | [default to "what"] -**NumberItem** | **decimal** | | -**IntegerItem** | **int** | | -**BoolItem** | **bool** | | [default to true] -**ArrayItem** | **List<int>** | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/TypeHolderExample.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/TypeHolderExample.md deleted file mode 100644 index b9573673baf..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/TypeHolderExample.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.TypeHolderExample - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StringItem** | **string** | | -**NumberItem** | **decimal** | | -**FloatItem** | **float** | | -**IntegerItem** | **int** | | -**BoolItem** | **bool** | | -**ArrayItem** | **List<int>** | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/User.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/User.md deleted file mode 100644 index a25c25d1aa0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/User.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Org.OpenAPITools.Model.User - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Username** | **string** | | [optional] -**FirstName** | **string** | | [optional] -**LastName** | **string** | | [optional] -**Email** | **string** | | [optional] -**Password** | **string** | | [optional] -**Phone** | **string** | | [optional] -**UserStatus** | **int** | User Status | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/UserApi.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/UserApi.md deleted file mode 100644 index 1385d840413..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/UserApi.md +++ /dev/null @@ -1,605 +0,0 @@ -# Org.OpenAPITools.Api.UserApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateUser**](UserApi.md#createuser) | **POST** /user | Create user -[**CreateUsersWithArrayInput**](UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -[**CreateUsersWithListInput**](UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -[**DeleteUser**](UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -[**GetUserByName**](UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -[**LoginUser**](UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -[**LogoutUser**](UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -[**UpdateUser**](UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - - -## CreateUser - -> void CreateUser (User body) - -Create user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var body = new User(); // User | Created user object - - try - { - // Create user - apiInstance.CreateUser(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateUsersWithArrayInput - -> void CreateUsersWithArrayInput (List body) - -Creates list of users with given input array - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUsersWithArrayInputExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var body = new List(); // List | List of user object - - try - { - // Creates list of users with given input array - apiInstance.CreateUsersWithArrayInput(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateUsersWithListInput - -> void CreateUsersWithListInput (List body) - -Creates list of users with given input array - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUsersWithListInputExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var body = new List(); // List | List of user object - - try - { - // Creates list of users with given input array - apiInstance.CreateUsersWithListInput(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteUser - -> void DeleteUser (string username) - -Delete user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeleteUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The name that needs to be deleted - - try - { - // Delete user - apiInstance.DeleteUser(username); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## GetUserByName - -> User GetUserByName (string username) - -Get user by user name - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetUserByNameExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. - - try - { - // Get user by user name - User result = apiInstance.GetUserByName(username); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be fetched. Use user1 for testing. | - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## LoginUser - -> string LoginUser (string username, string password) - -Logs user into the system - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class LoginUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text - - try - { - // Logs user into the system - string result = apiInstance.LoginUser(username, password); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The user name for login | - **password** | **string**| The password for login in clear text | - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| -| **400** | Invalid username/password supplied | - | - -[[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) - - -## LogoutUser - -> void LogoutUser () - -Logs out current logged in user session - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class LogoutUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - - try - { - // Logs out current logged in user session - apiInstance.LogoutUser(); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateUser - -> void UpdateUser (string username, User body) - -Updated user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdateUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | name that need to be deleted - var body = new User(); // User | Updated user object - - try - { - // Updated user - apiInstance.UpdateUser(username, body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid user supplied | - | -| **404** | User not found | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/XmlItem.md b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/XmlItem.md deleted file mode 100644 index 0dca90c706f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/docs/XmlItem.md +++ /dev/null @@ -1,41 +0,0 @@ - -# Org.OpenAPITools.Model.XmlItem - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AttributeString** | **string** | | [optional] -**AttributeNumber** | **decimal** | | [optional] -**AttributeInteger** | **int** | | [optional] -**AttributeBoolean** | **bool** | | [optional] -**WrappedArray** | **List<int>** | | [optional] -**NameString** | **string** | | [optional] -**NameNumber** | **decimal** | | [optional] -**NameInteger** | **int** | | [optional] -**NameBoolean** | **bool** | | [optional] -**NameArray** | **List<int>** | | [optional] -**NameWrappedArray** | **List<int>** | | [optional] -**PrefixString** | **string** | | [optional] -**PrefixNumber** | **decimal** | | [optional] -**PrefixInteger** | **int** | | [optional] -**PrefixBoolean** | **bool** | | [optional] -**PrefixArray** | **List<int>** | | [optional] -**PrefixWrappedArray** | **List<int>** | | [optional] -**NamespaceString** | **string** | | [optional] -**NamespaceNumber** | **decimal** | | [optional] -**NamespaceInteger** | **int** | | [optional] -**NamespaceBoolean** | **bool** | | [optional] -**NamespaceArray** | **List<int>** | | [optional] -**NamespaceWrappedArray** | **List<int>** | | [optional] -**PrefixNsString** | **string** | | [optional] -**PrefixNsNumber** | **decimal** | | [optional] -**PrefixNsInteger** | **int** | | [optional] -**PrefixNsBoolean** | **bool** | | [optional] -**PrefixNsArray** | **List<int>** | | [optional] -**PrefixNsWrappedArray** | **List<int>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/git_push.sh b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/git_push.sh deleted file mode 100644 index 200e975d212..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/AnotherFakeApi.cs deleted file mode 100644 index aee1041cf42..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ /dev/null @@ -1,337 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp.Portable; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IAnotherFakeApi : IApiAccessor - { - #region Synchronous Operations - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient Call123TestSpecialTags (ModelClient body); - - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse Call123TestSpecialTagsWithHttpInfo (ModelClient body); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - System.Threading.Tasks.Task Call123TestSpecialTagsAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class AnotherFakeApi : IAnotherFakeApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public AnotherFakeApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public AnotherFakeApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public AnotherFakeApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient Call123TestSpecialTags (ModelClient body) - { - ApiResponse localVarResponse = Call123TestSpecialTagsWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse Call123TestSpecialTagsWithHttpInfo (ModelClient body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->Call123TestSpecialTags"); - - var localVarPath = "./another-fake/dummy"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Call123TestSpecialTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->Call123TestSpecialTags"); - - var localVarPath = "./another-fake/dummy"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Call123TestSpecialTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeApi.cs deleted file mode 100644 index 88b9ccf2692..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeApi.cs +++ /dev/null @@ -1,3122 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp.Portable; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IFakeApi : IApiAccessor - { - #region Synchronous Operations - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// - void CreateXmlItem (XmlItem xmlItem); - - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// ApiResponse of Object(void) - ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem); - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// bool - bool FakeOuterBooleanSerialize (bool? body = default(bool?)); - - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)); - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// OuterComposite - OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)); - - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)); - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// decimal - decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)); - - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)); - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// string - string FakeOuterStringSerialize (string body = default(string)); - - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)); - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// - void TestBodyWithFileSchema (FileSchemaTestClass body); - - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass body); - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void TestBodyWithQueryParams (string query, User body); - - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, User body); - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient TestClientModel (ModelClient body); - - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse TestClientModelWithHttpInfo (ModelClient body); - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// - void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), 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 test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// - void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); - - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// - void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); - - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// - void TestInlineAdditionalProperties (Dictionary param); - - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// ApiResponse of Object(void) - ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Dictionary param); - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// - void TestJsonFormData (string param, string param2); - - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// ApiResponse of Object(void) - ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2); - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context); - - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task CreateXmlItemAsync (XmlItem xmlItem, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateXmlItemWithHttpInfoAsync (XmlItem xmlItem, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync (OuterComposite body = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestBodyWithFileSchemaAsync (FileSchemaTestClass body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync (FileSchemaTestClass body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestBodyWithQueryParamsAsync (string query, User body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync (string query, User body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - System.Threading.Tasks.Task TestClientModelAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync (Dictionary param, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync (Dictionary param, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestJsonFormDataAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List pipe, List ioutil, List http, List url, List context, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync (List pipe, List ioutil, List http, List url, List context, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class FakeApi : IFakeApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public FakeApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public FakeApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public FakeApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// - public void CreateXmlItem (XmlItem xmlItem) - { - CreateXmlItemWithHttpInfo(xmlItem); - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// ApiResponse of Object(void) - public ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem) - { - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) - throw new ApiException(400, "Missing required parameter 'xmlItem' when calling FakeApi->CreateXmlItem"); - - var localVarPath = "./fake/create_xml_item"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/xml", - "application/xml; charset=utf-8", - "application/xml; charset=utf-16", - "text/xml", - "text/xml; charset=utf-8", - "text/xml; charset=utf-16" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (xmlItem != null && xmlItem.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(xmlItem); // http body (model) parameter - } - else - { - localVarPostBody = xmlItem; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateXmlItem", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateXmlItemAsync (XmlItem xmlItem, CancellationToken cancellationToken = default(CancellationToken)) - { - await CreateXmlItemWithHttpInfoAsync(xmlItem, cancellationToken); - - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateXmlItemWithHttpInfoAsync (XmlItem xmlItem, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) - throw new ApiException(400, "Missing required parameter 'xmlItem' when calling FakeApi->CreateXmlItem"); - - var localVarPath = "./fake/create_xml_item"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/xml", - "application/xml; charset=utf-8", - "application/xml; charset=utf-16", - "text/xml", - "text/xml; charset=utf-8", - "text/xml; charset=utf-16" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (xmlItem != null && xmlItem.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(xmlItem); // http body (model) parameter - } - else - { - localVarPostBody = xmlItem; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateXmlItem", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// bool - public bool FakeOuterBooleanSerialize (bool? body = default(bool?)) - { - ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// ApiResponse of bool - public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)) - { - - var localVarPath = "./fake/outer/boolean"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (bool) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(bool))); - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "./fake/outer/boolean"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (bool) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(bool))); - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)) - { - ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// ApiResponse of OuterComposite - public ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)) - { - - var localVarPath = "./fake/outer/composite"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (OuterComposite) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite))); - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync (OuterComposite body = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "./fake/outer/composite"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (OuterComposite) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite))); - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// decimal - public decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)) - { - ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// ApiResponse of decimal - public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)) - { - - var localVarPath = "./fake/outer/number"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (decimal) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(decimal))); - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "./fake/outer/number"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (decimal) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(decimal))); - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// string - public string FakeOuterStringSerialize (string body = default(string)) - { - ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// ApiResponse of string - public ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)) - { - - var localVarPath = "./fake/outer/string"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "./fake/outer/string"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// - public void TestBodyWithFileSchema (FileSchemaTestClass body) - { - TestBodyWithFileSchemaWithHttpInfo(body); - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithFileSchema"); - - var localVarPath = "./fake/body-with-file-schema"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithFileSchema", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync (FileSchemaTestClass body, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestBodyWithFileSchemaWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync (FileSchemaTestClass body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithFileSchema"); - - var localVarPath = "./fake/body-with-file-schema"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithFileSchema", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - public void TestBodyWithQueryParams (string query, User body) - { - TestBodyWithQueryParamsWithHttpInfo(query, body); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - public ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, User body) - { - // verify the required parameter 'query' is set - if (query == null) - throw new ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams"); - - var localVarPath = "./fake/body-with-query-params"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithQueryParams", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync (string query, User body, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestBodyWithQueryParamsWithHttpInfoAsync(query, body, cancellationToken); - - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync (string query, User body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'query' is set - if (query == null) - throw new ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams"); - - var localVarPath = "./fake/body-with-query-params"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithQueryParams", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient TestClientModel (ModelClient body) - { - ApiResponse localVarResponse = TestClientModelWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse TestClientModelWithHttpInfo (ModelClient body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel"); - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClientModel", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - public async System.Threading.Tasks.Task TestClientModelAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel"); - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClientModel", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// - public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) - { - TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) - { - // verify the required parameter 'number' is set - if (number == null) - throw new ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_double' is set - if (_double == null) - throw new ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'patternWithoutDelimiter' is set - if (patternWithoutDelimiter == null) - throw new ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_byte' is set - if (_byte == null) - throw new ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (integer != null) localVarFormParams.Add("integer", this.Configuration.ApiClient.ParameterToString(integer)); // form parameter - if (int32 != null) localVarFormParams.Add("int32", this.Configuration.ApiClient.ParameterToString(int32)); // form parameter - if (int64 != null) localVarFormParams.Add("int64", this.Configuration.ApiClient.ParameterToString(int64)); // form parameter - if (number != null) localVarFormParams.Add("number", this.Configuration.ApiClient.ParameterToString(number)); // form parameter - if (_float != null) localVarFormParams.Add("float", this.Configuration.ApiClient.ParameterToString(_float)); // form parameter - if (_double != null) localVarFormParams.Add("double", this.Configuration.ApiClient.ParameterToString(_double)); // form parameter - if (_string != null) localVarFormParams.Add("string", this.Configuration.ApiClient.ParameterToString(_string)); // form parameter - if (patternWithoutDelimiter != null) localVarFormParams.Add("pattern_without_delimiter", this.Configuration.ApiClient.ParameterToString(patternWithoutDelimiter)); // form parameter - if (_byte != null) localVarFormParams.Add("byte", this.Configuration.ApiClient.ParameterToString(_byte)); // form parameter - if (binary != null) localVarFileParams.Add("binary", this.Configuration.ApiClient.ParameterToFile("binary", binary)); - if (date != null) localVarFormParams.Add("date", this.Configuration.ApiClient.ParameterToString(date)); // form parameter - if (dateTime != null) localVarFormParams.Add("dateTime", this.Configuration.ApiClient.ParameterToString(dateTime)); // form parameter - if (password != null) localVarFormParams.Add("password", this.Configuration.ApiClient.ParameterToString(password)); // form parameter - if (callback != null) localVarFormParams.Add("callback", this.Configuration.ApiClient.ParameterToString(callback)); // form parameter - - // authentication (http_basic_test) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestEndpointParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken); - - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'number' is set - if (number == null) - throw new ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_double' is set - if (_double == null) - throw new ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'patternWithoutDelimiter' is set - if (patternWithoutDelimiter == null) - throw new ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_byte' is set - if (_byte == null) - throw new ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (integer != null) localVarFormParams.Add("integer", this.Configuration.ApiClient.ParameterToString(integer)); // form parameter - if (int32 != null) localVarFormParams.Add("int32", this.Configuration.ApiClient.ParameterToString(int32)); // form parameter - if (int64 != null) localVarFormParams.Add("int64", this.Configuration.ApiClient.ParameterToString(int64)); // form parameter - if (number != null) localVarFormParams.Add("number", this.Configuration.ApiClient.ParameterToString(number)); // form parameter - if (_float != null) localVarFormParams.Add("float", this.Configuration.ApiClient.ParameterToString(_float)); // form parameter - if (_double != null) localVarFormParams.Add("double", this.Configuration.ApiClient.ParameterToString(_double)); // form parameter - if (_string != null) localVarFormParams.Add("string", this.Configuration.ApiClient.ParameterToString(_string)); // form parameter - if (patternWithoutDelimiter != null) localVarFormParams.Add("pattern_without_delimiter", this.Configuration.ApiClient.ParameterToString(patternWithoutDelimiter)); // form parameter - if (_byte != null) localVarFormParams.Add("byte", this.Configuration.ApiClient.ParameterToString(_byte)); // form parameter - if (binary != null) localVarFileParams.Add("binary", this.Configuration.ApiClient.ParameterToFile("binary", binary)); - if (date != null) localVarFormParams.Add("date", this.Configuration.ApiClient.ParameterToString(date)); // form parameter - if (dateTime != null) localVarFormParams.Add("dateTime", this.Configuration.ApiClient.ParameterToString(dateTime)); // form parameter - if (password != null) localVarFormParams.Add("password", this.Configuration.ApiClient.ParameterToString(password)); // form parameter - if (callback != null) localVarFormParams.Add("callback", this.Configuration.ApiClient.ParameterToString(callback)); // form parameter - - // authentication (http_basic_test) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestEndpointParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// - public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) - { - TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// ApiResponse of Object(void) - public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) - { - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter - if (enumQueryString != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_string", enumQueryString)); // query parameter - if (enumQueryInteger != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_integer", enumQueryInteger)); // query parameter - if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter - if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter - if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter - if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter - if (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter - - - // 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("TestEnumParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken); - - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter - if (enumQueryString != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_string", enumQueryString)); // query parameter - if (enumQueryInteger != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_integer", enumQueryInteger)); // query parameter - if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter - if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter - if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter - if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter - if (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestEnumParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// - public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) - { - TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// ApiResponse of Object(void) - public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) - { - // verify the required parameter 'requiredStringGroup' is set - if (requiredStringGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredBooleanGroup' is set - if (requiredBooleanGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredInt64Group' is set - if (requiredInt64Group == null) - throw new ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (requiredStringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_string_group", requiredStringGroup)); // query parameter - if (requiredInt64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_int64_group", requiredInt64Group)); // query parameter - if (stringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "string_group", stringGroup)); // query parameter - if (int64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "int64_group", int64Group)); // query parameter - if (requiredBooleanGroup != null) localVarHeaderParams.Add("required_boolean_group", this.Configuration.ApiClient.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) localVarHeaderParams.Add("boolean_group", this.Configuration.ApiClient.ParameterToString(booleanGroup)); // header parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestGroupParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)) - { - await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken); - - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'requiredStringGroup' is set - if (requiredStringGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredBooleanGroup' is set - if (requiredBooleanGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredInt64Group' is set - if (requiredInt64Group == null) - throw new ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (requiredStringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_string_group", requiredStringGroup)); // query parameter - if (requiredInt64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_int64_group", requiredInt64Group)); // query parameter - if (stringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "string_group", stringGroup)); // query parameter - if (int64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "int64_group", int64Group)); // query parameter - if (requiredBooleanGroup != null) localVarHeaderParams.Add("required_boolean_group", this.Configuration.ApiClient.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) localVarHeaderParams.Add("boolean_group", this.Configuration.ApiClient.ParameterToString(booleanGroup)); // header parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestGroupParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// - public void TestInlineAdditionalProperties (Dictionary param) - { - TestInlineAdditionalPropertiesWithHttpInfo(param); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// ApiResponse of Object(void) - public ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Dictionary param) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties"); - - var localVarPath = "./fake/inline-additionalProperties"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null && param.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(param); // http body (model) parameter - } - else - { - localVarPostBody = param; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync (Dictionary param, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestInlineAdditionalPropertiesWithHttpInfoAsync(param, cancellationToken); - - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync (Dictionary param, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties"); - - var localVarPath = "./fake/inline-additionalProperties"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null && param.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(param); // http body (model) parameter - } - else - { - localVarPostBody = param; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// - public void TestJsonFormData (string param, string param2) - { - TestJsonFormDataWithHttpInfo(param, param2); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// ApiResponse of Object(void) - public ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - // verify the required parameter 'param2' is set - if (param2 == null) - throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - - var localVarPath = "./fake/jsonFormData"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null) localVarFormParams.Add("param", this.Configuration.ApiClient.ParameterToString(param)); // form parameter - if (param2 != null) localVarFormParams.Add("param2", this.Configuration.ApiClient.ParameterToString(param2)); // form parameter - - - // 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("TestJsonFormData", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestJsonFormDataAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken); - - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - // verify the required parameter 'param2' is set - if (param2 == null) - throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - - var localVarPath = "./fake/jsonFormData"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null) localVarFormParams.Add("param", this.Configuration.ApiClient.ParameterToString(param)); // form parameter - if (param2 != null) localVarFormParams.Add("param2", this.Configuration.ApiClient.ParameterToString(param2)); // form parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestJsonFormData", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - public void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) - { - TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// ApiResponse of Object(void) - public ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context) - { - // verify the required parameter 'pipe' is set - if (pipe == null) - throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'ioutil' is set - if (ioutil == null) - throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'http' is set - if (http == null) - throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'url' is set - if (url == null) - throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'context' is set - if (context == null) - throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - - var localVarPath = "./fake/test-query-parameters"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter - if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter - if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("ssv", "http", http)); // query parameter - if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter - if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List pipe, List ioutil, List http, List url, List context, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken); - - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync (List pipe, List ioutil, List http, List url, List context, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'pipe' is set - if (pipe == null) - throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'ioutil' is set - if (ioutil == null) - throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'http' is set - if (http == null) - throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'url' is set - if (url == null) - throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'context' is set - if (context == null) - throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - - var localVarPath = "./fake/test-query-parameters"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter - if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter - if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("ssv", "http", http)); // query parameter - if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter - if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs deleted file mode 100644 index 9b590aaa767..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ /dev/null @@ -1,347 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp.Portable; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IFakeClassnameTags123Api : IApiAccessor - { - #region Synchronous Operations - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient TestClassname (ModelClient body); - - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse TestClassnameWithHttpInfo (ModelClient body); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - System.Threading.Tasks.Task TestClassnameAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public FakeClassnameTags123Api(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public FakeClassnameTags123Api() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public FakeClassnameTags123Api(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient TestClassname (ModelClient body) - { - ApiResponse localVarResponse = TestClassnameWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse TestClassnameWithHttpInfo (ModelClient body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname"); - - var localVarPath = "./fake_classname_test"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (api_key_query) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClassname", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - public async System.Threading.Tasks.Task TestClassnameAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname"); - - var localVarPath = "./fake_classname_test"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (api_key_query) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClassname", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs deleted file mode 100644 index 300293b4c41..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/PetApi.cs +++ /dev/null @@ -1,1975 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp.Portable; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IPetApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - void AddPet (Pet body); - - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - ApiResponse AddPetWithHttpInfo (Pet body); - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// - void DeletePet (long petId, string apiKey = default(string)); - - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)); - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// List<Pet> - List FindPetsByStatus (List status); - - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// ApiResponse of List<Pet> - ApiResponse> FindPetsByStatusWithHttpInfo (List status); - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// List<Pet> - [Obsolete] - List FindPetsByTags (List tags); - - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// ApiResponse of List<Pet> - [Obsolete] - ApiResponse> FindPetsByTagsWithHttpInfo (List tags); - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Pet - Pet GetPetById (long petId); - - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// ApiResponse of Pet - ApiResponse GetPetByIdWithHttpInfo (long petId); - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - void UpdatePet (Pet body); - - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - ApiResponse UpdatePetWithHttpInfo (Pet body); - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)); - - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); - - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task AddPetAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> AddPetWithHttpInfoAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> - System.Threading.Tasks.Task> FindPetsByStatusAsync (List status, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync (List status, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> - [Obsolete] - System.Threading.Tasks.Task> FindPetsByTagsAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - [Obsolete] - System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of Pet - System.Threading.Tasks.Task GetPetByIdAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task UpdatePetAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class PetApi : IPetApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public PetApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public PetApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public PetApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - public void AddPet (Pet body) - { - AddPetWithHttpInfo(body); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - public ApiResponse AddPetWithHttpInfo (Pet body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet"); - - var localVarPath = "./pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("AddPet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task AddPetAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)) - { - await AddPetWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet"); - - var localVarPath = "./pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("AddPet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// - public void DeletePet (long petId, string apiKey = default(string)) - { - DeletePetWithHttpInfo(petId, apiKey); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - - var localVarPath = "./pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (apiKey != null) localVarHeaderParams.Add("api_key", this.Configuration.ApiClient.ParameterToString(apiKey)); // header parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeletePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken); - - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - - var localVarPath = "./pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (apiKey != null) localVarHeaderParams.Add("api_key", this.Configuration.ApiClient.ParameterToString(apiKey)); // header parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeletePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// List<Pet> - public List FindPetsByStatus (List status) - { - ApiResponse> localVarResponse = FindPetsByStatusWithHttpInfo(status); - return localVarResponse.Data; - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// ApiResponse of List<Pet> - public ApiResponse> FindPetsByStatusWithHttpInfo (List status) - { - // verify the required parameter 'status' is set - if (status == null) - throw new ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - - var localVarPath = "./pet/findByStatus"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "status", status)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // 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("FindPetsByStatus", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> - public async System.Threading.Tasks.Task> FindPetsByStatusAsync (List status, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync (List status, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'status' is set - if (status == null) - throw new ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - - var localVarPath = "./pet/findByStatus"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "status", status)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FindPetsByStatus", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// List<Pet> - [Obsolete] - public List FindPetsByTags (List tags) - { - ApiResponse> localVarResponse = FindPetsByTagsWithHttpInfo(tags); - return localVarResponse.Data; - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// ApiResponse of List<Pet> - [Obsolete] - public ApiResponse> FindPetsByTagsWithHttpInfo (List tags) - { - // verify the required parameter 'tags' is set - if (tags == null) - throw new ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - - var localVarPath = "./pet/findByTags"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (tags != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "tags", tags)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // 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("FindPetsByTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> - [Obsolete] - public async System.Threading.Tasks.Task> FindPetsByTagsAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - [Obsolete] - public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'tags' is set - if (tags == null) - throw new ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - - var localVarPath = "./pet/findByTags"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (tags != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "tags", tags)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FindPetsByTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Pet - public Pet GetPetById (long petId) - { - ApiResponse localVarResponse = GetPetByIdWithHttpInfo(petId); - return localVarResponse.Data; - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// ApiResponse of Pet - public ApiResponse GetPetByIdWithHttpInfo (long petId) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - - var localVarPath = "./pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // 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("GetPetById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Pet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet))); - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of Pet - public async System.Threading.Tasks.Task GetPetByIdAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - - var localVarPath = "./pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetPetById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Pet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet))); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - public void UpdatePet (Pet body) - { - UpdatePetWithHttpInfo(body); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - public ApiResponse UpdatePetWithHttpInfo (Pet body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet"); - - var localVarPath = "./pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task UpdatePetAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)) - { - await UpdatePetWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet"); - - var localVarPath = "./pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - public void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)) - { - UpdatePetWithFormWithHttpInfo(petId, name, status); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// ApiResponse of Object(void) - public ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - - var localVarPath = "./pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (name != null) localVarFormParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // form parameter - if (status != null) localVarFormParams.Add("status", this.Configuration.ApiClient.ParameterToString(status)); // form parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePetWithForm", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken); - - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - - var localVarPath = "./pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (name != null) localVarFormParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // form parameter - if (status != null) localVarFormParams.Add("status", this.Configuration.ApiClient.ParameterToString(status)); // form parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePetWithForm", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - public ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) - { - ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); - return localVarResponse.Data; - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse of ApiResponse - public ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - - var localVarPath = "./pet/{petId}/uploadImage"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - - var localVarPath = "./pet/{petId}/uploadImage"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) - { - ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); - return localVarResponse.Data; - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - public ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'requiredFile' is set - if (requiredFile == null) - throw new ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "./fake/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (requiredFile != null) localVarFileParams.Add("requiredFile", this.Configuration.ApiClient.ParameterToFile("requiredFile", requiredFile)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'requiredFile' is set - if (requiredFile == null) - throw new ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "./fake/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (requiredFile != null) localVarFileParams.Add("requiredFile", this.Configuration.ApiClient.ParameterToFile("requiredFile", requiredFile)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/StoreApi.cs deleted file mode 100644 index e3a3ffbfc98..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/StoreApi.cs +++ /dev/null @@ -1,866 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp.Portable; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IStoreApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// - void DeleteOrder (string orderId); - - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// ApiResponse of Object(void) - ApiResponse DeleteOrderWithHttpInfo (string orderId); - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Dictionary<string, int> - Dictionary GetInventory (); - - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, int> - ApiResponse> GetInventoryWithHttpInfo (); - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Order - Order GetOrderById (long orderId); - - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// ApiResponse of Order - ApiResponse GetOrderByIdWithHttpInfo (long orderId); - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Order - Order PlaceOrder (Order body); - - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// ApiResponse of Order - ApiResponse PlaceOrderWithHttpInfo (Order body); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteOrderAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of Dictionary<string, int> - System.Threading.Tasks.Task> GetInventoryAsync (CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Dictionary<string, int>) - System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of Order - System.Threading.Tasks.Task GetOrderByIdAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of Order - System.Threading.Tasks.Task PlaceOrderAsync (Order body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync (Order body, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class StoreApi : IStoreApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public StoreApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public StoreApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public StoreApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// - public void DeleteOrder (string orderId) - { - DeleteOrderWithHttpInfo(orderId); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// ApiResponse of Object(void) - public ApiResponse DeleteOrderWithHttpInfo (string orderId) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - - var localVarPath = "./store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteOrderAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken); - - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - - var localVarPath = "./store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Dictionary<string, int> - public Dictionary GetInventory () - { - ApiResponse> localVarResponse = GetInventoryWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, int> - public ApiResponse> GetInventoryWithHttpInfo () - { - - var localVarPath = "./store/inventory"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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); - - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // 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("GetInventory", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Dictionary) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of Dictionary<string, int> - public async System.Threading.Tasks.Task> GetInventoryAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Dictionary<string, int>) - public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "./store/inventory"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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); - - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetInventory", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Dictionary) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Order - public Order GetOrderById (long orderId) - { - ApiResponse localVarResponse = GetOrderByIdWithHttpInfo(orderId); - return localVarResponse.Data; - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// ApiResponse of Order - public ApiResponse GetOrderByIdWithHttpInfo (long orderId) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - - var localVarPath = "./store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // 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("GetOrderById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of Order - public async System.Threading.Tasks.Task GetOrderByIdAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - - var localVarPath = "./store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetOrderById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Order - public Order PlaceOrder (Order body) - { - ApiResponse localVarResponse = PlaceOrderWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// ApiResponse of Order - public ApiResponse PlaceOrderWithHttpInfo (Order body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder"); - - var localVarPath = "./store/order"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("PlaceOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of Order - public async System.Threading.Tasks.Task PlaceOrderAsync (Order body, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync (Order body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder"); - - var localVarPath = "./store/order"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("PlaceOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/UserApi.cs deleted file mode 100644 index 5a11ce06ea8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Api/UserApi.cs +++ /dev/null @@ -1,1626 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp.Portable; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IUserApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// - void CreateUser (User body); - - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// ApiResponse of Object(void) - ApiResponse CreateUserWithHttpInfo (User body); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// - void CreateUsersWithArrayInput (List body); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - ApiResponse CreateUsersWithArrayInputWithHttpInfo (List body); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// - void CreateUsersWithListInput (List body); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - ApiResponse CreateUsersWithListInputWithHttpInfo (List body); - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// - void DeleteUser (string username); - - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// ApiResponse of Object(void) - ApiResponse DeleteUserWithHttpInfo (string username); - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// User - User GetUserByName (string username); - - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// ApiResponse of User - ApiResponse GetUserByNameWithHttpInfo (string username); - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// string - string LoginUser (string username, string password); - - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// ApiResponse of string - ApiResponse LoginUserWithHttpInfo (string username, string password); - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - void LogoutUser (); - - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - ApiResponse LogoutUserWithHttpInfo (); - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// - void UpdateUser (string username, User body); - - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// ApiResponse of Object(void) - ApiResponse UpdateUserWithHttpInfo (string username, User body); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task CreateUserAsync (User body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync (User body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync (List body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task CreateUsersWithListInputAsync (List body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync (List body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteUserAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of User - System.Threading.Tasks.Task GetUserByNameAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (User) - System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of string - System.Threading.Tasks.Task LoginUserAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task LogoutUserAsync (CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task UpdateUserAsync (string username, User body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync (string username, User body, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class UserApi : IUserApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public UserApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public UserApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public UserApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// - public void CreateUser (User body) - { - CreateUserWithHttpInfo(body); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// ApiResponse of Object(void) - public ApiResponse CreateUserWithHttpInfo (User body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser"); - - var localVarPath = "./user"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateUserAsync (User body, CancellationToken cancellationToken = default(CancellationToken)) - { - await CreateUserWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync (User body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser"); - - var localVarPath = "./user"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// - public void CreateUsersWithArrayInput (List body) - { - CreateUsersWithArrayInputWithHttpInfo(body); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - public ApiResponse CreateUsersWithArrayInputWithHttpInfo (List body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput"); - - var localVarPath = "./user/createWithArray"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithArrayInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List body, CancellationToken cancellationToken = default(CancellationToken)) - { - await CreateUsersWithArrayInputWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync (List body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput"); - - var localVarPath = "./user/createWithArray"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithArrayInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// - public void CreateUsersWithListInput (List body) - { - CreateUsersWithListInputWithHttpInfo(body); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - public ApiResponse CreateUsersWithListInputWithHttpInfo (List body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput"); - - var localVarPath = "./user/createWithList"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithListInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List body, CancellationToken cancellationToken = default(CancellationToken)) - { - await CreateUsersWithListInputWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync (List body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput"); - - var localVarPath = "./user/createWithList"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithListInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// - public void DeleteUser (string username) - { - DeleteUserWithHttpInfo(username); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// ApiResponse of Object(void) - public ApiResponse DeleteUserWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - - var localVarPath = "./user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteUserAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteUserWithHttpInfoAsync(username, cancellationToken); - - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - - var localVarPath = "./user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// User - public User GetUserByName (string username) - { - ApiResponse localVarResponse = GetUserByNameWithHttpInfo(username); - return localVarResponse.Data; - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// ApiResponse of User - public ApiResponse GetUserByNameWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - - var localVarPath = "./user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // 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("GetUserByName", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User))); - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of User - public async System.Threading.Tasks.Task GetUserByNameAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (User) - public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - - var localVarPath = "./user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetUserByName", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User))); - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// string - public string LoginUser (string username, string password) - { - ApiResponse localVarResponse = LoginUserWithHttpInfo(username, password); - return localVarResponse.Data; - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// ApiResponse of string - public ApiResponse LoginUserWithHttpInfo (string username, string password) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - // verify the required parameter 'password' is set - if (password == null) - throw new ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - - var localVarPath = "./user/login"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "username", username)); // query parameter - if (password != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "password", password)); // query parameter - - - // 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("LoginUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of string - public async System.Threading.Tasks.Task LoginUserAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - // verify the required parameter 'password' is set - if (password == null) - throw new ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - - var localVarPath = "./user/login"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "username", username)); // query parameter - if (password != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "password", password)); // query parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("LoginUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// - public void LogoutUser () - { - LogoutUserWithHttpInfo(); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - public ApiResponse LogoutUserWithHttpInfo () - { - - var localVarPath = "./user/logout"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - 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("LogoutUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task LogoutUserAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - await LogoutUserWithHttpInfoAsync(cancellationToken); - - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "./user/logout"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - 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, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("LogoutUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// - public void UpdateUser (string username, User body) - { - UpdateUserWithHttpInfo(username, body); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// ApiResponse of Object(void) - public ApiResponse UpdateUserWithHttpInfo (string username, User body) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); - - var localVarPath = "./user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task UpdateUserAsync (string username, User body, CancellationToken cancellationToken = default(CancellationToken)) - { - await UpdateUserWithHttpInfoAsync(username, body, cancellationToken); - - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync (string username, User body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); - - var localVarPath = "./user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiClient.cs deleted file mode 100644 index 3367117774f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiClient.cs +++ /dev/null @@ -1,541 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Text.RegularExpressions; -using System.IO; -using System.Threading; -using System.Linq; -using System.Net; -using System.Text; -using Newtonsoft.Json; -using RestSharp.Portable; -using RestSharp.Portable.HttpClient; - -namespace Org.OpenAPITools.Client -{ - /// - /// API client is mainly responsible for making the HTTP call to the API backend. - /// - public partial class ApiClient - { - private JsonSerializerSettings serializerSettings = new JsonSerializerSettings - { - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor - }; - - /// - /// Allows for extending request processing for generated code. - /// - /// The RestSharp request object - partial void InterceptRequest(IRestRequest request); - - /// - /// Allows for extending response processing for generated code. - /// - /// The RestSharp request object - /// The RestSharp response object - partial void InterceptResponse(IRestRequest request, IRestResponse response); - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - public ApiClient() - { - Configuration = Org.OpenAPITools.Client.Configuration.Default; - RestClient = new RestClient("http://petstore.swagger.io:80/v2"); - RestClient.IgnoreResponseStatusCode = true; - } - - /// - /// Initializes a new instance of the class - /// with default base path (http://petstore.swagger.io:80/v2). - /// - /// An instance of Configuration. - public ApiClient(Configuration config) - { - Configuration = config ?? Org.OpenAPITools.Client.Configuration.Default; - - RestClient = new RestClient(Configuration.BasePath); - RestClient.IgnoreResponseStatusCode = true; - } - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - /// The base path. - public ApiClient(String basePath = "http://petstore.swagger.io:80/v2") - { - if (String.IsNullOrEmpty(basePath)) - throw new ArgumentException("basePath cannot be empty"); - - RestClient = new RestClient(basePath); - RestClient.IgnoreResponseStatusCode = true; - Configuration = Client.Configuration.Default; - } - - /// - /// Gets or sets the default API client for making HTTP calls. - /// - /// The default API client. - [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] - public static ApiClient Default; - - /// - /// Gets or sets an instance of the IReadableConfiguration. - /// - /// An instance of the IReadableConfiguration. - /// - /// helps us to avoid modifying possibly global - /// configuration values from within a given client. It does not guarantee thread-safety - /// of the instance in any way. - /// - public IReadableConfiguration Configuration { get; set; } - - /// - /// Gets or sets the RestClient. - /// - /// An instance of the RestClient - public RestClient RestClient { get; set; } - - // Creates and sets up a RestRequest prior to a call. - private RestRequest PrepareRequest( - String path, Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = new RestRequest(path, method); - // disable ResetSharp.Portable built-in serialization - request.Serializer = null; - - // add path parameter, if any - foreach(var param in pathParams) - request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); - - // add header parameter, if any - foreach(var param in headerParams) - request.AddHeader(param.Key, param.Value); - - // add query parameter, if any - foreach(var param in queryParams) - request.AddQueryParameter(param.Key, param.Value); - - // add form parameter, if any - foreach(var param in formParams) - request.AddParameter(param.Key, param.Value); - - // add file parameter, if any - foreach(var param in fileParams) - { - request.AddFile(param.Value); - } - - if (postBody != null) // http body (model or byte[]) parameter - { - request.AddParameter(new Parameter { Value = postBody, Type = ParameterType.RequestBody, ContentType = contentType }); - } - - return request; - } - - /// - /// Makes the HTTP request (Sync). - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content Type of the request - /// Object - public Object CallApi( - String path, Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - - // set timeout - RestClient.Timeout = TimeSpan.FromMilliseconds(Configuration.Timeout); - - // set user agent - RestClient.UserAgent = Configuration.UserAgent; - - InterceptRequest(request); - var response = RestClient.Execute(request).Result; - InterceptResponse(request, response); - - return (Object) response; - } - /// - /// Makes the asynchronous HTTP request. - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content type. - /// Cancellation Token. - /// The Task instance. - public async System.Threading.Tasks.Task CallApiAsync( - String path, Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType, CancellationToken cancellationToken) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - RestClient.UserAgent = Configuration.UserAgent; - InterceptRequest(request); - var response = await RestClient.Execute(request, cancellationToken); - InterceptResponse(request, response); - return (Object)response; - } - - /// - /// Escape string (url-encoded). - /// - /// String to be escaped. - /// Escaped string. - public string EscapeString(string str) - { - return UrlEncode(str); - } - - /// - /// Create FileParameter based on Stream. - /// - /// Parameter name. - /// Input stream. - /// FileParameter. - public FileParameter ParameterToFile(string name, Stream stream) - { - if (stream is FileStream) - return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); - else - return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// Formatted string. - public string ParameterToString(object obj) - { - if (obj is DateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTime)obj).ToString (Configuration.DateTimeFormat); - else if (obj is DateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); - else if (obj is bool) - return (bool)obj ? "true" : "false"; - else if (obj is IList) - { - var flattenedString = new StringBuilder(); - foreach (var param in (IList)obj) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } - else - return Convert.ToString (obj); - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The HTTP response. - /// Object type. - /// Object representation of the JSON string. - public object Deserialize(IRestResponse response, Type type) - { - IHttpHeaders headers = response.Headers; - if (type == typeof(byte[])) // return byte array - { - return response.RawBytes; - } - - // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) - if (type == typeof(Stream)) - { - if (headers != null) - { - var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) - ? Path.GetTempPath() - : Configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); - foreach (var header in headers) - { - var match = regex.Match(header.ToString()); - if (match.Success) - { - string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); - } - } - } - var stream = new MemoryStream(response.RawBytes); - return stream; - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return ConvertType(response.Content, type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Serialize an input (model) into JSON string - /// - /// Object. - /// JSON string. - public String Serialize(object obj) - { - try - { - return obj != null ? JsonConvert.SerializeObject(obj) : null; - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - ///Check if the given MIME is a JSON MIME. - ///JSON MIME examples: - /// application/json - /// application/json; charset=UTF8 - /// APPLICATION/JSON - /// application/vnd.company+json - /// - /// MIME - /// Returns True if MIME type is json. - public bool IsJsonMime(String mime) - { - var jsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); - return mime != null && (jsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json")); - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON type exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public String SelectHeaderContentType(String[] contentTypes) - { - if (contentTypes.Length == 0) - return "application/json"; - - foreach (var contentType in contentTypes) - { - if (IsJsonMime(contentType.ToLower())) - return contentType; - } - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public String SelectHeaderAccept(String[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return String.Join(",", accepts); - } - - /// - /// Encode string in base64 format. - /// - /// String to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Dynamically cast the object into target type. - /// - /// Object to be casted - /// Target type - /// Casted object - public static dynamic ConvertType(dynamic fromObject, Type toObject) - { - return Convert.ChangeType(fromObject, toObject); - } - - /// - /// Convert stream to byte array - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream inputStream) - { - byte[] buf = new byte[16*1024]; - using (MemoryStream ms = new MemoryStream()) - { - int count; - while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) - { - ms.Write(buf, 0, count); - } - return ms.ToArray(); - } - } - - /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 - /// - /// String to be URL encoded - /// Byte array - public static string UrlEncode(string input) - { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); - } - - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - - if (match.Success) - { - return match.Groups[1].Value; - } - else - { - return filename; - } - } - - /// - /// Convert params to key/value pairs. - /// Use collectionFormat to properly format lists and collections. - /// - /// Collection format. - /// Key name. - /// Value object. - /// A list of KeyValuePairs - public IEnumerable> ParameterToKeyValuePairs(string collectionFormat, string name, object value) - { - var parameters = new List>(); - - if (IsCollection(value) && collectionFormat == "multi") - { - var valueCollection = value as IEnumerable; - parameters.AddRange(from object item in valueCollection select new KeyValuePair(name, ParameterToString(item))); - } - else - { - parameters.Add(new KeyValuePair(name, ParameterToString(value))); - } - - return parameters; - } - - /// - /// Check if generic object is a collection. - /// - /// - /// True if object is a collection type - private static bool IsCollection(object value) - { - return value is IList || value is ICollection; - } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiException.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiException.cs deleted file mode 100644 index e7ac15569b9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiException.cs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; - -namespace Org.OpenAPITools.Client -{ - /// - /// API Exception - /// - public class ApiException : Exception - { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public dynamic ErrorContent { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() {} - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) - { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) - { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiResponse.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiResponse.cs deleted file mode 100644 index 4b462cf5424..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ApiResponse.cs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; - -namespace Org.OpenAPITools.Client -{ - /// - /// API Response - /// - public class ApiResponse - { - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - public int StatusCode { get; private set; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public IDictionary Headers { get; private set; } - - /// - /// Gets or sets the data (parsed HTTP body) - /// - /// The data. - public T Data { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - public ApiResponse(int statusCode, IDictionary headers, T data) - { - this.StatusCode= statusCode; - this.Headers = headers; - this.Data = data; - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/Configuration.cs deleted file mode 100644 index e10bf1c07e7..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/Configuration.cs +++ /dev/null @@ -1,446 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Reflection; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents a set of configuration settings - /// - public class Configuration : IReadableConfiguration - { - #region Constants - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "1.0.0"; - - /// - /// Identifier for ISO 8601 DateTime Format - /// - /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. - // ReSharper disable once InconsistentNaming - public const string ISO8601_DATETIME_FORMAT = "o"; - - #endregion Constants - - #region Static Members - - private static readonly object GlobalConfigSync = new { }; - private static Configuration _globalConfiguration; - - /// - /// Default creation of exceptions for a given method name and response object - /// - public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => - { - var status = (int)response.StatusCode; - if (status >= 400) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.Content), - response.Content); - } - - return null; - }; - - /// - /// Gets or sets the default Configuration. - /// - /// Configuration. - public static Configuration Default - { - get { return _globalConfiguration; } - set - { - lock (GlobalConfigSync) - { - _globalConfiguration = value; - } - } - } - - #endregion Static Members - - #region Private Members - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - private IDictionary _apiKey = null; - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - private IDictionary _apiKeyPrefix = null; - - private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - private string _tempFolderPath = Path.GetTempPath(); - - #endregion Private Members - - #region Constructors - - static Configuration() - { - _globalConfiguration = new GlobalConfiguration(); - } - - /// - /// Initializes a new instance of the class - /// - public Configuration() - { - UserAgent = "OpenAPI-Generator/1.0.0/csharp"; - BasePath = "http://petstore.swagger.io:80/v2"; - DefaultHeader = new ConcurrentDictionary(); - ApiKey = new ConcurrentDictionary(); - ApiKeyPrefix = new ConcurrentDictionary(); - - // Setting Timeout has side effects (forces ApiClient creation). - Timeout = 100000; - } - - /// - /// Initializes a new instance of the class - /// - public Configuration( - IDictionary defaultHeader, - IDictionary apiKey, - IDictionary apiKeyPrefix, - string basePath = "http://petstore.swagger.io:80/v2") : this() - { - if (string.IsNullOrWhiteSpace(basePath)) - throw new ArgumentException("The provided basePath is invalid.", "basePath"); - if (defaultHeader == null) - throw new ArgumentNullException("defaultHeader"); - if (apiKey == null) - throw new ArgumentNullException("apiKey"); - if (apiKeyPrefix == null) - throw new ArgumentNullException("apiKeyPrefix"); - - BasePath = basePath; - - foreach (var keyValuePair in defaultHeader) - { - DefaultHeader.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKey) - { - ApiKey.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKeyPrefix) - { - ApiKeyPrefix.Add(keyValuePair); - } - } - - /// - /// Initializes a new instance of the class with different settings - /// - /// Api client - /// Dictionary of default HTTP header - /// Username - /// Password - /// accessToken - /// Dictionary of API key - /// Dictionary of API key prefix - /// Temp folder path - /// DateTime format string - /// HTTP connection timeout (in milliseconds) - /// HTTP user agent - [Obsolete("Use explicit object construction and setting of properties.", true)] - public Configuration( - // ReSharper disable UnusedParameter.Local - ApiClient apiClient = null, - IDictionary defaultHeader = null, - string username = null, - string password = null, - string accessToken = null, - IDictionary apiKey = null, - IDictionary apiKeyPrefix = null, - string tempFolderPath = null, - string dateTimeFormat = null, - int timeout = 100000, - string userAgent = "OpenAPI-Generator/1.0.0/csharp" - // ReSharper restore UnusedParameter.Local - ) - { - - } - - /// - /// Initializes a new instance of the Configuration class. - /// - /// Api client. - [Obsolete("This constructor caused unexpected sharing of static data. It is no longer supported.", true)] - // ReSharper disable once UnusedParameter.Local - public Configuration(ApiClient apiClient) - { - - } - - #endregion Constructors - - - #region Properties - - private ApiClient _apiClient = null; - /// - /// Gets an instance of an ApiClient for this configuration - /// - public virtual ApiClient ApiClient - { - get - { - if (_apiClient == null) _apiClient = CreateApiClient(); - return _apiClient; - } - } - - private String _basePath = null; - /// - /// Gets or sets the base path for API access. - /// - public virtual string BasePath { - get { return _basePath; } - set { - _basePath = value; - // pass-through to ApiClient if it's set. - if(_apiClient != null) { - _apiClient.RestClient.BaseUrl = new Uri(_basePath); - } - } - } - - /// - /// Gets or sets the default header. - /// - public virtual IDictionary DefaultHeader { get; set; } - - /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. - /// - public virtual int Timeout - { - get { return (int)ApiClient.RestClient.Timeout.GetValueOrDefault(TimeSpan.FromSeconds(0)).TotalMilliseconds; } - set { ApiClient.RestClient.Timeout = TimeSpan.FromMilliseconds(value); } - } - - /// - /// Gets or sets the HTTP user agent. - /// - /// Http user agent. - public virtual string UserAgent { get; set; } - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public virtual string Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public virtual string Password { get; set; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix(string apiKeyIdentifier) - { - var apiKeyValue = ""; - ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); - var apiKeyPrefix = ""; - if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) - return apiKeyPrefix + " " + apiKeyValue; - else - return apiKeyValue; - } - - /// - /// Gets or sets the access token for OAuth2 authentication. - /// - /// The access token. - public virtual string AccessToken { get; set; } - - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public virtual string TempFolderPath - { - get { return _tempFolderPath; } - - set - { - if (string.IsNullOrEmpty(value)) - { - _tempFolderPath = Path.GetTempPath(); - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - { - Directory.CreateDirectory(value); - } - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - { - _tempFolderPath = value; - } - else - { - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - } - - /// - /// Gets or sets the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public virtual string DateTimeFormat - { - get { return _dateTimeFormat; } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - public virtual IDictionary ApiKeyPrefix - { - get { return _apiKeyPrefix; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); - } - _apiKeyPrefix = value; - } - } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public virtual IDictionary ApiKey - { - get { return _apiKey; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKey collection may not be null."); - } - _apiKey = value; - } - } - - #endregion Properties - - #region Methods - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - public void AddDefaultHeader(string key, string value) - { - DefaultHeader[key] = value; - } - - /// - /// Creates a new based on this instance. - /// - /// - public ApiClient CreateApiClient() - { - return new ApiClient(BasePath) { Configuration = this }; - } - - - /// - /// Returns a string with essential information for debugging. - /// - public static String ToDebugReport() - { - String report = "C# SDK (Org.OpenAPITools) Debug Report:\n"; - report += " OS: " + System.Runtime.InteropServices.RuntimeInformation.OSDescription + "\n"; - report += " Version of the API: 1.0.0\n"; - report += " SDK Package Version: 1.0.0\n"; - - return report; - } - - /// - /// Add Api Key Header. - /// - /// Api Key name. - /// Api Key value. - /// - public void AddApiKey(string key, string value) - { - ApiKey[key] = value; - } - - /// - /// Sets the API key prefix. - /// - /// Api Key name. - /// Api Key value. - public void AddApiKeyPrefix(string key, string value) - { - ApiKeyPrefix[key] = value; - } - - #endregion Methods - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ExceptionFactory.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ExceptionFactory.cs deleted file mode 100644 index 343ea7ae2b6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/ExceptionFactory.cs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using RestSharp.Portable; - -namespace Org.OpenAPITools.Client -{ - /// - /// A delegate to ExceptionFactory method - /// - /// Method name - /// Response - /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/GlobalConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/GlobalConfiguration.cs deleted file mode 100644 index a79bea966bd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/GlobalConfiguration.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Reflection; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; - -namespace Org.OpenAPITools.Client -{ - /// - /// provides a compile-time extension point for globally configuring - /// API Clients. - /// - /// - /// A customized implementation via partial class may reside in another file and may - /// be excluded from automatic generation via a .openapi-generator-ignore file. - /// - public partial class GlobalConfiguration : Configuration - { - - } -} \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/IApiAccessor.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/IApiAccessor.cs deleted file mode 100644 index df00c43800c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/IApiAccessor.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp.Portable; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents configuration aspects required to interact with the API endpoints. - /// - public interface IApiAccessor - { - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - Configuration Configuration {get; set;} - - /// - /// Gets the base path of the API client. - /// - /// The base path - String GetBasePath(); - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - ExceptionFactory ExceptionFactory { get; set; } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/IReadableConfiguration.cs deleted file mode 100644 index 43ed169c6a1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System.Collections.Generic; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents a readable-only configuration contract. - /// - public interface IReadableConfiguration - { - /// - /// Gets the access token. - /// - /// Access token. - string AccessToken { get; } - - /// - /// Gets the API key. - /// - /// API key. - IDictionary ApiKey { get; } - - /// - /// Gets the API key prefix. - /// - /// API key prefix. - IDictionary ApiKeyPrefix { get; } - - /// - /// Gets the base path. - /// - /// Base path. - string BasePath { get; } - - /// - /// Gets the date time format. - /// - /// Date time format. - string DateTimeFormat { get; } - - /// - /// Gets the default header. - /// - /// Default header. - IDictionary DefaultHeader { get; } - - /// - /// Gets the temp folder path. - /// - /// Temp folder path. - string TempFolderPath { get; } - - /// - /// Gets the HTTP connection timeout (in milliseconds) - /// - /// HTTP connection timeout. - int Timeout { get; } - - /// - /// Gets the user agent. - /// - /// User agent. - string UserAgent { get; } - - /// - /// Gets the username. - /// - /// Username. - string Username { get; } - - /// - /// Gets the password. - /// - /// Password. - string Password { get; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - string GetApiKeyWithPrefix(string apiKeyIdentifier); - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs deleted file mode 100644 index a1bd6b08f3b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using Newtonsoft.Json.Converters; - -namespace Org.OpenAPITools.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public OpenAPIDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs deleted file mode 100644 index 0b66cfaa72a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesAnyType - /// - [DataContract] - public partial class AdditionalPropertiesAnyType : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesAnyType(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesAnyType {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesAnyType); - } - - /// - /// Returns true if AdditionalPropertiesAnyType instances are equal - /// - /// Instance of AdditionalPropertiesAnyType to be compared - /// Boolean - public bool Equals(AdditionalPropertiesAnyType input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs deleted file mode 100644 index 74e73ae5e69..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesArray - /// - [DataContract] - public partial class AdditionalPropertiesArray : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesArray(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesArray {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesArray); - } - - /// - /// Returns true if AdditionalPropertiesArray instances are equal - /// - /// Instance of AdditionalPropertiesArray to be compared - /// Boolean - public bool Equals(AdditionalPropertiesArray input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs deleted file mode 100644 index c52f36924d4..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesBoolean - /// - [DataContract] - public partial class AdditionalPropertiesBoolean : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesBoolean(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesBoolean {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesBoolean); - } - - /// - /// Returns true if AdditionalPropertiesBoolean instances are equal - /// - /// Instance of AdditionalPropertiesBoolean to be compared - /// Boolean - public bool Equals(AdditionalPropertiesBoolean input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs deleted file mode 100644 index f56db9cd165..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ /dev/null @@ -1,280 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesClass - /// - [DataContract] - public partial class AdditionalPropertiesClass : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// mapString. - /// mapNumber. - /// mapInteger. - /// mapBoolean. - /// mapArrayInteger. - /// mapArrayAnytype. - /// mapMapString. - /// mapMapAnytype. - /// anytype1. - /// anytype2. - /// anytype3. - public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) - { - this.MapString = mapString; - this.MapNumber = mapNumber; - this.MapInteger = mapInteger; - this.MapBoolean = mapBoolean; - this.MapArrayInteger = mapArrayInteger; - this.MapArrayAnytype = mapArrayAnytype; - this.MapMapString = mapMapString; - this.MapMapAnytype = mapMapAnytype; - this.Anytype1 = anytype1; - this.Anytype2 = anytype2; - this.Anytype3 = anytype3; - } - - /// - /// Gets or Sets MapString - /// - [DataMember(Name="map_string", EmitDefaultValue=false)] - public Dictionary MapString { get; set; } - - /// - /// Gets or Sets MapNumber - /// - [DataMember(Name="map_number", EmitDefaultValue=false)] - public Dictionary MapNumber { get; set; } - - /// - /// Gets or Sets MapInteger - /// - [DataMember(Name="map_integer", EmitDefaultValue=false)] - public Dictionary MapInteger { get; set; } - - /// - /// Gets or Sets MapBoolean - /// - [DataMember(Name="map_boolean", EmitDefaultValue=false)] - public Dictionary MapBoolean { get; set; } - - /// - /// Gets or Sets MapArrayInteger - /// - [DataMember(Name="map_array_integer", EmitDefaultValue=false)] - public Dictionary> MapArrayInteger { get; set; } - - /// - /// Gets or Sets MapArrayAnytype - /// - [DataMember(Name="map_array_anytype", EmitDefaultValue=false)] - public Dictionary> MapArrayAnytype { get; set; } - - /// - /// Gets or Sets MapMapString - /// - [DataMember(Name="map_map_string", EmitDefaultValue=false)] - public Dictionary> MapMapString { get; set; } - - /// - /// Gets or Sets MapMapAnytype - /// - [DataMember(Name="map_map_anytype", EmitDefaultValue=false)] - public Dictionary> MapMapAnytype { get; set; } - - /// - /// Gets or Sets Anytype1 - /// - [DataMember(Name="anytype_1", EmitDefaultValue=false)] - public Object Anytype1 { get; set; } - - /// - /// Gets or Sets Anytype2 - /// - [DataMember(Name="anytype_2", EmitDefaultValue=false)] - public Object Anytype2 { get; set; } - - /// - /// Gets or Sets Anytype3 - /// - [DataMember(Name="anytype_3", EmitDefaultValue=false)] - public Object Anytype3 { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapString: ").Append(MapString).Append("\n"); - sb.Append(" MapNumber: ").Append(MapNumber).Append("\n"); - sb.Append(" MapInteger: ").Append(MapInteger).Append("\n"); - sb.Append(" MapBoolean: ").Append(MapBoolean).Append("\n"); - sb.Append(" MapArrayInteger: ").Append(MapArrayInteger).Append("\n"); - sb.Append(" MapArrayAnytype: ").Append(MapArrayAnytype).Append("\n"); - sb.Append(" MapMapString: ").Append(MapMapString).Append("\n"); - sb.Append(" MapMapAnytype: ").Append(MapMapAnytype).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); - sb.Append(" Anytype2: ").Append(Anytype2).Append("\n"); - sb.Append(" Anytype3: ").Append(Anytype3).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesClass); - } - - /// - /// Returns true if AdditionalPropertiesClass instances are equal - /// - /// Instance of AdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(AdditionalPropertiesClass input) - { - if (input == null) - return false; - - return - ( - this.MapString == input.MapString || - this.MapString != null && - input.MapString != null && - this.MapString.SequenceEqual(input.MapString) - ) && - ( - this.MapNumber == input.MapNumber || - this.MapNumber != null && - input.MapNumber != null && - this.MapNumber.SequenceEqual(input.MapNumber) - ) && - ( - this.MapInteger == input.MapInteger || - this.MapInteger != null && - input.MapInteger != null && - this.MapInteger.SequenceEqual(input.MapInteger) - ) && - ( - this.MapBoolean == input.MapBoolean || - this.MapBoolean != null && - input.MapBoolean != null && - this.MapBoolean.SequenceEqual(input.MapBoolean) - ) && - ( - this.MapArrayInteger == input.MapArrayInteger || - this.MapArrayInteger != null && - input.MapArrayInteger != null && - this.MapArrayInteger.SequenceEqual(input.MapArrayInteger) - ) && - ( - this.MapArrayAnytype == input.MapArrayAnytype || - this.MapArrayAnytype != null && - input.MapArrayAnytype != null && - this.MapArrayAnytype.SequenceEqual(input.MapArrayAnytype) - ) && - ( - this.MapMapString == input.MapMapString || - this.MapMapString != null && - input.MapMapString != null && - this.MapMapString.SequenceEqual(input.MapMapString) - ) && - ( - this.MapMapAnytype == input.MapMapAnytype || - this.MapMapAnytype != null && - input.MapMapAnytype != null && - this.MapMapAnytype.SequenceEqual(input.MapMapAnytype) - ) && - ( - this.Anytype1 == input.Anytype1 || - (this.Anytype1 != null && - this.Anytype1.Equals(input.Anytype1)) - ) && - ( - this.Anytype2 == input.Anytype2 || - (this.Anytype2 != null && - this.Anytype2.Equals(input.Anytype2)) - ) && - ( - this.Anytype3 == input.Anytype3 || - (this.Anytype3 != null && - this.Anytype3.Equals(input.Anytype3)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapString != null) - hashCode = hashCode * 59 + this.MapString.GetHashCode(); - if (this.MapNumber != null) - hashCode = hashCode * 59 + this.MapNumber.GetHashCode(); - if (this.MapInteger != null) - hashCode = hashCode * 59 + this.MapInteger.GetHashCode(); - if (this.MapBoolean != null) - hashCode = hashCode * 59 + this.MapBoolean.GetHashCode(); - if (this.MapArrayInteger != null) - hashCode = hashCode * 59 + this.MapArrayInteger.GetHashCode(); - if (this.MapArrayAnytype != null) - hashCode = hashCode * 59 + this.MapArrayAnytype.GetHashCode(); - if (this.MapMapString != null) - hashCode = hashCode * 59 + this.MapMapString.GetHashCode(); - if (this.MapMapAnytype != null) - hashCode = hashCode * 59 + this.MapMapAnytype.GetHashCode(); - if (this.Anytype1 != null) - hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); - if (this.Anytype2 != null) - hashCode = hashCode * 59 + this.Anytype2.GetHashCode(); - if (this.Anytype3 != null) - hashCode = hashCode * 59 + this.Anytype3.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs deleted file mode 100644 index 522847f7b16..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesInteger - /// - [DataContract] - public partial class AdditionalPropertiesInteger : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesInteger(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesInteger {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesInteger); - } - - /// - /// Returns true if AdditionalPropertiesInteger instances are equal - /// - /// Instance of AdditionalPropertiesInteger to be compared - /// Boolean - public bool Equals(AdditionalPropertiesInteger input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs deleted file mode 100644 index cc739022c18..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesNumber - /// - [DataContract] - public partial class AdditionalPropertiesNumber : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesNumber(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesNumber {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesNumber); - } - - /// - /// Returns true if AdditionalPropertiesNumber instances are equal - /// - /// Instance of AdditionalPropertiesNumber to be compared - /// Boolean - public bool Equals(AdditionalPropertiesNumber input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs deleted file mode 100644 index d5e694f3fdc..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesObject - /// - [DataContract] - public partial class AdditionalPropertiesObject : Dictionary>, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesObject(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesObject {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesObject); - } - - /// - /// Returns true if AdditionalPropertiesObject instances are equal - /// - /// Instance of AdditionalPropertiesObject to be compared - /// Boolean - public bool Equals(AdditionalPropertiesObject input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs deleted file mode 100644 index 0c211e824d1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesString - /// - [DataContract] - public partial class AdditionalPropertiesString : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesString(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesString {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesString); - } - - /// - /// Returns true if AdditionalPropertiesString instances are equal - /// - /// Instance of AdditionalPropertiesString to be compared - /// Boolean - public bool Equals(AdditionalPropertiesString input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Animal.cs deleted file mode 100644 index 455c3a9bcef..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Animal.cs +++ /dev/null @@ -1,155 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using JsonSubTypes; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Animal - /// - [DataContract] - [JsonConverter(typeof(JsonSubtypes), "className")] - [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] - [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] - [JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")] - public partial class Animal : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Animal() { } - /// - /// Initializes a new instance of the class. - /// - /// className (required). - /// color (default to "red"). - public Animal(string className = default(string), string color = "red") - { - // to ensure "className" is required (not null) - if (className == null) - { - throw new InvalidDataException("className is a required property for Animal and cannot be null"); - } - else - { - this.ClassName = className; - } - - // use default value if no "color" provided - if (color == null) - { - this.Color = "red"; - } - else - { - this.Color = color; - } - } - - /// - /// Gets or Sets ClassName - /// - [DataMember(Name="className", EmitDefaultValue=true)] - public string ClassName { get; set; } - - /// - /// Gets or Sets Color - /// - [DataMember(Name="color", EmitDefaultValue=false)] - public string Color { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Animal {\n"); - sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Animal); - } - - /// - /// Returns true if Animal instances are equal - /// - /// Instance of Animal to be compared - /// Boolean - public bool Equals(Animal input) - { - if (input == null) - return false; - - return - ( - this.ClassName == input.ClassName || - (this.ClassName != null && - this.ClassName.Equals(input.ClassName)) - ) && - ( - this.Color == input.Color || - (this.Color != null && - this.Color.Equals(input.Color)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - hashCode = hashCode * 59 + this.ClassName.GetHashCode(); - if (this.Color != null) - hashCode = hashCode * 59 + this.Color.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ApiResponse.cs deleted file mode 100644 index 108ca344e67..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ApiResponse.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// ApiResponse - /// - [DataContract] - public partial class ApiResponse : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// code. - /// type. - /// message. - public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) - { - this.Code = code; - this.Type = type; - this.Message = message; - } - - /// - /// Gets or Sets Code - /// - [DataMember(Name="code", EmitDefaultValue=false)] - public int Code { get; set; } - - /// - /// Gets or Sets Type - /// - [DataMember(Name="type", EmitDefaultValue=false)] - public string Type { get; set; } - - /// - /// Gets or Sets Message - /// - [DataMember(Name="message", EmitDefaultValue=false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ApiResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApiResponse); - } - - /// - /// Returns true if ApiResponse instances are equal - /// - /// Instance of ApiResponse to be compared - /// Boolean - public bool Equals(ApiResponse input) - { - if (input == null) - return false; - - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - hashCode = hashCode * 59 + this.Code.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs deleted file mode 100644 index b95c1002b76..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// ArrayOfArrayOfNumberOnly - /// - [DataContract] - public partial class ArrayOfArrayOfNumberOnly : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// arrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) - { - this.ArrayArrayNumber = arrayArrayNumber; - } - - /// - /// Gets or Sets ArrayArrayNumber - /// - [DataMember(Name="ArrayArrayNumber", EmitDefaultValue=false)] - public List> ArrayArrayNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayOfArrayOfNumberOnly {\n"); - sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayOfArrayOfNumberOnly); - } - - /// - /// Returns true if ArrayOfArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfArrayOfNumberOnly input) - { - if (input == null) - return false; - - return - ( - this.ArrayArrayNumber == input.ArrayArrayNumber || - this.ArrayArrayNumber != null && - input.ArrayArrayNumber != null && - this.ArrayArrayNumber.SequenceEqual(input.ArrayArrayNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayArrayNumber != null) - hashCode = hashCode * 59 + this.ArrayArrayNumber.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs deleted file mode 100644 index 0b6c8afe9eb..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// ArrayOfNumberOnly - /// - [DataContract] - public partial class ArrayOfNumberOnly : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// arrayNumber. - public ArrayOfNumberOnly(List arrayNumber = default(List)) - { - this.ArrayNumber = arrayNumber; - } - - /// - /// Gets or Sets ArrayNumber - /// - [DataMember(Name="ArrayNumber", EmitDefaultValue=false)] - public List ArrayNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayOfNumberOnly {\n"); - sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayOfNumberOnly); - } - - /// - /// Returns true if ArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfNumberOnly input) - { - if (input == null) - return false; - - return - ( - this.ArrayNumber == input.ArrayNumber || - this.ArrayNumber != null && - input.ArrayNumber != null && - this.ArrayNumber.SequenceEqual(input.ArrayNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayNumber != null) - hashCode = hashCode * 59 + this.ArrayNumber.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ArrayTest.cs deleted file mode 100644 index ab309bde6b2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ArrayTest.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// ArrayTest - /// - [DataContract] - public partial class ArrayTest : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// arrayOfString. - /// arrayArrayOfInteger. - /// arrayArrayOfModel. - public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) - { - this.ArrayOfString = arrayOfString; - this.ArrayArrayOfInteger = arrayArrayOfInteger; - this.ArrayArrayOfModel = arrayArrayOfModel; - } - - /// - /// Gets or Sets ArrayOfString - /// - [DataMember(Name="array_of_string", EmitDefaultValue=false)] - public List ArrayOfString { get; set; } - - /// - /// Gets or Sets ArrayArrayOfInteger - /// - [DataMember(Name="array_array_of_integer", EmitDefaultValue=false)] - public List> ArrayArrayOfInteger { get; set; } - - /// - /// Gets or Sets ArrayArrayOfModel - /// - [DataMember(Name="array_array_of_model", EmitDefaultValue=false)] - public List> ArrayArrayOfModel { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); - sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); - sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayTest); - } - - /// - /// Returns true if ArrayTest instances are equal - /// - /// Instance of ArrayTest to be compared - /// Boolean - public bool Equals(ArrayTest input) - { - if (input == null) - return false; - - return - ( - this.ArrayOfString == input.ArrayOfString || - this.ArrayOfString != null && - input.ArrayOfString != null && - this.ArrayOfString.SequenceEqual(input.ArrayOfString) - ) && - ( - this.ArrayArrayOfInteger == input.ArrayArrayOfInteger || - this.ArrayArrayOfInteger != null && - input.ArrayArrayOfInteger != null && - this.ArrayArrayOfInteger.SequenceEqual(input.ArrayArrayOfInteger) - ) && - ( - this.ArrayArrayOfModel == input.ArrayArrayOfModel || - this.ArrayArrayOfModel != null && - input.ArrayArrayOfModel != null && - this.ArrayArrayOfModel.SequenceEqual(input.ArrayArrayOfModel) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayOfString != null) - hashCode = hashCode * 59 + this.ArrayOfString.GetHashCode(); - if (this.ArrayArrayOfInteger != null) - hashCode = hashCode * 59 + this.ArrayArrayOfInteger.GetHashCode(); - if (this.ArrayArrayOfModel != null) - hashCode = hashCode * 59 + this.ArrayArrayOfModel.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/BigCat.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/BigCat.cs deleted file mode 100644 index 0b09a9d1a3b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/BigCat.cs +++ /dev/null @@ -1,150 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// BigCat - /// - [DataContract] - public partial class BigCat : Cat, IEquatable - { - /// - /// Defines Kind - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum KindEnum - { - /// - /// Enum Lions for value: lions - /// - [EnumMember(Value = "lions")] - Lions = 1, - - /// - /// Enum Tigers for value: tigers - /// - [EnumMember(Value = "tigers")] - Tigers = 2, - - /// - /// Enum Leopards for value: leopards - /// - [EnumMember(Value = "leopards")] - Leopards = 3, - - /// - /// Enum Jaguars for value: jaguars - /// - [EnumMember(Value = "jaguars")] - Jaguars = 4 - - } - - /// - /// Gets or Sets Kind - /// - [DataMember(Name="kind", EmitDefaultValue=false)] - public KindEnum? Kind { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BigCat() { } - /// - /// Initializes a new instance of the class. - /// - /// kind. - public BigCat(KindEnum? kind = default(KindEnum?), string className = default(string), string color = "red", bool declawed = default(bool)) : base(declawed) - { - this.Kind = kind; - } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BigCat {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Kind: ").Append(Kind).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BigCat); - } - - /// - /// Returns true if BigCat instances are equal - /// - /// Instance of BigCat to be compared - /// Boolean - public bool Equals(BigCat input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Kind == input.Kind || - (this.Kind != null && - this.Kind.Equals(input.Kind)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Kind != null) - hashCode = hashCode * 59 + this.Kind.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/BigCatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/BigCatAllOf.cs deleted file mode 100644 index f0b9775277e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/BigCatAllOf.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// BigCatAllOf - /// - [DataContract] - public partial class BigCatAllOf : IEquatable - { - /// - /// Defines Kind - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum KindEnum - { - /// - /// Enum Lions for value: lions - /// - [EnumMember(Value = "lions")] - Lions = 1, - - /// - /// Enum Tigers for value: tigers - /// - [EnumMember(Value = "tigers")] - Tigers = 2, - - /// - /// Enum Leopards for value: leopards - /// - [EnumMember(Value = "leopards")] - Leopards = 3, - - /// - /// Enum Jaguars for value: jaguars - /// - [EnumMember(Value = "jaguars")] - Jaguars = 4 - - } - - /// - /// Gets or Sets Kind - /// - [DataMember(Name="kind", EmitDefaultValue=false)] - public KindEnum? Kind { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// kind. - public BigCatAllOf(KindEnum? kind = default(KindEnum?)) - { - this.Kind = kind; - } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BigCatAllOf {\n"); - sb.Append(" Kind: ").Append(Kind).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BigCatAllOf); - } - - /// - /// Returns true if BigCatAllOf instances are equal - /// - /// Instance of BigCatAllOf to be compared - /// Boolean - public bool Equals(BigCatAllOf input) - { - if (input == null) - return false; - - return - ( - this.Kind == input.Kind || - (this.Kind != null && - this.Kind.Equals(input.Kind)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Kind != null) - hashCode = hashCode * 59 + this.Kind.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Capitalization.cs deleted file mode 100644 index ca01a9ea1dd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Capitalization.cs +++ /dev/null @@ -1,193 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Capitalization - /// - [DataContract] - public partial class Capitalization : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// smallCamel. - /// capitalCamel. - /// smallSnake. - /// capitalSnake. - /// sCAETHFlowPoints. - /// Name of the pet . - public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) - { - this.SmallCamel = smallCamel; - this.CapitalCamel = capitalCamel; - this.SmallSnake = smallSnake; - this.CapitalSnake = capitalSnake; - this.SCAETHFlowPoints = sCAETHFlowPoints; - this.ATT_NAME = aTTNAME; - } - - /// - /// Gets or Sets SmallCamel - /// - [DataMember(Name="smallCamel", EmitDefaultValue=false)] - public string SmallCamel { get; set; } - - /// - /// Gets or Sets CapitalCamel - /// - [DataMember(Name="CapitalCamel", EmitDefaultValue=false)] - public string CapitalCamel { get; set; } - - /// - /// Gets or Sets SmallSnake - /// - [DataMember(Name="small_Snake", EmitDefaultValue=false)] - public string SmallSnake { get; set; } - - /// - /// Gets or Sets CapitalSnake - /// - [DataMember(Name="Capital_Snake", EmitDefaultValue=false)] - public string CapitalSnake { get; set; } - - /// - /// Gets or Sets SCAETHFlowPoints - /// - [DataMember(Name="SCA_ETH_Flow_Points", EmitDefaultValue=false)] - public string SCAETHFlowPoints { get; set; } - - /// - /// Name of the pet - /// - /// Name of the pet - [DataMember(Name="ATT_NAME", EmitDefaultValue=false)] - public string ATT_NAME { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); - sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); - sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); - sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Capitalization); - } - - /// - /// Returns true if Capitalization instances are equal - /// - /// Instance of Capitalization to be compared - /// Boolean - public bool Equals(Capitalization input) - { - if (input == null) - return false; - - return - ( - this.SmallCamel == input.SmallCamel || - (this.SmallCamel != null && - this.SmallCamel.Equals(input.SmallCamel)) - ) && - ( - this.CapitalCamel == input.CapitalCamel || - (this.CapitalCamel != null && - this.CapitalCamel.Equals(input.CapitalCamel)) - ) && - ( - this.SmallSnake == input.SmallSnake || - (this.SmallSnake != null && - this.SmallSnake.Equals(input.SmallSnake)) - ) && - ( - this.CapitalSnake == input.CapitalSnake || - (this.CapitalSnake != null && - this.CapitalSnake.Equals(input.CapitalSnake)) - ) && - ( - this.SCAETHFlowPoints == input.SCAETHFlowPoints || - (this.SCAETHFlowPoints != null && - this.SCAETHFlowPoints.Equals(input.SCAETHFlowPoints)) - ) && - ( - this.ATT_NAME == input.ATT_NAME || - (this.ATT_NAME != null && - this.ATT_NAME.Equals(input.ATT_NAME)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SmallCamel != null) - hashCode = hashCode * 59 + this.SmallCamel.GetHashCode(); - if (this.CapitalCamel != null) - hashCode = hashCode * 59 + this.CapitalCamel.GetHashCode(); - if (this.SmallSnake != null) - hashCode = hashCode * 59 + this.SmallSnake.GetHashCode(); - if (this.CapitalSnake != null) - hashCode = hashCode * 59 + this.CapitalSnake.GetHashCode(); - if (this.SCAETHFlowPoints != null) - hashCode = hashCode * 59 + this.SCAETHFlowPoints.GetHashCode(); - if (this.ATT_NAME != null) - hashCode = hashCode * 59 + this.ATT_NAME.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Cat.cs deleted file mode 100644 index 6f283567bf5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Cat.cs +++ /dev/null @@ -1,118 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Cat - /// - [DataContract] - public partial class Cat : Animal, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Cat() { } - /// - /// Initializes a new instance of the class. - /// - /// declawed. - public Cat(bool declawed = default(bool), string className = "Cat", string color = "red") : base(className, color) - { - this.Declawed = declawed; - } - - /// - /// Gets or Sets Declawed - /// - [DataMember(Name="declawed", EmitDefaultValue=false)] - public bool Declawed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Cat {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Cat); - } - - /// - /// Returns true if Cat instances are equal - /// - /// Instance of Cat to be compared - /// Boolean - public bool Equals(Cat input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Declawed == input.Declawed || - (this.Declawed != null && - this.Declawed.Equals(input.Declawed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Declawed != null) - hashCode = hashCode * 59 + this.Declawed.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/CatAllOf.cs deleted file mode 100644 index 82278839b40..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/CatAllOf.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// CatAllOf - /// - [DataContract] - public partial class CatAllOf : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// declawed. - public CatAllOf(bool declawed = default(bool)) - { - this.Declawed = declawed; - } - - /// - /// Gets or Sets Declawed - /// - [DataMember(Name="declawed", EmitDefaultValue=false)] - public bool Declawed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class CatAllOf {\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CatAllOf); - } - - /// - /// Returns true if CatAllOf instances are equal - /// - /// Instance of CatAllOf to be compared - /// Boolean - public bool Equals(CatAllOf input) - { - if (input == null) - return false; - - return - ( - this.Declawed == input.Declawed || - (this.Declawed != null && - this.Declawed.Equals(input.Declawed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Declawed != null) - hashCode = hashCode * 59 + this.Declawed.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Category.cs deleted file mode 100644 index 6dd4b2c6f25..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Category.cs +++ /dev/null @@ -1,142 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Category - /// - [DataContract] - public partial class Category : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Category() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required) (default to "default-name"). - 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; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Category); - } - - /// - /// Returns true if Category instances are equal - /// - /// Instance of Category to be compared - /// Boolean - public bool Equals(Category input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ClassModel.cs deleted file mode 100644 index bf180e2fd3d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ClassModel.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Model for testing model with \"_class\" property - /// - [DataContract] - public partial class ClassModel : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// _class. - public ClassModel(string _class = default(string)) - { - this.Class = _class; - } - - /// - /// Gets or Sets Class - /// - [DataMember(Name="_class", EmitDefaultValue=false)] - public string Class { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ClassModel); - } - - /// - /// Returns true if ClassModel instances are equal - /// - /// Instance of ClassModel to be compared - /// Boolean - public bool Equals(ClassModel input) - { - if (input == null) - return false; - - return - ( - this.Class == input.Class || - (this.Class != null && - this.Class.Equals(input.Class)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Class != null) - hashCode = hashCode * 59 + this.Class.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Dog.cs deleted file mode 100644 index 75b18156018..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Dog.cs +++ /dev/null @@ -1,118 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Dog - /// - [DataContract] - public partial class Dog : Animal, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Dog() { } - /// - /// Initializes a new instance of the class. - /// - /// breed. - public Dog(string breed = default(string), string className = "Dog", string color = "red") : base(className, color) - { - this.Breed = breed; - } - - /// - /// Gets or Sets Breed - /// - [DataMember(Name="breed", EmitDefaultValue=false)] - public string Breed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Dog {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Dog); - } - - /// - /// Returns true if Dog instances are equal - /// - /// Instance of Dog to be compared - /// Boolean - public bool Equals(Dog input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Breed == input.Breed || - (this.Breed != null && - this.Breed.Equals(input.Breed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Breed != null) - hashCode = hashCode * 59 + this.Breed.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/DogAllOf.cs deleted file mode 100644 index d4d0ee3f470..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/DogAllOf.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// DogAllOf - /// - [DataContract] - public partial class DogAllOf : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// breed. - public DogAllOf(string breed = default(string)) - { - this.Breed = breed; - } - - /// - /// Gets or Sets Breed - /// - [DataMember(Name="breed", EmitDefaultValue=false)] - public string Breed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class DogAllOf {\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DogAllOf); - } - - /// - /// Returns true if DogAllOf instances are equal - /// - /// Instance of DogAllOf to be compared - /// Boolean - public bool Equals(DogAllOf input) - { - if (input == null) - return false; - - return - ( - this.Breed == input.Breed || - (this.Breed != null && - this.Breed.Equals(input.Breed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Breed != null) - hashCode = hashCode * 59 + this.Breed.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/EnumArrays.cs deleted file mode 100644 index 4c0e96fd213..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/EnumArrays.cs +++ /dev/null @@ -1,170 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// EnumArrays - /// - [DataContract] - public partial class EnumArrays : IEquatable - { - /// - /// Defines JustSymbol - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum JustSymbolEnum - { - /// - /// Enum GreaterThanOrEqualTo for value: >= - /// - [EnumMember(Value = ">=")] - GreaterThanOrEqualTo = 1, - - /// - /// Enum Dollar for value: $ - /// - [EnumMember(Value = "$")] - Dollar = 2 - - } - - /// - /// Gets or Sets JustSymbol - /// - [DataMember(Name="just_symbol", EmitDefaultValue=false)] - public JustSymbolEnum? JustSymbol { get; set; } - /// - /// Defines ArrayEnum - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ArrayEnumEnum - { - /// - /// Enum Fish for value: fish - /// - [EnumMember(Value = "fish")] - Fish = 1, - - /// - /// Enum Crab for value: crab - /// - [EnumMember(Value = "crab")] - Crab = 2 - - } - - - /// - /// Gets or Sets ArrayEnum - /// - [DataMember(Name="array_enum", EmitDefaultValue=false)] - public List ArrayEnum { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// justSymbol. - /// arrayEnum. - public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) - { - this.JustSymbol = justSymbol; - this.ArrayEnum = arrayEnum; - } - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); - sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EnumArrays); - } - - /// - /// Returns true if EnumArrays instances are equal - /// - /// Instance of EnumArrays to be compared - /// Boolean - public bool Equals(EnumArrays input) - { - if (input == null) - return false; - - return - ( - this.JustSymbol == input.JustSymbol || - (this.JustSymbol != null && - this.JustSymbol.Equals(input.JustSymbol)) - ) && - ( - this.ArrayEnum == input.ArrayEnum || - this.ArrayEnum != null && - input.ArrayEnum != null && - this.ArrayEnum.SequenceEqual(input.ArrayEnum) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.JustSymbol != null) - hashCode = hashCode * 59 + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) - hashCode = hashCode * 59 + this.ArrayEnum.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/EnumClass.cs deleted file mode 100644 index 3f26d632378..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/EnumClass.cs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Defines EnumClass - /// - - [JsonConverter(typeof(StringEnumConverter))] - - public enum EnumClass - { - /// - /// Enum Abc for value: _abc - /// - [EnumMember(Value = "_abc")] - Abc = 1, - - /// - /// Enum Efg for value: -efg - /// - [EnumMember(Value = "-efg")] - Efg = 2, - - /// - /// Enum Xyz for value: (xyz) - /// - [EnumMember(Value = "(xyz)")] - Xyz = 3 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/EnumTest.cs deleted file mode 100644 index e234f80d68d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/EnumTest.cs +++ /dev/null @@ -1,279 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// EnumTest - /// - [DataContract] - public partial class EnumTest : IEquatable - { - /// - /// Defines EnumString - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumStringEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumString - /// - [DataMember(Name="enum_string", EmitDefaultValue=false)] - public EnumStringEnum? EnumString { get; set; } - /// - /// Defines EnumStringRequired - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumStringRequiredEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumStringRequired - /// - [DataMember(Name="enum_string_required", EmitDefaultValue=true)] - public EnumStringRequiredEnum EnumStringRequired { get; set; } - /// - /// Defines EnumInteger - /// - public enum EnumIntegerEnum - { - /// - /// Enum NUMBER_1 for value: 1 - /// - NUMBER_1 = 1, - - /// - /// Enum NUMBER_MINUS_1 for value: -1 - /// - NUMBER_MINUS_1 = -1 - - } - - /// - /// Gets or Sets EnumInteger - /// - [DataMember(Name="enum_integer", EmitDefaultValue=false)] - public EnumIntegerEnum? EnumInteger { get; set; } - /// - /// Defines EnumNumber - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumNumberEnum - { - /// - /// Enum NUMBER_1_DOT_1 for value: 1.1 - /// - [EnumMember(Value = "1.1")] - NUMBER_1_DOT_1 = 1, - - /// - /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2 - /// - [EnumMember(Value = "-1.2")] - NUMBER_MINUS_1_DOT_2 = 2 - - } - - /// - /// Gets or Sets EnumNumber - /// - [DataMember(Name="enum_number", EmitDefaultValue=false)] - public EnumNumberEnum? EnumNumber { get; set; } - /// - /// Gets or Sets OuterEnum - /// - [DataMember(Name="outerEnum", EmitDefaultValue=false)] - public OuterEnum? OuterEnum { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EnumTest() { } - /// - /// Initializes a new instance of the class. - /// - /// enumString. - /// enumStringRequired (required). - /// enumInteger. - /// enumNumber. - /// outerEnum. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?)) - { - // to ensure "enumStringRequired" is required (not null) - if (enumStringRequired == null) - { - throw new InvalidDataException("enumStringRequired is a required property for EnumTest and cannot be null"); - } - else - { - this.EnumStringRequired = enumStringRequired; - } - - this.EnumString = enumString; - this.EnumInteger = enumInteger; - this.EnumNumber = enumNumber; - this.OuterEnum = outerEnum; - } - - - - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class EnumTest {\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); - sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); - sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EnumTest); - } - - /// - /// Returns true if EnumTest instances are equal - /// - /// Instance of EnumTest to be compared - /// Boolean - public bool Equals(EnumTest input) - { - if (input == null) - return false; - - return - ( - this.EnumString == input.EnumString || - (this.EnumString != null && - this.EnumString.Equals(input.EnumString)) - ) && - ( - this.EnumStringRequired == input.EnumStringRequired || - (this.EnumStringRequired != null && - this.EnumStringRequired.Equals(input.EnumStringRequired)) - ) && - ( - this.EnumInteger == input.EnumInteger || - (this.EnumInteger != null && - this.EnumInteger.Equals(input.EnumInteger)) - ) && - ( - this.EnumNumber == input.EnumNumber || - (this.EnumNumber != null && - this.EnumNumber.Equals(input.EnumNumber)) - ) && - ( - this.OuterEnum == input.OuterEnum || - (this.OuterEnum != null && - this.OuterEnum.Equals(input.OuterEnum)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EnumString != null) - hashCode = hashCode * 59 + this.EnumString.GetHashCode(); - if (this.EnumStringRequired != null) - hashCode = hashCode * 59 + this.EnumStringRequired.GetHashCode(); - if (this.EnumInteger != null) - hashCode = hashCode * 59 + this.EnumInteger.GetHashCode(); - if (this.EnumNumber != null) - hashCode = hashCode * 59 + this.EnumNumber.GetHashCode(); - if (this.OuterEnum != null) - hashCode = hashCode * 59 + this.OuterEnum.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/File.cs deleted file mode 100644 index 8d182f792e8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/File.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Must be named `File` for test. - /// - [DataContract] - public partial class File : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// Test capitalization. - public File(string sourceURI = default(string)) - { - this.SourceURI = sourceURI; - } - - /// - /// Test capitalization - /// - /// Test capitalization - [DataMember(Name="sourceURI", EmitDefaultValue=false)] - public string SourceURI { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class File {\n"); - sb.Append(" SourceURI: ").Append(SourceURI).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as File); - } - - /// - /// Returns true if File instances are equal - /// - /// Instance of File to be compared - /// Boolean - public bool Equals(File input) - { - if (input == null) - return false; - - return - ( - this.SourceURI == input.SourceURI || - (this.SourceURI != null && - this.SourceURI.Equals(input.SourceURI)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SourceURI != null) - hashCode = hashCode * 59 + this.SourceURI.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs deleted file mode 100644 index 06713e9cd8e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// FileSchemaTestClass - /// - [DataContract] - public partial class FileSchemaTestClass : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// file. - /// files. - public FileSchemaTestClass(File file = default(File), List files = default(List)) - { - this.File = file; - this.Files = files; - } - - /// - /// Gets or Sets File - /// - [DataMember(Name="file", EmitDefaultValue=false)] - public File File { get; set; } - - /// - /// Gets or Sets Files - /// - [DataMember(Name="files", EmitDefaultValue=false)] - public List Files { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class FileSchemaTestClass {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FileSchemaTestClass); - } - - /// - /// Returns true if FileSchemaTestClass instances are equal - /// - /// Instance of FileSchemaTestClass to be compared - /// Boolean - public bool Equals(FileSchemaTestClass input) - { - if (input == null) - return false; - - return - ( - this.File == input.File || - (this.File != null && - this.File.Equals(input.File)) - ) && - ( - this.Files == input.Files || - this.Files != null && - input.Files != null && - this.Files.SequenceEqual(input.Files) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.File != null) - hashCode = hashCode * 59 + this.File.GetHashCode(); - if (this.Files != null) - hashCode = hashCode * 59 + this.Files.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/FormatTest.cs deleted file mode 100644 index 8128f7a332c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/FormatTest.cs +++ /dev/null @@ -1,362 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// FormatTest - /// - [DataContract] - public partial class FormatTest : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FormatTest() { } - /// - /// Initializes a new instance of the class. - /// - /// integer. - /// int32. - /// int64. - /// number (required). - /// _float. - /// _double. - /// _string. - /// _byte (required). - /// binary. - /// date (required). - /// dateTime. - /// uuid. - /// password (required). - /// bigDecimal. - public FormatTest(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), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), decimal bigDecimal = default(decimal)) - { - // to ensure "number" is required (not null) - if (number == null) - { - throw new InvalidDataException("number is a required property for FormatTest and cannot be null"); - } - else - { - this.Number = number; - } - - // to ensure "_byte" is required (not null) - if (_byte == null) - { - throw new InvalidDataException("_byte is a required property for FormatTest and cannot be null"); - } - else - { - this.Byte = _byte; - } - - // to ensure "date" is required (not null) - if (date == null) - { - throw new InvalidDataException("date is a required property for FormatTest and cannot be null"); - } - else - { - this.Date = date; - } - - // to ensure "password" is required (not null) - if (password == null) - { - throw new InvalidDataException("password is a required property for FormatTest and cannot be null"); - } - else - { - this.Password = password; - } - - this.Integer = integer; - this.Int32 = int32; - this.Int64 = int64; - this.Float = _float; - this.Double = _double; - this.String = _string; - this.Binary = binary; - this.DateTime = dateTime; - this.Uuid = uuid; - this.BigDecimal = bigDecimal; - } - - /// - /// Gets or Sets Integer - /// - [DataMember(Name="integer", EmitDefaultValue=false)] - public int Integer { get; set; } - - /// - /// Gets or Sets Int32 - /// - [DataMember(Name="int32", EmitDefaultValue=false)] - public int Int32 { get; set; } - - /// - /// Gets or Sets Int64 - /// - [DataMember(Name="int64", EmitDefaultValue=false)] - public long Int64 { get; set; } - - /// - /// Gets or Sets Number - /// - [DataMember(Name="number", EmitDefaultValue=true)] - public decimal Number { get; set; } - - /// - /// Gets or Sets Float - /// - [DataMember(Name="float", EmitDefaultValue=false)] - public float Float { get; set; } - - /// - /// Gets or Sets Double - /// - [DataMember(Name="double", EmitDefaultValue=false)] - public double Double { get; set; } - - /// - /// Gets or Sets String - /// - [DataMember(Name="string", EmitDefaultValue=false)] - public string String { get; set; } - - /// - /// Gets or Sets Byte - /// - [DataMember(Name="byte", EmitDefaultValue=true)] - public byte[] Byte { get; set; } - - /// - /// Gets or Sets Binary - /// - [DataMember(Name="binary", EmitDefaultValue=false)] - public System.IO.Stream Binary { get; set; } - - /// - /// Gets or Sets Date - /// - [DataMember(Name="date", EmitDefaultValue=true)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime Date { get; set; } - - /// - /// Gets or Sets DateTime - /// - [DataMember(Name="dateTime", EmitDefaultValue=false)] - public DateTime DateTime { get; set; } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name="uuid", EmitDefaultValue=false)] - public Guid Uuid { get; set; } - - /// - /// Gets or Sets Password - /// - [DataMember(Name="password", EmitDefaultValue=true)] - public string Password { get; set; } - - /// - /// Gets or Sets BigDecimal - /// - [DataMember(Name="BigDecimal", EmitDefaultValue=false)] - public decimal BigDecimal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class FormatTest {\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(" 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(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" BigDecimal: ").Append(BigDecimal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FormatTest); - } - - /// - /// Returns true if FormatTest instances are equal - /// - /// Instance of FormatTest to be compared - /// Boolean - public bool Equals(FormatTest 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.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.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.BigDecimal == input.BigDecimal || - (this.BigDecimal != null && - this.BigDecimal.Equals(input.BigDecimal)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.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.Uuid != null) - hashCode = hashCode * 59 + this.Uuid.GetHashCode(); - if (this.Password != null) - hashCode = hashCode * 59 + this.Password.GetHashCode(); - if (this.BigDecimal != null) - hashCode = hashCode * 59 + this.BigDecimal.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs deleted file mode 100644 index d5afdb16cc7..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// HasOnlyReadOnly - /// - [DataContract] - public partial class HasOnlyReadOnly : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - public HasOnlyReadOnly() - { - } - - /// - /// Gets or Sets Bar - /// - [DataMember(Name="bar", EmitDefaultValue=false)] - public string Bar { get; private set; } - - /// - /// Gets or Sets Foo - /// - [DataMember(Name="foo", EmitDefaultValue=false)] - public string Foo { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class HasOnlyReadOnly {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Foo: ").Append(Foo).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HasOnlyReadOnly); - } - - /// - /// Returns true if HasOnlyReadOnly instances are equal - /// - /// Instance of HasOnlyReadOnly to be compared - /// Boolean - public bool Equals(HasOnlyReadOnly input) - { - if (input == null) - return false; - - return - ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) - ) && - ( - this.Foo == input.Foo || - (this.Foo != null && - this.Foo.Equals(input.Foo)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bar != null) - hashCode = hashCode * 59 + this.Bar.GetHashCode(); - if (this.Foo != null) - hashCode = hashCode * 59 + this.Foo.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/List.cs deleted file mode 100644 index fd3153ee90b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/List.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// List - /// - [DataContract] - public partial class List : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// _123list. - public List(string _123list = default(string)) - { - this._123List = _123list; - } - - /// - /// Gets or Sets _123List - /// - [DataMember(Name="123-list", EmitDefaultValue=false)] - public string _123List { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class List {\n"); - sb.Append(" _123List: ").Append(_123List).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as List); - } - - /// - /// Returns true if List instances are equal - /// - /// Instance of List to be compared - /// Boolean - public bool Equals(List input) - { - if (input == null) - return false; - - return - ( - this._123List == input._123List || - (this._123List != null && - this._123List.Equals(input._123List)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._123List != null) - hashCode = hashCode * 59 + this._123List.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/MapTest.cs deleted file mode 100644 index 3c76047cfb6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/MapTest.cs +++ /dev/null @@ -1,185 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// MapTest - /// - [DataContract] - public partial class MapTest : IEquatable - { - /// - /// Defines Inner - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum InnerEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2 - - } - - - /// - /// Gets or Sets MapOfEnumString - /// - [DataMember(Name="map_of_enum_string", EmitDefaultValue=false)] - public Dictionary MapOfEnumString { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// mapMapOfString. - /// mapOfEnumString. - /// directMap. - /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) - { - this.MapMapOfString = mapMapOfString; - this.MapOfEnumString = mapOfEnumString; - this.DirectMap = directMap; - this.IndirectMap = indirectMap; - } - - /// - /// Gets or Sets MapMapOfString - /// - [DataMember(Name="map_map_of_string", EmitDefaultValue=false)] - public Dictionary> MapMapOfString { get; set; } - - - /// - /// Gets or Sets DirectMap - /// - [DataMember(Name="direct_map", EmitDefaultValue=false)] - public Dictionary DirectMap { get; set; } - - /// - /// Gets or Sets IndirectMap - /// - [DataMember(Name="indirect_map", EmitDefaultValue=false)] - public Dictionary IndirectMap { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); - sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); - sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MapTest); - } - - /// - /// Returns true if MapTest instances are equal - /// - /// Instance of MapTest to be compared - /// Boolean - public bool Equals(MapTest input) - { - if (input == null) - return false; - - return - ( - this.MapMapOfString == input.MapMapOfString || - this.MapMapOfString != null && - input.MapMapOfString != null && - this.MapMapOfString.SequenceEqual(input.MapMapOfString) - ) && - ( - this.MapOfEnumString == input.MapOfEnumString || - this.MapOfEnumString != null && - input.MapOfEnumString != null && - this.MapOfEnumString.SequenceEqual(input.MapOfEnumString) - ) && - ( - this.DirectMap == input.DirectMap || - this.DirectMap != null && - input.DirectMap != null && - this.DirectMap.SequenceEqual(input.DirectMap) - ) && - ( - this.IndirectMap == input.IndirectMap || - this.IndirectMap != null && - input.IndirectMap != null && - this.IndirectMap.SequenceEqual(input.IndirectMap) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapMapOfString != null) - hashCode = hashCode * 59 + this.MapMapOfString.GetHashCode(); - if (this.MapOfEnumString != null) - hashCode = hashCode * 59 + this.MapOfEnumString.GetHashCode(); - if (this.DirectMap != null) - hashCode = hashCode * 59 + this.DirectMap.GetHashCode(); - if (this.IndirectMap != null) - hashCode = hashCode * 59 + this.IndirectMap.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs deleted file mode 100644 index 3ec46aea273..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ /dev/null @@ -1,145 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// MixedPropertiesAndAdditionalPropertiesClass - /// - [DataContract] - public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// uuid. - /// dateTime. - /// map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) - { - this.Uuid = uuid; - this.DateTime = dateTime; - this.Map = map; - } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name="uuid", EmitDefaultValue=false)] - public Guid Uuid { get; set; } - - /// - /// Gets or Sets DateTime - /// - [DataMember(Name="dateTime", EmitDefaultValue=false)] - public DateTime DateTime { get; set; } - - /// - /// Gets or Sets Map - /// - [DataMember(Name="map", EmitDefaultValue=false)] - public Dictionary Map { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Map: ").Append(Map).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MixedPropertiesAndAdditionalPropertiesClass); - } - - /// - /// Returns true if MixedPropertiesAndAdditionalPropertiesClass instances are equal - /// - /// Instance of MixedPropertiesAndAdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(MixedPropertiesAndAdditionalPropertiesClass input) - { - if (input == null) - return false; - - return - ( - this.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) - ) && - ( - this.DateTime == input.DateTime || - (this.DateTime != null && - this.DateTime.Equals(input.DateTime)) - ) && - ( - this.Map == input.Map || - this.Map != null && - input.Map != null && - this.Map.SequenceEqual(input.Map) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uuid != null) - hashCode = hashCode * 59 + this.Uuid.GetHashCode(); - if (this.DateTime != null) - hashCode = hashCode * 59 + this.DateTime.GetHashCode(); - if (this.Map != null) - hashCode = hashCode * 59 + this.Map.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Model200Response.cs deleted file mode 100644 index 9b18e50452d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Model200Response.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Model for testing model name starting with number - /// - [DataContract] - public partial class Model200Response : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - /// _class. - public Model200Response(int name = default(int), string _class = default(string)) - { - this.Name = name; - this.Class = _class; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public int Name { get; set; } - - /// - /// Gets or Sets Class - /// - [DataMember(Name="class", EmitDefaultValue=false)] - public string Class { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Model200Response {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Model200Response); - } - - /// - /// Returns true if Model200Response instances are equal - /// - /// Instance of Model200Response to be compared - /// Boolean - public bool Equals(Model200Response input) - { - if (input == null) - return false; - - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Class == input.Class || - (this.Class != null && - this.Class.Equals(input.Class)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.Class != null) - hashCode = hashCode * 59 + this.Class.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ModelClient.cs deleted file mode 100644 index 8636e753b29..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ModelClient.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// ModelClient - /// - [DataContract] - public partial class ModelClient : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// _client. - public ModelClient(string _client = default(string)) - { - this.__Client = _client; - } - - /// - /// Gets or Sets __Client - /// - [DataMember(Name="client", EmitDefaultValue=false)] - public string __Client { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ModelClient {\n"); - sb.Append(" __Client: ").Append(__Client).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ModelClient); - } - - /// - /// Returns true if ModelClient instances are equal - /// - /// Instance of ModelClient to be compared - /// Boolean - public bool Equals(ModelClient input) - { - if (input == null) - return false; - - return - ( - this.__Client == input.__Client || - (this.__Client != null && - this.__Client.Equals(input.__Client)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.__Client != null) - hashCode = hashCode * 59 + this.__Client.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Name.cs deleted file mode 100644 index 64fdd861b64..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Name.cs +++ /dev/null @@ -1,170 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Model for testing model name same as property name - /// - [DataContract] - public partial class Name : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Name() { } - /// - /// Initializes a new instance of the class. - /// - /// name (required). - /// property. - public Name(int name = default(int), string property = default(string)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Name and cannot be null"); - } - else - { - this._Name = name; - } - - this.Property = property; - } - - /// - /// Gets or Sets _Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public int _Name { get; set; } - - /// - /// Gets or Sets SnakeCase - /// - [DataMember(Name="snake_case", EmitDefaultValue=false)] - public int SnakeCase { get; private set; } - - /// - /// Gets or Sets Property - /// - [DataMember(Name="property", EmitDefaultValue=false)] - public string Property { get; set; } - - /// - /// Gets or Sets _123Number - /// - [DataMember(Name="123Number", EmitDefaultValue=false)] - public int _123Number { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Name {\n"); - sb.Append(" _Name: ").Append(_Name).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); - sb.Append(" Property: ").Append(Property).Append("\n"); - sb.Append(" _123Number: ").Append(_123Number).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Name); - } - - /// - /// Returns true if Name instances are equal - /// - /// Instance of Name to be compared - /// Boolean - public bool Equals(Name input) - { - if (input == null) - return false; - - return - ( - this._Name == input._Name || - (this._Name != null && - this._Name.Equals(input._Name)) - ) && - ( - this.SnakeCase == input.SnakeCase || - (this.SnakeCase != null && - this.SnakeCase.Equals(input.SnakeCase)) - ) && - ( - this.Property == input.Property || - (this.Property != null && - this.Property.Equals(input.Property)) - ) && - ( - this._123Number == input._123Number || - (this._123Number != null && - this._123Number.Equals(input._123Number)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.SnakeCase != null) - hashCode = hashCode * 59 + this.SnakeCase.GetHashCode(); - if (this.Property != null) - hashCode = hashCode * 59 + this.Property.GetHashCode(); - if (this._123Number != null) - hashCode = hashCode * 59 + this._123Number.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/NumberOnly.cs deleted file mode 100644 index a9d51b7970e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/NumberOnly.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// NumberOnly - /// - [DataContract] - public partial class NumberOnly : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// justNumber. - public NumberOnly(decimal justNumber = default(decimal)) - { - this.JustNumber = justNumber; - } - - /// - /// Gets or Sets JustNumber - /// - [DataMember(Name="JustNumber", EmitDefaultValue=false)] - public decimal JustNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class NumberOnly {\n"); - sb.Append(" JustNumber: ").Append(JustNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NumberOnly); - } - - /// - /// Returns true if NumberOnly instances are equal - /// - /// Instance of NumberOnly to be compared - /// Boolean - public bool Equals(NumberOnly input) - { - if (input == null) - return false; - - return - ( - this.JustNumber == input.JustNumber || - (this.JustNumber != null && - this.JustNumber.Equals(input.JustNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.JustNumber != null) - hashCode = hashCode * 59 + this.JustNumber.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Order.cs deleted file mode 100644 index 18736e60d77..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Order.cs +++ /dev/null @@ -1,228 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Order - /// - [DataContract] - public partial class Order : IEquatable - { - /// - /// Order Status - /// - /// Order Status - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Placed for value: placed - /// - [EnumMember(Value = "placed")] - Placed = 1, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 2, - - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 3 - - } - - /// - /// Order Status - /// - /// Order Status - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// petId. - /// quantity. - /// shipDate. - /// Order Status. - /// complete (default to false). - public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) - { - this.Id = id; - this.PetId = petId; - this.Quantity = quantity; - this.ShipDate = shipDate; - this.Status = status; - // use default value if no "complete" provided - if (complete == null) - { - this.Complete = false; - } - else - { - this.Complete = complete; - } - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets PetId - /// - [DataMember(Name="petId", EmitDefaultValue=false)] - public long PetId { get; set; } - - /// - /// Gets or Sets Quantity - /// - [DataMember(Name="quantity", EmitDefaultValue=false)] - public int Quantity { get; set; } - - /// - /// Gets or Sets ShipDate - /// - [DataMember(Name="shipDate", EmitDefaultValue=false)] - public DateTime ShipDate { get; set; } - - - /// - /// Gets or Sets Complete - /// - [DataMember(Name="complete", EmitDefaultValue=false)] - public bool Complete { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Order {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Order); - } - - /// - /// Returns true if Order instances are equal - /// - /// Instance of Order to be compared - /// Boolean - public bool Equals(Order input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PetId == input.PetId || - (this.PetId != null && - this.PetId.Equals(input.PetId)) - ) && - ( - this.Quantity == input.Quantity || - (this.Quantity != null && - this.Quantity.Equals(input.Quantity)) - ) && - ( - this.ShipDate == input.ShipDate || - (this.ShipDate != null && - this.ShipDate.Equals(input.ShipDate)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.Complete == input.Complete || - (this.Complete != null && - this.Complete.Equals(input.Complete)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.PetId != null) - hashCode = hashCode * 59 + this.PetId.GetHashCode(); - if (this.Quantity != null) - hashCode = hashCode * 59 + this.Quantity.GetHashCode(); - if (this.ShipDate != null) - hashCode = hashCode * 59 + this.ShipDate.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - if (this.Complete != null) - hashCode = hashCode * 59 + this.Complete.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/OuterComposite.cs deleted file mode 100644 index 6b378405b74..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/OuterComposite.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// OuterComposite - /// - [DataContract] - public partial class OuterComposite : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// myNumber. - /// myString. - /// myBoolean. - public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) - { - this.MyNumber = myNumber; - this.MyString = myString; - this.MyBoolean = myBoolean; - } - - /// - /// Gets or Sets MyNumber - /// - [DataMember(Name="my_number", EmitDefaultValue=false)] - public decimal MyNumber { get; set; } - - /// - /// Gets or Sets MyString - /// - [DataMember(Name="my_string", EmitDefaultValue=false)] - public string MyString { get; set; } - - /// - /// Gets or Sets MyBoolean - /// - [DataMember(Name="my_boolean", EmitDefaultValue=false)] - public bool MyBoolean { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class OuterComposite {\n"); - sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); - sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OuterComposite); - } - - /// - /// Returns true if OuterComposite instances are equal - /// - /// Instance of OuterComposite to be compared - /// Boolean - public bool Equals(OuterComposite input) - { - if (input == null) - return false; - - return - ( - this.MyNumber == input.MyNumber || - (this.MyNumber != null && - this.MyNumber.Equals(input.MyNumber)) - ) && - ( - this.MyString == input.MyString || - (this.MyString != null && - this.MyString.Equals(input.MyString)) - ) && - ( - this.MyBoolean == input.MyBoolean || - (this.MyBoolean != null && - this.MyBoolean.Equals(input.MyBoolean)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MyNumber != null) - hashCode = hashCode * 59 + this.MyNumber.GetHashCode(); - if (this.MyString != null) - hashCode = hashCode * 59 + this.MyString.GetHashCode(); - if (this.MyBoolean != null) - hashCode = hashCode * 59 + this.MyBoolean.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/OuterEnum.cs deleted file mode 100644 index 38f979216b7..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/OuterEnum.cs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Defines OuterEnum - /// - - [JsonConverter(typeof(StringEnumConverter))] - - public enum OuterEnum - { - /// - /// Enum Placed for value: placed - /// - [EnumMember(Value = "placed")] - Placed = 1, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 2, - - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 3 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Pet.cs deleted file mode 100644 index ac454a7840a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Pet.cs +++ /dev/null @@ -1,245 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Pet - /// - [DataContract] - public partial class Pet : IEquatable - { - /// - /// pet status in the store - /// - /// pet status in the store - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Available for value: available - /// - [EnumMember(Value = "available")] - Available = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2, - - /// - /// Enum Sold for value: sold - /// - [EnumMember(Value = "sold")] - Sold = 3 - - } - - /// - /// pet status in the store - /// - /// pet status in the store - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Pet() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// category. - /// name (required). - /// photoUrls (required). - /// tags. - /// pet status in the store. - public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Pet and cannot be null"); - } - else - { - this.Name = name; - } - - // to ensure "photoUrls" is required (not null) - if (photoUrls == null) - { - throw new InvalidDataException("photoUrls is a required property for Pet and cannot be null"); - } - else - { - this.PhotoUrls = photoUrls; - } - - this.Id = id; - this.Category = category; - this.Tags = tags; - this.Status = status; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Category - /// - [DataMember(Name="category", EmitDefaultValue=false)] - public Category Category { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Gets or Sets PhotoUrls - /// - [DataMember(Name="photoUrls", EmitDefaultValue=true)] - public List PhotoUrls { get; set; } - - /// - /// Gets or Sets Tags - /// - [DataMember(Name="tags", EmitDefaultValue=false)] - public List Tags { get; set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Pet); - } - - /// - /// Returns true if Pet instances are equal - /// - /// Instance of Pet to be compared - /// Boolean - public bool Equals(Pet input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Category == input.Category || - (this.Category != null && - this.Category.Equals(input.Category)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PhotoUrls == input.PhotoUrls || - this.PhotoUrls != null && - input.PhotoUrls != null && - this.PhotoUrls.SequenceEqual(input.PhotoUrls) - ) && - ( - this.Tags == input.Tags || - this.Tags != null && - input.Tags != null && - this.Tags.SequenceEqual(input.Tags) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Category != null) - hashCode = hashCode * 59 + this.Category.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.PhotoUrls != null) - hashCode = hashCode * 59 + this.PhotoUrls.GetHashCode(); - if (this.Tags != null) - hashCode = hashCode * 59 + this.Tags.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs deleted file mode 100644 index 8b66e4f7dd2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ /dev/null @@ -1,126 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// ReadOnlyFirst - /// - [DataContract] - public partial class ReadOnlyFirst : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// baz. - public ReadOnlyFirst(string baz = default(string)) - { - this.Baz = baz; - } - - /// - /// Gets or Sets Bar - /// - [DataMember(Name="bar", EmitDefaultValue=false)] - public string Bar { get; private set; } - - /// - /// Gets or Sets Baz - /// - [DataMember(Name="baz", EmitDefaultValue=false)] - public string Baz { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ReadOnlyFirst {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Baz: ").Append(Baz).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReadOnlyFirst); - } - - /// - /// Returns true if ReadOnlyFirst instances are equal - /// - /// Instance of ReadOnlyFirst to be compared - /// Boolean - public bool Equals(ReadOnlyFirst input) - { - if (input == null) - return false; - - return - ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) - ) && - ( - this.Baz == input.Baz || - (this.Baz != null && - this.Baz.Equals(input.Baz)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bar != null) - hashCode = hashCode * 59 + this.Bar.GetHashCode(); - if (this.Baz != null) - hashCode = hashCode * 59 + this.Baz.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Return.cs deleted file mode 100644 index 3fac5a53eb7..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Return.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Model for testing reserved words - /// - [DataContract] - public partial class Return : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// _return. - public Return(int _return = default(int)) - { - this._Return = _return; - } - - /// - /// Gets or Sets _Return - /// - [DataMember(Name="return", EmitDefaultValue=false)] - public int _Return { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Return {\n"); - sb.Append(" _Return: ").Append(_Return).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Return); - } - - /// - /// Returns true if Return instances are equal - /// - /// Instance of Return to be compared - /// Boolean - public bool Equals(Return input) - { - if (input == null) - return false; - - return - ( - this._Return == input._Return || - (this._Return != null && - this._Return.Equals(input._Return)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._Return != null) - hashCode = hashCode * 59 + this._Return.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/SpecialModelName.cs deleted file mode 100644 index e16b6bfc0e8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// SpecialModelName - /// - [DataContract] - public partial class SpecialModelName : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// specialPropertyName. - public SpecialModelName(long specialPropertyName = default(long)) - { - this.SpecialPropertyName = specialPropertyName; - } - - /// - /// Gets or Sets SpecialPropertyName - /// - [DataMember(Name="$special[property.name]", EmitDefaultValue=false)] - public long SpecialPropertyName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SpecialModelName); - } - - /// - /// Returns true if SpecialModelName instances are equal - /// - /// Instance of SpecialModelName to be compared - /// Boolean - public bool Equals(SpecialModelName input) - { - if (input == null) - return false; - - return - ( - this.SpecialPropertyName == input.SpecialPropertyName || - (this.SpecialPropertyName != null && - this.SpecialPropertyName.Equals(input.SpecialPropertyName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SpecialPropertyName != null) - hashCode = hashCode * 59 + this.SpecialPropertyName.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Tag.cs deleted file mode 100644 index f5017864dec..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/Tag.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Tag - /// - [DataContract] - public partial class Tag : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - public Tag(long id = default(long), string name = default(string)) - { - this.Id = id; - this.Name = name; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Tag); - } - - /// - /// Returns true if Tag instances are equal - /// - /// Instance of Tag to be compared - /// Boolean - public bool Equals(Tag input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderDefault.cs deleted file mode 100644 index 8dcfb5aee00..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderDefault.cs +++ /dev/null @@ -1,227 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// TypeHolderDefault - /// - [DataContract] - public partial class TypeHolderDefault : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TypeHolderDefault() { } - /// - /// Initializes a new instance of the class. - /// - /// stringItem (required) (default to "what"). - /// numberItem (required). - /// integerItem (required). - /// boolItem (required) (default to true). - /// arrayItem (required). - public TypeHolderDefault(string stringItem = "what", decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = true, List arrayItem = default(List)) - { - // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - - // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - - } - - /// - /// Gets or Sets StringItem - /// - [DataMember(Name="string_item", EmitDefaultValue=true)] - public string StringItem { get; set; } - - /// - /// Gets or Sets NumberItem - /// - [DataMember(Name="number_item", EmitDefaultValue=true)] - public decimal NumberItem { get; set; } - - /// - /// Gets or Sets IntegerItem - /// - [DataMember(Name="integer_item", EmitDefaultValue=true)] - public int IntegerItem { get; set; } - - /// - /// Gets or Sets BoolItem - /// - [DataMember(Name="bool_item", EmitDefaultValue=true)] - public bool BoolItem { get; set; } - - /// - /// Gets or Sets ArrayItem - /// - [DataMember(Name="array_item", EmitDefaultValue=true)] - public List ArrayItem { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TypeHolderDefault {\n"); - sb.Append(" StringItem: ").Append(StringItem).Append("\n"); - sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); - sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); - sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); - sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TypeHolderDefault); - } - - /// - /// Returns true if TypeHolderDefault instances are equal - /// - /// Instance of TypeHolderDefault to be compared - /// Boolean - public bool Equals(TypeHolderDefault input) - { - if (input == null) - return false; - - return - ( - this.StringItem == input.StringItem || - (this.StringItem != null && - this.StringItem.Equals(input.StringItem)) - ) && - ( - this.NumberItem == input.NumberItem || - (this.NumberItem != null && - this.NumberItem.Equals(input.NumberItem)) - ) && - ( - this.IntegerItem == input.IntegerItem || - (this.IntegerItem != null && - this.IntegerItem.Equals(input.IntegerItem)) - ) && - ( - this.BoolItem == input.BoolItem || - (this.BoolItem != null && - this.BoolItem.Equals(input.BoolItem)) - ) && - ( - this.ArrayItem == input.ArrayItem || - this.ArrayItem != null && - input.ArrayItem != null && - this.ArrayItem.SequenceEqual(input.ArrayItem) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.StringItem != null) - hashCode = hashCode * 59 + this.StringItem.GetHashCode(); - if (this.NumberItem != null) - hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); - if (this.IntegerItem != null) - hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); - if (this.BoolItem != null) - hashCode = hashCode * 59 + this.BoolItem.GetHashCode(); - if (this.ArrayItem != null) - hashCode = hashCode * 59 + this.ArrayItem.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderExample.cs deleted file mode 100644 index 74fdf9563a8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ /dev/null @@ -1,252 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// TypeHolderExample - /// - [DataContract] - public partial class TypeHolderExample : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TypeHolderExample() { } - /// - /// Initializes a new instance of the class. - /// - /// stringItem (required). - /// numberItem (required). - /// floatItem (required). - /// integerItem (required). - /// boolItem (required). - /// arrayItem (required). - public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) - { - // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "floatItem" is required (not null) - if (floatItem == null) - { - throw new InvalidDataException("floatItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.FloatItem = floatItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - - // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - - } - - /// - /// Gets or Sets StringItem - /// - [DataMember(Name="string_item", EmitDefaultValue=true)] - public string StringItem { get; set; } - - /// - /// Gets or Sets NumberItem - /// - [DataMember(Name="number_item", EmitDefaultValue=true)] - public decimal NumberItem { get; set; } - - /// - /// Gets or Sets FloatItem - /// - [DataMember(Name="float_item", EmitDefaultValue=true)] - public float FloatItem { get; set; } - - /// - /// Gets or Sets IntegerItem - /// - [DataMember(Name="integer_item", EmitDefaultValue=true)] - public int IntegerItem { get; set; } - - /// - /// Gets or Sets BoolItem - /// - [DataMember(Name="bool_item", EmitDefaultValue=true)] - public bool BoolItem { get; set; } - - /// - /// Gets or Sets ArrayItem - /// - [DataMember(Name="array_item", EmitDefaultValue=true)] - public List ArrayItem { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TypeHolderExample {\n"); - sb.Append(" StringItem: ").Append(StringItem).Append("\n"); - sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); - sb.Append(" FloatItem: ").Append(FloatItem).Append("\n"); - sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); - sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); - sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TypeHolderExample); - } - - /// - /// Returns true if TypeHolderExample instances are equal - /// - /// Instance of TypeHolderExample to be compared - /// Boolean - public bool Equals(TypeHolderExample input) - { - if (input == null) - return false; - - return - ( - this.StringItem == input.StringItem || - (this.StringItem != null && - this.StringItem.Equals(input.StringItem)) - ) && - ( - this.NumberItem == input.NumberItem || - (this.NumberItem != null && - this.NumberItem.Equals(input.NumberItem)) - ) && - ( - this.FloatItem == input.FloatItem || - (this.FloatItem != null && - this.FloatItem.Equals(input.FloatItem)) - ) && - ( - this.IntegerItem == input.IntegerItem || - (this.IntegerItem != null && - this.IntegerItem.Equals(input.IntegerItem)) - ) && - ( - this.BoolItem == input.BoolItem || - (this.BoolItem != null && - this.BoolItem.Equals(input.BoolItem)) - ) && - ( - this.ArrayItem == input.ArrayItem || - this.ArrayItem != null && - input.ArrayItem != null && - this.ArrayItem.SequenceEqual(input.ArrayItem) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.StringItem != null) - hashCode = hashCode * 59 + this.StringItem.GetHashCode(); - if (this.NumberItem != null) - hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); - if (this.FloatItem != null) - hashCode = hashCode * 59 + this.FloatItem.GetHashCode(); - if (this.IntegerItem != null) - hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); - if (this.BoolItem != null) - hashCode = hashCode * 59 + this.BoolItem.GetHashCode(); - if (this.ArrayItem != null) - hashCode = hashCode * 59 + this.ArrayItem.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/User.cs deleted file mode 100644 index 7d119882806..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/User.cs +++ /dev/null @@ -1,225 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// User - /// - [DataContract] - public partial class User : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// username. - /// firstName. - /// lastName. - /// email. - /// password. - /// phone. - /// User Status. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int)) - { - this.Id = id; - this.Username = username; - this.FirstName = firstName; - this.LastName = lastName; - this.Email = email; - this.Password = password; - this.Phone = phone; - this.UserStatus = userStatus; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Username - /// - [DataMember(Name="username", EmitDefaultValue=false)] - public string Username { get; set; } - - /// - /// Gets or Sets FirstName - /// - [DataMember(Name="firstName", EmitDefaultValue=false)] - public string FirstName { get; set; } - - /// - /// Gets or Sets LastName - /// - [DataMember(Name="lastName", EmitDefaultValue=false)] - public string LastName { get; set; } - - /// - /// Gets or Sets Email - /// - [DataMember(Name="email", EmitDefaultValue=false)] - public string Email { get; set; } - - /// - /// Gets or Sets Password - /// - [DataMember(Name="password", EmitDefaultValue=false)] - public string Password { get; set; } - - /// - /// Gets or Sets Phone - /// - [DataMember(Name="phone", EmitDefaultValue=false)] - public string Phone { get; set; } - - /// - /// User Status - /// - /// User Status - [DataMember(Name="userStatus", EmitDefaultValue=false)] - public int UserStatus { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as User); - } - - /// - /// Returns true if User instances are equal - /// - /// Instance of User to be compared - /// Boolean - public bool Equals(User input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.UserStatus == input.UserStatus || - (this.UserStatus != null && - this.UserStatus.Equals(input.UserStatus)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Username != null) - hashCode = hashCode * 59 + this.Username.GetHashCode(); - if (this.FirstName != null) - hashCode = hashCode * 59 + this.FirstName.GetHashCode(); - if (this.LastName != null) - hashCode = hashCode * 59 + this.LastName.GetHashCode(); - if (this.Email != null) - hashCode = hashCode * 59 + this.Email.GetHashCode(); - if (this.Password != null) - hashCode = hashCode * 59 + this.Password.GetHashCode(); - if (this.Phone != null) - hashCode = hashCode * 59 + this.Phone.GetHashCode(); - if (this.UserStatus != null) - hashCode = hashCode * 59 + this.UserStatus.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/XmlItem.cs b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/XmlItem.cs deleted file mode 100644 index 280eedb3ad0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Model/XmlItem.cs +++ /dev/null @@ -1,569 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// XmlItem - /// - [DataContract] - public partial class XmlItem : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// attributeString. - /// attributeNumber. - /// attributeInteger. - /// attributeBoolean. - /// wrappedArray. - /// nameString. - /// nameNumber. - /// nameInteger. - /// nameBoolean. - /// nameArray. - /// nameWrappedArray. - /// prefixString. - /// prefixNumber. - /// prefixInteger. - /// prefixBoolean. - /// prefixArray. - /// prefixWrappedArray. - /// namespaceString. - /// namespaceNumber. - /// namespaceInteger. - /// namespaceBoolean. - /// namespaceArray. - /// namespaceWrappedArray. - /// prefixNsString. - /// prefixNsNumber. - /// prefixNsInteger. - /// prefixNsBoolean. - /// prefixNsArray. - /// prefixNsWrappedArray. - public XmlItem(string attributeString = default(string), decimal attributeNumber = default(decimal), int attributeInteger = default(int), bool attributeBoolean = default(bool), List wrappedArray = default(List), string nameString = default(string), decimal nameNumber = default(decimal), int nameInteger = default(int), bool nameBoolean = default(bool), List nameArray = default(List), List nameWrappedArray = default(List), string prefixString = default(string), decimal prefixNumber = default(decimal), int prefixInteger = default(int), bool prefixBoolean = default(bool), List prefixArray = default(List), List prefixWrappedArray = default(List), string namespaceString = default(string), decimal namespaceNumber = default(decimal), int namespaceInteger = default(int), bool namespaceBoolean = default(bool), List namespaceArray = default(List), List namespaceWrappedArray = default(List), string prefixNsString = default(string), decimal prefixNsNumber = default(decimal), int prefixNsInteger = default(int), bool prefixNsBoolean = default(bool), List prefixNsArray = default(List), List prefixNsWrappedArray = default(List)) - { - this.AttributeString = attributeString; - this.AttributeNumber = attributeNumber; - this.AttributeInteger = attributeInteger; - this.AttributeBoolean = attributeBoolean; - this.WrappedArray = wrappedArray; - this.NameString = nameString; - this.NameNumber = nameNumber; - this.NameInteger = nameInteger; - this.NameBoolean = nameBoolean; - this.NameArray = nameArray; - this.NameWrappedArray = nameWrappedArray; - this.PrefixString = prefixString; - this.PrefixNumber = prefixNumber; - this.PrefixInteger = prefixInteger; - this.PrefixBoolean = prefixBoolean; - this.PrefixArray = prefixArray; - this.PrefixWrappedArray = prefixWrappedArray; - this.NamespaceString = namespaceString; - this.NamespaceNumber = namespaceNumber; - this.NamespaceInteger = namespaceInteger; - this.NamespaceBoolean = namespaceBoolean; - this.NamespaceArray = namespaceArray; - this.NamespaceWrappedArray = namespaceWrappedArray; - this.PrefixNsString = prefixNsString; - this.PrefixNsNumber = prefixNsNumber; - this.PrefixNsInteger = prefixNsInteger; - this.PrefixNsBoolean = prefixNsBoolean; - this.PrefixNsArray = prefixNsArray; - this.PrefixNsWrappedArray = prefixNsWrappedArray; - } - - /// - /// Gets or Sets AttributeString - /// - [DataMember(Name="attribute_string", EmitDefaultValue=false)] - public string AttributeString { get; set; } - - /// - /// Gets or Sets AttributeNumber - /// - [DataMember(Name="attribute_number", EmitDefaultValue=false)] - public decimal AttributeNumber { get; set; } - - /// - /// Gets or Sets AttributeInteger - /// - [DataMember(Name="attribute_integer", EmitDefaultValue=false)] - public int AttributeInteger { get; set; } - - /// - /// Gets or Sets AttributeBoolean - /// - [DataMember(Name="attribute_boolean", EmitDefaultValue=false)] - public bool AttributeBoolean { get; set; } - - /// - /// Gets or Sets WrappedArray - /// - [DataMember(Name="wrapped_array", EmitDefaultValue=false)] - public List WrappedArray { get; set; } - - /// - /// Gets or Sets NameString - /// - [DataMember(Name="name_string", EmitDefaultValue=false)] - public string NameString { get; set; } - - /// - /// Gets or Sets NameNumber - /// - [DataMember(Name="name_number", EmitDefaultValue=false)] - public decimal NameNumber { get; set; } - - /// - /// Gets or Sets NameInteger - /// - [DataMember(Name="name_integer", EmitDefaultValue=false)] - public int NameInteger { get; set; } - - /// - /// Gets or Sets NameBoolean - /// - [DataMember(Name="name_boolean", EmitDefaultValue=false)] - public bool NameBoolean { get; set; } - - /// - /// Gets or Sets NameArray - /// - [DataMember(Name="name_array", EmitDefaultValue=false)] - public List NameArray { get; set; } - - /// - /// Gets or Sets NameWrappedArray - /// - [DataMember(Name="name_wrapped_array", EmitDefaultValue=false)] - public List NameWrappedArray { get; set; } - - /// - /// Gets or Sets PrefixString - /// - [DataMember(Name="prefix_string", EmitDefaultValue=false)] - public string PrefixString { get; set; } - - /// - /// Gets or Sets PrefixNumber - /// - [DataMember(Name="prefix_number", EmitDefaultValue=false)] - public decimal PrefixNumber { get; set; } - - /// - /// Gets or Sets PrefixInteger - /// - [DataMember(Name="prefix_integer", EmitDefaultValue=false)] - public int PrefixInteger { get; set; } - - /// - /// Gets or Sets PrefixBoolean - /// - [DataMember(Name="prefix_boolean", EmitDefaultValue=false)] - public bool PrefixBoolean { get; set; } - - /// - /// Gets or Sets PrefixArray - /// - [DataMember(Name="prefix_array", EmitDefaultValue=false)] - public List PrefixArray { get; set; } - - /// - /// Gets or Sets PrefixWrappedArray - /// - [DataMember(Name="prefix_wrapped_array", EmitDefaultValue=false)] - public List PrefixWrappedArray { get; set; } - - /// - /// Gets or Sets NamespaceString - /// - [DataMember(Name="namespace_string", EmitDefaultValue=false)] - public string NamespaceString { get; set; } - - /// - /// Gets or Sets NamespaceNumber - /// - [DataMember(Name="namespace_number", EmitDefaultValue=false)] - public decimal NamespaceNumber { get; set; } - - /// - /// Gets or Sets NamespaceInteger - /// - [DataMember(Name="namespace_integer", EmitDefaultValue=false)] - public int NamespaceInteger { get; set; } - - /// - /// Gets or Sets NamespaceBoolean - /// - [DataMember(Name="namespace_boolean", EmitDefaultValue=false)] - public bool NamespaceBoolean { get; set; } - - /// - /// Gets or Sets NamespaceArray - /// - [DataMember(Name="namespace_array", EmitDefaultValue=false)] - public List NamespaceArray { get; set; } - - /// - /// Gets or Sets NamespaceWrappedArray - /// - [DataMember(Name="namespace_wrapped_array", EmitDefaultValue=false)] - public List NamespaceWrappedArray { get; set; } - - /// - /// Gets or Sets PrefixNsString - /// - [DataMember(Name="prefix_ns_string", EmitDefaultValue=false)] - public string PrefixNsString { get; set; } - - /// - /// Gets or Sets PrefixNsNumber - /// - [DataMember(Name="prefix_ns_number", EmitDefaultValue=false)] - public decimal PrefixNsNumber { get; set; } - - /// - /// Gets or Sets PrefixNsInteger - /// - [DataMember(Name="prefix_ns_integer", EmitDefaultValue=false)] - public int PrefixNsInteger { get; set; } - - /// - /// Gets or Sets PrefixNsBoolean - /// - [DataMember(Name="prefix_ns_boolean", EmitDefaultValue=false)] - public bool PrefixNsBoolean { get; set; } - - /// - /// Gets or Sets PrefixNsArray - /// - [DataMember(Name="prefix_ns_array", EmitDefaultValue=false)] - public List PrefixNsArray { get; set; } - - /// - /// Gets or Sets PrefixNsWrappedArray - /// - [DataMember(Name="prefix_ns_wrapped_array", EmitDefaultValue=false)] - public List PrefixNsWrappedArray { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class XmlItem {\n"); - sb.Append(" AttributeString: ").Append(AttributeString).Append("\n"); - sb.Append(" AttributeNumber: ").Append(AttributeNumber).Append("\n"); - sb.Append(" AttributeInteger: ").Append(AttributeInteger).Append("\n"); - sb.Append(" AttributeBoolean: ").Append(AttributeBoolean).Append("\n"); - sb.Append(" WrappedArray: ").Append(WrappedArray).Append("\n"); - sb.Append(" NameString: ").Append(NameString).Append("\n"); - sb.Append(" NameNumber: ").Append(NameNumber).Append("\n"); - sb.Append(" NameInteger: ").Append(NameInteger).Append("\n"); - sb.Append(" NameBoolean: ").Append(NameBoolean).Append("\n"); - sb.Append(" NameArray: ").Append(NameArray).Append("\n"); - sb.Append(" NameWrappedArray: ").Append(NameWrappedArray).Append("\n"); - sb.Append(" PrefixString: ").Append(PrefixString).Append("\n"); - sb.Append(" PrefixNumber: ").Append(PrefixNumber).Append("\n"); - sb.Append(" PrefixInteger: ").Append(PrefixInteger).Append("\n"); - sb.Append(" PrefixBoolean: ").Append(PrefixBoolean).Append("\n"); - sb.Append(" PrefixArray: ").Append(PrefixArray).Append("\n"); - sb.Append(" PrefixWrappedArray: ").Append(PrefixWrappedArray).Append("\n"); - sb.Append(" NamespaceString: ").Append(NamespaceString).Append("\n"); - sb.Append(" NamespaceNumber: ").Append(NamespaceNumber).Append("\n"); - sb.Append(" NamespaceInteger: ").Append(NamespaceInteger).Append("\n"); - sb.Append(" NamespaceBoolean: ").Append(NamespaceBoolean).Append("\n"); - sb.Append(" NamespaceArray: ").Append(NamespaceArray).Append("\n"); - sb.Append(" NamespaceWrappedArray: ").Append(NamespaceWrappedArray).Append("\n"); - sb.Append(" PrefixNsString: ").Append(PrefixNsString).Append("\n"); - sb.Append(" PrefixNsNumber: ").Append(PrefixNsNumber).Append("\n"); - sb.Append(" PrefixNsInteger: ").Append(PrefixNsInteger).Append("\n"); - sb.Append(" PrefixNsBoolean: ").Append(PrefixNsBoolean).Append("\n"); - sb.Append(" PrefixNsArray: ").Append(PrefixNsArray).Append("\n"); - sb.Append(" PrefixNsWrappedArray: ").Append(PrefixNsWrappedArray).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as XmlItem); - } - - /// - /// Returns true if XmlItem instances are equal - /// - /// Instance of XmlItem to be compared - /// Boolean - public bool Equals(XmlItem input) - { - if (input == null) - return false; - - return - ( - this.AttributeString == input.AttributeString || - (this.AttributeString != null && - this.AttributeString.Equals(input.AttributeString)) - ) && - ( - this.AttributeNumber == input.AttributeNumber || - (this.AttributeNumber != null && - this.AttributeNumber.Equals(input.AttributeNumber)) - ) && - ( - this.AttributeInteger == input.AttributeInteger || - (this.AttributeInteger != null && - this.AttributeInteger.Equals(input.AttributeInteger)) - ) && - ( - this.AttributeBoolean == input.AttributeBoolean || - (this.AttributeBoolean != null && - this.AttributeBoolean.Equals(input.AttributeBoolean)) - ) && - ( - this.WrappedArray == input.WrappedArray || - this.WrappedArray != null && - input.WrappedArray != null && - this.WrappedArray.SequenceEqual(input.WrappedArray) - ) && - ( - this.NameString == input.NameString || - (this.NameString != null && - this.NameString.Equals(input.NameString)) - ) && - ( - this.NameNumber == input.NameNumber || - (this.NameNumber != null && - this.NameNumber.Equals(input.NameNumber)) - ) && - ( - this.NameInteger == input.NameInteger || - (this.NameInteger != null && - this.NameInteger.Equals(input.NameInteger)) - ) && - ( - this.NameBoolean == input.NameBoolean || - (this.NameBoolean != null && - this.NameBoolean.Equals(input.NameBoolean)) - ) && - ( - this.NameArray == input.NameArray || - this.NameArray != null && - input.NameArray != null && - this.NameArray.SequenceEqual(input.NameArray) - ) && - ( - this.NameWrappedArray == input.NameWrappedArray || - this.NameWrappedArray != null && - input.NameWrappedArray != null && - this.NameWrappedArray.SequenceEqual(input.NameWrappedArray) - ) && - ( - this.PrefixString == input.PrefixString || - (this.PrefixString != null && - this.PrefixString.Equals(input.PrefixString)) - ) && - ( - this.PrefixNumber == input.PrefixNumber || - (this.PrefixNumber != null && - this.PrefixNumber.Equals(input.PrefixNumber)) - ) && - ( - this.PrefixInteger == input.PrefixInteger || - (this.PrefixInteger != null && - this.PrefixInteger.Equals(input.PrefixInteger)) - ) && - ( - this.PrefixBoolean == input.PrefixBoolean || - (this.PrefixBoolean != null && - this.PrefixBoolean.Equals(input.PrefixBoolean)) - ) && - ( - this.PrefixArray == input.PrefixArray || - this.PrefixArray != null && - input.PrefixArray != null && - this.PrefixArray.SequenceEqual(input.PrefixArray) - ) && - ( - this.PrefixWrappedArray == input.PrefixWrappedArray || - this.PrefixWrappedArray != null && - input.PrefixWrappedArray != null && - this.PrefixWrappedArray.SequenceEqual(input.PrefixWrappedArray) - ) && - ( - this.NamespaceString == input.NamespaceString || - (this.NamespaceString != null && - this.NamespaceString.Equals(input.NamespaceString)) - ) && - ( - this.NamespaceNumber == input.NamespaceNumber || - (this.NamespaceNumber != null && - this.NamespaceNumber.Equals(input.NamespaceNumber)) - ) && - ( - this.NamespaceInteger == input.NamespaceInteger || - (this.NamespaceInteger != null && - this.NamespaceInteger.Equals(input.NamespaceInteger)) - ) && - ( - this.NamespaceBoolean == input.NamespaceBoolean || - (this.NamespaceBoolean != null && - this.NamespaceBoolean.Equals(input.NamespaceBoolean)) - ) && - ( - this.NamespaceArray == input.NamespaceArray || - this.NamespaceArray != null && - input.NamespaceArray != null && - this.NamespaceArray.SequenceEqual(input.NamespaceArray) - ) && - ( - this.NamespaceWrappedArray == input.NamespaceWrappedArray || - this.NamespaceWrappedArray != null && - input.NamespaceWrappedArray != null && - this.NamespaceWrappedArray.SequenceEqual(input.NamespaceWrappedArray) - ) && - ( - this.PrefixNsString == input.PrefixNsString || - (this.PrefixNsString != null && - this.PrefixNsString.Equals(input.PrefixNsString)) - ) && - ( - this.PrefixNsNumber == input.PrefixNsNumber || - (this.PrefixNsNumber != null && - this.PrefixNsNumber.Equals(input.PrefixNsNumber)) - ) && - ( - this.PrefixNsInteger == input.PrefixNsInteger || - (this.PrefixNsInteger != null && - this.PrefixNsInteger.Equals(input.PrefixNsInteger)) - ) && - ( - this.PrefixNsBoolean == input.PrefixNsBoolean || - (this.PrefixNsBoolean != null && - this.PrefixNsBoolean.Equals(input.PrefixNsBoolean)) - ) && - ( - this.PrefixNsArray == input.PrefixNsArray || - this.PrefixNsArray != null && - input.PrefixNsArray != null && - this.PrefixNsArray.SequenceEqual(input.PrefixNsArray) - ) && - ( - this.PrefixNsWrappedArray == input.PrefixNsWrappedArray || - this.PrefixNsWrappedArray != null && - input.PrefixNsWrappedArray != null && - this.PrefixNsWrappedArray.SequenceEqual(input.PrefixNsWrappedArray) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AttributeString != null) - hashCode = hashCode * 59 + this.AttributeString.GetHashCode(); - if (this.AttributeNumber != null) - hashCode = hashCode * 59 + this.AttributeNumber.GetHashCode(); - if (this.AttributeInteger != null) - hashCode = hashCode * 59 + this.AttributeInteger.GetHashCode(); - if (this.AttributeBoolean != null) - hashCode = hashCode * 59 + this.AttributeBoolean.GetHashCode(); - if (this.WrappedArray != null) - hashCode = hashCode * 59 + this.WrappedArray.GetHashCode(); - if (this.NameString != null) - hashCode = hashCode * 59 + this.NameString.GetHashCode(); - if (this.NameNumber != null) - hashCode = hashCode * 59 + this.NameNumber.GetHashCode(); - if (this.NameInteger != null) - hashCode = hashCode * 59 + this.NameInteger.GetHashCode(); - if (this.NameBoolean != null) - hashCode = hashCode * 59 + this.NameBoolean.GetHashCode(); - if (this.NameArray != null) - hashCode = hashCode * 59 + this.NameArray.GetHashCode(); - if (this.NameWrappedArray != null) - hashCode = hashCode * 59 + this.NameWrappedArray.GetHashCode(); - if (this.PrefixString != null) - hashCode = hashCode * 59 + this.PrefixString.GetHashCode(); - if (this.PrefixNumber != null) - hashCode = hashCode * 59 + this.PrefixNumber.GetHashCode(); - if (this.PrefixInteger != null) - hashCode = hashCode * 59 + this.PrefixInteger.GetHashCode(); - if (this.PrefixBoolean != null) - hashCode = hashCode * 59 + this.PrefixBoolean.GetHashCode(); - if (this.PrefixArray != null) - hashCode = hashCode * 59 + this.PrefixArray.GetHashCode(); - if (this.PrefixWrappedArray != null) - hashCode = hashCode * 59 + this.PrefixWrappedArray.GetHashCode(); - if (this.NamespaceString != null) - hashCode = hashCode * 59 + this.NamespaceString.GetHashCode(); - if (this.NamespaceNumber != null) - hashCode = hashCode * 59 + this.NamespaceNumber.GetHashCode(); - if (this.NamespaceInteger != null) - hashCode = hashCode * 59 + this.NamespaceInteger.GetHashCode(); - if (this.NamespaceBoolean != null) - hashCode = hashCode * 59 + this.NamespaceBoolean.GetHashCode(); - if (this.NamespaceArray != null) - hashCode = hashCode * 59 + this.NamespaceArray.GetHashCode(); - if (this.NamespaceWrappedArray != null) - hashCode = hashCode * 59 + this.NamespaceWrappedArray.GetHashCode(); - if (this.PrefixNsString != null) - hashCode = hashCode * 59 + this.PrefixNsString.GetHashCode(); - if (this.PrefixNsNumber != null) - hashCode = hashCode * 59 + this.PrefixNsNumber.GetHashCode(); - if (this.PrefixNsInteger != null) - hashCode = hashCode * 59 + this.PrefixNsInteger.GetHashCode(); - if (this.PrefixNsBoolean != null) - hashCode = hashCode * 59 + this.PrefixNsBoolean.GetHashCode(); - if (this.PrefixNsArray != null) - hashCode = hashCode * 59 + this.PrefixNsArray.GetHashCode(); - if (this.PrefixNsWrappedArray != null) - hashCode = hashCode * 59 + this.PrefixNsWrappedArray.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Org.OpenAPITools.csproj deleted file mode 100644 index 83b4ee272ad..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetCoreProject/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ /dev/null @@ -1,28 +0,0 @@ - - - - netstandard1.3 - Org.OpenAPITools - Org.OpenAPITools - Library - OpenAPI - OpenAPI - OpenAPI Library - A library generated from a OpenAPI doc - No Copyright - true - true - true - Org.OpenAPITools - 1.0.0 - - - - - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.gitignore b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.gitignore deleted file mode 100644 index 1ee53850b84..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.gitignore +++ /dev/null @@ -1,362 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator-ignore b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/FILES b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/FILES deleted file mode 100644 index 92e38160857..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/FILES +++ /dev/null @@ -1,124 +0,0 @@ -.gitignore -Org.OpenAPITools.sln -README.md -docs/AdditionalPropertiesAnyType.md -docs/AdditionalPropertiesArray.md -docs/AdditionalPropertiesBoolean.md -docs/AdditionalPropertiesClass.md -docs/AdditionalPropertiesInteger.md -docs/AdditionalPropertiesNumber.md -docs/AdditionalPropertiesObject.md -docs/AdditionalPropertiesString.md -docs/Animal.md -docs/AnotherFakeApi.md -docs/ApiResponse.md -docs/ArrayOfArrayOfNumberOnly.md -docs/ArrayOfNumberOnly.md -docs/ArrayTest.md -docs/BigCat.md -docs/BigCatAllOf.md -docs/Capitalization.md -docs/Cat.md -docs/CatAllOf.md -docs/Category.md -docs/ClassModel.md -docs/Dog.md -docs/DogAllOf.md -docs/EnumArrays.md -docs/EnumClass.md -docs/EnumTest.md -docs/FakeApi.md -docs/FakeClassnameTags123Api.md -docs/File.md -docs/FileSchemaTestClass.md -docs/FormatTest.md -docs/HasOnlyReadOnly.md -docs/List.md -docs/MapTest.md -docs/MixedPropertiesAndAdditionalPropertiesClass.md -docs/Model200Response.md -docs/ModelClient.md -docs/Name.md -docs/NumberOnly.md -docs/Order.md -docs/OuterComposite.md -docs/OuterEnum.md -docs/Pet.md -docs/PetApi.md -docs/ReadOnlyFirst.md -docs/Return.md -docs/SpecialModelName.md -docs/StoreApi.md -docs/Tag.md -docs/TypeHolderDefault.md -docs/TypeHolderExample.md -docs/User.md -docs/UserApi.md -docs/XmlItem.md -git_push.sh -src/Org.OpenAPITools/Api/AnotherFakeApi.cs -src/Org.OpenAPITools/Api/FakeApi.cs -src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs -src/Org.OpenAPITools/Api/PetApi.cs -src/Org.OpenAPITools/Api/StoreApi.cs -src/Org.OpenAPITools/Api/UserApi.cs -src/Org.OpenAPITools/Client/ApiClient.cs -src/Org.OpenAPITools/Client/ApiException.cs -src/Org.OpenAPITools/Client/ApiResponse.cs -src/Org.OpenAPITools/Client/Configuration.cs -src/Org.OpenAPITools/Client/ExceptionFactory.cs -src/Org.OpenAPITools/Client/GlobalConfiguration.cs -src/Org.OpenAPITools/Client/IApiAccessor.cs -src/Org.OpenAPITools/Client/IReadableConfiguration.cs -src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs -src/Org.OpenAPITools/Model/Animal.cs -src/Org.OpenAPITools/Model/ApiResponse.cs -src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs -src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs -src/Org.OpenAPITools/Model/ArrayTest.cs -src/Org.OpenAPITools/Model/BigCat.cs -src/Org.OpenAPITools/Model/BigCatAllOf.cs -src/Org.OpenAPITools/Model/Capitalization.cs -src/Org.OpenAPITools/Model/Cat.cs -src/Org.OpenAPITools/Model/CatAllOf.cs -src/Org.OpenAPITools/Model/Category.cs -src/Org.OpenAPITools/Model/ClassModel.cs -src/Org.OpenAPITools/Model/Dog.cs -src/Org.OpenAPITools/Model/DogAllOf.cs -src/Org.OpenAPITools/Model/EnumArrays.cs -src/Org.OpenAPITools/Model/EnumClass.cs -src/Org.OpenAPITools/Model/EnumTest.cs -src/Org.OpenAPITools/Model/File.cs -src/Org.OpenAPITools/Model/FileSchemaTestClass.cs -src/Org.OpenAPITools/Model/FormatTest.cs -src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs -src/Org.OpenAPITools/Model/List.cs -src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs -src/Org.OpenAPITools/Model/Model200Response.cs -src/Org.OpenAPITools/Model/ModelClient.cs -src/Org.OpenAPITools/Model/Name.cs -src/Org.OpenAPITools/Model/NumberOnly.cs -src/Org.OpenAPITools/Model/Order.cs -src/Org.OpenAPITools/Model/OuterComposite.cs -src/Org.OpenAPITools/Model/OuterEnum.cs -src/Org.OpenAPITools/Model/Pet.cs -src/Org.OpenAPITools/Model/ReadOnlyFirst.cs -src/Org.OpenAPITools/Model/Return.cs -src/Org.OpenAPITools/Model/SpecialModelName.cs -src/Org.OpenAPITools/Model/Tag.cs -src/Org.OpenAPITools/Model/TypeHolderDefault.cs -src/Org.OpenAPITools/Model/TypeHolderExample.cs -src/Org.OpenAPITools/Model/User.cs -src/Org.OpenAPITools/Model/XmlItem.cs -src/Org.OpenAPITools/Org.OpenAPITools.csproj -src/Org.OpenAPITools/Properties/AssemblyInfo.cs -src/Org.OpenAPITools/project.json diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/Org.OpenAPITools.sln b/samples/client/petstore/csharp/OpenAPIClientNetStandard/Org.OpenAPITools.sln deleted file mode 100644 index 8d85f5b71f0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/Org.OpenAPITools.sln +++ /dev/null @@ -1,25 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 14 -VisualStudioVersion = 14.0.25420.1 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.Build.0 = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md deleted file mode 100644 index 569d82c8e20..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/README.md +++ /dev/null @@ -1,209 +0,0 @@ -# Org.OpenAPITools - the C# library for the 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: \" \\ - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- SDK version: 1.0.0 -- Build package: org.openapitools.codegen.languages.CSharpClientCodegen - -## Frameworks supported - - -- .NET Core >=1.0 -- .NET Framework >=4.6 -- Mono/Xamarin >=vNext -- UWP >=10.0 - -## Dependencies - - -- FubarCoder.RestSharp.Portable.Core >=4.0.7 -- FubarCoder.RestSharp.Portable.HttpClient >=4.0.7 -- Newtonsoft.Json >=10.0.3 - -## Installation - -Generate the DLL using your preferred tool - -Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: - -```csharp -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -``` - - -## Getting Started - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class Example - { - public static void Main() - { - - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test special tags - ModelClient result = apiInstance.Call123TestSpecialTags(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - - } - } -} -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*FakeApi* | [**CreateXmlItem**](docs/FakeApi.md#createxmlitem) | **POST** /fake/create_xml_item | creates an XmlItem -*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | -*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **POST** /user | Create user -*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation for Models - - - [Model.AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - - [Model.AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - - [Model.AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) - - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [Model.AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md) - - [Model.AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md) - - [Model.AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - - [Model.AdditionalPropertiesString](docs/AdditionalPropertiesString.md) - - [Model.Animal](docs/Animal.md) - - [Model.ApiResponse](docs/ApiResponse.md) - - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - - [Model.ArrayTest](docs/ArrayTest.md) - - [Model.BigCat](docs/BigCat.md) - - [Model.BigCatAllOf](docs/BigCatAllOf.md) - - [Model.Capitalization](docs/Capitalization.md) - - [Model.Cat](docs/Cat.md) - - [Model.CatAllOf](docs/CatAllOf.md) - - [Model.Category](docs/Category.md) - - [Model.ClassModel](docs/ClassModel.md) - - [Model.Dog](docs/Dog.md) - - [Model.DogAllOf](docs/DogAllOf.md) - - [Model.EnumArrays](docs/EnumArrays.md) - - [Model.EnumClass](docs/EnumClass.md) - - [Model.EnumTest](docs/EnumTest.md) - - [Model.File](docs/File.md) - - [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md) - - [Model.FormatTest](docs/FormatTest.md) - - [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - - [Model.List](docs/List.md) - - [Model.MapTest](docs/MapTest.md) - - [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model.Model200Response](docs/Model200Response.md) - - [Model.ModelClient](docs/ModelClient.md) - - [Model.Name](docs/Name.md) - - [Model.NumberOnly](docs/NumberOnly.md) - - [Model.Order](docs/Order.md) - - [Model.OuterComposite](docs/OuterComposite.md) - - [Model.OuterEnum](docs/OuterEnum.md) - - [Model.Pet](docs/Pet.md) - - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - - [Model.Return](docs/Return.md) - - [Model.SpecialModelName](docs/SpecialModelName.md) - - [Model.Tag](docs/Tag.md) - - [Model.TypeHolderDefault](docs/TypeHolderDefault.md) - - [Model.TypeHolderExample](docs/TypeHolderExample.md) - - [Model.User](docs/User.md) - - [Model.XmlItem](docs/XmlItem.md) - - -## Documentation for Authorization - - -### api_key - -- **Type**: API key - -- **API key parameter name**: api_key -- **Location**: HTTP header - - -### api_key_query - -- **Type**: API key - -- **API key parameter name**: api_key_query -- **Location**: URL query string - - -### http_basic_test - - -- **Type**: HTTP basic authentication - - -### petstore_auth - - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - write:pets: modify pets in your account - - read:pets: read your pets - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesAnyType.md deleted file mode 100644 index fd118d3bfc5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesAnyType.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesAnyType - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesArray.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesArray.md deleted file mode 100644 index 3d0606cea5f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesArray.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesArray - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesBoolean.md deleted file mode 100644 index bb4b2498263..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesBoolean.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesBoolean - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesClass.md deleted file mode 100644 index 12f3292db0b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesClass.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MapString** | **Dictionary<string, string>** | | [optional] -**MapNumber** | **Dictionary<string, decimal>** | | [optional] -**MapInteger** | **Dictionary<string, int>** | | [optional] -**MapBoolean** | **Dictionary<string, bool>** | | [optional] -**MapArrayInteger** | **Dictionary<string, List<int>>** | | [optional] -**MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] -**MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**Anytype1** | **Object** | | [optional] -**Anytype2** | **Object** | | [optional] -**Anytype3** | **Object** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesInteger.md deleted file mode 100644 index 86a6259ecc9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesInteger.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesInteger - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesNumber.md deleted file mode 100644 index 8dc46024e03..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesNumber.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesNumber - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesObject.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesObject.md deleted file mode 100644 index 455456fe6dd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesObject.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesString.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesString.md deleted file mode 100644 index 0f7cf804167..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AdditionalPropertiesString.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesString - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Animal.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Animal.md deleted file mode 100644 index 0a05bcdf061..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Animal.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Animal - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AnotherFakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AnotherFakeApi.md deleted file mode 100644 index 5af41a1862c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/AnotherFakeApi.md +++ /dev/null @@ -1,84 +0,0 @@ -# Org.OpenAPITools.Api.AnotherFakeApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**Call123TestSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags - - - -## Call123TestSpecialTags - -> ModelClient Call123TestSpecialTags (ModelClient body) - -To test special tags - -To test special tags and operation ID starting with number - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class Call123TestSpecialTagsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test special tags - ModelClient result = apiInstance.Call123TestSpecialTags(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ApiResponse.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ApiResponse.md deleted file mode 100644 index a3b916355fd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ApiResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.ApiResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Code** | **int** | | [optional] -**Type** | **string** | | [optional] -**Message** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index e05ea7dc240..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayOfArrayOfNumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayArrayNumber** | **List<List<decimal>>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ArrayOfNumberOnly.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ArrayOfNumberOnly.md deleted file mode 100644 index 5f593d42929..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ArrayOfNumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayOfNumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayNumber** | **List<decimal>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ArrayTest.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ArrayTest.md deleted file mode 100644 index 593bc2d7386..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ArrayTest.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayOfString** | **List<string>** | | [optional] -**ArrayArrayOfInteger** | **List<List<long>>** | | [optional] -**ArrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/BigCat.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/BigCat.md deleted file mode 100644 index 6247107ab35..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/BigCat.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.BigCat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Declawed** | **bool** | | [optional] -**Kind** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/BigCatAllOf.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/BigCatAllOf.md deleted file mode 100644 index 864c2298e03..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/BigCatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.BigCatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Kind** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Capitalization.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Capitalization.md deleted file mode 100644 index 0c66f2d2d44..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Capitalization.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Capitalization - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SmallCamel** | **string** | | [optional] -**CapitalCamel** | **string** | | [optional] -**SmallSnake** | **string** | | [optional] -**CapitalSnake** | **string** | | [optional] -**SCAETHFlowPoints** | **string** | | [optional] -**ATT_NAME** | **string** | Name 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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Cat.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Cat.md deleted file mode 100644 index 6609de8e12a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Cat.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.Cat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] -**Declawed** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/CatAllOf.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/CatAllOf.md deleted file mode 100644 index d623d2a0a6e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.CatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Declawed** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Category.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Category.md deleted file mode 100644 index 42102d4e508..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Category.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Category - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ClassModel.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ClassModel.md deleted file mode 100644 index b2b42407d2b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ClassModel.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ClassModel - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Class** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Dog.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Dog.md deleted file mode 100644 index 1f39769d2b9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Dog.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.Dog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] -**Breed** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/DogAllOf.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/DogAllOf.md deleted file mode 100644 index d72134a0f5f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.DogAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Breed** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/EnumArrays.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/EnumArrays.md deleted file mode 100644 index 9d58d25f972..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/EnumArrays.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.EnumArrays - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JustSymbol** | **string** | | [optional] -**ArrayEnum** | **List<string>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/EnumClass.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/EnumClass.md deleted file mode 100644 index 16d21587b4c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/EnumClass.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.EnumClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/EnumTest.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/EnumTest.md deleted file mode 100644 index f8bc67baa6a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/EnumTest.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Org.OpenAPITools.Model.EnumTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EnumString** | **string** | | [optional] -**EnumStringRequired** | **string** | | -**EnumInteger** | **int** | | [optional] -**EnumNumber** | **double** | | [optional] -**OuterEnum** | **OuterEnum** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md deleted file mode 100644 index 47853770985..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeApi.md +++ /dev/null @@ -1,1118 +0,0 @@ -# Org.OpenAPITools.Api.FakeApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateXmlItem**](FakeApi.md#createxmlitem) | **POST** /fake/create_xml_item | creates an XmlItem -[**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -[**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -[**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -[**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -[**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -[**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -[**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -[**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | - - - -## CreateXmlItem - -> void CreateXmlItem (XmlItem xmlItem) - -creates an XmlItem - -this route creates an XmlItem - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateXmlItemExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var xmlItem = new XmlItem(); // XmlItem | XmlItem Body - - try - { - // creates an XmlItem - apiInstance.CreateXmlItem(xmlItem); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.CreateXmlItem: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## FakeOuterBooleanSerialize - -> bool FakeOuterBooleanSerialize (bool? body = null) - - - -Test serialization of outer boolean types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterBooleanSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = true; // bool? | Input boolean as post body (optional) - - try - { - bool result = apiInstance.FakeOuterBooleanSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **bool?**| Input boolean as post body | [optional] - -### Return type - -**bool** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output boolean | - | - -[[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) - - -## FakeOuterCompositeSerialize - -> OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null) - - - -Test serialization of object with outer number type - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterCompositeSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional) - - try - { - OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output composite | - | - -[[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) - - -## FakeOuterNumberSerialize - -> decimal FakeOuterNumberSerialize (decimal? body = null) - - - -Test serialization of outer number types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterNumberSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = 8.14; // decimal? | Input number as post body (optional) - - try - { - decimal result = apiInstance.FakeOuterNumberSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **decimal?**| Input number as post body | [optional] - -### Return type - -**decimal** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output number | - | - -[[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) - - -## FakeOuterStringSerialize - -> string FakeOuterStringSerialize (string body = null) - - - -Test serialization of outer string types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterStringSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = body_example; // string | Input string as post body (optional) - - try - { - string result = apiInstance.FakeOuterStringSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **string**| Input string as post body | [optional] - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output string | - | - -[[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) - - -## TestBodyWithFileSchema - -> void TestBodyWithFileSchema (FileSchemaTestClass body) - - - -For this test, the body for this request much reference a schema named `File`. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestBodyWithFileSchemaExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new FileSchemaTestClass(); // FileSchemaTestClass | - - try - { - apiInstance.TestBodyWithFileSchema(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - - -## TestBodyWithQueryParams - -> void TestBodyWithQueryParams (string query, User body) - - - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestBodyWithQueryParamsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var query = query_example; // string | - var body = new User(); // User | - - try - { - apiInstance.TestBodyWithQueryParams(query, body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **string**| | - **body** | [**User**](User.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - - -## TestClientModel - -> ModelClient TestClientModel (ModelClient body) - -To test \"client\" model - -To test \"client\" model - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestClientModelExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test \"client\" model - ModelClient result = apiInstance.TestClientModel(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestEndpointParameters - -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestEndpointParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure HTTP basic authorization: http_basic_test - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - - var apiInstance = new FakeApi(Configuration.Default); - var number = 8.14; // decimal | None - var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None - var integer = 56; // int? | None (optional) - var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) - var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) - var password = password_example; // string | None (optional) - var callback = callback_example; // string | None (optional) - - try - { - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **decimal**| None | - **_double** | **double**| None | - **patternWithoutDelimiter** | **string**| None | - **_byte** | **byte[]**| None | - **integer** | **int?**| None | [optional] - **int32** | **int?**| None | [optional] - **int64** | **long?**| None | [optional] - **_float** | **float?**| None | [optional] - **_string** | **string**| None | [optional] - **binary** | **System.IO.Stream**| None | [optional] - **date** | **DateTime?**| None | [optional] - **dateTime** | **DateTime?**| None | [optional] - **password** | **string**| None | [optional] - **callback** | **string**| None | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## TestEnumParameters - -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) - -To test enum parameters - -To test enum parameters - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestEnumParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) - var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) - var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) - - try - { - // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional] - **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] - **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] - **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] - **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] - **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] - **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid request | - | -| **404** | Not found | - | - -[[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) - - -## TestGroupParameters - -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestGroupParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var requiredStringGroup = 56; // int | Required String in group parameters - var requiredBooleanGroup = true; // bool | Required Boolean in group parameters - var requiredInt64Group = 789; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) - var booleanGroup = true; // bool? | Boolean in group parameters (optional) - var int64Group = 789; // long? | Integer in group parameters (optional) - - try - { - // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **int**| Required String in group parameters | - **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | - **requiredInt64Group** | **long**| Required Integer in group parameters | - **stringGroup** | **int?**| String in group parameters | [optional] - **booleanGroup** | **bool?**| Boolean in group parameters | [optional] - **int64Group** | **long?**| Integer in group parameters | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Something wrong | - | - -[[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) - - -## TestInlineAdditionalProperties - -> void TestInlineAdditionalProperties (Dictionary param) - -test inline additionalProperties - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestInlineAdditionalPropertiesExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var param = new Dictionary(); // Dictionary | request body - - try - { - // test inline additionalProperties - apiInstance.TestInlineAdditionalProperties(param); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestInlineAdditionalProperties: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Dictionary<string, string>**](string.md)| request body | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestJsonFormData - -> void TestJsonFormData (string param, string param2) - -test json serialization of form data - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestJsonFormDataExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 - - try - { - // test json serialization of form data - apiInstance.TestJsonFormData(param, param2); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **string**| field1 | - **param2** | **string**| field2 | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestQueryParameterCollectionFormat - -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) - - - -To test the collection format in query parameters - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestQueryParameterCollectionFormatExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var pipe = new List(); // List | - var ioutil = new List(); // List | - var http = new List(); // List | - var url = new List(); // List | - var context = new List(); // List | - - try - { - apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormat: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<string>**](string.md)| | - **ioutil** | [**List<string>**](string.md)| | - **http** | [**List<string>**](string.md)| | - **url** | [**List<string>**](string.md)| | - **context** | [**List<string>**](string.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeClassnameTags123Api.md deleted file mode 100644 index deb97a27697..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FakeClassnameTags123Api.md +++ /dev/null @@ -1,89 +0,0 @@ -# Org.OpenAPITools.Api.FakeClassnameTags123Api - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**TestClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case - - - -## TestClassname - -> ModelClient TestClassname (ModelClient body) - -To test class name in snake case - -To test class name in snake case - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestClassnameExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key_query - Configuration.Default.AddApiKey("api_key_query", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key_query", "Bearer"); - - var apiInstance = new FakeClassnameTags123Api(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test class name in snake case - ModelClient result = apiInstance.TestClassname(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeClassnameTags123Api.TestClassname: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/File.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/File.md deleted file mode 100644 index b7105102579..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/File.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.File - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SourceURI** | **string** | Test capitalization | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FileSchemaTestClass.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FileSchemaTestClass.md deleted file mode 100644 index df1453f686b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FileSchemaTestClass.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.FileSchemaTestClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**File** | [**File**](File.md) | | [optional] -**Files** | [**List<File>**](File.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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FormatTest.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FormatTest.md deleted file mode 100644 index 92d7d1e0104..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/FormatTest.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Org.OpenAPITools.Model.FormatTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Integer** | **int** | | [optional] -**Int32** | **int** | | [optional] -**Int64** | **long** | | [optional] -**Number** | **decimal** | | -**Float** | **float** | | [optional] -**Double** | **double** | | [optional] -**String** | **string** | | [optional] -**Byte** | **byte[]** | | -**Binary** | **System.IO.Stream** | | [optional] -**Date** | **DateTime** | | -**DateTime** | **DateTime** | | [optional] -**Uuid** | **Guid** | | [optional] -**Password** | **string** | | -**BigDecimal** | **decimal** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/HasOnlyReadOnly.md deleted file mode 100644 index 043d2442b4e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/HasOnlyReadOnly.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.HasOnlyReadOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] [readonly] -**Foo** | **string** | | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/List.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/List.md deleted file mode 100644 index cb41193b43e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/List.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.List - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123List** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/MapTest.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/MapTest.md deleted file mode 100644 index 79d499e2cf9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/MapTest.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Org.OpenAPITools.Model.MapTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**MapOfEnumString** | **Dictionary<string, string>** | | [optional] -**DirectMap** | **Dictionary<string, bool>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index dd7b01e49fe..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.MixedPropertiesAndAdditionalPropertiesClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Uuid** | **Guid** | | [optional] -**DateTime** | **DateTime** | | [optional] -**Map** | [**Dictionary<string, Animal>**](Animal.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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Model200Response.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Model200Response.md deleted file mode 100644 index 7d826bca1ec..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Model200Response.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Model200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **int** | | [optional] -**Class** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ModelClient.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ModelClient.md deleted file mode 100644 index e36e1fad802..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ModelClient.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ModelClient - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**__Client** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Name.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Name.md deleted file mode 100644 index bfd7955e5b4..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Name.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Org.OpenAPITools.Model.Name - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_Name** | **int** | | -**SnakeCase** | **int** | | [optional] [readonly] -**Property** | **string** | | [optional] -**_123Number** | **int** | | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/NumberOnly.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/NumberOnly.md deleted file mode 100644 index e4b08467e08..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/NumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.NumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JustNumber** | **decimal** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Order.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Order.md deleted file mode 100644 index 875f43a30e5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Order.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Order - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**PetId** | **long** | | [optional] -**Quantity** | **int** | | [optional] -**ShipDate** | **DateTime** | | [optional] -**Status** | **string** | Order Status | [optional] -**Complete** | **bool** | | [optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/OuterComposite.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/OuterComposite.md deleted file mode 100644 index f381fb7fd28..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/OuterComposite.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.OuterComposite - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MyNumber** | **decimal** | | [optional] -**MyString** | **string** | | [optional] -**MyBoolean** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/OuterEnum.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/OuterEnum.md deleted file mode 100644 index edc2300684d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/OuterEnum.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.OuterEnum - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Pet.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Pet.md deleted file mode 100644 index 0bd5c40fc99..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Pet.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Pet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Category** | [**Category**](Category.md) | | [optional] -**Name** | **string** | | -**PhotoUrls** | **List<string>** | | -**Tags** | [**List<Tag>**](Tag.md) | | [optional] -**Status** | **string** | pet status in the store | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/PetApi.md deleted file mode 100644 index 1a9eba14868..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/PetApi.md +++ /dev/null @@ -1,728 +0,0 @@ -# Org.OpenAPITools.Api.PetApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -[**DeletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -[**FindPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -[**FindPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -[**GetPetById**](PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -[**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -[**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) - - - -## AddPet - -> void AddPet (Pet body) - -Add a new pet to the store - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class AddPetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var body = new Pet(); // Pet | Pet object that needs to be added to the store - - try - { - // Add a new pet to the store - apiInstance.AddPet(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.AddPet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **405** | Invalid input | - | - -[[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) - - -## DeletePet - -> void DeletePet (long petId, string apiKey = null) - -Deletes a pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeletePetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) - - try - { - // Deletes a pet - apiInstance.DeletePet(petId, apiKey); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| Pet id to delete | - **apiKey** | **string**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid pet value | - | - -[[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) - - -## FindPetsByStatus - -> List<Pet> FindPetsByStatus (List status) - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FindPetsByStatusExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var status = status_example; // List | Status values that need to be considered for filter - - try - { - // Finds Pets by status - List result = apiInstance.FindPetsByStatus(status); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **List<string>**| Status values that need to be considered for filter | - -### Return type - -[**List<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid status value | - | - -[[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) - - -## FindPetsByTags - -> List<Pet> FindPetsByTags (List tags) - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FindPetsByTagsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var tags = new List(); // List | Tags to filter by - - try - { - // Finds Pets by tags - List result = apiInstance.FindPetsByTags(tags); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**List<string>**](string.md)| Tags to filter by | - -### Return type - -[**List<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid tag value | - | - -[[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) - - -## GetPetById - -> Pet GetPetById (long petId) - -Find pet by ID - -Returns a single pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetPetByIdExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to return - - try - { - // Find pet by ID - Pet result = apiInstance.GetPetById(petId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to return | - -### Return type - -[**Pet**](Pet.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | - -[[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) - - -## UpdatePet - -> void UpdatePet (Pet body) - -Update an existing pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdatePetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var body = new Pet(); // Pet | Pet object that needs to be added to the store - - try - { - // Update an existing pet - apiInstance.UpdatePet(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | -| **405** | Validation exception | - | - -[[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) - - -## UpdatePetWithForm - -> void UpdatePetWithForm (long petId, string name = null, string status = null) - -Updates a pet in the store with form data - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdatePetWithFormExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet that needs to be updated - var name = name_example; // string | Updated name of the pet (optional) - var status = status_example; // string | Updated status of the pet (optional) - - try - { - // Updates a pet in the store with form data - apiInstance.UpdatePetWithForm(petId, name, status); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet that needs to be updated | - **name** | **string**| Updated name of the pet | [optional] - **status** | **string**| Updated status of the pet | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **405** | Invalid input | - | - -[[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) - - -## UploadFile - -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) - -uploads an image - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to update - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) - - try - { - // uploads an image - ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to update | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - **file** | **System.IO.Stream**| file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UploadFileWithRequiredFile - -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) - -uploads an image (required) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileWithRequiredFileExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to update - var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - - try - { - // uploads an image (required) - ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to update | - **requiredFile** | **System.IO.Stream**| file to upload | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ReadOnlyFirst.md deleted file mode 100644 index 8ea3b95919b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/ReadOnlyFirst.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.ReadOnlyFirst - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] [readonly] -**Baz** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Return.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Return.md deleted file mode 100644 index 4761c70748e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Return.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.Return - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_Return** | **int** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/SpecialModelName.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/SpecialModelName.md deleted file mode 100644 index ee6489524d0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/SpecialModelName.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.SpecialModelName - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SpecialPropertyName** | **long** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/StoreApi.md deleted file mode 100644 index ae123168a11..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/StoreApi.md +++ /dev/null @@ -1,314 +0,0 @@ -# Org.OpenAPITools.Api.StoreApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**GetInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[**PlaceOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet - - - -## DeleteOrder - -> void DeleteOrder (string orderId) - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeleteOrderExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var orderId = orderId_example; // string | ID of the order that needs to be deleted - - try - { - // Delete purchase order by ID - apiInstance.DeleteOrder(orderId); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **string**| ID of the order that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - -[[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) - - -## GetInventory - -> Dictionary<string, int> GetInventory () - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetInventoryExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - - var apiInstance = new StoreApi(Configuration.Default); - - try - { - // Returns pet inventories by status - Dictionary result = apiInstance.GetInventory(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**Dictionary** - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetOrderById - -> Order GetOrderById (long orderId) - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetOrderByIdExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var orderId = 789; // long | ID of pet that needs to be fetched - - try - { - // Find purchase order by ID - Order result = apiInstance.GetOrderById(orderId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **long**| ID of pet that needs to be fetched | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - -[[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) - - -## PlaceOrder - -> Order PlaceOrder (Order body) - -Place an order for a pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class PlaceOrderExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var body = new Order(); // Order | order placed for purchasing the pet - - try - { - // Place an order for a pet - Order result = apiInstance.PlaceOrder(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid Order | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Tag.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Tag.md deleted file mode 100644 index f781c26f017..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/Tag.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Tag - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/TypeHolderDefault.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/TypeHolderDefault.md deleted file mode 100644 index 0945245b213..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/TypeHolderDefault.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Org.OpenAPITools.Model.TypeHolderDefault - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StringItem** | **string** | | [default to "what"] -**NumberItem** | **decimal** | | -**IntegerItem** | **int** | | -**BoolItem** | **bool** | | [default to true] -**ArrayItem** | **List<int>** | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/TypeHolderExample.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/TypeHolderExample.md deleted file mode 100644 index b9573673baf..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/TypeHolderExample.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.TypeHolderExample - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StringItem** | **string** | | -**NumberItem** | **decimal** | | -**FloatItem** | **float** | | -**IntegerItem** | **int** | | -**BoolItem** | **bool** | | -**ArrayItem** | **List<int>** | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/User.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/User.md deleted file mode 100644 index a25c25d1aa0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/User.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Org.OpenAPITools.Model.User - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Username** | **string** | | [optional] -**FirstName** | **string** | | [optional] -**LastName** | **string** | | [optional] -**Email** | **string** | | [optional] -**Password** | **string** | | [optional] -**Phone** | **string** | | [optional] -**UserStatus** | **int** | User Status | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/UserApi.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/UserApi.md deleted file mode 100644 index 1385d840413..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/UserApi.md +++ /dev/null @@ -1,605 +0,0 @@ -# Org.OpenAPITools.Api.UserApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateUser**](UserApi.md#createuser) | **POST** /user | Create user -[**CreateUsersWithArrayInput**](UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -[**CreateUsersWithListInput**](UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -[**DeleteUser**](UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -[**GetUserByName**](UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -[**LoginUser**](UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -[**LogoutUser**](UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -[**UpdateUser**](UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - - -## CreateUser - -> void CreateUser (User body) - -Create user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var body = new User(); // User | Created user object - - try - { - // Create user - apiInstance.CreateUser(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateUsersWithArrayInput - -> void CreateUsersWithArrayInput (List body) - -Creates list of users with given input array - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUsersWithArrayInputExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var body = new List(); // List | List of user object - - try - { - // Creates list of users with given input array - apiInstance.CreateUsersWithArrayInput(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateUsersWithListInput - -> void CreateUsersWithListInput (List body) - -Creates list of users with given input array - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUsersWithListInputExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var body = new List(); // List | List of user object - - try - { - // Creates list of users with given input array - apiInstance.CreateUsersWithListInput(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteUser - -> void DeleteUser (string username) - -Delete user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeleteUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The name that needs to be deleted - - try - { - // Delete user - apiInstance.DeleteUser(username); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## GetUserByName - -> User GetUserByName (string username) - -Get user by user name - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetUserByNameExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. - - try - { - // Get user by user name - User result = apiInstance.GetUserByName(username); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be fetched. Use user1 for testing. | - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## LoginUser - -> string LoginUser (string username, string password) - -Logs user into the system - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class LoginUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text - - try - { - // Logs user into the system - string result = apiInstance.LoginUser(username, password); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The user name for login | - **password** | **string**| The password for login in clear text | - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| -| **400** | Invalid username/password supplied | - | - -[[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) - - -## LogoutUser - -> void LogoutUser () - -Logs out current logged in user session - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class LogoutUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - - try - { - // Logs out current logged in user session - apiInstance.LogoutUser(); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateUser - -> void UpdateUser (string username, User body) - -Updated user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdateUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | name that need to be deleted - var body = new User(); // User | Updated user object - - try - { - // Updated user - apiInstance.UpdateUser(username, body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid user supplied | - | -| **404** | User not found | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/XmlItem.md b/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/XmlItem.md deleted file mode 100644 index 0dca90c706f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/docs/XmlItem.md +++ /dev/null @@ -1,41 +0,0 @@ - -# Org.OpenAPITools.Model.XmlItem - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AttributeString** | **string** | | [optional] -**AttributeNumber** | **decimal** | | [optional] -**AttributeInteger** | **int** | | [optional] -**AttributeBoolean** | **bool** | | [optional] -**WrappedArray** | **List<int>** | | [optional] -**NameString** | **string** | | [optional] -**NameNumber** | **decimal** | | [optional] -**NameInteger** | **int** | | [optional] -**NameBoolean** | **bool** | | [optional] -**NameArray** | **List<int>** | | [optional] -**NameWrappedArray** | **List<int>** | | [optional] -**PrefixString** | **string** | | [optional] -**PrefixNumber** | **decimal** | | [optional] -**PrefixInteger** | **int** | | [optional] -**PrefixBoolean** | **bool** | | [optional] -**PrefixArray** | **List<int>** | | [optional] -**PrefixWrappedArray** | **List<int>** | | [optional] -**NamespaceString** | **string** | | [optional] -**NamespaceNumber** | **decimal** | | [optional] -**NamespaceInteger** | **int** | | [optional] -**NamespaceBoolean** | **bool** | | [optional] -**NamespaceArray** | **List<int>** | | [optional] -**NamespaceWrappedArray** | **List<int>** | | [optional] -**PrefixNsString** | **string** | | [optional] -**PrefixNsNumber** | **decimal** | | [optional] -**PrefixNsInteger** | **int** | | [optional] -**PrefixNsBoolean** | **bool** | | [optional] -**PrefixNsArray** | **List<int>** | | [optional] -**PrefixNsWrappedArray** | **List<int>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/git_push.sh b/samples/client/petstore/csharp/OpenAPIClientNetStandard/git_push.sh deleted file mode 100644 index 200e975d212..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/AnotherFakeApi.cs deleted file mode 100644 index aee1041cf42..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ /dev/null @@ -1,337 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp.Portable; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IAnotherFakeApi : IApiAccessor - { - #region Synchronous Operations - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient Call123TestSpecialTags (ModelClient body); - - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse Call123TestSpecialTagsWithHttpInfo (ModelClient body); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - System.Threading.Tasks.Task Call123TestSpecialTagsAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class AnotherFakeApi : IAnotherFakeApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public AnotherFakeApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public AnotherFakeApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public AnotherFakeApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient Call123TestSpecialTags (ModelClient body) - { - ApiResponse localVarResponse = Call123TestSpecialTagsWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse Call123TestSpecialTagsWithHttpInfo (ModelClient body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->Call123TestSpecialTags"); - - var localVarPath = "./another-fake/dummy"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Call123TestSpecialTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->Call123TestSpecialTags"); - - var localVarPath = "./another-fake/dummy"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Call123TestSpecialTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs deleted file mode 100644 index 88b9ccf2692..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeApi.cs +++ /dev/null @@ -1,3122 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp.Portable; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IFakeApi : IApiAccessor - { - #region Synchronous Operations - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// - void CreateXmlItem (XmlItem xmlItem); - - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// ApiResponse of Object(void) - ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem); - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// bool - bool FakeOuterBooleanSerialize (bool? body = default(bool?)); - - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)); - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// OuterComposite - OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)); - - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)); - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// decimal - decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)); - - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)); - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// string - string FakeOuterStringSerialize (string body = default(string)); - - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)); - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// - void TestBodyWithFileSchema (FileSchemaTestClass body); - - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass body); - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void TestBodyWithQueryParams (string query, User body); - - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, User body); - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient TestClientModel (ModelClient body); - - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse TestClientModelWithHttpInfo (ModelClient body); - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// - void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), 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 test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// - void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); - - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// - void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); - - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// - void TestInlineAdditionalProperties (Dictionary param); - - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// ApiResponse of Object(void) - ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Dictionary param); - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// - void TestJsonFormData (string param, string param2); - - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// ApiResponse of Object(void) - ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2); - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context); - - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task CreateXmlItemAsync (XmlItem xmlItem, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateXmlItemWithHttpInfoAsync (XmlItem xmlItem, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync (OuterComposite body = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestBodyWithFileSchemaAsync (FileSchemaTestClass body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync (FileSchemaTestClass body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestBodyWithQueryParamsAsync (string query, User body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync (string query, User body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - System.Threading.Tasks.Task TestClientModelAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync (Dictionary param, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync (Dictionary param, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestJsonFormDataAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List pipe, List ioutil, List http, List url, List context, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync (List pipe, List ioutil, List http, List url, List context, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class FakeApi : IFakeApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public FakeApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public FakeApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public FakeApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// - public void CreateXmlItem (XmlItem xmlItem) - { - CreateXmlItemWithHttpInfo(xmlItem); - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// ApiResponse of Object(void) - public ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem) - { - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) - throw new ApiException(400, "Missing required parameter 'xmlItem' when calling FakeApi->CreateXmlItem"); - - var localVarPath = "./fake/create_xml_item"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/xml", - "application/xml; charset=utf-8", - "application/xml; charset=utf-16", - "text/xml", - "text/xml; charset=utf-8", - "text/xml; charset=utf-16" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (xmlItem != null && xmlItem.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(xmlItem); // http body (model) parameter - } - else - { - localVarPostBody = xmlItem; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateXmlItem", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateXmlItemAsync (XmlItem xmlItem, CancellationToken cancellationToken = default(CancellationToken)) - { - await CreateXmlItemWithHttpInfoAsync(xmlItem, cancellationToken); - - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateXmlItemWithHttpInfoAsync (XmlItem xmlItem, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) - throw new ApiException(400, "Missing required parameter 'xmlItem' when calling FakeApi->CreateXmlItem"); - - var localVarPath = "./fake/create_xml_item"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/xml", - "application/xml; charset=utf-8", - "application/xml; charset=utf-16", - "text/xml", - "text/xml; charset=utf-8", - "text/xml; charset=utf-16" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (xmlItem != null && xmlItem.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(xmlItem); // http body (model) parameter - } - else - { - localVarPostBody = xmlItem; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateXmlItem", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// bool - public bool FakeOuterBooleanSerialize (bool? body = default(bool?)) - { - ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// ApiResponse of bool - public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)) - { - - var localVarPath = "./fake/outer/boolean"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (bool) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(bool))); - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "./fake/outer/boolean"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (bool) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(bool))); - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)) - { - ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// ApiResponse of OuterComposite - public ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)) - { - - var localVarPath = "./fake/outer/composite"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (OuterComposite) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite))); - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync (OuterComposite body = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "./fake/outer/composite"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (OuterComposite) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite))); - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// decimal - public decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)) - { - ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// ApiResponse of decimal - public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)) - { - - var localVarPath = "./fake/outer/number"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (decimal) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(decimal))); - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "./fake/outer/number"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (decimal) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(decimal))); - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// string - public string FakeOuterStringSerialize (string body = default(string)) - { - ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// ApiResponse of string - public ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)) - { - - var localVarPath = "./fake/outer/string"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "./fake/outer/string"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// - public void TestBodyWithFileSchema (FileSchemaTestClass body) - { - TestBodyWithFileSchemaWithHttpInfo(body); - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithFileSchema"); - - var localVarPath = "./fake/body-with-file-schema"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithFileSchema", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync (FileSchemaTestClass body, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestBodyWithFileSchemaWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync (FileSchemaTestClass body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithFileSchema"); - - var localVarPath = "./fake/body-with-file-schema"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithFileSchema", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - public void TestBodyWithQueryParams (string query, User body) - { - TestBodyWithQueryParamsWithHttpInfo(query, body); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - public ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, User body) - { - // verify the required parameter 'query' is set - if (query == null) - throw new ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams"); - - var localVarPath = "./fake/body-with-query-params"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithQueryParams", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync (string query, User body, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestBodyWithQueryParamsWithHttpInfoAsync(query, body, cancellationToken); - - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync (string query, User body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'query' is set - if (query == null) - throw new ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams"); - - var localVarPath = "./fake/body-with-query-params"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithQueryParams", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient TestClientModel (ModelClient body) - { - ApiResponse localVarResponse = TestClientModelWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse TestClientModelWithHttpInfo (ModelClient body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel"); - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClientModel", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - public async System.Threading.Tasks.Task TestClientModelAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel"); - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClientModel", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// - public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) - { - TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) - { - // verify the required parameter 'number' is set - if (number == null) - throw new ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_double' is set - if (_double == null) - throw new ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'patternWithoutDelimiter' is set - if (patternWithoutDelimiter == null) - throw new ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_byte' is set - if (_byte == null) - throw new ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (integer != null) localVarFormParams.Add("integer", this.Configuration.ApiClient.ParameterToString(integer)); // form parameter - if (int32 != null) localVarFormParams.Add("int32", this.Configuration.ApiClient.ParameterToString(int32)); // form parameter - if (int64 != null) localVarFormParams.Add("int64", this.Configuration.ApiClient.ParameterToString(int64)); // form parameter - if (number != null) localVarFormParams.Add("number", this.Configuration.ApiClient.ParameterToString(number)); // form parameter - if (_float != null) localVarFormParams.Add("float", this.Configuration.ApiClient.ParameterToString(_float)); // form parameter - if (_double != null) localVarFormParams.Add("double", this.Configuration.ApiClient.ParameterToString(_double)); // form parameter - if (_string != null) localVarFormParams.Add("string", this.Configuration.ApiClient.ParameterToString(_string)); // form parameter - if (patternWithoutDelimiter != null) localVarFormParams.Add("pattern_without_delimiter", this.Configuration.ApiClient.ParameterToString(patternWithoutDelimiter)); // form parameter - if (_byte != null) localVarFormParams.Add("byte", this.Configuration.ApiClient.ParameterToString(_byte)); // form parameter - if (binary != null) localVarFileParams.Add("binary", this.Configuration.ApiClient.ParameterToFile("binary", binary)); - if (date != null) localVarFormParams.Add("date", this.Configuration.ApiClient.ParameterToString(date)); // form parameter - if (dateTime != null) localVarFormParams.Add("dateTime", this.Configuration.ApiClient.ParameterToString(dateTime)); // form parameter - if (password != null) localVarFormParams.Add("password", this.Configuration.ApiClient.ParameterToString(password)); // form parameter - if (callback != null) localVarFormParams.Add("callback", this.Configuration.ApiClient.ParameterToString(callback)); // form parameter - - // authentication (http_basic_test) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestEndpointParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken); - - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'number' is set - if (number == null) - throw new ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_double' is set - if (_double == null) - throw new ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'patternWithoutDelimiter' is set - if (patternWithoutDelimiter == null) - throw new ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_byte' is set - if (_byte == null) - throw new ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (integer != null) localVarFormParams.Add("integer", this.Configuration.ApiClient.ParameterToString(integer)); // form parameter - if (int32 != null) localVarFormParams.Add("int32", this.Configuration.ApiClient.ParameterToString(int32)); // form parameter - if (int64 != null) localVarFormParams.Add("int64", this.Configuration.ApiClient.ParameterToString(int64)); // form parameter - if (number != null) localVarFormParams.Add("number", this.Configuration.ApiClient.ParameterToString(number)); // form parameter - if (_float != null) localVarFormParams.Add("float", this.Configuration.ApiClient.ParameterToString(_float)); // form parameter - if (_double != null) localVarFormParams.Add("double", this.Configuration.ApiClient.ParameterToString(_double)); // form parameter - if (_string != null) localVarFormParams.Add("string", this.Configuration.ApiClient.ParameterToString(_string)); // form parameter - if (patternWithoutDelimiter != null) localVarFormParams.Add("pattern_without_delimiter", this.Configuration.ApiClient.ParameterToString(patternWithoutDelimiter)); // form parameter - if (_byte != null) localVarFormParams.Add("byte", this.Configuration.ApiClient.ParameterToString(_byte)); // form parameter - if (binary != null) localVarFileParams.Add("binary", this.Configuration.ApiClient.ParameterToFile("binary", binary)); - if (date != null) localVarFormParams.Add("date", this.Configuration.ApiClient.ParameterToString(date)); // form parameter - if (dateTime != null) localVarFormParams.Add("dateTime", this.Configuration.ApiClient.ParameterToString(dateTime)); // form parameter - if (password != null) localVarFormParams.Add("password", this.Configuration.ApiClient.ParameterToString(password)); // form parameter - if (callback != null) localVarFormParams.Add("callback", this.Configuration.ApiClient.ParameterToString(callback)); // form parameter - - // authentication (http_basic_test) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestEndpointParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// - public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) - { - TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// ApiResponse of Object(void) - public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) - { - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter - if (enumQueryString != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_string", enumQueryString)); // query parameter - if (enumQueryInteger != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_integer", enumQueryInteger)); // query parameter - if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter - if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter - if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter - if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter - if (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter - - - // 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("TestEnumParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken); - - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter - if (enumQueryString != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_string", enumQueryString)); // query parameter - if (enumQueryInteger != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_integer", enumQueryInteger)); // query parameter - if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter - if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter - if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter - if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter - if (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestEnumParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// - public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) - { - TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// ApiResponse of Object(void) - public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) - { - // verify the required parameter 'requiredStringGroup' is set - if (requiredStringGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredBooleanGroup' is set - if (requiredBooleanGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredInt64Group' is set - if (requiredInt64Group == null) - throw new ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (requiredStringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_string_group", requiredStringGroup)); // query parameter - if (requiredInt64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_int64_group", requiredInt64Group)); // query parameter - if (stringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "string_group", stringGroup)); // query parameter - if (int64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "int64_group", int64Group)); // query parameter - if (requiredBooleanGroup != null) localVarHeaderParams.Add("required_boolean_group", this.Configuration.ApiClient.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) localVarHeaderParams.Add("boolean_group", this.Configuration.ApiClient.ParameterToString(booleanGroup)); // header parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestGroupParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)) - { - await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken); - - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'requiredStringGroup' is set - if (requiredStringGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredBooleanGroup' is set - if (requiredBooleanGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredInt64Group' is set - if (requiredInt64Group == null) - throw new ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - - var localVarPath = "./fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (requiredStringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_string_group", requiredStringGroup)); // query parameter - if (requiredInt64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_int64_group", requiredInt64Group)); // query parameter - if (stringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "string_group", stringGroup)); // query parameter - if (int64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "int64_group", int64Group)); // query parameter - if (requiredBooleanGroup != null) localVarHeaderParams.Add("required_boolean_group", this.Configuration.ApiClient.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) localVarHeaderParams.Add("boolean_group", this.Configuration.ApiClient.ParameterToString(booleanGroup)); // header parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestGroupParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// - public void TestInlineAdditionalProperties (Dictionary param) - { - TestInlineAdditionalPropertiesWithHttpInfo(param); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// ApiResponse of Object(void) - public ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Dictionary param) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties"); - - var localVarPath = "./fake/inline-additionalProperties"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null && param.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(param); // http body (model) parameter - } - else - { - localVarPostBody = param; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync (Dictionary param, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestInlineAdditionalPropertiesWithHttpInfoAsync(param, cancellationToken); - - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync (Dictionary param, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties"); - - var localVarPath = "./fake/inline-additionalProperties"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null && param.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(param); // http body (model) parameter - } - else - { - localVarPostBody = param; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// - public void TestJsonFormData (string param, string param2) - { - TestJsonFormDataWithHttpInfo(param, param2); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// ApiResponse of Object(void) - public ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - // verify the required parameter 'param2' is set - if (param2 == null) - throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - - var localVarPath = "./fake/jsonFormData"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null) localVarFormParams.Add("param", this.Configuration.ApiClient.ParameterToString(param)); // form parameter - if (param2 != null) localVarFormParams.Add("param2", this.Configuration.ApiClient.ParameterToString(param2)); // form parameter - - - // 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("TestJsonFormData", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestJsonFormDataAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken); - - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - // verify the required parameter 'param2' is set - if (param2 == null) - throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - - var localVarPath = "./fake/jsonFormData"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null) localVarFormParams.Add("param", this.Configuration.ApiClient.ParameterToString(param)); // form parameter - if (param2 != null) localVarFormParams.Add("param2", this.Configuration.ApiClient.ParameterToString(param2)); // form parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestJsonFormData", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - public void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) - { - TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// ApiResponse of Object(void) - public ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context) - { - // verify the required parameter 'pipe' is set - if (pipe == null) - throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'ioutil' is set - if (ioutil == null) - throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'http' is set - if (http == null) - throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'url' is set - if (url == null) - throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'context' is set - if (context == null) - throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - - var localVarPath = "./fake/test-query-parameters"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter - if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter - if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("ssv", "http", http)); // query parameter - if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter - if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List pipe, List ioutil, List http, List url, List context, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken); - - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync (List pipe, List ioutil, List http, List url, List context, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'pipe' is set - if (pipe == null) - throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'ioutil' is set - if (ioutil == null) - throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'http' is set - if (http == null) - throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'url' is set - if (url == null) - throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'context' is set - if (context == null) - throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - - var localVarPath = "./fake/test-query-parameters"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter - if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter - if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("ssv", "http", http)); // query parameter - if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter - if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs deleted file mode 100644 index 9b590aaa767..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ /dev/null @@ -1,347 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp.Portable; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IFakeClassnameTags123Api : IApiAccessor - { - #region Synchronous Operations - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient TestClassname (ModelClient body); - - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse TestClassnameWithHttpInfo (ModelClient body); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - System.Threading.Tasks.Task TestClassnameAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public FakeClassnameTags123Api(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public FakeClassnameTags123Api() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public FakeClassnameTags123Api(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient TestClassname (ModelClient body) - { - ApiResponse localVarResponse = TestClassnameWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse TestClassnameWithHttpInfo (ModelClient body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname"); - - var localVarPath = "./fake_classname_test"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (api_key_query) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClassname", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - public async System.Threading.Tasks.Task TestClassnameAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname"); - - var localVarPath = "./fake_classname_test"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (api_key_query) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClassname", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/PetApi.cs deleted file mode 100644 index 300293b4c41..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/PetApi.cs +++ /dev/null @@ -1,1975 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp.Portable; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IPetApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - void AddPet (Pet body); - - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - ApiResponse AddPetWithHttpInfo (Pet body); - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// - void DeletePet (long petId, string apiKey = default(string)); - - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)); - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// List<Pet> - List FindPetsByStatus (List status); - - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// ApiResponse of List<Pet> - ApiResponse> FindPetsByStatusWithHttpInfo (List status); - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// List<Pet> - [Obsolete] - List FindPetsByTags (List tags); - - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// ApiResponse of List<Pet> - [Obsolete] - ApiResponse> FindPetsByTagsWithHttpInfo (List tags); - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Pet - Pet GetPetById (long petId); - - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// ApiResponse of Pet - ApiResponse GetPetByIdWithHttpInfo (long petId); - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - void UpdatePet (Pet body); - - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - ApiResponse UpdatePetWithHttpInfo (Pet body); - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)); - - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); - - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task AddPetAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> AddPetWithHttpInfoAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> - System.Threading.Tasks.Task> FindPetsByStatusAsync (List status, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync (List status, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> - [Obsolete] - System.Threading.Tasks.Task> FindPetsByTagsAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - [Obsolete] - System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of Pet - System.Threading.Tasks.Task GetPetByIdAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task UpdatePetAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class PetApi : IPetApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public PetApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public PetApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public PetApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - public void AddPet (Pet body) - { - AddPetWithHttpInfo(body); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - public ApiResponse AddPetWithHttpInfo (Pet body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet"); - - var localVarPath = "./pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("AddPet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task AddPetAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)) - { - await AddPetWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet"); - - var localVarPath = "./pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("AddPet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// - public void DeletePet (long petId, string apiKey = default(string)) - { - DeletePetWithHttpInfo(petId, apiKey); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - - var localVarPath = "./pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (apiKey != null) localVarHeaderParams.Add("api_key", this.Configuration.ApiClient.ParameterToString(apiKey)); // header parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeletePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken); - - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - - var localVarPath = "./pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (apiKey != null) localVarHeaderParams.Add("api_key", this.Configuration.ApiClient.ParameterToString(apiKey)); // header parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeletePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// List<Pet> - public List FindPetsByStatus (List status) - { - ApiResponse> localVarResponse = FindPetsByStatusWithHttpInfo(status); - return localVarResponse.Data; - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// ApiResponse of List<Pet> - public ApiResponse> FindPetsByStatusWithHttpInfo (List status) - { - // verify the required parameter 'status' is set - if (status == null) - throw new ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - - var localVarPath = "./pet/findByStatus"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "status", status)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // 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("FindPetsByStatus", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> - public async System.Threading.Tasks.Task> FindPetsByStatusAsync (List status, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync (List status, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'status' is set - if (status == null) - throw new ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - - var localVarPath = "./pet/findByStatus"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "status", status)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FindPetsByStatus", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// List<Pet> - [Obsolete] - public List FindPetsByTags (List tags) - { - ApiResponse> localVarResponse = FindPetsByTagsWithHttpInfo(tags); - return localVarResponse.Data; - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// ApiResponse of List<Pet> - [Obsolete] - public ApiResponse> FindPetsByTagsWithHttpInfo (List tags) - { - // verify the required parameter 'tags' is set - if (tags == null) - throw new ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - - var localVarPath = "./pet/findByTags"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (tags != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "tags", tags)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // 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("FindPetsByTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> - [Obsolete] - public async System.Threading.Tasks.Task> FindPetsByTagsAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - [Obsolete] - public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'tags' is set - if (tags == null) - throw new ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - - var localVarPath = "./pet/findByTags"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (tags != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "tags", tags)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FindPetsByTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Pet - public Pet GetPetById (long petId) - { - ApiResponse localVarResponse = GetPetByIdWithHttpInfo(petId); - return localVarResponse.Data; - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// ApiResponse of Pet - public ApiResponse GetPetByIdWithHttpInfo (long petId) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - - var localVarPath = "./pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // 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("GetPetById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Pet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet))); - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of Pet - public async System.Threading.Tasks.Task GetPetByIdAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - - var localVarPath = "./pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetPetById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Pet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet))); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - public void UpdatePet (Pet body) - { - UpdatePetWithHttpInfo(body); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - public ApiResponse UpdatePetWithHttpInfo (Pet body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet"); - - var localVarPath = "./pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task UpdatePetAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)) - { - await UpdatePetWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet"); - - var localVarPath = "./pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - public void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)) - { - UpdatePetWithFormWithHttpInfo(petId, name, status); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// ApiResponse of Object(void) - public ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - - var localVarPath = "./pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (name != null) localVarFormParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // form parameter - if (status != null) localVarFormParams.Add("status", this.Configuration.ApiClient.ParameterToString(status)); // form parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePetWithForm", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken); - - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - - var localVarPath = "./pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (name != null) localVarFormParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // form parameter - if (status != null) localVarFormParams.Add("status", this.Configuration.ApiClient.ParameterToString(status)); // form parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePetWithForm", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - public ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) - { - ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); - return localVarResponse.Data; - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse of ApiResponse - public ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - - var localVarPath = "./pet/{petId}/uploadImage"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - - var localVarPath = "./pet/{petId}/uploadImage"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) - { - ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); - return localVarResponse.Data; - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - public ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'requiredFile' is set - if (requiredFile == null) - throw new ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "./fake/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (requiredFile != null) localVarFileParams.Add("requiredFile", this.Configuration.ApiClient.ParameterToFile("requiredFile", requiredFile)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'requiredFile' is set - if (requiredFile == null) - throw new ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "./fake/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (requiredFile != null) localVarFileParams.Add("requiredFile", this.Configuration.ApiClient.ParameterToFile("requiredFile", requiredFile)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/StoreApi.cs deleted file mode 100644 index e3a3ffbfc98..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/StoreApi.cs +++ /dev/null @@ -1,866 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp.Portable; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IStoreApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// - void DeleteOrder (string orderId); - - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// ApiResponse of Object(void) - ApiResponse DeleteOrderWithHttpInfo (string orderId); - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Dictionary<string, int> - Dictionary GetInventory (); - - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, int> - ApiResponse> GetInventoryWithHttpInfo (); - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Order - Order GetOrderById (long orderId); - - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// ApiResponse of Order - ApiResponse GetOrderByIdWithHttpInfo (long orderId); - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Order - Order PlaceOrder (Order body); - - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// ApiResponse of Order - ApiResponse PlaceOrderWithHttpInfo (Order body); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteOrderAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of Dictionary<string, int> - System.Threading.Tasks.Task> GetInventoryAsync (CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Dictionary<string, int>) - System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of Order - System.Threading.Tasks.Task GetOrderByIdAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of Order - System.Threading.Tasks.Task PlaceOrderAsync (Order body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync (Order body, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class StoreApi : IStoreApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public StoreApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public StoreApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public StoreApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// - public void DeleteOrder (string orderId) - { - DeleteOrderWithHttpInfo(orderId); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// ApiResponse of Object(void) - public ApiResponse DeleteOrderWithHttpInfo (string orderId) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - - var localVarPath = "./store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteOrderAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken); - - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - - var localVarPath = "./store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Dictionary<string, int> - public Dictionary GetInventory () - { - ApiResponse> localVarResponse = GetInventoryWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, int> - public ApiResponse> GetInventoryWithHttpInfo () - { - - var localVarPath = "./store/inventory"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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); - - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // 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("GetInventory", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Dictionary) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of Dictionary<string, int> - public async System.Threading.Tasks.Task> GetInventoryAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Dictionary<string, int>) - public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "./store/inventory"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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); - - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetInventory", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Dictionary) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Order - public Order GetOrderById (long orderId) - { - ApiResponse localVarResponse = GetOrderByIdWithHttpInfo(orderId); - return localVarResponse.Data; - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// ApiResponse of Order - public ApiResponse GetOrderByIdWithHttpInfo (long orderId) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - - var localVarPath = "./store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // 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("GetOrderById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of Order - public async System.Threading.Tasks.Task GetOrderByIdAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - - var localVarPath = "./store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetOrderById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Order - public Order PlaceOrder (Order body) - { - ApiResponse localVarResponse = PlaceOrderWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// ApiResponse of Order - public ApiResponse PlaceOrderWithHttpInfo (Order body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder"); - - var localVarPath = "./store/order"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("PlaceOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of Order - public async System.Threading.Tasks.Task PlaceOrderAsync (Order body, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync (Order body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder"); - - var localVarPath = "./store/order"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("PlaceOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/UserApi.cs deleted file mode 100644 index 5a11ce06ea8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Api/UserApi.cs +++ /dev/null @@ -1,1626 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp.Portable; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IUserApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// - void CreateUser (User body); - - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// ApiResponse of Object(void) - ApiResponse CreateUserWithHttpInfo (User body); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// - void CreateUsersWithArrayInput (List body); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - ApiResponse CreateUsersWithArrayInputWithHttpInfo (List body); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// - void CreateUsersWithListInput (List body); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - ApiResponse CreateUsersWithListInputWithHttpInfo (List body); - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// - void DeleteUser (string username); - - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// ApiResponse of Object(void) - ApiResponse DeleteUserWithHttpInfo (string username); - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// User - User GetUserByName (string username); - - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// ApiResponse of User - ApiResponse GetUserByNameWithHttpInfo (string username); - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// string - string LoginUser (string username, string password); - - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// ApiResponse of string - ApiResponse LoginUserWithHttpInfo (string username, string password); - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - void LogoutUser (); - - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - ApiResponse LogoutUserWithHttpInfo (); - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// - void UpdateUser (string username, User body); - - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// ApiResponse of Object(void) - ApiResponse UpdateUserWithHttpInfo (string username, User body); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task CreateUserAsync (User body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync (User body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync (List body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task CreateUsersWithListInputAsync (List body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync (List body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteUserAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of User - System.Threading.Tasks.Task GetUserByNameAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (User) - System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of string - System.Threading.Tasks.Task LoginUserAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task LogoutUserAsync (CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task UpdateUserAsync (string username, User body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync (string username, User body, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class UserApi : IUserApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public UserApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public UserApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public UserApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// - public void CreateUser (User body) - { - CreateUserWithHttpInfo(body); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// ApiResponse of Object(void) - public ApiResponse CreateUserWithHttpInfo (User body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser"); - - var localVarPath = "./user"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateUserAsync (User body, CancellationToken cancellationToken = default(CancellationToken)) - { - await CreateUserWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync (User body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser"); - - var localVarPath = "./user"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// - public void CreateUsersWithArrayInput (List body) - { - CreateUsersWithArrayInputWithHttpInfo(body); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - public ApiResponse CreateUsersWithArrayInputWithHttpInfo (List body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput"); - - var localVarPath = "./user/createWithArray"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithArrayInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List body, CancellationToken cancellationToken = default(CancellationToken)) - { - await CreateUsersWithArrayInputWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync (List body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput"); - - var localVarPath = "./user/createWithArray"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithArrayInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// - public void CreateUsersWithListInput (List body) - { - CreateUsersWithListInputWithHttpInfo(body); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - public ApiResponse CreateUsersWithListInputWithHttpInfo (List body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput"); - - var localVarPath = "./user/createWithList"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithListInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List body, CancellationToken cancellationToken = default(CancellationToken)) - { - await CreateUsersWithListInputWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync (List body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput"); - - var localVarPath = "./user/createWithList"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithListInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// - public void DeleteUser (string username) - { - DeleteUserWithHttpInfo(username); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// ApiResponse of Object(void) - public ApiResponse DeleteUserWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - - var localVarPath = "./user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteUserAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteUserWithHttpInfoAsync(username, cancellationToken); - - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - - var localVarPath = "./user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// User - public User GetUserByName (string username) - { - ApiResponse localVarResponse = GetUserByNameWithHttpInfo(username); - return localVarResponse.Data; - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// ApiResponse of User - public ApiResponse GetUserByNameWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - - var localVarPath = "./user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // 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("GetUserByName", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User))); - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of User - public async System.Threading.Tasks.Task GetUserByNameAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (User) - public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - - var localVarPath = "./user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetUserByName", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User))); - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// string - public string LoginUser (string username, string password) - { - ApiResponse localVarResponse = LoginUserWithHttpInfo(username, password); - return localVarResponse.Data; - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// ApiResponse of string - public ApiResponse LoginUserWithHttpInfo (string username, string password) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - // verify the required parameter 'password' is set - if (password == null) - throw new ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - - var localVarPath = "./user/login"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "username", username)); // query parameter - if (password != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "password", password)); // query parameter - - - // 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("LoginUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of string - public async System.Threading.Tasks.Task LoginUserAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - // verify the required parameter 'password' is set - if (password == null) - throw new ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - - var localVarPath = "./user/login"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "username", username)); // query parameter - if (password != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "password", password)); // query parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("LoginUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// - public void LogoutUser () - { - LogoutUserWithHttpInfo(); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - public ApiResponse LogoutUserWithHttpInfo () - { - - var localVarPath = "./user/logout"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - 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("LogoutUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task LogoutUserAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - await LogoutUserWithHttpInfoAsync(cancellationToken); - - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "./user/logout"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - 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, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("LogoutUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// - public void UpdateUser (string username, User body) - { - UpdateUserWithHttpInfo(username, body); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// ApiResponse of Object(void) - public ApiResponse UpdateUserWithHttpInfo (string username, User body) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); - - var localVarPath = "./user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task UpdateUserAsync (string username, User body, CancellationToken cancellationToken = default(CancellationToken)) - { - await UpdateUserWithHttpInfoAsync(username, body, cancellationToken); - - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync (string username, User body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); - - var localVarPath = "./user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Key, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiClient.cs deleted file mode 100644 index 33758aa1883..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiClient.cs +++ /dev/null @@ -1,541 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Text.RegularExpressions; -using System.IO; -using System.Threading; -using System.Linq; -using System.Net; -using System.Text; -using Newtonsoft.Json; -using RestSharp.Portable; -using RestSharp.Portable.HttpClient; - -namespace Org.OpenAPITools.Client -{ - /// - /// API client is mainly responsible for making the HTTP call to the API backend. - /// - public partial class ApiClient - { - public JsonSerializerSettings serializerSettings = new JsonSerializerSettings - { - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor - }; - - /// - /// Allows for extending request processing for generated code. - /// - /// The RestSharp request object - partial void InterceptRequest(IRestRequest request); - - /// - /// Allows for extending response processing for generated code. - /// - /// The RestSharp request object - /// The RestSharp response object - partial void InterceptResponse(IRestRequest request, IRestResponse response); - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - public ApiClient() - { - Configuration = Org.OpenAPITools.Client.Configuration.Default; - RestClient = new RestClient("http://petstore.swagger.io:80/v2"); - RestClient.IgnoreResponseStatusCode = true; - } - - /// - /// Initializes a new instance of the class - /// with default base path (http://petstore.swagger.io:80/v2). - /// - /// An instance of Configuration. - public ApiClient(Configuration config) - { - Configuration = config ?? Org.OpenAPITools.Client.Configuration.Default; - - RestClient = new RestClient(Configuration.BasePath); - RestClient.IgnoreResponseStatusCode = true; - } - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - /// The base path. - public ApiClient(String basePath = "http://petstore.swagger.io:80/v2") - { - if (String.IsNullOrEmpty(basePath)) - throw new ArgumentException("basePath cannot be empty"); - - RestClient = new RestClient(basePath); - RestClient.IgnoreResponseStatusCode = true; - Configuration = Client.Configuration.Default; - } - - /// - /// Gets or sets the default API client for making HTTP calls. - /// - /// The default API client. - [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] - public static ApiClient Default; - - /// - /// Gets or sets an instance of the IReadableConfiguration. - /// - /// An instance of the IReadableConfiguration. - /// - /// helps us to avoid modifying possibly global - /// configuration values from within a given client. It does not guarantee thread-safety - /// of the instance in any way. - /// - public IReadableConfiguration Configuration { get; set; } - - /// - /// Gets or sets the RestClient. - /// - /// An instance of the RestClient - public RestClient RestClient { get; set; } - - // Creates and sets up a RestRequest prior to a call. - private RestRequest PrepareRequest( - String path, Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = new RestRequest(path, method); - // disable ResetSharp.Portable built-in serialization - request.Serializer = null; - - // add path parameter, if any - foreach(var param in pathParams) - request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); - - // add header parameter, if any - foreach(var param in headerParams) - request.AddHeader(param.Key, param.Value); - - // add query parameter, if any - foreach(var param in queryParams) - request.AddQueryParameter(param.Key, param.Value); - - // add form parameter, if any - foreach(var param in formParams) - request.AddParameter(param.Key, param.Value); - - // add file parameter, if any - foreach(var param in fileParams) - { - request.AddFile(param.Value); - } - - if (postBody != null) // http body (model or byte[]) parameter - { - request.AddParameter(new Parameter { Value = postBody, Type = ParameterType.RequestBody, ContentType = contentType }); - } - - return request; - } - - /// - /// Makes the HTTP request (Sync). - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content Type of the request - /// Object - public Object CallApi( - String path, Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - - // set timeout - RestClient.Timeout = TimeSpan.FromMilliseconds(Configuration.Timeout); - - // set user agent - RestClient.UserAgent = Configuration.UserAgent; - - InterceptRequest(request); - var response = RestClient.Execute(request).Result; - InterceptResponse(request, response); - - return (Object) response; - } - /// - /// Makes the asynchronous HTTP request. - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content type. - /// Cancellation Token. - /// The Task instance. - public async System.Threading.Tasks.Task CallApiAsync( - String path, Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType, CancellationToken cancellationToken) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - RestClient.UserAgent = Configuration.UserAgent; - InterceptRequest(request); - var response = await RestClient.Execute(request, cancellationToken); - InterceptResponse(request, response); - return (Object)response; - } - - /// - /// Escape string (url-encoded). - /// - /// String to be escaped. - /// Escaped string. - public string EscapeString(string str) - { - return UrlEncode(str); - } - - /// - /// Create FileParameter based on Stream. - /// - /// Parameter name. - /// Input stream. - /// FileParameter. - public FileParameter ParameterToFile(string name, Stream stream) - { - if (stream is FileStream) - return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); - else - return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// Formatted string. - public string ParameterToString(object obj) - { - if (obj is DateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTime)obj).ToString (Configuration.DateTimeFormat); - else if (obj is DateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); - else if (obj is bool) - return (bool)obj ? "true" : "false"; - else if (obj is IList) - { - var flattenedString = new StringBuilder(); - foreach (var param in (IList)obj) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } - else - return Convert.ToString (obj); - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The HTTP response. - /// Object type. - /// Object representation of the JSON string. - public object Deserialize(IRestResponse response, Type type) - { - IHttpHeaders headers = response.Headers; - if (type == typeof(byte[])) // return byte array - { - return response.RawBytes; - } - - // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) - if (type == typeof(Stream)) - { - if (headers != null) - { - var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) - ? Path.GetTempPath() - : Configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); - foreach (var header in headers) - { - var match = regex.Match(header.ToString()); - if (match.Success) - { - string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); - } - } - } - var stream = new MemoryStream(response.RawBytes); - return stream; - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return ConvertType(response.Content, type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Serialize an input (model) into JSON string - /// - /// Object. - /// JSON string. - public String Serialize(object obj) - { - try - { - return obj != null ? JsonConvert.SerializeObject(obj) : null; - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - ///Check if the given MIME is a JSON MIME. - ///JSON MIME examples: - /// application/json - /// application/json; charset=UTF8 - /// APPLICATION/JSON - /// application/vnd.company+json - /// - /// MIME - /// Returns True if MIME type is json. - public bool IsJsonMime(String mime) - { - var jsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); - return mime != null && (jsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json")); - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON type exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public String SelectHeaderContentType(String[] contentTypes) - { - if (contentTypes.Length == 0) - return "application/json"; - - foreach (var contentType in contentTypes) - { - if (IsJsonMime(contentType.ToLower())) - return contentType; - } - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public String SelectHeaderAccept(String[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return String.Join(",", accepts); - } - - /// - /// Encode string in base64 format. - /// - /// String to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Dynamically cast the object into target type. - /// - /// Object to be casted - /// Target type - /// Casted object - public static dynamic ConvertType(dynamic fromObject, Type toObject) - { - return Convert.ChangeType(fromObject, toObject); - } - - /// - /// Convert stream to byte array - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream inputStream) - { - byte[] buf = new byte[16*1024]; - using (MemoryStream ms = new MemoryStream()) - { - int count; - while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) - { - ms.Write(buf, 0, count); - } - return ms.ToArray(); - } - } - - /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 - /// - /// String to be URL encoded - /// Byte array - public static string UrlEncode(string input) - { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); - } - - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - - if (match.Success) - { - return match.Groups[1].Value; - } - else - { - return filename; - } - } - - /// - /// Convert params to key/value pairs. - /// Use collectionFormat to properly format lists and collections. - /// - /// Collection format. - /// Key name. - /// Value object. - /// A list of KeyValuePairs - public IEnumerable> ParameterToKeyValuePairs(string collectionFormat, string name, object value) - { - var parameters = new List>(); - - if (IsCollection(value) && collectionFormat == "multi") - { - var valueCollection = value as IEnumerable; - parameters.AddRange(from object item in valueCollection select new KeyValuePair(name, ParameterToString(item))); - } - else - { - parameters.Add(new KeyValuePair(name, ParameterToString(value))); - } - - return parameters; - } - - /// - /// Check if generic object is a collection. - /// - /// - /// True if object is a collection type - private static bool IsCollection(object value) - { - return value is IList || value is ICollection; - } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiException.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiException.cs deleted file mode 100644 index e7ac15569b9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiException.cs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; - -namespace Org.OpenAPITools.Client -{ - /// - /// API Exception - /// - public class ApiException : Exception - { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public dynamic ErrorContent { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() {} - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) - { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) - { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiResponse.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiResponse.cs deleted file mode 100644 index 4b462cf5424..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ApiResponse.cs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; - -namespace Org.OpenAPITools.Client -{ - /// - /// API Response - /// - public class ApiResponse - { - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - public int StatusCode { get; private set; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public IDictionary Headers { get; private set; } - - /// - /// Gets or sets the data (parsed HTTP body) - /// - /// The data. - public T Data { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - public ApiResponse(int statusCode, IDictionary headers, T data) - { - this.StatusCode= statusCode; - this.Headers = headers; - this.Data = data; - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/Configuration.cs deleted file mode 100644 index e10bf1c07e7..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/Configuration.cs +++ /dev/null @@ -1,446 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Reflection; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents a set of configuration settings - /// - public class Configuration : IReadableConfiguration - { - #region Constants - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "1.0.0"; - - /// - /// Identifier for ISO 8601 DateTime Format - /// - /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. - // ReSharper disable once InconsistentNaming - public const string ISO8601_DATETIME_FORMAT = "o"; - - #endregion Constants - - #region Static Members - - private static readonly object GlobalConfigSync = new { }; - private static Configuration _globalConfiguration; - - /// - /// Default creation of exceptions for a given method name and response object - /// - public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => - { - var status = (int)response.StatusCode; - if (status >= 400) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.Content), - response.Content); - } - - return null; - }; - - /// - /// Gets or sets the default Configuration. - /// - /// Configuration. - public static Configuration Default - { - get { return _globalConfiguration; } - set - { - lock (GlobalConfigSync) - { - _globalConfiguration = value; - } - } - } - - #endregion Static Members - - #region Private Members - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - private IDictionary _apiKey = null; - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - private IDictionary _apiKeyPrefix = null; - - private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - private string _tempFolderPath = Path.GetTempPath(); - - #endregion Private Members - - #region Constructors - - static Configuration() - { - _globalConfiguration = new GlobalConfiguration(); - } - - /// - /// Initializes a new instance of the class - /// - public Configuration() - { - UserAgent = "OpenAPI-Generator/1.0.0/csharp"; - BasePath = "http://petstore.swagger.io:80/v2"; - DefaultHeader = new ConcurrentDictionary(); - ApiKey = new ConcurrentDictionary(); - ApiKeyPrefix = new ConcurrentDictionary(); - - // Setting Timeout has side effects (forces ApiClient creation). - Timeout = 100000; - } - - /// - /// Initializes a new instance of the class - /// - public Configuration( - IDictionary defaultHeader, - IDictionary apiKey, - IDictionary apiKeyPrefix, - string basePath = "http://petstore.swagger.io:80/v2") : this() - { - if (string.IsNullOrWhiteSpace(basePath)) - throw new ArgumentException("The provided basePath is invalid.", "basePath"); - if (defaultHeader == null) - throw new ArgumentNullException("defaultHeader"); - if (apiKey == null) - throw new ArgumentNullException("apiKey"); - if (apiKeyPrefix == null) - throw new ArgumentNullException("apiKeyPrefix"); - - BasePath = basePath; - - foreach (var keyValuePair in defaultHeader) - { - DefaultHeader.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKey) - { - ApiKey.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKeyPrefix) - { - ApiKeyPrefix.Add(keyValuePair); - } - } - - /// - /// Initializes a new instance of the class with different settings - /// - /// Api client - /// Dictionary of default HTTP header - /// Username - /// Password - /// accessToken - /// Dictionary of API key - /// Dictionary of API key prefix - /// Temp folder path - /// DateTime format string - /// HTTP connection timeout (in milliseconds) - /// HTTP user agent - [Obsolete("Use explicit object construction and setting of properties.", true)] - public Configuration( - // ReSharper disable UnusedParameter.Local - ApiClient apiClient = null, - IDictionary defaultHeader = null, - string username = null, - string password = null, - string accessToken = null, - IDictionary apiKey = null, - IDictionary apiKeyPrefix = null, - string tempFolderPath = null, - string dateTimeFormat = null, - int timeout = 100000, - string userAgent = "OpenAPI-Generator/1.0.0/csharp" - // ReSharper restore UnusedParameter.Local - ) - { - - } - - /// - /// Initializes a new instance of the Configuration class. - /// - /// Api client. - [Obsolete("This constructor caused unexpected sharing of static data. It is no longer supported.", true)] - // ReSharper disable once UnusedParameter.Local - public Configuration(ApiClient apiClient) - { - - } - - #endregion Constructors - - - #region Properties - - private ApiClient _apiClient = null; - /// - /// Gets an instance of an ApiClient for this configuration - /// - public virtual ApiClient ApiClient - { - get - { - if (_apiClient == null) _apiClient = CreateApiClient(); - return _apiClient; - } - } - - private String _basePath = null; - /// - /// Gets or sets the base path for API access. - /// - public virtual string BasePath { - get { return _basePath; } - set { - _basePath = value; - // pass-through to ApiClient if it's set. - if(_apiClient != null) { - _apiClient.RestClient.BaseUrl = new Uri(_basePath); - } - } - } - - /// - /// Gets or sets the default header. - /// - public virtual IDictionary DefaultHeader { get; set; } - - /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. - /// - public virtual int Timeout - { - get { return (int)ApiClient.RestClient.Timeout.GetValueOrDefault(TimeSpan.FromSeconds(0)).TotalMilliseconds; } - set { ApiClient.RestClient.Timeout = TimeSpan.FromMilliseconds(value); } - } - - /// - /// Gets or sets the HTTP user agent. - /// - /// Http user agent. - public virtual string UserAgent { get; set; } - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public virtual string Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public virtual string Password { get; set; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix(string apiKeyIdentifier) - { - var apiKeyValue = ""; - ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); - var apiKeyPrefix = ""; - if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) - return apiKeyPrefix + " " + apiKeyValue; - else - return apiKeyValue; - } - - /// - /// Gets or sets the access token for OAuth2 authentication. - /// - /// The access token. - public virtual string AccessToken { get; set; } - - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public virtual string TempFolderPath - { - get { return _tempFolderPath; } - - set - { - if (string.IsNullOrEmpty(value)) - { - _tempFolderPath = Path.GetTempPath(); - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - { - Directory.CreateDirectory(value); - } - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - { - _tempFolderPath = value; - } - else - { - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - } - - /// - /// Gets or sets the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public virtual string DateTimeFormat - { - get { return _dateTimeFormat; } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - public virtual IDictionary ApiKeyPrefix - { - get { return _apiKeyPrefix; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); - } - _apiKeyPrefix = value; - } - } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public virtual IDictionary ApiKey - { - get { return _apiKey; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKey collection may not be null."); - } - _apiKey = value; - } - } - - #endregion Properties - - #region Methods - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - public void AddDefaultHeader(string key, string value) - { - DefaultHeader[key] = value; - } - - /// - /// Creates a new based on this instance. - /// - /// - public ApiClient CreateApiClient() - { - return new ApiClient(BasePath) { Configuration = this }; - } - - - /// - /// Returns a string with essential information for debugging. - /// - public static String ToDebugReport() - { - String report = "C# SDK (Org.OpenAPITools) Debug Report:\n"; - report += " OS: " + System.Runtime.InteropServices.RuntimeInformation.OSDescription + "\n"; - report += " Version of the API: 1.0.0\n"; - report += " SDK Package Version: 1.0.0\n"; - - return report; - } - - /// - /// Add Api Key Header. - /// - /// Api Key name. - /// Api Key value. - /// - public void AddApiKey(string key, string value) - { - ApiKey[key] = value; - } - - /// - /// Sets the API key prefix. - /// - /// Api Key name. - /// Api Key value. - public void AddApiKeyPrefix(string key, string value) - { - ApiKeyPrefix[key] = value; - } - - #endregion Methods - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ExceptionFactory.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ExceptionFactory.cs deleted file mode 100644 index 343ea7ae2b6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/ExceptionFactory.cs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using RestSharp.Portable; - -namespace Org.OpenAPITools.Client -{ - /// - /// A delegate to ExceptionFactory method - /// - /// Method name - /// Response - /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/GlobalConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/GlobalConfiguration.cs deleted file mode 100644 index a79bea966bd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/GlobalConfiguration.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Reflection; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; - -namespace Org.OpenAPITools.Client -{ - /// - /// provides a compile-time extension point for globally configuring - /// API Clients. - /// - /// - /// A customized implementation via partial class may reside in another file and may - /// be excluded from automatic generation via a .openapi-generator-ignore file. - /// - public partial class GlobalConfiguration : Configuration - { - - } -} \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/IApiAccessor.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/IApiAccessor.cs deleted file mode 100644 index df00c43800c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/IApiAccessor.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp.Portable; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents configuration aspects required to interact with the API endpoints. - /// - public interface IApiAccessor - { - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - Configuration Configuration {get; set;} - - /// - /// Gets the base path of the API client. - /// - /// The base path - String GetBasePath(); - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - ExceptionFactory ExceptionFactory { get; set; } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/IReadableConfiguration.cs deleted file mode 100644 index 43ed169c6a1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System.Collections.Generic; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents a readable-only configuration contract. - /// - public interface IReadableConfiguration - { - /// - /// Gets the access token. - /// - /// Access token. - string AccessToken { get; } - - /// - /// Gets the API key. - /// - /// API key. - IDictionary ApiKey { get; } - - /// - /// Gets the API key prefix. - /// - /// API key prefix. - IDictionary ApiKeyPrefix { get; } - - /// - /// Gets the base path. - /// - /// Base path. - string BasePath { get; } - - /// - /// Gets the date time format. - /// - /// Date time format. - string DateTimeFormat { get; } - - /// - /// Gets the default header. - /// - /// Default header. - IDictionary DefaultHeader { get; } - - /// - /// Gets the temp folder path. - /// - /// Temp folder path. - string TempFolderPath { get; } - - /// - /// Gets the HTTP connection timeout (in milliseconds) - /// - /// HTTP connection timeout. - int Timeout { get; } - - /// - /// Gets the user agent. - /// - /// User agent. - string UserAgent { get; } - - /// - /// Gets the username. - /// - /// Username. - string Username { get; } - - /// - /// Gets the password. - /// - /// Password. - string Password { get; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - string GetApiKeyWithPrefix(string apiKeyIdentifier); - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs deleted file mode 100644 index a1bd6b08f3b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using Newtonsoft.Json.Converters; - -namespace Org.OpenAPITools.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public OpenAPIDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs deleted file mode 100644 index 0b66cfaa72a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesAnyType - /// - [DataContract] - public partial class AdditionalPropertiesAnyType : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesAnyType(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesAnyType {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesAnyType); - } - - /// - /// Returns true if AdditionalPropertiesAnyType instances are equal - /// - /// Instance of AdditionalPropertiesAnyType to be compared - /// Boolean - public bool Equals(AdditionalPropertiesAnyType input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs deleted file mode 100644 index 74e73ae5e69..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesArray - /// - [DataContract] - public partial class AdditionalPropertiesArray : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesArray(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesArray {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesArray); - } - - /// - /// Returns true if AdditionalPropertiesArray instances are equal - /// - /// Instance of AdditionalPropertiesArray to be compared - /// Boolean - public bool Equals(AdditionalPropertiesArray input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs deleted file mode 100644 index c52f36924d4..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesBoolean - /// - [DataContract] - public partial class AdditionalPropertiesBoolean : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesBoolean(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesBoolean {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesBoolean); - } - - /// - /// Returns true if AdditionalPropertiesBoolean instances are equal - /// - /// Instance of AdditionalPropertiesBoolean to be compared - /// Boolean - public bool Equals(AdditionalPropertiesBoolean input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs deleted file mode 100644 index f56db9cd165..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ /dev/null @@ -1,280 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesClass - /// - [DataContract] - public partial class AdditionalPropertiesClass : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// mapString. - /// mapNumber. - /// mapInteger. - /// mapBoolean. - /// mapArrayInteger. - /// mapArrayAnytype. - /// mapMapString. - /// mapMapAnytype. - /// anytype1. - /// anytype2. - /// anytype3. - public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) - { - this.MapString = mapString; - this.MapNumber = mapNumber; - this.MapInteger = mapInteger; - this.MapBoolean = mapBoolean; - this.MapArrayInteger = mapArrayInteger; - this.MapArrayAnytype = mapArrayAnytype; - this.MapMapString = mapMapString; - this.MapMapAnytype = mapMapAnytype; - this.Anytype1 = anytype1; - this.Anytype2 = anytype2; - this.Anytype3 = anytype3; - } - - /// - /// Gets or Sets MapString - /// - [DataMember(Name="map_string", EmitDefaultValue=false)] - public Dictionary MapString { get; set; } - - /// - /// Gets or Sets MapNumber - /// - [DataMember(Name="map_number", EmitDefaultValue=false)] - public Dictionary MapNumber { get; set; } - - /// - /// Gets or Sets MapInteger - /// - [DataMember(Name="map_integer", EmitDefaultValue=false)] - public Dictionary MapInteger { get; set; } - - /// - /// Gets or Sets MapBoolean - /// - [DataMember(Name="map_boolean", EmitDefaultValue=false)] - public Dictionary MapBoolean { get; set; } - - /// - /// Gets or Sets MapArrayInteger - /// - [DataMember(Name="map_array_integer", EmitDefaultValue=false)] - public Dictionary> MapArrayInteger { get; set; } - - /// - /// Gets or Sets MapArrayAnytype - /// - [DataMember(Name="map_array_anytype", EmitDefaultValue=false)] - public Dictionary> MapArrayAnytype { get; set; } - - /// - /// Gets or Sets MapMapString - /// - [DataMember(Name="map_map_string", EmitDefaultValue=false)] - public Dictionary> MapMapString { get; set; } - - /// - /// Gets or Sets MapMapAnytype - /// - [DataMember(Name="map_map_anytype", EmitDefaultValue=false)] - public Dictionary> MapMapAnytype { get; set; } - - /// - /// Gets or Sets Anytype1 - /// - [DataMember(Name="anytype_1", EmitDefaultValue=false)] - public Object Anytype1 { get; set; } - - /// - /// Gets or Sets Anytype2 - /// - [DataMember(Name="anytype_2", EmitDefaultValue=false)] - public Object Anytype2 { get; set; } - - /// - /// Gets or Sets Anytype3 - /// - [DataMember(Name="anytype_3", EmitDefaultValue=false)] - public Object Anytype3 { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapString: ").Append(MapString).Append("\n"); - sb.Append(" MapNumber: ").Append(MapNumber).Append("\n"); - sb.Append(" MapInteger: ").Append(MapInteger).Append("\n"); - sb.Append(" MapBoolean: ").Append(MapBoolean).Append("\n"); - sb.Append(" MapArrayInteger: ").Append(MapArrayInteger).Append("\n"); - sb.Append(" MapArrayAnytype: ").Append(MapArrayAnytype).Append("\n"); - sb.Append(" MapMapString: ").Append(MapMapString).Append("\n"); - sb.Append(" MapMapAnytype: ").Append(MapMapAnytype).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); - sb.Append(" Anytype2: ").Append(Anytype2).Append("\n"); - sb.Append(" Anytype3: ").Append(Anytype3).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesClass); - } - - /// - /// Returns true if AdditionalPropertiesClass instances are equal - /// - /// Instance of AdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(AdditionalPropertiesClass input) - { - if (input == null) - return false; - - return - ( - this.MapString == input.MapString || - this.MapString != null && - input.MapString != null && - this.MapString.SequenceEqual(input.MapString) - ) && - ( - this.MapNumber == input.MapNumber || - this.MapNumber != null && - input.MapNumber != null && - this.MapNumber.SequenceEqual(input.MapNumber) - ) && - ( - this.MapInteger == input.MapInteger || - this.MapInteger != null && - input.MapInteger != null && - this.MapInteger.SequenceEqual(input.MapInteger) - ) && - ( - this.MapBoolean == input.MapBoolean || - this.MapBoolean != null && - input.MapBoolean != null && - this.MapBoolean.SequenceEqual(input.MapBoolean) - ) && - ( - this.MapArrayInteger == input.MapArrayInteger || - this.MapArrayInteger != null && - input.MapArrayInteger != null && - this.MapArrayInteger.SequenceEqual(input.MapArrayInteger) - ) && - ( - this.MapArrayAnytype == input.MapArrayAnytype || - this.MapArrayAnytype != null && - input.MapArrayAnytype != null && - this.MapArrayAnytype.SequenceEqual(input.MapArrayAnytype) - ) && - ( - this.MapMapString == input.MapMapString || - this.MapMapString != null && - input.MapMapString != null && - this.MapMapString.SequenceEqual(input.MapMapString) - ) && - ( - this.MapMapAnytype == input.MapMapAnytype || - this.MapMapAnytype != null && - input.MapMapAnytype != null && - this.MapMapAnytype.SequenceEqual(input.MapMapAnytype) - ) && - ( - this.Anytype1 == input.Anytype1 || - (this.Anytype1 != null && - this.Anytype1.Equals(input.Anytype1)) - ) && - ( - this.Anytype2 == input.Anytype2 || - (this.Anytype2 != null && - this.Anytype2.Equals(input.Anytype2)) - ) && - ( - this.Anytype3 == input.Anytype3 || - (this.Anytype3 != null && - this.Anytype3.Equals(input.Anytype3)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapString != null) - hashCode = hashCode * 59 + this.MapString.GetHashCode(); - if (this.MapNumber != null) - hashCode = hashCode * 59 + this.MapNumber.GetHashCode(); - if (this.MapInteger != null) - hashCode = hashCode * 59 + this.MapInteger.GetHashCode(); - if (this.MapBoolean != null) - hashCode = hashCode * 59 + this.MapBoolean.GetHashCode(); - if (this.MapArrayInteger != null) - hashCode = hashCode * 59 + this.MapArrayInteger.GetHashCode(); - if (this.MapArrayAnytype != null) - hashCode = hashCode * 59 + this.MapArrayAnytype.GetHashCode(); - if (this.MapMapString != null) - hashCode = hashCode * 59 + this.MapMapString.GetHashCode(); - if (this.MapMapAnytype != null) - hashCode = hashCode * 59 + this.MapMapAnytype.GetHashCode(); - if (this.Anytype1 != null) - hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); - if (this.Anytype2 != null) - hashCode = hashCode * 59 + this.Anytype2.GetHashCode(); - if (this.Anytype3 != null) - hashCode = hashCode * 59 + this.Anytype3.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs deleted file mode 100644 index 522847f7b16..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesInteger - /// - [DataContract] - public partial class AdditionalPropertiesInteger : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesInteger(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesInteger {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesInteger); - } - - /// - /// Returns true if AdditionalPropertiesInteger instances are equal - /// - /// Instance of AdditionalPropertiesInteger to be compared - /// Boolean - public bool Equals(AdditionalPropertiesInteger input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs deleted file mode 100644 index cc739022c18..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesNumber - /// - [DataContract] - public partial class AdditionalPropertiesNumber : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesNumber(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesNumber {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesNumber); - } - - /// - /// Returns true if AdditionalPropertiesNumber instances are equal - /// - /// Instance of AdditionalPropertiesNumber to be compared - /// Boolean - public bool Equals(AdditionalPropertiesNumber input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs deleted file mode 100644 index d5e694f3fdc..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesObject - /// - [DataContract] - public partial class AdditionalPropertiesObject : Dictionary>, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesObject(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesObject {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesObject); - } - - /// - /// Returns true if AdditionalPropertiesObject instances are equal - /// - /// Instance of AdditionalPropertiesObject to be compared - /// Boolean - public bool Equals(AdditionalPropertiesObject input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs deleted file mode 100644 index 0c211e824d1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// AdditionalPropertiesString - /// - [DataContract] - public partial class AdditionalPropertiesString : Dictionary, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesString(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesString {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesString); - } - - /// - /// Returns true if AdditionalPropertiesString instances are equal - /// - /// Instance of AdditionalPropertiesString to be compared - /// Boolean - public bool Equals(AdditionalPropertiesString input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Animal.cs deleted file mode 100644 index 455c3a9bcef..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Animal.cs +++ /dev/null @@ -1,155 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using JsonSubTypes; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Animal - /// - [DataContract] - [JsonConverter(typeof(JsonSubtypes), "className")] - [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] - [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] - [JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")] - public partial class Animal : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Animal() { } - /// - /// Initializes a new instance of the class. - /// - /// className (required). - /// color (default to "red"). - public Animal(string className = default(string), string color = "red") - { - // to ensure "className" is required (not null) - if (className == null) - { - throw new InvalidDataException("className is a required property for Animal and cannot be null"); - } - else - { - this.ClassName = className; - } - - // use default value if no "color" provided - if (color == null) - { - this.Color = "red"; - } - else - { - this.Color = color; - } - } - - /// - /// Gets or Sets ClassName - /// - [DataMember(Name="className", EmitDefaultValue=true)] - public string ClassName { get; set; } - - /// - /// Gets or Sets Color - /// - [DataMember(Name="color", EmitDefaultValue=false)] - public string Color { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Animal {\n"); - sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Animal); - } - - /// - /// Returns true if Animal instances are equal - /// - /// Instance of Animal to be compared - /// Boolean - public bool Equals(Animal input) - { - if (input == null) - return false; - - return - ( - this.ClassName == input.ClassName || - (this.ClassName != null && - this.ClassName.Equals(input.ClassName)) - ) && - ( - this.Color == input.Color || - (this.Color != null && - this.Color.Equals(input.Color)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - hashCode = hashCode * 59 + this.ClassName.GetHashCode(); - if (this.Color != null) - hashCode = hashCode * 59 + this.Color.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ApiResponse.cs deleted file mode 100644 index 108ca344e67..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ApiResponse.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// ApiResponse - /// - [DataContract] - public partial class ApiResponse : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// code. - /// type. - /// message. - public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) - { - this.Code = code; - this.Type = type; - this.Message = message; - } - - /// - /// Gets or Sets Code - /// - [DataMember(Name="code", EmitDefaultValue=false)] - public int Code { get; set; } - - /// - /// Gets or Sets Type - /// - [DataMember(Name="type", EmitDefaultValue=false)] - public string Type { get; set; } - - /// - /// Gets or Sets Message - /// - [DataMember(Name="message", EmitDefaultValue=false)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ApiResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApiResponse); - } - - /// - /// Returns true if ApiResponse instances are equal - /// - /// Instance of ApiResponse to be compared - /// Boolean - public bool Equals(ApiResponse input) - { - if (input == null) - return false; - - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - hashCode = hashCode * 59 + this.Code.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs deleted file mode 100644 index b95c1002b76..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// ArrayOfArrayOfNumberOnly - /// - [DataContract] - public partial class ArrayOfArrayOfNumberOnly : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// arrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) - { - this.ArrayArrayNumber = arrayArrayNumber; - } - - /// - /// Gets or Sets ArrayArrayNumber - /// - [DataMember(Name="ArrayArrayNumber", EmitDefaultValue=false)] - public List> ArrayArrayNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayOfArrayOfNumberOnly {\n"); - sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayOfArrayOfNumberOnly); - } - - /// - /// Returns true if ArrayOfArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfArrayOfNumberOnly input) - { - if (input == null) - return false; - - return - ( - this.ArrayArrayNumber == input.ArrayArrayNumber || - this.ArrayArrayNumber != null && - input.ArrayArrayNumber != null && - this.ArrayArrayNumber.SequenceEqual(input.ArrayArrayNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayArrayNumber != null) - hashCode = hashCode * 59 + this.ArrayArrayNumber.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs deleted file mode 100644 index 0b6c8afe9eb..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// ArrayOfNumberOnly - /// - [DataContract] - public partial class ArrayOfNumberOnly : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// arrayNumber. - public ArrayOfNumberOnly(List arrayNumber = default(List)) - { - this.ArrayNumber = arrayNumber; - } - - /// - /// Gets or Sets ArrayNumber - /// - [DataMember(Name="ArrayNumber", EmitDefaultValue=false)] - public List ArrayNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayOfNumberOnly {\n"); - sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayOfNumberOnly); - } - - /// - /// Returns true if ArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfNumberOnly input) - { - if (input == null) - return false; - - return - ( - this.ArrayNumber == input.ArrayNumber || - this.ArrayNumber != null && - input.ArrayNumber != null && - this.ArrayNumber.SequenceEqual(input.ArrayNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayNumber != null) - hashCode = hashCode * 59 + this.ArrayNumber.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ArrayTest.cs deleted file mode 100644 index ab309bde6b2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ArrayTest.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// ArrayTest - /// - [DataContract] - public partial class ArrayTest : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// arrayOfString. - /// arrayArrayOfInteger. - /// arrayArrayOfModel. - public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) - { - this.ArrayOfString = arrayOfString; - this.ArrayArrayOfInteger = arrayArrayOfInteger; - this.ArrayArrayOfModel = arrayArrayOfModel; - } - - /// - /// Gets or Sets ArrayOfString - /// - [DataMember(Name="array_of_string", EmitDefaultValue=false)] - public List ArrayOfString { get; set; } - - /// - /// Gets or Sets ArrayArrayOfInteger - /// - [DataMember(Name="array_array_of_integer", EmitDefaultValue=false)] - public List> ArrayArrayOfInteger { get; set; } - - /// - /// Gets or Sets ArrayArrayOfModel - /// - [DataMember(Name="array_array_of_model", EmitDefaultValue=false)] - public List> ArrayArrayOfModel { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); - sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); - sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayTest); - } - - /// - /// Returns true if ArrayTest instances are equal - /// - /// Instance of ArrayTest to be compared - /// Boolean - public bool Equals(ArrayTest input) - { - if (input == null) - return false; - - return - ( - this.ArrayOfString == input.ArrayOfString || - this.ArrayOfString != null && - input.ArrayOfString != null && - this.ArrayOfString.SequenceEqual(input.ArrayOfString) - ) && - ( - this.ArrayArrayOfInteger == input.ArrayArrayOfInteger || - this.ArrayArrayOfInteger != null && - input.ArrayArrayOfInteger != null && - this.ArrayArrayOfInteger.SequenceEqual(input.ArrayArrayOfInteger) - ) && - ( - this.ArrayArrayOfModel == input.ArrayArrayOfModel || - this.ArrayArrayOfModel != null && - input.ArrayArrayOfModel != null && - this.ArrayArrayOfModel.SequenceEqual(input.ArrayArrayOfModel) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayOfString != null) - hashCode = hashCode * 59 + this.ArrayOfString.GetHashCode(); - if (this.ArrayArrayOfInteger != null) - hashCode = hashCode * 59 + this.ArrayArrayOfInteger.GetHashCode(); - if (this.ArrayArrayOfModel != null) - hashCode = hashCode * 59 + this.ArrayArrayOfModel.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/BigCat.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/BigCat.cs deleted file mode 100644 index 0b09a9d1a3b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/BigCat.cs +++ /dev/null @@ -1,150 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// BigCat - /// - [DataContract] - public partial class BigCat : Cat, IEquatable - { - /// - /// Defines Kind - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum KindEnum - { - /// - /// Enum Lions for value: lions - /// - [EnumMember(Value = "lions")] - Lions = 1, - - /// - /// Enum Tigers for value: tigers - /// - [EnumMember(Value = "tigers")] - Tigers = 2, - - /// - /// Enum Leopards for value: leopards - /// - [EnumMember(Value = "leopards")] - Leopards = 3, - - /// - /// Enum Jaguars for value: jaguars - /// - [EnumMember(Value = "jaguars")] - Jaguars = 4 - - } - - /// - /// Gets or Sets Kind - /// - [DataMember(Name="kind", EmitDefaultValue=false)] - public KindEnum? Kind { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BigCat() { } - /// - /// Initializes a new instance of the class. - /// - /// kind. - public BigCat(KindEnum? kind = default(KindEnum?), string className = default(string), string color = "red", bool declawed = default(bool)) : base(declawed) - { - this.Kind = kind; - } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BigCat {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Kind: ").Append(Kind).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BigCat); - } - - /// - /// Returns true if BigCat instances are equal - /// - /// Instance of BigCat to be compared - /// Boolean - public bool Equals(BigCat input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Kind == input.Kind || - (this.Kind != null && - this.Kind.Equals(input.Kind)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Kind != null) - hashCode = hashCode * 59 + this.Kind.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/BigCatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/BigCatAllOf.cs deleted file mode 100644 index f0b9775277e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/BigCatAllOf.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// BigCatAllOf - /// - [DataContract] - public partial class BigCatAllOf : IEquatable - { - /// - /// Defines Kind - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum KindEnum - { - /// - /// Enum Lions for value: lions - /// - [EnumMember(Value = "lions")] - Lions = 1, - - /// - /// Enum Tigers for value: tigers - /// - [EnumMember(Value = "tigers")] - Tigers = 2, - - /// - /// Enum Leopards for value: leopards - /// - [EnumMember(Value = "leopards")] - Leopards = 3, - - /// - /// Enum Jaguars for value: jaguars - /// - [EnumMember(Value = "jaguars")] - Jaguars = 4 - - } - - /// - /// Gets or Sets Kind - /// - [DataMember(Name="kind", EmitDefaultValue=false)] - public KindEnum? Kind { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// kind. - public BigCatAllOf(KindEnum? kind = default(KindEnum?)) - { - this.Kind = kind; - } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BigCatAllOf {\n"); - sb.Append(" Kind: ").Append(Kind).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BigCatAllOf); - } - - /// - /// Returns true if BigCatAllOf instances are equal - /// - /// Instance of BigCatAllOf to be compared - /// Boolean - public bool Equals(BigCatAllOf input) - { - if (input == null) - return false; - - return - ( - this.Kind == input.Kind || - (this.Kind != null && - this.Kind.Equals(input.Kind)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Kind != null) - hashCode = hashCode * 59 + this.Kind.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Capitalization.cs deleted file mode 100644 index ca01a9ea1dd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Capitalization.cs +++ /dev/null @@ -1,193 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Capitalization - /// - [DataContract] - public partial class Capitalization : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// smallCamel. - /// capitalCamel. - /// smallSnake. - /// capitalSnake. - /// sCAETHFlowPoints. - /// Name of the pet . - public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) - { - this.SmallCamel = smallCamel; - this.CapitalCamel = capitalCamel; - this.SmallSnake = smallSnake; - this.CapitalSnake = capitalSnake; - this.SCAETHFlowPoints = sCAETHFlowPoints; - this.ATT_NAME = aTTNAME; - } - - /// - /// Gets or Sets SmallCamel - /// - [DataMember(Name="smallCamel", EmitDefaultValue=false)] - public string SmallCamel { get; set; } - - /// - /// Gets or Sets CapitalCamel - /// - [DataMember(Name="CapitalCamel", EmitDefaultValue=false)] - public string CapitalCamel { get; set; } - - /// - /// Gets or Sets SmallSnake - /// - [DataMember(Name="small_Snake", EmitDefaultValue=false)] - public string SmallSnake { get; set; } - - /// - /// Gets or Sets CapitalSnake - /// - [DataMember(Name="Capital_Snake", EmitDefaultValue=false)] - public string CapitalSnake { get; set; } - - /// - /// Gets or Sets SCAETHFlowPoints - /// - [DataMember(Name="SCA_ETH_Flow_Points", EmitDefaultValue=false)] - public string SCAETHFlowPoints { get; set; } - - /// - /// Name of the pet - /// - /// Name of the pet - [DataMember(Name="ATT_NAME", EmitDefaultValue=false)] - public string ATT_NAME { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); - sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); - sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); - sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Capitalization); - } - - /// - /// Returns true if Capitalization instances are equal - /// - /// Instance of Capitalization to be compared - /// Boolean - public bool Equals(Capitalization input) - { - if (input == null) - return false; - - return - ( - this.SmallCamel == input.SmallCamel || - (this.SmallCamel != null && - this.SmallCamel.Equals(input.SmallCamel)) - ) && - ( - this.CapitalCamel == input.CapitalCamel || - (this.CapitalCamel != null && - this.CapitalCamel.Equals(input.CapitalCamel)) - ) && - ( - this.SmallSnake == input.SmallSnake || - (this.SmallSnake != null && - this.SmallSnake.Equals(input.SmallSnake)) - ) && - ( - this.CapitalSnake == input.CapitalSnake || - (this.CapitalSnake != null && - this.CapitalSnake.Equals(input.CapitalSnake)) - ) && - ( - this.SCAETHFlowPoints == input.SCAETHFlowPoints || - (this.SCAETHFlowPoints != null && - this.SCAETHFlowPoints.Equals(input.SCAETHFlowPoints)) - ) && - ( - this.ATT_NAME == input.ATT_NAME || - (this.ATT_NAME != null && - this.ATT_NAME.Equals(input.ATT_NAME)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SmallCamel != null) - hashCode = hashCode * 59 + this.SmallCamel.GetHashCode(); - if (this.CapitalCamel != null) - hashCode = hashCode * 59 + this.CapitalCamel.GetHashCode(); - if (this.SmallSnake != null) - hashCode = hashCode * 59 + this.SmallSnake.GetHashCode(); - if (this.CapitalSnake != null) - hashCode = hashCode * 59 + this.CapitalSnake.GetHashCode(); - if (this.SCAETHFlowPoints != null) - hashCode = hashCode * 59 + this.SCAETHFlowPoints.GetHashCode(); - if (this.ATT_NAME != null) - hashCode = hashCode * 59 + this.ATT_NAME.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Cat.cs deleted file mode 100644 index 6f283567bf5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Cat.cs +++ /dev/null @@ -1,118 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Cat - /// - [DataContract] - public partial class Cat : Animal, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Cat() { } - /// - /// Initializes a new instance of the class. - /// - /// declawed. - public Cat(bool declawed = default(bool), string className = "Cat", string color = "red") : base(className, color) - { - this.Declawed = declawed; - } - - /// - /// Gets or Sets Declawed - /// - [DataMember(Name="declawed", EmitDefaultValue=false)] - public bool Declawed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Cat {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Cat); - } - - /// - /// Returns true if Cat instances are equal - /// - /// Instance of Cat to be compared - /// Boolean - public bool Equals(Cat input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Declawed == input.Declawed || - (this.Declawed != null && - this.Declawed.Equals(input.Declawed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Declawed != null) - hashCode = hashCode * 59 + this.Declawed.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/CatAllOf.cs deleted file mode 100644 index 82278839b40..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/CatAllOf.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// CatAllOf - /// - [DataContract] - public partial class CatAllOf : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// declawed. - public CatAllOf(bool declawed = default(bool)) - { - this.Declawed = declawed; - } - - /// - /// Gets or Sets Declawed - /// - [DataMember(Name="declawed", EmitDefaultValue=false)] - public bool Declawed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class CatAllOf {\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CatAllOf); - } - - /// - /// Returns true if CatAllOf instances are equal - /// - /// Instance of CatAllOf to be compared - /// Boolean - public bool Equals(CatAllOf input) - { - if (input == null) - return false; - - return - ( - this.Declawed == input.Declawed || - (this.Declawed != null && - this.Declawed.Equals(input.Declawed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Declawed != null) - hashCode = hashCode * 59 + this.Declawed.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Category.cs deleted file mode 100644 index 6dd4b2c6f25..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Category.cs +++ /dev/null @@ -1,142 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Category - /// - [DataContract] - public partial class Category : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Category() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required) (default to "default-name"). - 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; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Category); - } - - /// - /// Returns true if Category instances are equal - /// - /// Instance of Category to be compared - /// Boolean - public bool Equals(Category input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ClassModel.cs deleted file mode 100644 index bf180e2fd3d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ClassModel.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Model for testing model with \"_class\" property - /// - [DataContract] - public partial class ClassModel : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// _class. - public ClassModel(string _class = default(string)) - { - this.Class = _class; - } - - /// - /// Gets or Sets Class - /// - [DataMember(Name="_class", EmitDefaultValue=false)] - public string Class { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ClassModel); - } - - /// - /// Returns true if ClassModel instances are equal - /// - /// Instance of ClassModel to be compared - /// Boolean - public bool Equals(ClassModel input) - { - if (input == null) - return false; - - return - ( - this.Class == input.Class || - (this.Class != null && - this.Class.Equals(input.Class)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Class != null) - hashCode = hashCode * 59 + this.Class.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Dog.cs deleted file mode 100644 index 75b18156018..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Dog.cs +++ /dev/null @@ -1,118 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Dog - /// - [DataContract] - public partial class Dog : Animal, IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Dog() { } - /// - /// Initializes a new instance of the class. - /// - /// breed. - public Dog(string breed = default(string), string className = "Dog", string color = "red") : base(className, color) - { - this.Breed = breed; - } - - /// - /// Gets or Sets Breed - /// - [DataMember(Name="breed", EmitDefaultValue=false)] - public string Breed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Dog {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Dog); - } - - /// - /// Returns true if Dog instances are equal - /// - /// Instance of Dog to be compared - /// Boolean - public bool Equals(Dog input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Breed == input.Breed || - (this.Breed != null && - this.Breed.Equals(input.Breed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Breed != null) - hashCode = hashCode * 59 + this.Breed.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/DogAllOf.cs deleted file mode 100644 index d4d0ee3f470..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/DogAllOf.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// DogAllOf - /// - [DataContract] - public partial class DogAllOf : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// breed. - public DogAllOf(string breed = default(string)) - { - this.Breed = breed; - } - - /// - /// Gets or Sets Breed - /// - [DataMember(Name="breed", EmitDefaultValue=false)] - public string Breed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class DogAllOf {\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DogAllOf); - } - - /// - /// Returns true if DogAllOf instances are equal - /// - /// Instance of DogAllOf to be compared - /// Boolean - public bool Equals(DogAllOf input) - { - if (input == null) - return false; - - return - ( - this.Breed == input.Breed || - (this.Breed != null && - this.Breed.Equals(input.Breed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Breed != null) - hashCode = hashCode * 59 + this.Breed.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/EnumArrays.cs deleted file mode 100644 index 4c0e96fd213..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/EnumArrays.cs +++ /dev/null @@ -1,170 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// EnumArrays - /// - [DataContract] - public partial class EnumArrays : IEquatable - { - /// - /// Defines JustSymbol - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum JustSymbolEnum - { - /// - /// Enum GreaterThanOrEqualTo for value: >= - /// - [EnumMember(Value = ">=")] - GreaterThanOrEqualTo = 1, - - /// - /// Enum Dollar for value: $ - /// - [EnumMember(Value = "$")] - Dollar = 2 - - } - - /// - /// Gets or Sets JustSymbol - /// - [DataMember(Name="just_symbol", EmitDefaultValue=false)] - public JustSymbolEnum? JustSymbol { get; set; } - /// - /// Defines ArrayEnum - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ArrayEnumEnum - { - /// - /// Enum Fish for value: fish - /// - [EnumMember(Value = "fish")] - Fish = 1, - - /// - /// Enum Crab for value: crab - /// - [EnumMember(Value = "crab")] - Crab = 2 - - } - - - /// - /// Gets or Sets ArrayEnum - /// - [DataMember(Name="array_enum", EmitDefaultValue=false)] - public List ArrayEnum { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// justSymbol. - /// arrayEnum. - public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) - { - this.JustSymbol = justSymbol; - this.ArrayEnum = arrayEnum; - } - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); - sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EnumArrays); - } - - /// - /// Returns true if EnumArrays instances are equal - /// - /// Instance of EnumArrays to be compared - /// Boolean - public bool Equals(EnumArrays input) - { - if (input == null) - return false; - - return - ( - this.JustSymbol == input.JustSymbol || - (this.JustSymbol != null && - this.JustSymbol.Equals(input.JustSymbol)) - ) && - ( - this.ArrayEnum == input.ArrayEnum || - this.ArrayEnum != null && - input.ArrayEnum != null && - this.ArrayEnum.SequenceEqual(input.ArrayEnum) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.JustSymbol != null) - hashCode = hashCode * 59 + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) - hashCode = hashCode * 59 + this.ArrayEnum.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/EnumClass.cs deleted file mode 100644 index 3f26d632378..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/EnumClass.cs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Defines EnumClass - /// - - [JsonConverter(typeof(StringEnumConverter))] - - public enum EnumClass - { - /// - /// Enum Abc for value: _abc - /// - [EnumMember(Value = "_abc")] - Abc = 1, - - /// - /// Enum Efg for value: -efg - /// - [EnumMember(Value = "-efg")] - Efg = 2, - - /// - /// Enum Xyz for value: (xyz) - /// - [EnumMember(Value = "(xyz)")] - Xyz = 3 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/EnumTest.cs deleted file mode 100644 index e234f80d68d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/EnumTest.cs +++ /dev/null @@ -1,279 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// EnumTest - /// - [DataContract] - public partial class EnumTest : IEquatable - { - /// - /// Defines EnumString - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumStringEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumString - /// - [DataMember(Name="enum_string", EmitDefaultValue=false)] - public EnumStringEnum? EnumString { get; set; } - /// - /// Defines EnumStringRequired - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumStringRequiredEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumStringRequired - /// - [DataMember(Name="enum_string_required", EmitDefaultValue=true)] - public EnumStringRequiredEnum EnumStringRequired { get; set; } - /// - /// Defines EnumInteger - /// - public enum EnumIntegerEnum - { - /// - /// Enum NUMBER_1 for value: 1 - /// - NUMBER_1 = 1, - - /// - /// Enum NUMBER_MINUS_1 for value: -1 - /// - NUMBER_MINUS_1 = -1 - - } - - /// - /// Gets or Sets EnumInteger - /// - [DataMember(Name="enum_integer", EmitDefaultValue=false)] - public EnumIntegerEnum? EnumInteger { get; set; } - /// - /// Defines EnumNumber - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumNumberEnum - { - /// - /// Enum NUMBER_1_DOT_1 for value: 1.1 - /// - [EnumMember(Value = "1.1")] - NUMBER_1_DOT_1 = 1, - - /// - /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2 - /// - [EnumMember(Value = "-1.2")] - NUMBER_MINUS_1_DOT_2 = 2 - - } - - /// - /// Gets or Sets EnumNumber - /// - [DataMember(Name="enum_number", EmitDefaultValue=false)] - public EnumNumberEnum? EnumNumber { get; set; } - /// - /// Gets or Sets OuterEnum - /// - [DataMember(Name="outerEnum", EmitDefaultValue=false)] - public OuterEnum? OuterEnum { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EnumTest() { } - /// - /// Initializes a new instance of the class. - /// - /// enumString. - /// enumStringRequired (required). - /// enumInteger. - /// enumNumber. - /// outerEnum. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?)) - { - // to ensure "enumStringRequired" is required (not null) - if (enumStringRequired == null) - { - throw new InvalidDataException("enumStringRequired is a required property for EnumTest and cannot be null"); - } - else - { - this.EnumStringRequired = enumStringRequired; - } - - this.EnumString = enumString; - this.EnumInteger = enumInteger; - this.EnumNumber = enumNumber; - this.OuterEnum = outerEnum; - } - - - - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class EnumTest {\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); - sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); - sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EnumTest); - } - - /// - /// Returns true if EnumTest instances are equal - /// - /// Instance of EnumTest to be compared - /// Boolean - public bool Equals(EnumTest input) - { - if (input == null) - return false; - - return - ( - this.EnumString == input.EnumString || - (this.EnumString != null && - this.EnumString.Equals(input.EnumString)) - ) && - ( - this.EnumStringRequired == input.EnumStringRequired || - (this.EnumStringRequired != null && - this.EnumStringRequired.Equals(input.EnumStringRequired)) - ) && - ( - this.EnumInteger == input.EnumInteger || - (this.EnumInteger != null && - this.EnumInteger.Equals(input.EnumInteger)) - ) && - ( - this.EnumNumber == input.EnumNumber || - (this.EnumNumber != null && - this.EnumNumber.Equals(input.EnumNumber)) - ) && - ( - this.OuterEnum == input.OuterEnum || - (this.OuterEnum != null && - this.OuterEnum.Equals(input.OuterEnum)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EnumString != null) - hashCode = hashCode * 59 + this.EnumString.GetHashCode(); - if (this.EnumStringRequired != null) - hashCode = hashCode * 59 + this.EnumStringRequired.GetHashCode(); - if (this.EnumInteger != null) - hashCode = hashCode * 59 + this.EnumInteger.GetHashCode(); - if (this.EnumNumber != null) - hashCode = hashCode * 59 + this.EnumNumber.GetHashCode(); - if (this.OuterEnum != null) - hashCode = hashCode * 59 + this.OuterEnum.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/File.cs deleted file mode 100644 index 8d182f792e8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/File.cs +++ /dev/null @@ -1,113 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Must be named `File` for test. - /// - [DataContract] - public partial class File : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// Test capitalization. - public File(string sourceURI = default(string)) - { - this.SourceURI = sourceURI; - } - - /// - /// Test capitalization - /// - /// Test capitalization - [DataMember(Name="sourceURI", EmitDefaultValue=false)] - public string SourceURI { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class File {\n"); - sb.Append(" SourceURI: ").Append(SourceURI).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as File); - } - - /// - /// Returns true if File instances are equal - /// - /// Instance of File to be compared - /// Boolean - public bool Equals(File input) - { - if (input == null) - return false; - - return - ( - this.SourceURI == input.SourceURI || - (this.SourceURI != null && - this.SourceURI.Equals(input.SourceURI)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SourceURI != null) - hashCode = hashCode * 59 + this.SourceURI.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs deleted file mode 100644 index 06713e9cd8e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ /dev/null @@ -1,129 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// FileSchemaTestClass - /// - [DataContract] - public partial class FileSchemaTestClass : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// file. - /// files. - public FileSchemaTestClass(File file = default(File), List files = default(List)) - { - this.File = file; - this.Files = files; - } - - /// - /// Gets or Sets File - /// - [DataMember(Name="file", EmitDefaultValue=false)] - public File File { get; set; } - - /// - /// Gets or Sets Files - /// - [DataMember(Name="files", EmitDefaultValue=false)] - public List Files { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class FileSchemaTestClass {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FileSchemaTestClass); - } - - /// - /// Returns true if FileSchemaTestClass instances are equal - /// - /// Instance of FileSchemaTestClass to be compared - /// Boolean - public bool Equals(FileSchemaTestClass input) - { - if (input == null) - return false; - - return - ( - this.File == input.File || - (this.File != null && - this.File.Equals(input.File)) - ) && - ( - this.Files == input.Files || - this.Files != null && - input.Files != null && - this.Files.SequenceEqual(input.Files) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.File != null) - hashCode = hashCode * 59 + this.File.GetHashCode(); - if (this.Files != null) - hashCode = hashCode * 59 + this.Files.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/FormatTest.cs deleted file mode 100644 index 8128f7a332c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/FormatTest.cs +++ /dev/null @@ -1,362 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// FormatTest - /// - [DataContract] - public partial class FormatTest : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FormatTest() { } - /// - /// Initializes a new instance of the class. - /// - /// integer. - /// int32. - /// int64. - /// number (required). - /// _float. - /// _double. - /// _string. - /// _byte (required). - /// binary. - /// date (required). - /// dateTime. - /// uuid. - /// password (required). - /// bigDecimal. - public FormatTest(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), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), decimal bigDecimal = default(decimal)) - { - // to ensure "number" is required (not null) - if (number == null) - { - throw new InvalidDataException("number is a required property for FormatTest and cannot be null"); - } - else - { - this.Number = number; - } - - // to ensure "_byte" is required (not null) - if (_byte == null) - { - throw new InvalidDataException("_byte is a required property for FormatTest and cannot be null"); - } - else - { - this.Byte = _byte; - } - - // to ensure "date" is required (not null) - if (date == null) - { - throw new InvalidDataException("date is a required property for FormatTest and cannot be null"); - } - else - { - this.Date = date; - } - - // to ensure "password" is required (not null) - if (password == null) - { - throw new InvalidDataException("password is a required property for FormatTest and cannot be null"); - } - else - { - this.Password = password; - } - - this.Integer = integer; - this.Int32 = int32; - this.Int64 = int64; - this.Float = _float; - this.Double = _double; - this.String = _string; - this.Binary = binary; - this.DateTime = dateTime; - this.Uuid = uuid; - this.BigDecimal = bigDecimal; - } - - /// - /// Gets or Sets Integer - /// - [DataMember(Name="integer", EmitDefaultValue=false)] - public int Integer { get; set; } - - /// - /// Gets or Sets Int32 - /// - [DataMember(Name="int32", EmitDefaultValue=false)] - public int Int32 { get; set; } - - /// - /// Gets or Sets Int64 - /// - [DataMember(Name="int64", EmitDefaultValue=false)] - public long Int64 { get; set; } - - /// - /// Gets or Sets Number - /// - [DataMember(Name="number", EmitDefaultValue=true)] - public decimal Number { get; set; } - - /// - /// Gets or Sets Float - /// - [DataMember(Name="float", EmitDefaultValue=false)] - public float Float { get; set; } - - /// - /// Gets or Sets Double - /// - [DataMember(Name="double", EmitDefaultValue=false)] - public double Double { get; set; } - - /// - /// Gets or Sets String - /// - [DataMember(Name="string", EmitDefaultValue=false)] - public string String { get; set; } - - /// - /// Gets or Sets Byte - /// - [DataMember(Name="byte", EmitDefaultValue=true)] - public byte[] Byte { get; set; } - - /// - /// Gets or Sets Binary - /// - [DataMember(Name="binary", EmitDefaultValue=false)] - public System.IO.Stream Binary { get; set; } - - /// - /// Gets or Sets Date - /// - [DataMember(Name="date", EmitDefaultValue=true)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime Date { get; set; } - - /// - /// Gets or Sets DateTime - /// - [DataMember(Name="dateTime", EmitDefaultValue=false)] - public DateTime DateTime { get; set; } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name="uuid", EmitDefaultValue=false)] - public Guid Uuid { get; set; } - - /// - /// Gets or Sets Password - /// - [DataMember(Name="password", EmitDefaultValue=true)] - public string Password { get; set; } - - /// - /// Gets or Sets BigDecimal - /// - [DataMember(Name="BigDecimal", EmitDefaultValue=false)] - public decimal BigDecimal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class FormatTest {\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(" 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(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" BigDecimal: ").Append(BigDecimal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FormatTest); - } - - /// - /// Returns true if FormatTest instances are equal - /// - /// Instance of FormatTest to be compared - /// Boolean - public bool Equals(FormatTest 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.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.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.BigDecimal == input.BigDecimal || - (this.BigDecimal != null && - this.BigDecimal.Equals(input.BigDecimal)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.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.Uuid != null) - hashCode = hashCode * 59 + this.Uuid.GetHashCode(); - if (this.Password != null) - hashCode = hashCode * 59 + this.Password.GetHashCode(); - if (this.BigDecimal != null) - hashCode = hashCode * 59 + this.BigDecimal.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs deleted file mode 100644 index d5afdb16cc7..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ /dev/null @@ -1,125 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// HasOnlyReadOnly - /// - [DataContract] - public partial class HasOnlyReadOnly : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - public HasOnlyReadOnly() - { - } - - /// - /// Gets or Sets Bar - /// - [DataMember(Name="bar", EmitDefaultValue=false)] - public string Bar { get; private set; } - - /// - /// Gets or Sets Foo - /// - [DataMember(Name="foo", EmitDefaultValue=false)] - public string Foo { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class HasOnlyReadOnly {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Foo: ").Append(Foo).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HasOnlyReadOnly); - } - - /// - /// Returns true if HasOnlyReadOnly instances are equal - /// - /// Instance of HasOnlyReadOnly to be compared - /// Boolean - public bool Equals(HasOnlyReadOnly input) - { - if (input == null) - return false; - - return - ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) - ) && - ( - this.Foo == input.Foo || - (this.Foo != null && - this.Foo.Equals(input.Foo)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bar != null) - hashCode = hashCode * 59 + this.Bar.GetHashCode(); - if (this.Foo != null) - hashCode = hashCode * 59 + this.Foo.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/List.cs deleted file mode 100644 index fd3153ee90b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/List.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// List - /// - [DataContract] - public partial class List : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// _123list. - public List(string _123list = default(string)) - { - this._123List = _123list; - } - - /// - /// Gets or Sets _123List - /// - [DataMember(Name="123-list", EmitDefaultValue=false)] - public string _123List { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class List {\n"); - sb.Append(" _123List: ").Append(_123List).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as List); - } - - /// - /// Returns true if List instances are equal - /// - /// Instance of List to be compared - /// Boolean - public bool Equals(List input) - { - if (input == null) - return false; - - return - ( - this._123List == input._123List || - (this._123List != null && - this._123List.Equals(input._123List)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._123List != null) - hashCode = hashCode * 59 + this._123List.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/MapTest.cs deleted file mode 100644 index 3c76047cfb6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/MapTest.cs +++ /dev/null @@ -1,185 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// MapTest - /// - [DataContract] - public partial class MapTest : IEquatable - { - /// - /// Defines Inner - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum InnerEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2 - - } - - - /// - /// Gets or Sets MapOfEnumString - /// - [DataMember(Name="map_of_enum_string", EmitDefaultValue=false)] - public Dictionary MapOfEnumString { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// mapMapOfString. - /// mapOfEnumString. - /// directMap. - /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) - { - this.MapMapOfString = mapMapOfString; - this.MapOfEnumString = mapOfEnumString; - this.DirectMap = directMap; - this.IndirectMap = indirectMap; - } - - /// - /// Gets or Sets MapMapOfString - /// - [DataMember(Name="map_map_of_string", EmitDefaultValue=false)] - public Dictionary> MapMapOfString { get; set; } - - - /// - /// Gets or Sets DirectMap - /// - [DataMember(Name="direct_map", EmitDefaultValue=false)] - public Dictionary DirectMap { get; set; } - - /// - /// Gets or Sets IndirectMap - /// - [DataMember(Name="indirect_map", EmitDefaultValue=false)] - public Dictionary IndirectMap { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); - sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); - sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MapTest); - } - - /// - /// Returns true if MapTest instances are equal - /// - /// Instance of MapTest to be compared - /// Boolean - public bool Equals(MapTest input) - { - if (input == null) - return false; - - return - ( - this.MapMapOfString == input.MapMapOfString || - this.MapMapOfString != null && - input.MapMapOfString != null && - this.MapMapOfString.SequenceEqual(input.MapMapOfString) - ) && - ( - this.MapOfEnumString == input.MapOfEnumString || - this.MapOfEnumString != null && - input.MapOfEnumString != null && - this.MapOfEnumString.SequenceEqual(input.MapOfEnumString) - ) && - ( - this.DirectMap == input.DirectMap || - this.DirectMap != null && - input.DirectMap != null && - this.DirectMap.SequenceEqual(input.DirectMap) - ) && - ( - this.IndirectMap == input.IndirectMap || - this.IndirectMap != null && - input.IndirectMap != null && - this.IndirectMap.SequenceEqual(input.IndirectMap) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapMapOfString != null) - hashCode = hashCode * 59 + this.MapMapOfString.GetHashCode(); - if (this.MapOfEnumString != null) - hashCode = hashCode * 59 + this.MapOfEnumString.GetHashCode(); - if (this.DirectMap != null) - hashCode = hashCode * 59 + this.DirectMap.GetHashCode(); - if (this.IndirectMap != null) - hashCode = hashCode * 59 + this.IndirectMap.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs deleted file mode 100644 index 3ec46aea273..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ /dev/null @@ -1,145 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// MixedPropertiesAndAdditionalPropertiesClass - /// - [DataContract] - public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// uuid. - /// dateTime. - /// map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) - { - this.Uuid = uuid; - this.DateTime = dateTime; - this.Map = map; - } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name="uuid", EmitDefaultValue=false)] - public Guid Uuid { get; set; } - - /// - /// Gets or Sets DateTime - /// - [DataMember(Name="dateTime", EmitDefaultValue=false)] - public DateTime DateTime { get; set; } - - /// - /// Gets or Sets Map - /// - [DataMember(Name="map", EmitDefaultValue=false)] - public Dictionary Map { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Map: ").Append(Map).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MixedPropertiesAndAdditionalPropertiesClass); - } - - /// - /// Returns true if MixedPropertiesAndAdditionalPropertiesClass instances are equal - /// - /// Instance of MixedPropertiesAndAdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(MixedPropertiesAndAdditionalPropertiesClass input) - { - if (input == null) - return false; - - return - ( - this.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) - ) && - ( - this.DateTime == input.DateTime || - (this.DateTime != null && - this.DateTime.Equals(input.DateTime)) - ) && - ( - this.Map == input.Map || - this.Map != null && - input.Map != null && - this.Map.SequenceEqual(input.Map) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uuid != null) - hashCode = hashCode * 59 + this.Uuid.GetHashCode(); - if (this.DateTime != null) - hashCode = hashCode * 59 + this.DateTime.GetHashCode(); - if (this.Map != null) - hashCode = hashCode * 59 + this.Map.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Model200Response.cs deleted file mode 100644 index 9b18e50452d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Model200Response.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Model for testing model name starting with number - /// - [DataContract] - public partial class Model200Response : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// name. - /// _class. - public Model200Response(int name = default(int), string _class = default(string)) - { - this.Name = name; - this.Class = _class; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public int Name { get; set; } - - /// - /// Gets or Sets Class - /// - [DataMember(Name="class", EmitDefaultValue=false)] - public string Class { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Model200Response {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Model200Response); - } - - /// - /// Returns true if Model200Response instances are equal - /// - /// Instance of Model200Response to be compared - /// Boolean - public bool Equals(Model200Response input) - { - if (input == null) - return false; - - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Class == input.Class || - (this.Class != null && - this.Class.Equals(input.Class)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.Class != null) - hashCode = hashCode * 59 + this.Class.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ModelClient.cs deleted file mode 100644 index 8636e753b29..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ModelClient.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// ModelClient - /// - [DataContract] - public partial class ModelClient : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// _client. - public ModelClient(string _client = default(string)) - { - this.__Client = _client; - } - - /// - /// Gets or Sets __Client - /// - [DataMember(Name="client", EmitDefaultValue=false)] - public string __Client { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ModelClient {\n"); - sb.Append(" __Client: ").Append(__Client).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ModelClient); - } - - /// - /// Returns true if ModelClient instances are equal - /// - /// Instance of ModelClient to be compared - /// Boolean - public bool Equals(ModelClient input) - { - if (input == null) - return false; - - return - ( - this.__Client == input.__Client || - (this.__Client != null && - this.__Client.Equals(input.__Client)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.__Client != null) - hashCode = hashCode * 59 + this.__Client.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Name.cs deleted file mode 100644 index 64fdd861b64..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Name.cs +++ /dev/null @@ -1,170 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Model for testing model name same as property name - /// - [DataContract] - public partial class Name : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Name() { } - /// - /// Initializes a new instance of the class. - /// - /// name (required). - /// property. - public Name(int name = default(int), string property = default(string)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Name and cannot be null"); - } - else - { - this._Name = name; - } - - this.Property = property; - } - - /// - /// Gets or Sets _Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public int _Name { get; set; } - - /// - /// Gets or Sets SnakeCase - /// - [DataMember(Name="snake_case", EmitDefaultValue=false)] - public int SnakeCase { get; private set; } - - /// - /// Gets or Sets Property - /// - [DataMember(Name="property", EmitDefaultValue=false)] - public string Property { get; set; } - - /// - /// Gets or Sets _123Number - /// - [DataMember(Name="123Number", EmitDefaultValue=false)] - public int _123Number { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Name {\n"); - sb.Append(" _Name: ").Append(_Name).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); - sb.Append(" Property: ").Append(Property).Append("\n"); - sb.Append(" _123Number: ").Append(_123Number).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Name); - } - - /// - /// Returns true if Name instances are equal - /// - /// Instance of Name to be compared - /// Boolean - public bool Equals(Name input) - { - if (input == null) - return false; - - return - ( - this._Name == input._Name || - (this._Name != null && - this._Name.Equals(input._Name)) - ) && - ( - this.SnakeCase == input.SnakeCase || - (this.SnakeCase != null && - this.SnakeCase.Equals(input.SnakeCase)) - ) && - ( - this.Property == input.Property || - (this.Property != null && - this.Property.Equals(input.Property)) - ) && - ( - this._123Number == input._123Number || - (this._123Number != null && - this._123Number.Equals(input._123Number)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.SnakeCase != null) - hashCode = hashCode * 59 + this.SnakeCase.GetHashCode(); - if (this.Property != null) - hashCode = hashCode * 59 + this.Property.GetHashCode(); - if (this._123Number != null) - hashCode = hashCode * 59 + this._123Number.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/NumberOnly.cs deleted file mode 100644 index a9d51b7970e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/NumberOnly.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// NumberOnly - /// - [DataContract] - public partial class NumberOnly : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// justNumber. - public NumberOnly(decimal justNumber = default(decimal)) - { - this.JustNumber = justNumber; - } - - /// - /// Gets or Sets JustNumber - /// - [DataMember(Name="JustNumber", EmitDefaultValue=false)] - public decimal JustNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class NumberOnly {\n"); - sb.Append(" JustNumber: ").Append(JustNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NumberOnly); - } - - /// - /// Returns true if NumberOnly instances are equal - /// - /// Instance of NumberOnly to be compared - /// Boolean - public bool Equals(NumberOnly input) - { - if (input == null) - return false; - - return - ( - this.JustNumber == input.JustNumber || - (this.JustNumber != null && - this.JustNumber.Equals(input.JustNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.JustNumber != null) - hashCode = hashCode * 59 + this.JustNumber.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Order.cs deleted file mode 100644 index 18736e60d77..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Order.cs +++ /dev/null @@ -1,228 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Order - /// - [DataContract] - public partial class Order : IEquatable - { - /// - /// Order Status - /// - /// Order Status - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Placed for value: placed - /// - [EnumMember(Value = "placed")] - Placed = 1, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 2, - - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 3 - - } - - /// - /// Order Status - /// - /// Order Status - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// petId. - /// quantity. - /// shipDate. - /// Order Status. - /// complete (default to false). - public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) - { - this.Id = id; - this.PetId = petId; - this.Quantity = quantity; - this.ShipDate = shipDate; - this.Status = status; - // use default value if no "complete" provided - if (complete == null) - { - this.Complete = false; - } - else - { - this.Complete = complete; - } - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets PetId - /// - [DataMember(Name="petId", EmitDefaultValue=false)] - public long PetId { get; set; } - - /// - /// Gets or Sets Quantity - /// - [DataMember(Name="quantity", EmitDefaultValue=false)] - public int Quantity { get; set; } - - /// - /// Gets or Sets ShipDate - /// - [DataMember(Name="shipDate", EmitDefaultValue=false)] - public DateTime ShipDate { get; set; } - - - /// - /// Gets or Sets Complete - /// - [DataMember(Name="complete", EmitDefaultValue=false)] - public bool Complete { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Order {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Order); - } - - /// - /// Returns true if Order instances are equal - /// - /// Instance of Order to be compared - /// Boolean - public bool Equals(Order input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PetId == input.PetId || - (this.PetId != null && - this.PetId.Equals(input.PetId)) - ) && - ( - this.Quantity == input.Quantity || - (this.Quantity != null && - this.Quantity.Equals(input.Quantity)) - ) && - ( - this.ShipDate == input.ShipDate || - (this.ShipDate != null && - this.ShipDate.Equals(input.ShipDate)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.Complete == input.Complete || - (this.Complete != null && - this.Complete.Equals(input.Complete)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.PetId != null) - hashCode = hashCode * 59 + this.PetId.GetHashCode(); - if (this.Quantity != null) - hashCode = hashCode * 59 + this.Quantity.GetHashCode(); - if (this.ShipDate != null) - hashCode = hashCode * 59 + this.ShipDate.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - if (this.Complete != null) - hashCode = hashCode * 59 + this.Complete.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/OuterComposite.cs deleted file mode 100644 index 6b378405b74..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/OuterComposite.cs +++ /dev/null @@ -1,144 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// OuterComposite - /// - [DataContract] - public partial class OuterComposite : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// myNumber. - /// myString. - /// myBoolean. - public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) - { - this.MyNumber = myNumber; - this.MyString = myString; - this.MyBoolean = myBoolean; - } - - /// - /// Gets or Sets MyNumber - /// - [DataMember(Name="my_number", EmitDefaultValue=false)] - public decimal MyNumber { get; set; } - - /// - /// Gets or Sets MyString - /// - [DataMember(Name="my_string", EmitDefaultValue=false)] - public string MyString { get; set; } - - /// - /// Gets or Sets MyBoolean - /// - [DataMember(Name="my_boolean", EmitDefaultValue=false)] - public bool MyBoolean { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class OuterComposite {\n"); - sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); - sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OuterComposite); - } - - /// - /// Returns true if OuterComposite instances are equal - /// - /// Instance of OuterComposite to be compared - /// Boolean - public bool Equals(OuterComposite input) - { - if (input == null) - return false; - - return - ( - this.MyNumber == input.MyNumber || - (this.MyNumber != null && - this.MyNumber.Equals(input.MyNumber)) - ) && - ( - this.MyString == input.MyString || - (this.MyString != null && - this.MyString.Equals(input.MyString)) - ) && - ( - this.MyBoolean == input.MyBoolean || - (this.MyBoolean != null && - this.MyBoolean.Equals(input.MyBoolean)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MyNumber != null) - hashCode = hashCode * 59 + this.MyNumber.GetHashCode(); - if (this.MyString != null) - hashCode = hashCode * 59 + this.MyString.GetHashCode(); - if (this.MyBoolean != null) - hashCode = hashCode * 59 + this.MyBoolean.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/OuterEnum.cs deleted file mode 100644 index 38f979216b7..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/OuterEnum.cs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Defines OuterEnum - /// - - [JsonConverter(typeof(StringEnumConverter))] - - public enum OuterEnum - { - /// - /// Enum Placed for value: placed - /// - [EnumMember(Value = "placed")] - Placed = 1, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 2, - - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 3 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Pet.cs deleted file mode 100644 index ac454a7840a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Pet.cs +++ /dev/null @@ -1,245 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Pet - /// - [DataContract] - public partial class Pet : IEquatable - { - /// - /// pet status in the store - /// - /// pet status in the store - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Available for value: available - /// - [EnumMember(Value = "available")] - Available = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2, - - /// - /// Enum Sold for value: sold - /// - [EnumMember(Value = "sold")] - Sold = 3 - - } - - /// - /// pet status in the store - /// - /// pet status in the store - [DataMember(Name="status", EmitDefaultValue=false)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Pet() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// category. - /// name (required). - /// photoUrls (required). - /// tags. - /// pet status in the store. - public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Pet and cannot be null"); - } - else - { - this.Name = name; - } - - // to ensure "photoUrls" is required (not null) - if (photoUrls == null) - { - throw new InvalidDataException("photoUrls is a required property for Pet and cannot be null"); - } - else - { - this.PhotoUrls = photoUrls; - } - - this.Id = id; - this.Category = category; - this.Tags = tags; - this.Status = status; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Category - /// - [DataMember(Name="category", EmitDefaultValue=false)] - public Category Category { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Gets or Sets PhotoUrls - /// - [DataMember(Name="photoUrls", EmitDefaultValue=true)] - public List PhotoUrls { get; set; } - - /// - /// Gets or Sets Tags - /// - [DataMember(Name="tags", EmitDefaultValue=false)] - public List Tags { get; set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Pet); - } - - /// - /// Returns true if Pet instances are equal - /// - /// Instance of Pet to be compared - /// Boolean - public bool Equals(Pet input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Category == input.Category || - (this.Category != null && - this.Category.Equals(input.Category)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PhotoUrls == input.PhotoUrls || - this.PhotoUrls != null && - input.PhotoUrls != null && - this.PhotoUrls.SequenceEqual(input.PhotoUrls) - ) && - ( - this.Tags == input.Tags || - this.Tags != null && - input.Tags != null && - this.Tags.SequenceEqual(input.Tags) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Category != null) - hashCode = hashCode * 59 + this.Category.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.PhotoUrls != null) - hashCode = hashCode * 59 + this.PhotoUrls.GetHashCode(); - if (this.Tags != null) - hashCode = hashCode * 59 + this.Tags.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs deleted file mode 100644 index 8b66e4f7dd2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ /dev/null @@ -1,126 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// ReadOnlyFirst - /// - [DataContract] - public partial class ReadOnlyFirst : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// baz. - public ReadOnlyFirst(string baz = default(string)) - { - this.Baz = baz; - } - - /// - /// Gets or Sets Bar - /// - [DataMember(Name="bar", EmitDefaultValue=false)] - public string Bar { get; private set; } - - /// - /// Gets or Sets Baz - /// - [DataMember(Name="baz", EmitDefaultValue=false)] - public string Baz { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ReadOnlyFirst {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Baz: ").Append(Baz).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReadOnlyFirst); - } - - /// - /// Returns true if ReadOnlyFirst instances are equal - /// - /// Instance of ReadOnlyFirst to be compared - /// Boolean - public bool Equals(ReadOnlyFirst input) - { - if (input == null) - return false; - - return - ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) - ) && - ( - this.Baz == input.Baz || - (this.Baz != null && - this.Baz.Equals(input.Baz)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bar != null) - hashCode = hashCode * 59 + this.Bar.GetHashCode(); - if (this.Baz != null) - hashCode = hashCode * 59 + this.Baz.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Return.cs deleted file mode 100644 index 3fac5a53eb7..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Return.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Model for testing reserved words - /// - [DataContract] - public partial class Return : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// _return. - public Return(int _return = default(int)) - { - this._Return = _return; - } - - /// - /// Gets or Sets _Return - /// - [DataMember(Name="return", EmitDefaultValue=false)] - public int _Return { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Return {\n"); - sb.Append(" _Return: ").Append(_Return).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Return); - } - - /// - /// Returns true if Return instances are equal - /// - /// Instance of Return to be compared - /// Boolean - public bool Equals(Return input) - { - if (input == null) - return false; - - return - ( - this._Return == input._Return || - (this._Return != null && - this._Return.Equals(input._Return)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._Return != null) - hashCode = hashCode * 59 + this._Return.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/SpecialModelName.cs deleted file mode 100644 index e16b6bfc0e8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// SpecialModelName - /// - [DataContract] - public partial class SpecialModelName : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// specialPropertyName. - public SpecialModelName(long specialPropertyName = default(long)) - { - this.SpecialPropertyName = specialPropertyName; - } - - /// - /// Gets or Sets SpecialPropertyName - /// - [DataMember(Name="$special[property.name]", EmitDefaultValue=false)] - public long SpecialPropertyName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SpecialModelName); - } - - /// - /// Returns true if SpecialModelName instances are equal - /// - /// Instance of SpecialModelName to be compared - /// Boolean - public bool Equals(SpecialModelName input) - { - if (input == null) - return false; - - return - ( - this.SpecialPropertyName == input.SpecialPropertyName || - (this.SpecialPropertyName != null && - this.SpecialPropertyName.Equals(input.SpecialPropertyName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SpecialPropertyName != null) - hashCode = hashCode * 59 + this.SpecialPropertyName.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Tag.cs deleted file mode 100644 index f5017864dec..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/Tag.cs +++ /dev/null @@ -1,128 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// Tag - /// - [DataContract] - public partial class Tag : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - public Tag(long id = default(long), string name = default(string)) - { - this.Id = id; - this.Name = name; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Tag); - } - - /// - /// Returns true if Tag instances are equal - /// - /// Instance of Tag to be compared - /// Boolean - public bool Equals(Tag input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderDefault.cs deleted file mode 100644 index 8dcfb5aee00..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderDefault.cs +++ /dev/null @@ -1,227 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// TypeHolderDefault - /// - [DataContract] - public partial class TypeHolderDefault : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TypeHolderDefault() { } - /// - /// Initializes a new instance of the class. - /// - /// stringItem (required) (default to "what"). - /// numberItem (required). - /// integerItem (required). - /// boolItem (required) (default to true). - /// arrayItem (required). - public TypeHolderDefault(string stringItem = "what", decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = true, List arrayItem = default(List)) - { - // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - - // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - - } - - /// - /// Gets or Sets StringItem - /// - [DataMember(Name="string_item", EmitDefaultValue=true)] - public string StringItem { get; set; } - - /// - /// Gets or Sets NumberItem - /// - [DataMember(Name="number_item", EmitDefaultValue=true)] - public decimal NumberItem { get; set; } - - /// - /// Gets or Sets IntegerItem - /// - [DataMember(Name="integer_item", EmitDefaultValue=true)] - public int IntegerItem { get; set; } - - /// - /// Gets or Sets BoolItem - /// - [DataMember(Name="bool_item", EmitDefaultValue=true)] - public bool BoolItem { get; set; } - - /// - /// Gets or Sets ArrayItem - /// - [DataMember(Name="array_item", EmitDefaultValue=true)] - public List ArrayItem { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TypeHolderDefault {\n"); - sb.Append(" StringItem: ").Append(StringItem).Append("\n"); - sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); - sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); - sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); - sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TypeHolderDefault); - } - - /// - /// Returns true if TypeHolderDefault instances are equal - /// - /// Instance of TypeHolderDefault to be compared - /// Boolean - public bool Equals(TypeHolderDefault input) - { - if (input == null) - return false; - - return - ( - this.StringItem == input.StringItem || - (this.StringItem != null && - this.StringItem.Equals(input.StringItem)) - ) && - ( - this.NumberItem == input.NumberItem || - (this.NumberItem != null && - this.NumberItem.Equals(input.NumberItem)) - ) && - ( - this.IntegerItem == input.IntegerItem || - (this.IntegerItem != null && - this.IntegerItem.Equals(input.IntegerItem)) - ) && - ( - this.BoolItem == input.BoolItem || - (this.BoolItem != null && - this.BoolItem.Equals(input.BoolItem)) - ) && - ( - this.ArrayItem == input.ArrayItem || - this.ArrayItem != null && - input.ArrayItem != null && - this.ArrayItem.SequenceEqual(input.ArrayItem) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.StringItem != null) - hashCode = hashCode * 59 + this.StringItem.GetHashCode(); - if (this.NumberItem != null) - hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); - if (this.IntegerItem != null) - hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); - if (this.BoolItem != null) - hashCode = hashCode * 59 + this.BoolItem.GetHashCode(); - if (this.ArrayItem != null) - hashCode = hashCode * 59 + this.ArrayItem.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderExample.cs deleted file mode 100644 index 74fdf9563a8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ /dev/null @@ -1,252 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// TypeHolderExample - /// - [DataContract] - public partial class TypeHolderExample : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TypeHolderExample() { } - /// - /// Initializes a new instance of the class. - /// - /// stringItem (required). - /// numberItem (required). - /// floatItem (required). - /// integerItem (required). - /// boolItem (required). - /// arrayItem (required). - public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) - { - // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "floatItem" is required (not null) - if (floatItem == null) - { - throw new InvalidDataException("floatItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.FloatItem = floatItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - - // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - - } - - /// - /// Gets or Sets StringItem - /// - [DataMember(Name="string_item", EmitDefaultValue=true)] - public string StringItem { get; set; } - - /// - /// Gets or Sets NumberItem - /// - [DataMember(Name="number_item", EmitDefaultValue=true)] - public decimal NumberItem { get; set; } - - /// - /// Gets or Sets FloatItem - /// - [DataMember(Name="float_item", EmitDefaultValue=true)] - public float FloatItem { get; set; } - - /// - /// Gets or Sets IntegerItem - /// - [DataMember(Name="integer_item", EmitDefaultValue=true)] - public int IntegerItem { get; set; } - - /// - /// Gets or Sets BoolItem - /// - [DataMember(Name="bool_item", EmitDefaultValue=true)] - public bool BoolItem { get; set; } - - /// - /// Gets or Sets ArrayItem - /// - [DataMember(Name="array_item", EmitDefaultValue=true)] - public List ArrayItem { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TypeHolderExample {\n"); - sb.Append(" StringItem: ").Append(StringItem).Append("\n"); - sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); - sb.Append(" FloatItem: ").Append(FloatItem).Append("\n"); - sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); - sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); - sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TypeHolderExample); - } - - /// - /// Returns true if TypeHolderExample instances are equal - /// - /// Instance of TypeHolderExample to be compared - /// Boolean - public bool Equals(TypeHolderExample input) - { - if (input == null) - return false; - - return - ( - this.StringItem == input.StringItem || - (this.StringItem != null && - this.StringItem.Equals(input.StringItem)) - ) && - ( - this.NumberItem == input.NumberItem || - (this.NumberItem != null && - this.NumberItem.Equals(input.NumberItem)) - ) && - ( - this.FloatItem == input.FloatItem || - (this.FloatItem != null && - this.FloatItem.Equals(input.FloatItem)) - ) && - ( - this.IntegerItem == input.IntegerItem || - (this.IntegerItem != null && - this.IntegerItem.Equals(input.IntegerItem)) - ) && - ( - this.BoolItem == input.BoolItem || - (this.BoolItem != null && - this.BoolItem.Equals(input.BoolItem)) - ) && - ( - this.ArrayItem == input.ArrayItem || - this.ArrayItem != null && - input.ArrayItem != null && - this.ArrayItem.SequenceEqual(input.ArrayItem) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.StringItem != null) - hashCode = hashCode * 59 + this.StringItem.GetHashCode(); - if (this.NumberItem != null) - hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); - if (this.FloatItem != null) - hashCode = hashCode * 59 + this.FloatItem.GetHashCode(); - if (this.IntegerItem != null) - hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); - if (this.BoolItem != null) - hashCode = hashCode * 59 + this.BoolItem.GetHashCode(); - if (this.ArrayItem != null) - hashCode = hashCode * 59 + this.ArrayItem.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/User.cs deleted file mode 100644 index 7d119882806..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/User.cs +++ /dev/null @@ -1,225 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// User - /// - [DataContract] - public partial class User : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// username. - /// firstName. - /// lastName. - /// email. - /// password. - /// phone. - /// User Status. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int)) - { - this.Id = id; - this.Username = username; - this.FirstName = firstName; - this.LastName = lastName; - this.Email = email; - this.Password = password; - this.Phone = phone; - this.UserStatus = userStatus; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=false)] - public long Id { get; set; } - - /// - /// Gets or Sets Username - /// - [DataMember(Name="username", EmitDefaultValue=false)] - public string Username { get; set; } - - /// - /// Gets or Sets FirstName - /// - [DataMember(Name="firstName", EmitDefaultValue=false)] - public string FirstName { get; set; } - - /// - /// Gets or Sets LastName - /// - [DataMember(Name="lastName", EmitDefaultValue=false)] - public string LastName { get; set; } - - /// - /// Gets or Sets Email - /// - [DataMember(Name="email", EmitDefaultValue=false)] - public string Email { get; set; } - - /// - /// Gets or Sets Password - /// - [DataMember(Name="password", EmitDefaultValue=false)] - public string Password { get; set; } - - /// - /// Gets or Sets Phone - /// - [DataMember(Name="phone", EmitDefaultValue=false)] - public string Phone { get; set; } - - /// - /// User Status - /// - /// User Status - [DataMember(Name="userStatus", EmitDefaultValue=false)] - public int UserStatus { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as User); - } - - /// - /// Returns true if User instances are equal - /// - /// Instance of User to be compared - /// Boolean - public bool Equals(User input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.UserStatus == input.UserStatus || - (this.UserStatus != null && - this.UserStatus.Equals(input.UserStatus)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Username != null) - hashCode = hashCode * 59 + this.Username.GetHashCode(); - if (this.FirstName != null) - hashCode = hashCode * 59 + this.FirstName.GetHashCode(); - if (this.LastName != null) - hashCode = hashCode * 59 + this.LastName.GetHashCode(); - if (this.Email != null) - hashCode = hashCode * 59 + this.Email.GetHashCode(); - if (this.Password != null) - hashCode = hashCode * 59 + this.Password.GetHashCode(); - if (this.Phone != null) - hashCode = hashCode * 59 + this.Phone.GetHashCode(); - if (this.UserStatus != null) - hashCode = hashCode * 59 + this.UserStatus.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/XmlItem.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/XmlItem.cs deleted file mode 100644 index 280eedb3ad0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Model/XmlItem.cs +++ /dev/null @@ -1,569 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.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 -{ - /// - /// XmlItem - /// - [DataContract] - public partial class XmlItem : IEquatable - { - /// - /// Initializes a new instance of the class. - /// - /// attributeString. - /// attributeNumber. - /// attributeInteger. - /// attributeBoolean. - /// wrappedArray. - /// nameString. - /// nameNumber. - /// nameInteger. - /// nameBoolean. - /// nameArray. - /// nameWrappedArray. - /// prefixString. - /// prefixNumber. - /// prefixInteger. - /// prefixBoolean. - /// prefixArray. - /// prefixWrappedArray. - /// namespaceString. - /// namespaceNumber. - /// namespaceInteger. - /// namespaceBoolean. - /// namespaceArray. - /// namespaceWrappedArray. - /// prefixNsString. - /// prefixNsNumber. - /// prefixNsInteger. - /// prefixNsBoolean. - /// prefixNsArray. - /// prefixNsWrappedArray. - public XmlItem(string attributeString = default(string), decimal attributeNumber = default(decimal), int attributeInteger = default(int), bool attributeBoolean = default(bool), List wrappedArray = default(List), string nameString = default(string), decimal nameNumber = default(decimal), int nameInteger = default(int), bool nameBoolean = default(bool), List nameArray = default(List), List nameWrappedArray = default(List), string prefixString = default(string), decimal prefixNumber = default(decimal), int prefixInteger = default(int), bool prefixBoolean = default(bool), List prefixArray = default(List), List prefixWrappedArray = default(List), string namespaceString = default(string), decimal namespaceNumber = default(decimal), int namespaceInteger = default(int), bool namespaceBoolean = default(bool), List namespaceArray = default(List), List namespaceWrappedArray = default(List), string prefixNsString = default(string), decimal prefixNsNumber = default(decimal), int prefixNsInteger = default(int), bool prefixNsBoolean = default(bool), List prefixNsArray = default(List), List prefixNsWrappedArray = default(List)) - { - this.AttributeString = attributeString; - this.AttributeNumber = attributeNumber; - this.AttributeInteger = attributeInteger; - this.AttributeBoolean = attributeBoolean; - this.WrappedArray = wrappedArray; - this.NameString = nameString; - this.NameNumber = nameNumber; - this.NameInteger = nameInteger; - this.NameBoolean = nameBoolean; - this.NameArray = nameArray; - this.NameWrappedArray = nameWrappedArray; - this.PrefixString = prefixString; - this.PrefixNumber = prefixNumber; - this.PrefixInteger = prefixInteger; - this.PrefixBoolean = prefixBoolean; - this.PrefixArray = prefixArray; - this.PrefixWrappedArray = prefixWrappedArray; - this.NamespaceString = namespaceString; - this.NamespaceNumber = namespaceNumber; - this.NamespaceInteger = namespaceInteger; - this.NamespaceBoolean = namespaceBoolean; - this.NamespaceArray = namespaceArray; - this.NamespaceWrappedArray = namespaceWrappedArray; - this.PrefixNsString = prefixNsString; - this.PrefixNsNumber = prefixNsNumber; - this.PrefixNsInteger = prefixNsInteger; - this.PrefixNsBoolean = prefixNsBoolean; - this.PrefixNsArray = prefixNsArray; - this.PrefixNsWrappedArray = prefixNsWrappedArray; - } - - /// - /// Gets or Sets AttributeString - /// - [DataMember(Name="attribute_string", EmitDefaultValue=false)] - public string AttributeString { get; set; } - - /// - /// Gets or Sets AttributeNumber - /// - [DataMember(Name="attribute_number", EmitDefaultValue=false)] - public decimal AttributeNumber { get; set; } - - /// - /// Gets or Sets AttributeInteger - /// - [DataMember(Name="attribute_integer", EmitDefaultValue=false)] - public int AttributeInteger { get; set; } - - /// - /// Gets or Sets AttributeBoolean - /// - [DataMember(Name="attribute_boolean", EmitDefaultValue=false)] - public bool AttributeBoolean { get; set; } - - /// - /// Gets or Sets WrappedArray - /// - [DataMember(Name="wrapped_array", EmitDefaultValue=false)] - public List WrappedArray { get; set; } - - /// - /// Gets or Sets NameString - /// - [DataMember(Name="name_string", EmitDefaultValue=false)] - public string NameString { get; set; } - - /// - /// Gets or Sets NameNumber - /// - [DataMember(Name="name_number", EmitDefaultValue=false)] - public decimal NameNumber { get; set; } - - /// - /// Gets or Sets NameInteger - /// - [DataMember(Name="name_integer", EmitDefaultValue=false)] - public int NameInteger { get; set; } - - /// - /// Gets or Sets NameBoolean - /// - [DataMember(Name="name_boolean", EmitDefaultValue=false)] - public bool NameBoolean { get; set; } - - /// - /// Gets or Sets NameArray - /// - [DataMember(Name="name_array", EmitDefaultValue=false)] - public List NameArray { get; set; } - - /// - /// Gets or Sets NameWrappedArray - /// - [DataMember(Name="name_wrapped_array", EmitDefaultValue=false)] - public List NameWrappedArray { get; set; } - - /// - /// Gets or Sets PrefixString - /// - [DataMember(Name="prefix_string", EmitDefaultValue=false)] - public string PrefixString { get; set; } - - /// - /// Gets or Sets PrefixNumber - /// - [DataMember(Name="prefix_number", EmitDefaultValue=false)] - public decimal PrefixNumber { get; set; } - - /// - /// Gets or Sets PrefixInteger - /// - [DataMember(Name="prefix_integer", EmitDefaultValue=false)] - public int PrefixInteger { get; set; } - - /// - /// Gets or Sets PrefixBoolean - /// - [DataMember(Name="prefix_boolean", EmitDefaultValue=false)] - public bool PrefixBoolean { get; set; } - - /// - /// Gets or Sets PrefixArray - /// - [DataMember(Name="prefix_array", EmitDefaultValue=false)] - public List PrefixArray { get; set; } - - /// - /// Gets or Sets PrefixWrappedArray - /// - [DataMember(Name="prefix_wrapped_array", EmitDefaultValue=false)] - public List PrefixWrappedArray { get; set; } - - /// - /// Gets or Sets NamespaceString - /// - [DataMember(Name="namespace_string", EmitDefaultValue=false)] - public string NamespaceString { get; set; } - - /// - /// Gets or Sets NamespaceNumber - /// - [DataMember(Name="namespace_number", EmitDefaultValue=false)] - public decimal NamespaceNumber { get; set; } - - /// - /// Gets or Sets NamespaceInteger - /// - [DataMember(Name="namespace_integer", EmitDefaultValue=false)] - public int NamespaceInteger { get; set; } - - /// - /// Gets or Sets NamespaceBoolean - /// - [DataMember(Name="namespace_boolean", EmitDefaultValue=false)] - public bool NamespaceBoolean { get; set; } - - /// - /// Gets or Sets NamespaceArray - /// - [DataMember(Name="namespace_array", EmitDefaultValue=false)] - public List NamespaceArray { get; set; } - - /// - /// Gets or Sets NamespaceWrappedArray - /// - [DataMember(Name="namespace_wrapped_array", EmitDefaultValue=false)] - public List NamespaceWrappedArray { get; set; } - - /// - /// Gets or Sets PrefixNsString - /// - [DataMember(Name="prefix_ns_string", EmitDefaultValue=false)] - public string PrefixNsString { get; set; } - - /// - /// Gets or Sets PrefixNsNumber - /// - [DataMember(Name="prefix_ns_number", EmitDefaultValue=false)] - public decimal PrefixNsNumber { get; set; } - - /// - /// Gets or Sets PrefixNsInteger - /// - [DataMember(Name="prefix_ns_integer", EmitDefaultValue=false)] - public int PrefixNsInteger { get; set; } - - /// - /// Gets or Sets PrefixNsBoolean - /// - [DataMember(Name="prefix_ns_boolean", EmitDefaultValue=false)] - public bool PrefixNsBoolean { get; set; } - - /// - /// Gets or Sets PrefixNsArray - /// - [DataMember(Name="prefix_ns_array", EmitDefaultValue=false)] - public List PrefixNsArray { get; set; } - - /// - /// Gets or Sets PrefixNsWrappedArray - /// - [DataMember(Name="prefix_ns_wrapped_array", EmitDefaultValue=false)] - public List PrefixNsWrappedArray { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class XmlItem {\n"); - sb.Append(" AttributeString: ").Append(AttributeString).Append("\n"); - sb.Append(" AttributeNumber: ").Append(AttributeNumber).Append("\n"); - sb.Append(" AttributeInteger: ").Append(AttributeInteger).Append("\n"); - sb.Append(" AttributeBoolean: ").Append(AttributeBoolean).Append("\n"); - sb.Append(" WrappedArray: ").Append(WrappedArray).Append("\n"); - sb.Append(" NameString: ").Append(NameString).Append("\n"); - sb.Append(" NameNumber: ").Append(NameNumber).Append("\n"); - sb.Append(" NameInteger: ").Append(NameInteger).Append("\n"); - sb.Append(" NameBoolean: ").Append(NameBoolean).Append("\n"); - sb.Append(" NameArray: ").Append(NameArray).Append("\n"); - sb.Append(" NameWrappedArray: ").Append(NameWrappedArray).Append("\n"); - sb.Append(" PrefixString: ").Append(PrefixString).Append("\n"); - sb.Append(" PrefixNumber: ").Append(PrefixNumber).Append("\n"); - sb.Append(" PrefixInteger: ").Append(PrefixInteger).Append("\n"); - sb.Append(" PrefixBoolean: ").Append(PrefixBoolean).Append("\n"); - sb.Append(" PrefixArray: ").Append(PrefixArray).Append("\n"); - sb.Append(" PrefixWrappedArray: ").Append(PrefixWrappedArray).Append("\n"); - sb.Append(" NamespaceString: ").Append(NamespaceString).Append("\n"); - sb.Append(" NamespaceNumber: ").Append(NamespaceNumber).Append("\n"); - sb.Append(" NamespaceInteger: ").Append(NamespaceInteger).Append("\n"); - sb.Append(" NamespaceBoolean: ").Append(NamespaceBoolean).Append("\n"); - sb.Append(" NamespaceArray: ").Append(NamespaceArray).Append("\n"); - sb.Append(" NamespaceWrappedArray: ").Append(NamespaceWrappedArray).Append("\n"); - sb.Append(" PrefixNsString: ").Append(PrefixNsString).Append("\n"); - sb.Append(" PrefixNsNumber: ").Append(PrefixNsNumber).Append("\n"); - sb.Append(" PrefixNsInteger: ").Append(PrefixNsInteger).Append("\n"); - sb.Append(" PrefixNsBoolean: ").Append(PrefixNsBoolean).Append("\n"); - sb.Append(" PrefixNsArray: ").Append(PrefixNsArray).Append("\n"); - sb.Append(" PrefixNsWrappedArray: ").Append(PrefixNsWrappedArray).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as XmlItem); - } - - /// - /// Returns true if XmlItem instances are equal - /// - /// Instance of XmlItem to be compared - /// Boolean - public bool Equals(XmlItem input) - { - if (input == null) - return false; - - return - ( - this.AttributeString == input.AttributeString || - (this.AttributeString != null && - this.AttributeString.Equals(input.AttributeString)) - ) && - ( - this.AttributeNumber == input.AttributeNumber || - (this.AttributeNumber != null && - this.AttributeNumber.Equals(input.AttributeNumber)) - ) && - ( - this.AttributeInteger == input.AttributeInteger || - (this.AttributeInteger != null && - this.AttributeInteger.Equals(input.AttributeInteger)) - ) && - ( - this.AttributeBoolean == input.AttributeBoolean || - (this.AttributeBoolean != null && - this.AttributeBoolean.Equals(input.AttributeBoolean)) - ) && - ( - this.WrappedArray == input.WrappedArray || - this.WrappedArray != null && - input.WrappedArray != null && - this.WrappedArray.SequenceEqual(input.WrappedArray) - ) && - ( - this.NameString == input.NameString || - (this.NameString != null && - this.NameString.Equals(input.NameString)) - ) && - ( - this.NameNumber == input.NameNumber || - (this.NameNumber != null && - this.NameNumber.Equals(input.NameNumber)) - ) && - ( - this.NameInteger == input.NameInteger || - (this.NameInteger != null && - this.NameInteger.Equals(input.NameInteger)) - ) && - ( - this.NameBoolean == input.NameBoolean || - (this.NameBoolean != null && - this.NameBoolean.Equals(input.NameBoolean)) - ) && - ( - this.NameArray == input.NameArray || - this.NameArray != null && - input.NameArray != null && - this.NameArray.SequenceEqual(input.NameArray) - ) && - ( - this.NameWrappedArray == input.NameWrappedArray || - this.NameWrappedArray != null && - input.NameWrappedArray != null && - this.NameWrappedArray.SequenceEqual(input.NameWrappedArray) - ) && - ( - this.PrefixString == input.PrefixString || - (this.PrefixString != null && - this.PrefixString.Equals(input.PrefixString)) - ) && - ( - this.PrefixNumber == input.PrefixNumber || - (this.PrefixNumber != null && - this.PrefixNumber.Equals(input.PrefixNumber)) - ) && - ( - this.PrefixInteger == input.PrefixInteger || - (this.PrefixInteger != null && - this.PrefixInteger.Equals(input.PrefixInteger)) - ) && - ( - this.PrefixBoolean == input.PrefixBoolean || - (this.PrefixBoolean != null && - this.PrefixBoolean.Equals(input.PrefixBoolean)) - ) && - ( - this.PrefixArray == input.PrefixArray || - this.PrefixArray != null && - input.PrefixArray != null && - this.PrefixArray.SequenceEqual(input.PrefixArray) - ) && - ( - this.PrefixWrappedArray == input.PrefixWrappedArray || - this.PrefixWrappedArray != null && - input.PrefixWrappedArray != null && - this.PrefixWrappedArray.SequenceEqual(input.PrefixWrappedArray) - ) && - ( - this.NamespaceString == input.NamespaceString || - (this.NamespaceString != null && - this.NamespaceString.Equals(input.NamespaceString)) - ) && - ( - this.NamespaceNumber == input.NamespaceNumber || - (this.NamespaceNumber != null && - this.NamespaceNumber.Equals(input.NamespaceNumber)) - ) && - ( - this.NamespaceInteger == input.NamespaceInteger || - (this.NamespaceInteger != null && - this.NamespaceInteger.Equals(input.NamespaceInteger)) - ) && - ( - this.NamespaceBoolean == input.NamespaceBoolean || - (this.NamespaceBoolean != null && - this.NamespaceBoolean.Equals(input.NamespaceBoolean)) - ) && - ( - this.NamespaceArray == input.NamespaceArray || - this.NamespaceArray != null && - input.NamespaceArray != null && - this.NamespaceArray.SequenceEqual(input.NamespaceArray) - ) && - ( - this.NamespaceWrappedArray == input.NamespaceWrappedArray || - this.NamespaceWrappedArray != null && - input.NamespaceWrappedArray != null && - this.NamespaceWrappedArray.SequenceEqual(input.NamespaceWrappedArray) - ) && - ( - this.PrefixNsString == input.PrefixNsString || - (this.PrefixNsString != null && - this.PrefixNsString.Equals(input.PrefixNsString)) - ) && - ( - this.PrefixNsNumber == input.PrefixNsNumber || - (this.PrefixNsNumber != null && - this.PrefixNsNumber.Equals(input.PrefixNsNumber)) - ) && - ( - this.PrefixNsInteger == input.PrefixNsInteger || - (this.PrefixNsInteger != null && - this.PrefixNsInteger.Equals(input.PrefixNsInteger)) - ) && - ( - this.PrefixNsBoolean == input.PrefixNsBoolean || - (this.PrefixNsBoolean != null && - this.PrefixNsBoolean.Equals(input.PrefixNsBoolean)) - ) && - ( - this.PrefixNsArray == input.PrefixNsArray || - this.PrefixNsArray != null && - input.PrefixNsArray != null && - this.PrefixNsArray.SequenceEqual(input.PrefixNsArray) - ) && - ( - this.PrefixNsWrappedArray == input.PrefixNsWrappedArray || - this.PrefixNsWrappedArray != null && - input.PrefixNsWrappedArray != null && - this.PrefixNsWrappedArray.SequenceEqual(input.PrefixNsWrappedArray) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AttributeString != null) - hashCode = hashCode * 59 + this.AttributeString.GetHashCode(); - if (this.AttributeNumber != null) - hashCode = hashCode * 59 + this.AttributeNumber.GetHashCode(); - if (this.AttributeInteger != null) - hashCode = hashCode * 59 + this.AttributeInteger.GetHashCode(); - if (this.AttributeBoolean != null) - hashCode = hashCode * 59 + this.AttributeBoolean.GetHashCode(); - if (this.WrappedArray != null) - hashCode = hashCode * 59 + this.WrappedArray.GetHashCode(); - if (this.NameString != null) - hashCode = hashCode * 59 + this.NameString.GetHashCode(); - if (this.NameNumber != null) - hashCode = hashCode * 59 + this.NameNumber.GetHashCode(); - if (this.NameInteger != null) - hashCode = hashCode * 59 + this.NameInteger.GetHashCode(); - if (this.NameBoolean != null) - hashCode = hashCode * 59 + this.NameBoolean.GetHashCode(); - if (this.NameArray != null) - hashCode = hashCode * 59 + this.NameArray.GetHashCode(); - if (this.NameWrappedArray != null) - hashCode = hashCode * 59 + this.NameWrappedArray.GetHashCode(); - if (this.PrefixString != null) - hashCode = hashCode * 59 + this.PrefixString.GetHashCode(); - if (this.PrefixNumber != null) - hashCode = hashCode * 59 + this.PrefixNumber.GetHashCode(); - if (this.PrefixInteger != null) - hashCode = hashCode * 59 + this.PrefixInteger.GetHashCode(); - if (this.PrefixBoolean != null) - hashCode = hashCode * 59 + this.PrefixBoolean.GetHashCode(); - if (this.PrefixArray != null) - hashCode = hashCode * 59 + this.PrefixArray.GetHashCode(); - if (this.PrefixWrappedArray != null) - hashCode = hashCode * 59 + this.PrefixWrappedArray.GetHashCode(); - if (this.NamespaceString != null) - hashCode = hashCode * 59 + this.NamespaceString.GetHashCode(); - if (this.NamespaceNumber != null) - hashCode = hashCode * 59 + this.NamespaceNumber.GetHashCode(); - if (this.NamespaceInteger != null) - hashCode = hashCode * 59 + this.NamespaceInteger.GetHashCode(); - if (this.NamespaceBoolean != null) - hashCode = hashCode * 59 + this.NamespaceBoolean.GetHashCode(); - if (this.NamespaceArray != null) - hashCode = hashCode * 59 + this.NamespaceArray.GetHashCode(); - if (this.NamespaceWrappedArray != null) - hashCode = hashCode * 59 + this.NamespaceWrappedArray.GetHashCode(); - if (this.PrefixNsString != null) - hashCode = hashCode * 59 + this.PrefixNsString.GetHashCode(); - if (this.PrefixNsNumber != null) - hashCode = hashCode * 59 + this.PrefixNsNumber.GetHashCode(); - if (this.PrefixNsInteger != null) - hashCode = hashCode * 59 + this.PrefixNsInteger.GetHashCode(); - if (this.PrefixNsBoolean != null) - hashCode = hashCode * 59 + this.PrefixNsBoolean.GetHashCode(); - if (this.PrefixNsArray != null) - hashCode = hashCode * 59 + this.PrefixNsArray.GetHashCode(); - if (this.PrefixNsWrappedArray != null) - hashCode = hashCode * 59 + this.PrefixNsWrappedArray.GetHashCode(); - return hashCode; - } - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Org.OpenAPITools.csproj deleted file mode 100644 index df362a6df37..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ /dev/null @@ -1,54 +0,0 @@ - - - - - 14.0 - Debug - AnyCPU - {321C8C3F-0156-40C1-AE42-D59761FB9B6C} - Library - Properties - Org.OpenAPITools - Org.OpenAPITools - {786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - netstandard1.3 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Org.OpenAPITools.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Org.OpenAPITools.xml - - - - - - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Properties/AssemblyInfo.cs b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Properties/AssemblyInfo.cs deleted file mode 100644 index d1abdf7936a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenAPI Library")] -[assembly: AssemblyDescription("A library generated from a OpenAPI doc")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("OpenAPI")] -[assembly: AssemblyProduct("OpenAPILibrary")] -[assembly: AssemblyCopyright("No Copyright")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0")] -[assembly: AssemblyFileVersion("1.0.0")] diff --git a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/project.json b/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/project.json deleted file mode 100644 index 360e244b41e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientNetStandard/src/Org.OpenAPITools/project.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "supports": {}, - "dependencies": { - "FubarCoder.RestSharp.Portable.Core": "4.0.7", - "FubarCoder.RestSharp.Portable.HttpClient": "4.0.7", - "Newtonsoft.Json": "12.0.3", - "JsonSubTypes": "1.6.0" - }, - "frameworks": { - "netstandard1.3": {} - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.gitignore b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.gitignore deleted file mode 100644 index 1ee53850b84..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.gitignore +++ /dev/null @@ -1,362 +0,0 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator-ignore b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator-ignore deleted file mode 100644 index 7484ee590a3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator-ignore +++ /dev/null @@ -1,23 +0,0 @@ -# OpenAPI Generator Ignore -# Generated by openapi-generator https://github.com/openapitools/openapi-generator - -# Use this file to prevent files from being overwritten by the generator. -# The patterns follow closely to .gitignore or .dockerignore. - -# As an example, the C# client generator defines ApiClient.cs. -# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: -#ApiClient.cs - -# You can match any string of characters against a directory, file or extension with a single asterisk (*): -#foo/*/qux -# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux - -# You can recursively match patterns against a directory, file or extension with a double asterisk (**): -#foo/**/qux -# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux - -# You can also negate patterns with an exclamation (!). -# For example, you can ignore all files in a docs folder with the file extension .md: -#docs/*.md -# Then explicitly reverse the ignore rule for a single file: -#!docs/README.md diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/FILES b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/FILES deleted file mode 100644 index 89585fb44f4..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/FILES +++ /dev/null @@ -1,132 +0,0 @@ -.gitignore -.travis.yml -Org.OpenAPITools.sln -README.md -build.bat -build.sh -docs/AdditionalPropertiesAnyType.md -docs/AdditionalPropertiesArray.md -docs/AdditionalPropertiesBoolean.md -docs/AdditionalPropertiesClass.md -docs/AdditionalPropertiesInteger.md -docs/AdditionalPropertiesNumber.md -docs/AdditionalPropertiesObject.md -docs/AdditionalPropertiesString.md -docs/Animal.md -docs/AnotherFakeApi.md -docs/ApiResponse.md -docs/ArrayOfArrayOfNumberOnly.md -docs/ArrayOfNumberOnly.md -docs/ArrayTest.md -docs/BigCat.md -docs/BigCatAllOf.md -docs/Capitalization.md -docs/Cat.md -docs/CatAllOf.md -docs/Category.md -docs/ClassModel.md -docs/Dog.md -docs/DogAllOf.md -docs/EnumArrays.md -docs/EnumClass.md -docs/EnumTest.md -docs/FakeApi.md -docs/FakeClassnameTags123Api.md -docs/File.md -docs/FileSchemaTestClass.md -docs/FormatTest.md -docs/HasOnlyReadOnly.md -docs/List.md -docs/MapTest.md -docs/MixedPropertiesAndAdditionalPropertiesClass.md -docs/Model200Response.md -docs/ModelClient.md -docs/Name.md -docs/NumberOnly.md -docs/Order.md -docs/OuterComposite.md -docs/OuterEnum.md -docs/Pet.md -docs/PetApi.md -docs/ReadOnlyFirst.md -docs/Return.md -docs/SpecialModelName.md -docs/StoreApi.md -docs/Tag.md -docs/TypeHolderDefault.md -docs/TypeHolderExample.md -docs/User.md -docs/UserApi.md -docs/XmlItem.md -git_push.sh -mono_nunit_test.sh -src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj -src/Org.OpenAPITools.Test/packages.config -src/Org.OpenAPITools/Api/AnotherFakeApi.cs -src/Org.OpenAPITools/Api/FakeApi.cs -src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs -src/Org.OpenAPITools/Api/PetApi.cs -src/Org.OpenAPITools/Api/StoreApi.cs -src/Org.OpenAPITools/Api/UserApi.cs -src/Org.OpenAPITools/Client/ApiClient.cs -src/Org.OpenAPITools/Client/ApiException.cs -src/Org.OpenAPITools/Client/ApiResponse.cs -src/Org.OpenAPITools/Client/Configuration.cs -src/Org.OpenAPITools/Client/ExceptionFactory.cs -src/Org.OpenAPITools/Client/GlobalConfiguration.cs -src/Org.OpenAPITools/Client/IApiAccessor.cs -src/Org.OpenAPITools/Client/IReadableConfiguration.cs -src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs -src/Org.OpenAPITools/FodyWeavers.xml -src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs -src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs -src/Org.OpenAPITools/Model/Animal.cs -src/Org.OpenAPITools/Model/ApiResponse.cs -src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs -src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs -src/Org.OpenAPITools/Model/ArrayTest.cs -src/Org.OpenAPITools/Model/BigCat.cs -src/Org.OpenAPITools/Model/BigCatAllOf.cs -src/Org.OpenAPITools/Model/Capitalization.cs -src/Org.OpenAPITools/Model/Cat.cs -src/Org.OpenAPITools/Model/CatAllOf.cs -src/Org.OpenAPITools/Model/Category.cs -src/Org.OpenAPITools/Model/ClassModel.cs -src/Org.OpenAPITools/Model/Dog.cs -src/Org.OpenAPITools/Model/DogAllOf.cs -src/Org.OpenAPITools/Model/EnumArrays.cs -src/Org.OpenAPITools/Model/EnumClass.cs -src/Org.OpenAPITools/Model/EnumTest.cs -src/Org.OpenAPITools/Model/File.cs -src/Org.OpenAPITools/Model/FileSchemaTestClass.cs -src/Org.OpenAPITools/Model/FormatTest.cs -src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs -src/Org.OpenAPITools/Model/List.cs -src/Org.OpenAPITools/Model/MapTest.cs -src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs -src/Org.OpenAPITools/Model/Model200Response.cs -src/Org.OpenAPITools/Model/ModelClient.cs -src/Org.OpenAPITools/Model/Name.cs -src/Org.OpenAPITools/Model/NumberOnly.cs -src/Org.OpenAPITools/Model/Order.cs -src/Org.OpenAPITools/Model/OuterComposite.cs -src/Org.OpenAPITools/Model/OuterEnum.cs -src/Org.OpenAPITools/Model/Pet.cs -src/Org.OpenAPITools/Model/ReadOnlyFirst.cs -src/Org.OpenAPITools/Model/Return.cs -src/Org.OpenAPITools/Model/SpecialModelName.cs -src/Org.OpenAPITools/Model/Tag.cs -src/Org.OpenAPITools/Model/TypeHolderDefault.cs -src/Org.OpenAPITools/Model/TypeHolderExample.cs -src/Org.OpenAPITools/Model/User.cs -src/Org.OpenAPITools/Model/XmlItem.cs -src/Org.OpenAPITools/Org.OpenAPITools.csproj -src/Org.OpenAPITools/Org.OpenAPITools.nuspec -src/Org.OpenAPITools/Properties/AssemblyInfo.cs -src/Org.OpenAPITools/packages.config diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION deleted file mode 100644 index d99e7162d01..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.openapi-generator/VERSION +++ /dev/null @@ -1 +0,0 @@ -5.0.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.travis.yml b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.travis.yml deleted file mode 100644 index e4965fc7e5c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/.travis.yml +++ /dev/null @@ -1,9 +0,0 @@ -# -# Generated by: https://github.com/openapitools/openapi-generator.git -# -language: csharp -mono: - - latest -solution: Org.OpenAPITools.sln -script: - - /bin/sh ./mono_nunit_test.sh diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/Org.OpenAPITools.sln b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/Org.OpenAPITools.sln deleted file mode 100644 index 7ca1bba682d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/Org.OpenAPITools.sln +++ /dev/null @@ -1,27 +0,0 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -VisualStudioVersion = 12.0.0.0 -MinimumVisualStudioVersion = 10.0.0.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools", "src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{5CD900DE-8266-412F-A758-28E1F9C623D5}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools.Test", "src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {5CD900DE-8266-412F-A758-28E1F9C623D5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5CD900DE-8266-412F-A758-28E1F9C623D5}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5CD900DE-8266-412F-A758-28E1F9C623D5}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5CD900DE-8266-412F-A758-28E1F9C623D5}.Release|Any CPU.Build.0 = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU - {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md deleted file mode 100644 index 4a48304fa4b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/README.md +++ /dev/null @@ -1,233 +0,0 @@ -# Org.OpenAPITools - the C# library for the 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: \" \\ - -This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - -- API version: 1.0.0 -- SDK version: 1.0.0 -- Build package: org.openapitools.codegen.languages.CSharpClientCodegen - -## Frameworks supported - - -- .NET 4.0 or later -- Windows Phone 7.1 (Mango) - -## Dependencies - - -- [RestSharp](https://www.nuget.org/packages/RestSharp) - 105.1.0 or later -- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 7.0.0 or later -- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.2.0 or later - -The DLLs included in the package may not be the latest version. We recommend using [NuGet](https://docs.nuget.org/consume/installing-nuget) to obtain the latest version of the packages: - -``` -Install-Package RestSharp -Install-Package Newtonsoft.Json -Install-Package JsonSubTypes -``` - -NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See [RestSharp#742](https://github.com/restsharp/RestSharp/issues/742) - -## Installation - -Run the following command to generate the DLL - -- [Mac/Linux] `/bin/sh build.sh` -- [Windows] `build.bat` - -Then include the DLL (under the `bin` folder) in the C# project, and use the namespaces: - -```csharp -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -``` - - -## Packaging - -A `.nuspec` is included with the project. You can follow the Nuget quickstart to [create](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#create-the-package) and [publish](https://docs.microsoft.com/en-us/nuget/quickstart/create-and-publish-a-package#publish-the-package) packages. - -This `.nuspec` uses placeholders from the `.csproj`, so build the `.csproj` directly: - -``` -nuget pack -Build -OutputDirectory out Org.OpenAPITools.csproj -``` - -Then, publish to a [local feed](https://docs.microsoft.com/en-us/nuget/hosting-packages/local-feeds) or [other host](https://docs.microsoft.com/en-us/nuget/hosting-packages/overview) and consume the new package via Nuget as usual. - - -## Getting Started - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class Example - { - public static void Main() - { - - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test special tags - ModelClient result = apiInstance.Call123TestSpecialTags(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - - } - } -} -``` - -## Documentation for API Endpoints - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Class | Method | HTTP request | Description ------------- | ------------- | ------------- | ------------- -*AnotherFakeApi* | [**Call123TestSpecialTags**](docs/AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags -*FakeApi* | [**CreateXmlItem**](docs/FakeApi.md#createxmlitem) | **POST** /fake/create_xml_item | creates an XmlItem -*FakeApi* | [**FakeOuterBooleanSerialize**](docs/FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -*FakeApi* | [**FakeOuterCompositeSerialize**](docs/FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -*FakeApi* | [**FakeOuterNumberSerialize**](docs/FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -*FakeApi* | [**FakeOuterStringSerialize**](docs/FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -*FakeApi* | [**TestBodyWithFileSchema**](docs/FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -*FakeApi* | [**TestBodyWithQueryParams**](docs/FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -*FakeApi* | [**TestClientModel**](docs/FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -*FakeApi* | [**TestEndpointParameters**](docs/FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -*FakeApi* | [**TestEnumParameters**](docs/FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -*FakeApi* | [**TestGroupParameters**](docs/FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -*FakeApi* | [**TestInlineAdditionalProperties**](docs/FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -*FakeApi* | [**TestJsonFormData**](docs/FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -*FakeApi* | [**TestQueryParameterCollectionFormat**](docs/FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | -*FakeClassnameTags123Api* | [**TestClassname**](docs/FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case -*PetApi* | [**AddPet**](docs/PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -*PetApi* | [**DeletePet**](docs/PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -*PetApi* | [**FindPetsByStatus**](docs/PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -*PetApi* | [**FindPetsByTags**](docs/PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -*PetApi* | [**GetPetById**](docs/PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -*PetApi* | [**UpdatePet**](docs/PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -*PetApi* | [**UpdatePetWithForm**](docs/PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -*PetApi* | [**UploadFile**](docs/PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -*PetApi* | [**UploadFileWithRequiredFile**](docs/PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) -*StoreApi* | [**DeleteOrder**](docs/StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -*StoreApi* | [**GetInventory**](docs/StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -*StoreApi* | [**GetOrderById**](docs/StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -*StoreApi* | [**PlaceOrder**](docs/StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet -*UserApi* | [**CreateUser**](docs/UserApi.md#createuser) | **POST** /user | Create user -*UserApi* | [**CreateUsersWithArrayInput**](docs/UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -*UserApi* | [**CreateUsersWithListInput**](docs/UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -*UserApi* | [**DeleteUser**](docs/UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -*UserApi* | [**GetUserByName**](docs/UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -*UserApi* | [**LoginUser**](docs/UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -*UserApi* | [**LogoutUser**](docs/UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -*UserApi* | [**UpdateUser**](docs/UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - -## Documentation for Models - - - [Model.AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md) - - [Model.AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md) - - [Model.AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md) - - [Model.AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md) - - [Model.AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md) - - [Model.AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md) - - [Model.AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md) - - [Model.AdditionalPropertiesString](docs/AdditionalPropertiesString.md) - - [Model.Animal](docs/Animal.md) - - [Model.ApiResponse](docs/ApiResponse.md) - - [Model.ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md) - - [Model.ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md) - - [Model.ArrayTest](docs/ArrayTest.md) - - [Model.BigCat](docs/BigCat.md) - - [Model.BigCatAllOf](docs/BigCatAllOf.md) - - [Model.Capitalization](docs/Capitalization.md) - - [Model.Cat](docs/Cat.md) - - [Model.CatAllOf](docs/CatAllOf.md) - - [Model.Category](docs/Category.md) - - [Model.ClassModel](docs/ClassModel.md) - - [Model.Dog](docs/Dog.md) - - [Model.DogAllOf](docs/DogAllOf.md) - - [Model.EnumArrays](docs/EnumArrays.md) - - [Model.EnumClass](docs/EnumClass.md) - - [Model.EnumTest](docs/EnumTest.md) - - [Model.File](docs/File.md) - - [Model.FileSchemaTestClass](docs/FileSchemaTestClass.md) - - [Model.FormatTest](docs/FormatTest.md) - - [Model.HasOnlyReadOnly](docs/HasOnlyReadOnly.md) - - [Model.List](docs/List.md) - - [Model.MapTest](docs/MapTest.md) - - [Model.MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md) - - [Model.Model200Response](docs/Model200Response.md) - - [Model.ModelClient](docs/ModelClient.md) - - [Model.Name](docs/Name.md) - - [Model.NumberOnly](docs/NumberOnly.md) - - [Model.Order](docs/Order.md) - - [Model.OuterComposite](docs/OuterComposite.md) - - [Model.OuterEnum](docs/OuterEnum.md) - - [Model.Pet](docs/Pet.md) - - [Model.ReadOnlyFirst](docs/ReadOnlyFirst.md) - - [Model.Return](docs/Return.md) - - [Model.SpecialModelName](docs/SpecialModelName.md) - - [Model.Tag](docs/Tag.md) - - [Model.TypeHolderDefault](docs/TypeHolderDefault.md) - - [Model.TypeHolderExample](docs/TypeHolderExample.md) - - [Model.User](docs/User.md) - - [Model.XmlItem](docs/XmlItem.md) - - -## Documentation for Authorization - - -### api_key - -- **Type**: API key - -- **API key parameter name**: api_key -- **Location**: HTTP header - - -### api_key_query - -- **Type**: API key - -- **API key parameter name**: api_key_query -- **Location**: URL query string - - -### http_basic_test - - -- **Type**: HTTP basic authentication - - -### petstore_auth - - -- **Type**: OAuth -- **Flow**: implicit -- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog -- **Scopes**: - - write:pets: modify pets in your account - - read:pets: read your pets - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.bat b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.bat deleted file mode 100644 index 935e87072cb..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.bat +++ /dev/null @@ -1,20 +0,0 @@ -:: Generated by: https://github.com/openapitools/openapi-generator.git -:: - -@echo off - -SET CSCPATH=%SYSTEMROOT%\Microsoft.NET\Framework\v4.0.30319 - -if not exist ".\nuget.exe" powershell -Command "(new-object System.Net.WebClient).DownloadFile('https://dist.nuget.org/win-x86-commandline/latest/nuget.exe', '.\nuget.exe')" -.\nuget.exe install src\Org.OpenAPITools\packages.config -o packages - -if not exist ".\bin" mkdir bin - -copy packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll bin\Newtonsoft.Json.dll -copy packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll bin\JsonSubTypes.dll -copy packages\RestSharp.105.1.0\lib\net45\RestSharp.dll bin\RestSharp.dll -copy packages\Fody.1.29.4\Fody.dll bin\Fody.dll -copy packages\PropertyChanged.Fody.1.51.3\PropertyChanged.Fody.dll bin\PropertyChanged.Fody.dll -copy packages\PropertyChanged.Fody.1.51.3\Lib\dotnet\PropertyChanged.dll bin\PropertyChanged.dll -%CSCPATH%\csc /reference:bin\Newtonsoft.Json.dll;bin\JsonSubTypes.dll;bin\RestSharp.dll;System.ComponentModel.DataAnnotations.dll /r:bin\Fody.dll;bin\PropertyChanged.Fody.dll;bin\PropertyChanged.dll /target:library /out:bin\Org.OpenAPITools.dll /recurse:src\Org.OpenAPITools\*.cs /doc:bin\Org.OpenAPITools.xml - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh deleted file mode 100644 index ee26741580f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/build.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/usr/bin/env bash -# -# Generated by: https://github.com/openapitools/openapi-generator.git -# - -frameworkVersion=net45 - -# sdk must match installed frameworks under PREFIX/lib/mono/[value] -sdk=4.5.2-api - -# langversion refers to C# language features. see man mcs for details. -langversion=${sdk} -nuget_cmd=nuget - -# Match against our known SDK possibilities -case "${sdk}" in - 4) - langversion=4 - ;; - 4.5*) - langversion=5 - ;; - 4.6*) - langversion=6 - ;; - 4.7*) - langversion=7 # ignoring 7.1 for now. - ;; - *) - langversion=6 - ;; -esac - -echo "[INFO] Target framework: ${frameworkVersion}" - -if ! type nuget &>/dev/null; then - echo "[INFO] Download nuget and packages" - wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe; - nuget_cmd="mono nuget.exe" -fi - -mozroots --import --sync -${nuget_cmd} install src/Org.OpenAPITools/packages.config -o packages; - -echo "[INFO] Copy DLLs to the 'bin' folder" -mkdir -p bin; -cp packages/Newtonsoft.Json.12.0.3/lib/net45/Newtonsoft.Json.dll bin/Newtonsoft.Json.dll; -cp packages/RestSharp.105.1.0/lib/net45/RestSharp.dll bin/RestSharp.dll; -cp packages/JsonSubTypes.1.6.0/lib/net45/JsonSubTypes.dll bin/JsonSubTypes.dll -cp packages/Fody.1.29.4/Fody.dll bin/Fody.dll -cp packages/PropertyChanged.Fody.1.51.3/PropertyChanged.Fody.dll bin/PropertyChanged.Fody.dll -cp packages/PropertyChanged.Fody.1.51.3/Lib/dotnet/PropertyChanged.dll bin/PropertyChanged.dll - -echo "[INFO] Run 'mcs' to build bin/Org.OpenAPITools.dll" -mcs -langversion:${langversion} -sdk:${sdk} -r:bin/Newtonsoft.Json.dll,bin/JsonSubTypes.dll,\ -bin/Fody.dll,\ -bin/PropertyChanged.Fody.dll,\ -bin/PropertyChanged.dll,\ -bin/RestSharp.dll,\ -System.ComponentModel.DataAnnotations.dll,\ -System.Runtime.Serialization.dll \ --target:library \ --out:bin/Org.OpenAPITools.dll \ --recurse:'src/Org.OpenAPITools/*.cs' \ --doc:bin/Org.OpenAPITools.xml \ --platform:anycpu - -if [ $? -ne 0 ] -then - echo "[ERROR] Compilation failed with exit code $?" - exit 1 -else - echo "[INFO] bin/Org.OpenAPITools.dll was created successfully" -fi diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesAnyType.md deleted file mode 100644 index fd118d3bfc5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesAnyType.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesAnyType - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesArray.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesArray.md deleted file mode 100644 index 3d0606cea5f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesArray.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesArray - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesBoolean.md deleted file mode 100644 index bb4b2498263..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesBoolean.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesBoolean - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md deleted file mode 100644 index 12f3292db0b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md +++ /dev/null @@ -1,23 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MapString** | **Dictionary<string, string>** | | [optional] -**MapNumber** | **Dictionary<string, decimal>** | | [optional] -**MapInteger** | **Dictionary<string, int>** | | [optional] -**MapBoolean** | **Dictionary<string, bool>** | | [optional] -**MapArrayInteger** | **Dictionary<string, List<int>>** | | [optional] -**MapArrayAnytype** | **Dictionary<string, List<Object>>** | | [optional] -**MapMapString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**MapMapAnytype** | **Dictionary<string, Dictionary<string, Object>>** | | [optional] -**Anytype1** | **Object** | | [optional] -**Anytype2** | **Object** | | [optional] -**Anytype3** | **Object** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesInteger.md deleted file mode 100644 index 86a6259ecc9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesInteger.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesInteger - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesNumber.md deleted file mode 100644 index 8dc46024e03..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesNumber.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesNumber - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesObject.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesObject.md deleted file mode 100644 index 455456fe6dd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesObject.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesObject - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesString.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesString.md deleted file mode 100644 index 0f7cf804167..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesString.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.AdditionalPropertiesString - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Animal.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Animal.md deleted file mode 100644 index 0a05bcdf061..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Animal.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Animal - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AnotherFakeApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AnotherFakeApi.md deleted file mode 100644 index 5af41a1862c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AnotherFakeApi.md +++ /dev/null @@ -1,84 +0,0 @@ -# Org.OpenAPITools.Api.AnotherFakeApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**Call123TestSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags - - - -## Call123TestSpecialTags - -> ModelClient Call123TestSpecialTags (ModelClient body) - -To test special tags - -To test special tags and operation ID starting with number - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class Call123TestSpecialTagsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new AnotherFakeApi(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test special tags - ModelClient result = apiInstance.Call123TestSpecialTags(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ApiResponse.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ApiResponse.md deleted file mode 100644 index a3b916355fd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ApiResponse.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.ApiResponse - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Code** | **int** | | [optional] -**Type** | **string** | | [optional] -**Message** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ArrayOfArrayOfNumberOnly.md deleted file mode 100644 index e05ea7dc240..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ArrayOfArrayOfNumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayOfArrayOfNumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayArrayNumber** | **List<List<decimal>>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ArrayOfNumberOnly.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ArrayOfNumberOnly.md deleted file mode 100644 index 5f593d42929..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ArrayOfNumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayOfNumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayNumber** | **List<decimal>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ArrayTest.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ArrayTest.md deleted file mode 100644 index 593bc2d7386..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ArrayTest.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.ArrayTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ArrayOfString** | **List<string>** | | [optional] -**ArrayArrayOfInteger** | **List<List<long>>** | | [optional] -**ArrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/BigCat.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/BigCat.md deleted file mode 100644 index 6247107ab35..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/BigCat.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.BigCat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Declawed** | **bool** | | [optional] -**Kind** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/BigCatAllOf.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/BigCatAllOf.md deleted file mode 100644 index 864c2298e03..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/BigCatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.BigCatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Kind** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Capitalization.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Capitalization.md deleted file mode 100644 index 0c66f2d2d44..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Capitalization.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Capitalization - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SmallCamel** | **string** | | [optional] -**CapitalCamel** | **string** | | [optional] -**SmallSnake** | **string** | | [optional] -**CapitalSnake** | **string** | | [optional] -**SCAETHFlowPoints** | **string** | | [optional] -**ATT_NAME** | **string** | Name 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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Cat.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Cat.md deleted file mode 100644 index 6609de8e12a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Cat.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.Cat - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] -**Declawed** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/CatAllOf.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/CatAllOf.md deleted file mode 100644 index d623d2a0a6e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/CatAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.CatAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Declawed** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Category.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Category.md deleted file mode 100644 index 42102d4e508..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Category.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Category - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ClassModel.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ClassModel.md deleted file mode 100644 index b2b42407d2b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ClassModel.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ClassModel - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Class** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Dog.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Dog.md deleted file mode 100644 index 1f39769d2b9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Dog.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.Dog - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**ClassName** | **string** | | -**Color** | **string** | | [optional] [default to "red"] -**Breed** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/DogAllOf.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/DogAllOf.md deleted file mode 100644 index d72134a0f5f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/DogAllOf.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.DogAllOf - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Breed** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/EnumArrays.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/EnumArrays.md deleted file mode 100644 index 9d58d25f972..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/EnumArrays.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.EnumArrays - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JustSymbol** | **string** | | [optional] -**ArrayEnum** | **List<string>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/EnumClass.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/EnumClass.md deleted file mode 100644 index 16d21587b4c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/EnumClass.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.EnumClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/EnumTest.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/EnumTest.md deleted file mode 100644 index f8bc67baa6a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/EnumTest.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Org.OpenAPITools.Model.EnumTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**EnumString** | **string** | | [optional] -**EnumStringRequired** | **string** | | -**EnumInteger** | **int** | | [optional] -**EnumNumber** | **double** | | [optional] -**OuterEnum** | **OuterEnum** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md deleted file mode 100644 index 47853770985..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeApi.md +++ /dev/null @@ -1,1118 +0,0 @@ -# Org.OpenAPITools.Api.FakeApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateXmlItem**](FakeApi.md#createxmlitem) | **POST** /fake/create_xml_item | creates an XmlItem -[**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | -[**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | -[**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | -[**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | -[**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | -[**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | -[**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model -[**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 -[**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters -[**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) -[**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties -[**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data -[**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | - - - -## CreateXmlItem - -> void CreateXmlItem (XmlItem xmlItem) - -creates an XmlItem - -this route creates an XmlItem - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateXmlItemExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var xmlItem = new XmlItem(); // XmlItem | XmlItem Body - - try - { - // creates an XmlItem - apiInstance.CreateXmlItem(xmlItem); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.CreateXmlItem: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **xmlItem** | [**XmlItem**](XmlItem.md)| XmlItem Body | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16 -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## FakeOuterBooleanSerialize - -> bool FakeOuterBooleanSerialize (bool? body = null) - - - -Test serialization of outer boolean types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterBooleanSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = true; // bool? | Input boolean as post body (optional) - - try - { - bool result = apiInstance.FakeOuterBooleanSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **bool?**| Input boolean as post body | [optional] - -### Return type - -**bool** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output boolean | - | - -[[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) - - -## FakeOuterCompositeSerialize - -> OuterComposite FakeOuterCompositeSerialize (OuterComposite body = null) - - - -Test serialization of object with outer number type - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterCompositeSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new OuterComposite(); // OuterComposite | Input composite as post body (optional) - - try - { - OuterComposite result = apiInstance.FakeOuterCompositeSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**OuterComposite**](OuterComposite.md)| Input composite as post body | [optional] - -### Return type - -[**OuterComposite**](OuterComposite.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output composite | - | - -[[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) - - -## FakeOuterNumberSerialize - -> decimal FakeOuterNumberSerialize (decimal? body = null) - - - -Test serialization of outer number types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterNumberSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = 8.14; // decimal? | Input number as post body (optional) - - try - { - decimal result = apiInstance.FakeOuterNumberSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **decimal?**| Input number as post body | [optional] - -### Return type - -**decimal** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output number | - | - -[[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) - - -## FakeOuterStringSerialize - -> string FakeOuterStringSerialize (string body = null) - - - -Test serialization of outer string types - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FakeOuterStringSerializeExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = body_example; // string | Input string as post body (optional) - - try - { - string result = apiInstance.FakeOuterStringSerialize(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | **string**| Input string as post body | [optional] - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: */* - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Output string | - | - -[[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) - - -## TestBodyWithFileSchema - -> void TestBodyWithFileSchema (FileSchemaTestClass body) - - - -For this test, the body for this request much reference a schema named `File`. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestBodyWithFileSchemaExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new FileSchemaTestClass(); // FileSchemaTestClass | - - try - { - apiInstance.TestBodyWithFileSchema(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - - -## TestBodyWithQueryParams - -> void TestBodyWithQueryParams (string query, User body) - - - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestBodyWithQueryParamsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var query = query_example; // string | - var body = new User(); // User | - - try - { - apiInstance.TestBodyWithQueryParams(query, body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **query** | **string**| | - **body** | [**User**](User.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - - -## TestClientModel - -> ModelClient TestClientModel (ModelClient body) - -To test \"client\" model - -To test \"client\" model - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestClientModelExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test \"client\" model - ModelClient result = apiInstance.TestClientModel(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestEndpointParameters - -> void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = null, int? int32 = null, long? int64 = null, float? _float = null, string _string = null, System.IO.Stream binary = null, DateTime? date = null, DateTime? dateTime = null, string password = null, string callback = null) - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestEndpointParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure HTTP basic authorization: http_basic_test - Configuration.Default.Username = "YOUR_USERNAME"; - Configuration.Default.Password = "YOUR_PASSWORD"; - - var apiInstance = new FakeApi(Configuration.Default); - var number = 8.14; // decimal | None - var _double = 1.2D; // double | None - var patternWithoutDelimiter = patternWithoutDelimiter_example; // string | None - var _byte = BYTE_ARRAY_DATA_HERE; // byte[] | None - var integer = 56; // int? | None (optional) - var int32 = 56; // int? | None (optional) - var int64 = 789; // long? | None (optional) - var _float = 3.4F; // float? | None (optional) - var _string = _string_example; // string | None (optional) - var binary = BINARY_DATA_HERE; // System.IO.Stream | None (optional) - var date = 2013-10-20; // DateTime? | None (optional) - var dateTime = 2013-10-20T19:20:30+01:00; // DateTime? | None (optional) - var password = password_example; // string | None (optional) - var callback = callback_example; // string | None (optional) - - try - { - // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - apiInstance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **number** | **decimal**| None | - **_double** | **double**| None | - **patternWithoutDelimiter** | **string**| None | - **_byte** | **byte[]**| None | - **integer** | **int?**| None | [optional] - **int32** | **int?**| None | [optional] - **int64** | **long?**| None | [optional] - **_float** | **float?**| None | [optional] - **_string** | **string**| None | [optional] - **binary** | **System.IO.Stream**| None | [optional] - **date** | **DateTime?**| None | [optional] - **dateTime** | **DateTime?**| None | [optional] - **password** | **string**| None | [optional] - **callback** | **string**| None | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[http_basic_test](../README.md#http_basic_test) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## TestEnumParameters - -> void TestEnumParameters (List enumHeaderStringArray = null, string enumHeaderString = null, List enumQueryStringArray = null, string enumQueryString = null, int? enumQueryInteger = null, double? enumQueryDouble = null, List enumFormStringArray = null, string enumFormString = null) - -To test enum parameters - -To test enum parameters - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestEnumParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var enumHeaderStringArray = enumHeaderStringArray_example; // List | Header parameter enum test (string array) (optional) - var enumHeaderString = enumHeaderString_example; // string | Header parameter enum test (string) (optional) (default to -efg) - var enumQueryStringArray = enumQueryStringArray_example; // List | Query parameter enum test (string array) (optional) - var enumQueryString = enumQueryString_example; // string | Query parameter enum test (string) (optional) (default to -efg) - var enumQueryInteger = 56; // int? | Query parameter enum test (double) (optional) - var enumQueryDouble = 1.2D; // double? | Query parameter enum test (double) (optional) - var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $) - var enumFormString = enumFormString_example; // string | Form parameter enum test (string) (optional) (default to -efg) - - try - { - // To test enum parameters - apiInstance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **enumHeaderStringArray** | **List<string>**| Header parameter enum test (string array) | [optional] - **enumHeaderString** | **string**| Header parameter enum test (string) | [optional] [default to -efg] - **enumQueryStringArray** | **List<string>**| Query parameter enum test (string array) | [optional] - **enumQueryString** | **string**| Query parameter enum test (string) | [optional] [default to -efg] - **enumQueryInteger** | **int?**| Query parameter enum test (double) | [optional] - **enumQueryDouble** | **double?**| Query parameter enum test (double) | [optional] - **enumFormStringArray** | [**List<string>**](string.md)| Form parameter enum test (string array) | [optional] [default to $] - **enumFormString** | **string**| Form parameter enum test (string) | [optional] [default to -efg] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid request | - | -| **404** | Not found | - | - -[[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) - - -## TestGroupParameters - -> void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = null, bool? booleanGroup = null, long? int64Group = null) - -Fake endpoint to test group parameters (optional) - -Fake endpoint to test group parameters (optional) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestGroupParametersExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var requiredStringGroup = 56; // int | Required String in group parameters - var requiredBooleanGroup = true; // bool | Required Boolean in group parameters - var requiredInt64Group = 789; // long | Required Integer in group parameters - var stringGroup = 56; // int? | String in group parameters (optional) - var booleanGroup = true; // bool? | Boolean in group parameters (optional) - var int64Group = 789; // long? | Integer in group parameters (optional) - - try - { - // Fake endpoint to test group parameters (optional) - apiInstance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **requiredStringGroup** | **int**| Required String in group parameters | - **requiredBooleanGroup** | **bool**| Required Boolean in group parameters | - **requiredInt64Group** | **long**| Required Integer in group parameters | - **stringGroup** | **int?**| String in group parameters | [optional] - **booleanGroup** | **bool?**| Boolean in group parameters | [optional] - **int64Group** | **long?**| Integer in group parameters | [optional] - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Something wrong | - | - -[[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) - - -## TestInlineAdditionalProperties - -> void TestInlineAdditionalProperties (Dictionary param) - -test inline additionalProperties - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestInlineAdditionalPropertiesExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var param = new Dictionary(); // Dictionary | request body - - try - { - // test inline additionalProperties - apiInstance.TestInlineAdditionalProperties(param); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestInlineAdditionalProperties: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | [**Dictionary<string, string>**](string.md)| request body | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestJsonFormData - -> void TestJsonFormData (string param, string param2) - -test json serialization of form data - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestJsonFormDataExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var param = param_example; // string | field1 - var param2 = param2_example; // string | field2 - - try - { - // test json serialization of form data - apiInstance.TestJsonFormData(param, param2); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **param** | **string**| field1 | - **param2** | **string**| field2 | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## TestQueryParameterCollectionFormat - -> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) - - - -To test the collection format in query parameters - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestQueryParameterCollectionFormatExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new FakeApi(Configuration.Default); - var pipe = new List(); // List | - var ioutil = new List(); // List | - var http = new List(); // List | - var url = new List(); // List | - var context = new List(); // List | - - try - { - apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormat: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **pipe** | [**List<string>**](string.md)| | - **ioutil** | [**List<string>**](string.md)| | - **http** | [**List<string>**](string.md)| | - **url** | [**List<string>**](string.md)| | - **context** | [**List<string>**](string.md)| | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Success | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeClassnameTags123Api.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeClassnameTags123Api.md deleted file mode 100644 index deb97a27697..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FakeClassnameTags123Api.md +++ /dev/null @@ -1,89 +0,0 @@ -# Org.OpenAPITools.Api.FakeClassnameTags123Api - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**TestClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case - - - -## TestClassname - -> ModelClient TestClassname (ModelClient body) - -To test class name in snake case - -To test class name in snake case - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class TestClassnameExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key_query - Configuration.Default.AddApiKey("api_key_query", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key_query", "Bearer"); - - var apiInstance = new FakeClassnameTags123Api(Configuration.Default); - var body = new ModelClient(); // ModelClient | client model - - try - { - // To test class name in snake case - ModelClient result = apiInstance.TestClassname(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling FakeClassnameTags123Api.TestClassname: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**ModelClient**](ModelClient.md)| client model | - -### Return type - -[**ModelClient**](ModelClient.md) - -### Authorization - -[api_key_query](../README.md#api_key_query) - -### HTTP request headers - -- **Content-Type**: application/json -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/File.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/File.md deleted file mode 100644 index b7105102579..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/File.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.File - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SourceURI** | **string** | Test capitalization | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FileSchemaTestClass.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FileSchemaTestClass.md deleted file mode 100644 index df1453f686b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FileSchemaTestClass.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.FileSchemaTestClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**File** | [**File**](File.md) | | [optional] -**Files** | [**List<File>**](File.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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FormatTest.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FormatTest.md deleted file mode 100644 index 92d7d1e0104..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/FormatTest.md +++ /dev/null @@ -1,26 +0,0 @@ - -# Org.OpenAPITools.Model.FormatTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Integer** | **int** | | [optional] -**Int32** | **int** | | [optional] -**Int64** | **long** | | [optional] -**Number** | **decimal** | | -**Float** | **float** | | [optional] -**Double** | **double** | | [optional] -**String** | **string** | | [optional] -**Byte** | **byte[]** | | -**Binary** | **System.IO.Stream** | | [optional] -**Date** | **DateTime** | | -**DateTime** | **DateTime** | | [optional] -**Uuid** | **Guid** | | [optional] -**Password** | **string** | | -**BigDecimal** | **decimal** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/HasOnlyReadOnly.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/HasOnlyReadOnly.md deleted file mode 100644 index 043d2442b4e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/HasOnlyReadOnly.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.HasOnlyReadOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] [readonly] -**Foo** | **string** | | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/List.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/List.md deleted file mode 100644 index cb41193b43e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/List.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.List - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_123List** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/MapTest.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/MapTest.md deleted file mode 100644 index 79d499e2cf9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/MapTest.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Org.OpenAPITools.Model.MapTest - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional] -**MapOfEnumString** | **Dictionary<string, string>** | | [optional] -**DirectMap** | **Dictionary<string, bool>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/MixedPropertiesAndAdditionalPropertiesClass.md deleted file mode 100644 index dd7b01e49fe..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/MixedPropertiesAndAdditionalPropertiesClass.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.MixedPropertiesAndAdditionalPropertiesClass - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Uuid** | **Guid** | | [optional] -**DateTime** | **DateTime** | | [optional] -**Map** | [**Dictionary<string, Animal>**](Animal.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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Model200Response.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Model200Response.md deleted file mode 100644 index 7d826bca1ec..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Model200Response.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Model200Response - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Name** | **int** | | [optional] -**Class** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ModelClient.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ModelClient.md deleted file mode 100644 index e36e1fad802..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ModelClient.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.ModelClient - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**__Client** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Name.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Name.md deleted file mode 100644 index bfd7955e5b4..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Name.md +++ /dev/null @@ -1,16 +0,0 @@ - -# Org.OpenAPITools.Model.Name - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_Name** | **int** | | -**SnakeCase** | **int** | | [optional] [readonly] -**Property** | **string** | | [optional] -**_123Number** | **int** | | [optional] [readonly] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/NumberOnly.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/NumberOnly.md deleted file mode 100644 index e4b08467e08..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/NumberOnly.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.NumberOnly - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**JustNumber** | **decimal** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Order.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Order.md deleted file mode 100644 index 875f43a30e5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Order.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Order - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**PetId** | **long** | | [optional] -**Quantity** | **int** | | [optional] -**ShipDate** | **DateTime** | | [optional] -**Status** | **string** | Order Status | [optional] -**Complete** | **bool** | | [optional] [default to false] - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/OuterComposite.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/OuterComposite.md deleted file mode 100644 index f381fb7fd28..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/OuterComposite.md +++ /dev/null @@ -1,15 +0,0 @@ - -# Org.OpenAPITools.Model.OuterComposite - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**MyNumber** | **decimal** | | [optional] -**MyString** | **string** | | [optional] -**MyBoolean** | **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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/OuterEnum.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/OuterEnum.md deleted file mode 100644 index edc2300684d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/OuterEnum.md +++ /dev/null @@ -1,12 +0,0 @@ - -# Org.OpenAPITools.Model.OuterEnum - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Pet.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Pet.md deleted file mode 100644 index 0bd5c40fc99..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Pet.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.Pet - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Category** | [**Category**](Category.md) | | [optional] -**Name** | **string** | | -**PhotoUrls** | **List<string>** | | -**Tags** | [**List<Tag>**](Tag.md) | | [optional] -**Status** | **string** | pet status in the store | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/PetApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/PetApi.md deleted file mode 100644 index 1a9eba14868..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/PetApi.md +++ /dev/null @@ -1,728 +0,0 @@ -# Org.OpenAPITools.Api.PetApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**AddPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store -[**DeletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet -[**FindPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status -[**FindPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags -[**GetPetById**](PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID -[**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet -[**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data -[**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image -[**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) - - - -## AddPet - -> void AddPet (Pet body) - -Add a new pet to the store - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class AddPetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var body = new Pet(); // Pet | Pet object that needs to be added to the store - - try - { - // Add a new pet to the store - apiInstance.AddPet(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.AddPet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **405** | Invalid input | - | - -[[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) - - -## DeletePet - -> void DeletePet (long petId, string apiKey = null) - -Deletes a pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeletePetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | Pet id to delete - var apiKey = apiKey_example; // string | (optional) - - try - { - // Deletes a pet - apiInstance.DeletePet(petId, apiKey); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| Pet id to delete | - **apiKey** | **string**| | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid pet value | - | - -[[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) - - -## FindPetsByStatus - -> List<Pet> FindPetsByStatus (List status) - -Finds Pets by status - -Multiple status values can be provided with comma separated strings - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FindPetsByStatusExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var status = status_example; // List | Status values that need to be considered for filter - - try - { - // Finds Pets by status - List result = apiInstance.FindPetsByStatus(status); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **status** | **List<string>**| Status values that need to be considered for filter | - -### Return type - -[**List<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid status value | - | - -[[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) - - -## FindPetsByTags - -> List<Pet> FindPetsByTags (List tags) - -Finds Pets by tags - -Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class FindPetsByTagsExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var tags = new List(); // List | Tags to filter by - - try - { - // Finds Pets by tags - List result = apiInstance.FindPetsByTags(tags); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **tags** | [**List<string>**](string.md)| Tags to filter by | - -### Return type - -[**List<Pet>**](Pet.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid tag value | - | - -[[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) - - -## GetPetById - -> Pet GetPetById (long petId) - -Find pet by ID - -Returns a single pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetPetByIdExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to return - - try - { - // Find pet by ID - Pet result = apiInstance.GetPetById(petId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to return | - -### Return type - -[**Pet**](Pet.md) - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | - -[[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) - - -## UpdatePet - -> void UpdatePet (Pet body) - -Update an existing pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdatePetExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var body = new Pet(); // Pet | Pet object that needs to be added to the store - - try - { - // Update an existing pet - apiInstance.UpdatePet(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store | - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/json, application/xml -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Pet not found | - | -| **405** | Validation exception | - | - -[[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) - - -## UpdatePetWithForm - -> void UpdatePetWithForm (long petId, string name = null, string status = null) - -Updates a pet in the store with form data - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdatePetWithFormExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet that needs to be updated - var name = name_example; // string | Updated name of the pet (optional) - var status = status_example; // string | Updated status of the pet (optional) - - try - { - // Updates a pet in the store with form data - apiInstance.UpdatePetWithForm(petId, name, status); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet that needs to be updated | - **name** | **string**| Updated name of the pet | [optional] - **status** | **string**| Updated status of the pet | [optional] - -### Return type - -void (empty response body) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: application/x-www-form-urlencoded -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **405** | Invalid input | - | - -[[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) - - -## UploadFile - -> ApiResponse UploadFile (long petId, string additionalMetadata = null, System.IO.Stream file = null) - -uploads an image - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to update - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - var file = BINARY_DATA_HERE; // System.IO.Stream | file to upload (optional) - - try - { - // uploads an image - ApiResponse result = apiInstance.UploadFile(petId, additionalMetadata, file); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to update | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - **file** | **System.IO.Stream**| file to upload | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UploadFileWithRequiredFile - -> ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = null) - -uploads an image (required) - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UploadFileWithRequiredFileExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure OAuth2 access token for authorization: petstore_auth - Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN"; - - var apiInstance = new PetApi(Configuration.Default); - var petId = 789; // long | ID of pet to update - var requiredFile = BINARY_DATA_HERE; // System.IO.Stream | file to upload - var additionalMetadata = additionalMetadata_example; // string | Additional data to pass to server (optional) - - try - { - // uploads an image (required) - ApiResponse result = apiInstance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **petId** | **long**| ID of pet to update | - **requiredFile** | **System.IO.Stream**| file to upload | - **additionalMetadata** | **string**| Additional data to pass to server | [optional] - -### Return type - -[**ApiResponse**](ApiResponse.md) - -### Authorization - -[petstore_auth](../README.md#petstore_auth) - -### HTTP request headers - -- **Content-Type**: multipart/form-data -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ReadOnlyFirst.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ReadOnlyFirst.md deleted file mode 100644 index 8ea3b95919b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/ReadOnlyFirst.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.ReadOnlyFirst - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Bar** | **string** | | [optional] [readonly] -**Baz** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Return.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Return.md deleted file mode 100644 index 4761c70748e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Return.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.Return - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**_Return** | **int** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/SpecialModelName.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/SpecialModelName.md deleted file mode 100644 index ee6489524d0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/SpecialModelName.md +++ /dev/null @@ -1,13 +0,0 @@ - -# Org.OpenAPITools.Model.SpecialModelName - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**SpecialPropertyName** | **long** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/StoreApi.md deleted file mode 100644 index ae123168a11..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/StoreApi.md +++ /dev/null @@ -1,314 +0,0 @@ -# Org.OpenAPITools.Api.StoreApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID -[**GetInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status -[**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID -[**PlaceOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet - - - -## DeleteOrder - -> void DeleteOrder (string orderId) - -Delete purchase order by ID - -For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeleteOrderExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var orderId = orderId_example; // string | ID of the order that needs to be deleted - - try - { - // Delete purchase order by ID - apiInstance.DeleteOrder(orderId); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **string**| ID of the order that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - -[[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) - - -## GetInventory - -> Dictionary<string, int> GetInventory () - -Returns pet inventories by status - -Returns a map of status codes to quantities - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetInventoryExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - // Configure API key authorization: api_key - Configuration.Default.AddApiKey("api_key", "YOUR_API_KEY"); - // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed - // Configuration.Default.AddApiKeyPrefix("api_key", "Bearer"); - - var apiInstance = new StoreApi(Configuration.Default); - - try - { - // Returns pet inventories by status - Dictionary result = apiInstance.GetInventory(); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -**Dictionary** - -### Authorization - -[api_key](../README.md#api_key) - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## GetOrderById - -> Order GetOrderById (long orderId) - -Find purchase order by ID - -For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetOrderByIdExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var orderId = 789; // long | ID of pet that needs to be fetched - - try - { - // Find purchase order by ID - Order result = apiInstance.GetOrderById(orderId); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **orderId** | **long**| ID of pet that needs to be fetched | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid ID supplied | - | -| **404** | Order not found | - | - -[[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) - - -## PlaceOrder - -> Order PlaceOrder (Order body) - -Place an order for a pet - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class PlaceOrderExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new StoreApi(Configuration.Default); - var body = new Order(); // Order | order placed for purchasing the pet - - try - { - // Place an order for a pet - Order result = apiInstance.PlaceOrder(body); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**Order**](Order.md)| order placed for purchasing the pet | - -### Return type - -[**Order**](Order.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid Order | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Tag.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Tag.md deleted file mode 100644 index f781c26f017..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/Tag.md +++ /dev/null @@ -1,14 +0,0 @@ - -# Org.OpenAPITools.Model.Tag - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Name** | **string** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/TypeHolderDefault.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/TypeHolderDefault.md deleted file mode 100644 index 0945245b213..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/TypeHolderDefault.md +++ /dev/null @@ -1,17 +0,0 @@ - -# Org.OpenAPITools.Model.TypeHolderDefault - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StringItem** | **string** | | [default to "what"] -**NumberItem** | **decimal** | | -**IntegerItem** | **int** | | -**BoolItem** | **bool** | | [default to true] -**ArrayItem** | **List<int>** | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/TypeHolderExample.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/TypeHolderExample.md deleted file mode 100644 index b9573673baf..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/TypeHolderExample.md +++ /dev/null @@ -1,18 +0,0 @@ - -# Org.OpenAPITools.Model.TypeHolderExample - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**StringItem** | **string** | | -**NumberItem** | **decimal** | | -**FloatItem** | **float** | | -**IntegerItem** | **int** | | -**BoolItem** | **bool** | | -**ArrayItem** | **List<int>** | | - -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to README]](../README.md) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/User.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/User.md deleted file mode 100644 index a25c25d1aa0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/User.md +++ /dev/null @@ -1,20 +0,0 @@ - -# Org.OpenAPITools.Model.User - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**Id** | **long** | | [optional] -**Username** | **string** | | [optional] -**FirstName** | **string** | | [optional] -**LastName** | **string** | | [optional] -**Email** | **string** | | [optional] -**Password** | **string** | | [optional] -**Phone** | **string** | | [optional] -**UserStatus** | **int** | User Status | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/UserApi.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/UserApi.md deleted file mode 100644 index 1385d840413..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/UserApi.md +++ /dev/null @@ -1,605 +0,0 @@ -# Org.OpenAPITools.Api.UserApi - -All URIs are relative to *http://petstore.swagger.io:80/v2* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**CreateUser**](UserApi.md#createuser) | **POST** /user | Create user -[**CreateUsersWithArrayInput**](UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array -[**CreateUsersWithListInput**](UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array -[**DeleteUser**](UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user -[**GetUserByName**](UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name -[**LoginUser**](UserApi.md#loginuser) | **GET** /user/login | Logs user into the system -[**LogoutUser**](UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session -[**UpdateUser**](UserApi.md#updateuser) | **PUT** /user/{username} | Updated user - - - -## CreateUser - -> void CreateUser (User body) - -Create user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var body = new User(); // User | Created user object - - try - { - // Create user - apiInstance.CreateUser(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**User**](User.md)| Created user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateUsersWithArrayInput - -> void CreateUsersWithArrayInput (List body) - -Creates list of users with given input array - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUsersWithArrayInputExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var body = new List(); // List | List of user object - - try - { - // Creates list of users with given input array - apiInstance.CreateUsersWithArrayInput(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## CreateUsersWithListInput - -> void CreateUsersWithListInput (List body) - -Creates list of users with given input array - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class CreateUsersWithListInputExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var body = new List(); // List | List of user object - - try - { - // Creates list of users with given input array - apiInstance.CreateUsersWithListInput(body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **body** | [**List<User>**](User.md)| List of user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## DeleteUser - -> void DeleteUser (string username) - -Delete user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class DeleteUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The name that needs to be deleted - - try - { - // Delete user - apiInstance.DeleteUser(username); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be deleted | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## GetUserByName - -> User GetUserByName (string username) - -Get user by user name - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class GetUserByNameExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The name that needs to be fetched. Use user1 for testing. - - try - { - // Get user by user name - User result = apiInstance.GetUserByName(username); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The name that needs to be fetched. Use user1 for testing. | - -### Return type - -[**User**](User.md) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | - | -| **400** | Invalid username supplied | - | -| **404** | User not found | - | - -[[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) - - -## LoginUser - -> string LoginUser (string username, string password) - -Logs user into the system - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class LoginUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | The user name for login - var password = password_example; // string | The password for login in clear text - - try - { - // Logs user into the system - string result = apiInstance.LoginUser(username, password); - Debug.WriteLine(result); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| The user name for login | - **password** | **string**| The password for login in clear text | - -### Return type - -**string** - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: application/xml, application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
| -| **400** | Invalid username/password supplied | - | - -[[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) - - -## LogoutUser - -> void LogoutUser () - -Logs out current logged in user session - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class LogoutUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - - try - { - // Logs out current logged in user session - apiInstance.LogoutUser(); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **0** | successful operation | - | - -[[Back to top]](#) -[[Back to API list]](../README.md#documentation-for-api-endpoints) -[[Back to Model list]](../README.md#documentation-for-models) -[[Back to README]](../README.md) - - -## UpdateUser - -> void UpdateUser (string username, User body) - -Updated user - -This can only be done by the logged in user. - -### Example - -```csharp -using System.Collections.Generic; -using System.Diagnostics; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Example -{ - public class UpdateUserExample - { - public static void Main() - { - Configuration.Default.BasePath = "http://petstore.swagger.io:80/v2"; - var apiInstance = new UserApi(Configuration.Default); - var username = username_example; // string | name that need to be deleted - var body = new User(); // User | Updated user object - - try - { - // Updated user - apiInstance.UpdateUser(username, body); - } - catch (ApiException e) - { - Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message ); - Debug.Print("Status Code: "+ e.ErrorCode); - Debug.Print(e.StackTrace); - } - } - } -} -``` - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **username** | **string**| name that need to be deleted | - **body** | [**User**](User.md)| Updated user object | - -### Return type - -void (empty response body) - -### Authorization - -No authorization required - -### HTTP request headers - -- **Content-Type**: Not defined -- **Accept**: Not defined - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **400** | Invalid user supplied | - | -| **404** | User not found | - | - -[[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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/XmlItem.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/XmlItem.md deleted file mode 100644 index 0dca90c706f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/XmlItem.md +++ /dev/null @@ -1,41 +0,0 @@ - -# Org.OpenAPITools.Model.XmlItem - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**AttributeString** | **string** | | [optional] -**AttributeNumber** | **decimal** | | [optional] -**AttributeInteger** | **int** | | [optional] -**AttributeBoolean** | **bool** | | [optional] -**WrappedArray** | **List<int>** | | [optional] -**NameString** | **string** | | [optional] -**NameNumber** | **decimal** | | [optional] -**NameInteger** | **int** | | [optional] -**NameBoolean** | **bool** | | [optional] -**NameArray** | **List<int>** | | [optional] -**NameWrappedArray** | **List<int>** | | [optional] -**PrefixString** | **string** | | [optional] -**PrefixNumber** | **decimal** | | [optional] -**PrefixInteger** | **int** | | [optional] -**PrefixBoolean** | **bool** | | [optional] -**PrefixArray** | **List<int>** | | [optional] -**PrefixWrappedArray** | **List<int>** | | [optional] -**NamespaceString** | **string** | | [optional] -**NamespaceNumber** | **decimal** | | [optional] -**NamespaceInteger** | **int** | | [optional] -**NamespaceBoolean** | **bool** | | [optional] -**NamespaceArray** | **List<int>** | | [optional] -**NamespaceWrappedArray** | **List<int>** | | [optional] -**PrefixNsString** | **string** | | [optional] -**PrefixNsNumber** | **decimal** | | [optional] -**PrefixNsInteger** | **int** | | [optional] -**PrefixNsBoolean** | **bool** | | [optional] -**PrefixNsArray** | **List<int>** | | [optional] -**PrefixNsWrappedArray** | **List<int>** | | [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) - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/git_push.sh b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/git_push.sh deleted file mode 100644 index 200e975d212..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/git_push.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ -# -# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" - -git_user_id=$1 -git_repo_id=$2 -release_note=$3 -git_host=$4 - -if [ "$git_host" = "" ]; then - git_host="github.com" - echo "[INFO] No command line input provided. Set \$git_host to $git_host" -fi - -if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" - echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" -fi - -if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" - echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" -fi - -if [ "$release_note" = "" ]; then - release_note="Minor update" - echo "[INFO] No command line input provided. Set \$release_note to $release_note" -fi - -# Initialize the local directory as a Git repository -git init - -# Adds the files in the local repository and stages them for commit. -git add . - -# Commits the tracked changes and prepares them to be pushed to a remote repository. -git commit -m "$release_note" - -# Sets the new remote -git_remote=`git remote` -if [ "$git_remote" = "" ]; then # git remote not defined - - if [ "$GIT_TOKEN" = "" ]; then - echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." - git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git - else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git - fi - -fi - -git pull origin master - -# Pushes (Forces) the changes in the local repository up to the remote repository -echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" -git push origin master 2>&1 | grep -v 'To https' - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/mono_nunit_test.sh b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/mono_nunit_test.sh deleted file mode 100644 index ef4209de27b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/mono_nunit_test.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/usr/bin/env bash -# -# Generated by: https://github.com/openapitools/openapi-generator.git -# - -wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -mozroots --import --sync - -echo "[INFO] remove bin/Debug/Org.OpenAPITools.Test.dll" -rm src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll 2> /dev/null - -echo "[INFO] install NUnit runners via NuGet" -wget -nc https://dist.nuget.org/win-x86-commandline/latest/nuget.exe -mozroots --import --sync -mono nuget.exe install src/Org.OpenAPITools.Test/packages.config -o packages - -echo "[INFO] Install NUnit Console 3.x runners via NuGet" -mono nuget.exe install NUnit.ConsoleRunner -Version 3.10.0 -OutputDirectory packages - -echo "[INFO] Build the solution and run the unit test" -xbuild Org.OpenAPITools.sln && \ - mono ./packages/NUnit.ConsoleRunner.3.10.0/tools/nunit3-console.exe src/Org.OpenAPITools.Test/bin/Debug/Org.OpenAPITools.Test.dll diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs deleted file mode 100644 index 626c8e8329d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/AnotherFakeApiTests.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing AnotherFakeApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class AnotherFakeApiTests - { - private AnotherFakeApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new AnotherFakeApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AnotherFakeApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' AnotherFakeApi - //Assert.IsInstanceOf(typeof(AnotherFakeApi), instance); - } - - - /// - /// Test Call123TestSpecialTags - /// - [Test] - public void Call123TestSpecialTagsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //ModelClient body = null; - //var response = instance.Call123TestSpecialTags(body); - //Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs deleted file mode 100644 index bdbcdb21efe..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/FakeApiTests.cs +++ /dev/null @@ -1,267 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing FakeApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class FakeApiTests - { - private FakeApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new FakeApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FakeApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' FakeApi - //Assert.IsInstanceOf(typeof(FakeApi), instance); - } - - - /// - /// Test CreateXmlItem - /// - [Test] - public void CreateXmlItemTest() - { - // TODO uncomment below to test the method and replace null with proper value - //XmlItem xmlItem = null; - //instance.CreateXmlItem(xmlItem); - - } - - /// - /// Test FakeOuterBooleanSerialize - /// - [Test] - public void FakeOuterBooleanSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //bool? body = null; - //var response = instance.FakeOuterBooleanSerialize(body); - //Assert.IsInstanceOf(typeof(bool), response, "response is bool"); - } - - /// - /// Test FakeOuterCompositeSerialize - /// - [Test] - public void FakeOuterCompositeSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //OuterComposite body = null; - //var response = instance.FakeOuterCompositeSerialize(body); - //Assert.IsInstanceOf(typeof(OuterComposite), response, "response is OuterComposite"); - } - - /// - /// Test FakeOuterNumberSerialize - /// - [Test] - public void FakeOuterNumberSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //decimal? body = null; - //var response = instance.FakeOuterNumberSerialize(body); - //Assert.IsInstanceOf(typeof(decimal), response, "response is decimal"); - } - - /// - /// Test FakeOuterStringSerialize - /// - [Test] - public void FakeOuterStringSerializeTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string body = null; - //var response = instance.FakeOuterStringSerialize(body); - //Assert.IsInstanceOf(typeof(string), response, "response is string"); - } - - /// - /// Test TestBodyWithFileSchema - /// - [Test] - public void TestBodyWithFileSchemaTest() - { - // TODO uncomment below to test the method and replace null with proper value - //FileSchemaTestClass body = null; - //instance.TestBodyWithFileSchema(body); - - } - - /// - /// Test TestBodyWithQueryParams - /// - [Test] - public void TestBodyWithQueryParamsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string query = null; - //User body = null; - //instance.TestBodyWithQueryParams(query, body); - - } - - /// - /// Test TestClientModel - /// - [Test] - public void TestClientModelTest() - { - // TODO uncomment below to test the method and replace null with proper value - //ModelClient body = null; - //var response = instance.TestClientModel(body); - //Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient"); - } - - /// - /// Test TestEndpointParameters - /// - [Test] - public void TestEndpointParametersTest() - { - // TODO uncomment below to test the method and replace null with proper value - //decimal number = null; - //double _double = null; - //string patternWithoutDelimiter = null; - //byte[] _byte = null; - //int? integer = null; - //int? int32 = null; - //long? int64 = null; - //float? _float = null; - //string _string = null; - //System.IO.Stream binary = null; - //DateTime? date = null; - //DateTime? dateTime = null; - //string password = null; - //string callback = null; - //instance.TestEndpointParameters(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); - - } - - /// - /// Test TestEnumParameters - /// - [Test] - public void TestEnumParametersTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List enumHeaderStringArray = null; - //string enumHeaderString = null; - //List enumQueryStringArray = null; - //string enumQueryString = null; - //int? enumQueryInteger = null; - //double? enumQueryDouble = null; - //List enumFormStringArray = null; - //string enumFormString = null; - //instance.TestEnumParameters(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - - } - - /// - /// Test TestGroupParameters - /// - [Test] - public void TestGroupParametersTest() - { - // TODO uncomment below to test the method and replace null with proper value - //int requiredStringGroup = null; - //bool requiredBooleanGroup = null; - //long requiredInt64Group = null; - //int? stringGroup = null; - //bool? booleanGroup = null; - //long? int64Group = null; - //instance.TestGroupParameters(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - - } - - /// - /// Test TestInlineAdditionalProperties - /// - [Test] - public void TestInlineAdditionalPropertiesTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Dictionary param = null; - //instance.TestInlineAdditionalProperties(param); - - } - - /// - /// Test TestJsonFormData - /// - [Test] - public void TestJsonFormDataTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string param = null; - //string param2 = null; - //instance.TestJsonFormData(param, param2); - - } - - /// - /// Test TestQueryParameterCollectionFormat - /// - [Test] - public void TestQueryParameterCollectionFormatTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List pipe = null; - //List ioutil = null; - //List http = null; - //List url = null; - //List context = null; - //instance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context); - - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs deleted file mode 100644 index f73f71bc211..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/FakeClassnameTags123ApiTests.cs +++ /dev/null @@ -1,80 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing FakeClassnameTags123Api - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class FakeClassnameTags123ApiTests - { - private FakeClassnameTags123Api instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new FakeClassnameTags123Api(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FakeClassnameTags123Api - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' FakeClassnameTags123Api - //Assert.IsInstanceOf(typeof(FakeClassnameTags123Api), instance); - } - - - /// - /// Test TestClassname - /// - [Test] - public void TestClassnameTest() - { - // TODO uncomment below to test the method and replace null with proper value - //ModelClient body = null; - //var response = instance.TestClassname(body); - //Assert.IsInstanceOf(typeof(ModelClient), response, "response is ModelClient"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/PetApiTests.cs deleted file mode 100644 index ef563f71442..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/PetApiTests.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing PetApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class PetApiTests - { - private PetApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new PetApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of PetApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' PetApi - //Assert.IsInstanceOf(typeof(PetApi), instance); - } - - - /// - /// Test AddPet - /// - [Test] - public void AddPetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Pet body = null; - //instance.AddPet(body); - - } - - /// - /// Test DeletePet - /// - [Test] - public void DeletePetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //string apiKey = null; - //instance.DeletePet(petId, apiKey); - - } - - /// - /// Test FindPetsByStatus - /// - [Test] - public void FindPetsByStatusTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List status = null; - //var response = instance.FindPetsByStatus(status); - //Assert.IsInstanceOf(typeof(List), response, "response is List"); - } - - /// - /// Test FindPetsByTags - /// - [Test] - public void FindPetsByTagsTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List tags = null; - //var response = instance.FindPetsByTags(tags); - //Assert.IsInstanceOf(typeof(List), response, "response is List"); - } - - /// - /// Test GetPetById - /// - [Test] - public void GetPetByIdTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //var response = instance.GetPetById(petId); - //Assert.IsInstanceOf(typeof(Pet), response, "response is Pet"); - } - - /// - /// Test UpdatePet - /// - [Test] - public void UpdatePetTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Pet body = null; - //instance.UpdatePet(body); - - } - - /// - /// Test UpdatePetWithForm - /// - [Test] - public void UpdatePetWithFormTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //string name = null; - //string status = null; - //instance.UpdatePetWithForm(petId, name, status); - - } - - /// - /// Test UploadFile - /// - [Test] - public void UploadFileTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //string additionalMetadata = null; - //System.IO.Stream file = null; - //var response = instance.UploadFile(petId, additionalMetadata, file); - //Assert.IsInstanceOf(typeof(ApiResponse), response, "response is ApiResponse"); - } - - /// - /// Test UploadFileWithRequiredFile - /// - [Test] - public void UploadFileWithRequiredFileTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long petId = null; - //System.IO.Stream requiredFile = null; - //string additionalMetadata = null; - //var response = instance.UploadFileWithRequiredFile(petId, requiredFile, additionalMetadata); - //Assert.IsInstanceOf(typeof(ApiResponse), response, "response is ApiResponse"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs deleted file mode 100644 index 969eaa7a2ab..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/StoreApiTests.cs +++ /dev/null @@ -1,115 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing StoreApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class StoreApiTests - { - private StoreApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new StoreApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of StoreApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' StoreApi - //Assert.IsInstanceOf(typeof(StoreApi), instance); - } - - - /// - /// Test DeleteOrder - /// - [Test] - public void DeleteOrderTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string orderId = null; - //instance.DeleteOrder(orderId); - - } - - /// - /// Test GetInventory - /// - [Test] - public void GetInventoryTest() - { - // TODO uncomment below to test the method and replace null with proper value - //var response = instance.GetInventory(); - //Assert.IsInstanceOf(typeof(Dictionary), response, "response is Dictionary"); - } - - /// - /// Test GetOrderById - /// - [Test] - public void GetOrderByIdTest() - { - // TODO uncomment below to test the method and replace null with proper value - //long orderId = null; - //var response = instance.GetOrderById(orderId); - //Assert.IsInstanceOf(typeof(Order), response, "response is Order"); - } - - /// - /// Test PlaceOrder - /// - [Test] - public void PlaceOrderTest() - { - // TODO uncomment below to test the method and replace null with proper value - //Order body = null; - //var response = instance.PlaceOrder(body); - //Assert.IsInstanceOf(typeof(Order), response, "response is Order"); - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/UserApiTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/UserApiTests.cs deleted file mode 100644 index a79cad43130..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Api/UserApiTests.cs +++ /dev/null @@ -1,165 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.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 -{ - /// - /// Class for testing UserApi - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the API endpoint. - /// - public class UserApiTests - { - private UserApi instance; - - /// - /// Setup before each unit test - /// - [SetUp] - public void Init() - { - instance = new UserApi(); - } - - /// - /// Clean up after each unit test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of UserApi - /// - [Test] - public void InstanceTest() - { - // TODO uncomment below to test 'IsInstanceOf' UserApi - //Assert.IsInstanceOf(typeof(UserApi), instance); - } - - - /// - /// Test CreateUser - /// - [Test] - public void CreateUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //User body = null; - //instance.CreateUser(body); - - } - - /// - /// Test CreateUsersWithArrayInput - /// - [Test] - public void CreateUsersWithArrayInputTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List body = null; - //instance.CreateUsersWithArrayInput(body); - - } - - /// - /// Test CreateUsersWithListInput - /// - [Test] - public void CreateUsersWithListInputTest() - { - // TODO uncomment below to test the method and replace null with proper value - //List body = null; - //instance.CreateUsersWithListInput(body); - - } - - /// - /// Test DeleteUser - /// - [Test] - public void DeleteUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //instance.DeleteUser(username); - - } - - /// - /// Test GetUserByName - /// - [Test] - public void GetUserByNameTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //var response = instance.GetUserByName(username); - //Assert.IsInstanceOf(typeof(User), response, "response is User"); - } - - /// - /// Test LoginUser - /// - [Test] - public void LoginUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //string password = null; - //var response = instance.LoginUser(username, password); - //Assert.IsInstanceOf(typeof(string), response, "response is string"); - } - - /// - /// Test LogoutUser - /// - [Test] - public void LogoutUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //instance.LogoutUser(); - - } - - /// - /// Test UpdateUser - /// - [Test] - public void UpdateUserTest() - { - // TODO uncomment below to test the method and replace null with proper value - //string username = null; - //User body = null; - //instance.UpdateUser(username, body); - - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs deleted file mode 100644 index 03151430729..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesAnyTypeTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesAnyType - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesAnyTypeTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesAnyType - //private AdditionalPropertiesAnyType instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesAnyType - //instance = new AdditionalPropertiesAnyType(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesAnyType - /// - [Test] - public void AdditionalPropertiesAnyTypeInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesAnyType - //Assert.IsInstanceOf(typeof(AdditionalPropertiesAnyType), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs deleted file mode 100644 index e75114595b6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesArrayTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesArray - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesArrayTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesArray - //private AdditionalPropertiesArray instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesArray - //instance = new AdditionalPropertiesArray(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesArray - /// - [Test] - public void AdditionalPropertiesArrayInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesArray - //Assert.IsInstanceOf(typeof(AdditionalPropertiesArray), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs deleted file mode 100644 index c09b604fae8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesBooleanTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesBoolean - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesBooleanTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesBoolean - //private AdditionalPropertiesBoolean instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesBoolean - //instance = new AdditionalPropertiesBoolean(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesBoolean - /// - [Test] - public void AdditionalPropertiesBooleanInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesBoolean - //Assert.IsInstanceOf(typeof(AdditionalPropertiesBoolean), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs deleted file mode 100644 index 4ee461b5ed0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesClassTests.cs +++ /dev/null @@ -1,159 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesClassTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesClass - //private AdditionalPropertiesClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesClass - //instance = new AdditionalPropertiesClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesClass - /// - [Test] - public void AdditionalPropertiesClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesClass - //Assert.IsInstanceOf(typeof(AdditionalPropertiesClass), instance); - } - - - /// - /// Test the property 'MapString' - /// - [Test] - public void MapStringTest() - { - // TODO unit test for the property 'MapString' - } - /// - /// Test the property 'MapNumber' - /// - [Test] - public void MapNumberTest() - { - // TODO unit test for the property 'MapNumber' - } - /// - /// Test the property 'MapInteger' - /// - [Test] - public void MapIntegerTest() - { - // TODO unit test for the property 'MapInteger' - } - /// - /// Test the property 'MapBoolean' - /// - [Test] - public void MapBooleanTest() - { - // TODO unit test for the property 'MapBoolean' - } - /// - /// Test the property 'MapArrayInteger' - /// - [Test] - public void MapArrayIntegerTest() - { - // TODO unit test for the property 'MapArrayInteger' - } - /// - /// Test the property 'MapArrayAnytype' - /// - [Test] - public void MapArrayAnytypeTest() - { - // TODO unit test for the property 'MapArrayAnytype' - } - /// - /// Test the property 'MapMapString' - /// - [Test] - public void MapMapStringTest() - { - // TODO unit test for the property 'MapMapString' - } - /// - /// Test the property 'MapMapAnytype' - /// - [Test] - public void MapMapAnytypeTest() - { - // TODO unit test for the property 'MapMapAnytype' - } - /// - /// Test the property 'Anytype1' - /// - [Test] - public void Anytype1Test() - { - // TODO unit test for the property 'Anytype1' - } - /// - /// Test the property 'Anytype2' - /// - [Test] - public void Anytype2Test() - { - // TODO unit test for the property 'Anytype2' - } - /// - /// Test the property 'Anytype3' - /// - [Test] - public void Anytype3Test() - { - // TODO unit test for the property 'Anytype3' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs deleted file mode 100644 index 98e65b0e548..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesIntegerTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesInteger - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesIntegerTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesInteger - //private AdditionalPropertiesInteger instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesInteger - //instance = new AdditionalPropertiesInteger(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesInteger - /// - [Test] - public void AdditionalPropertiesIntegerInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesInteger - //Assert.IsInstanceOf(typeof(AdditionalPropertiesInteger), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs deleted file mode 100644 index b20dac9314a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesNumberTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesNumber - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesNumberTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesNumber - //private AdditionalPropertiesNumber instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesNumber - //instance = new AdditionalPropertiesNumber(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesNumber - /// - [Test] - public void AdditionalPropertiesNumberInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesNumber - //Assert.IsInstanceOf(typeof(AdditionalPropertiesNumber), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs deleted file mode 100644 index 342cbd47075..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesObjectTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesObject - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesObjectTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesObject - //private AdditionalPropertiesObject instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesObject - //instance = new AdditionalPropertiesObject(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesObject - /// - [Test] - public void AdditionalPropertiesObjectInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesObject - //Assert.IsInstanceOf(typeof(AdditionalPropertiesObject), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs deleted file mode 100644 index 273ade918d8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AdditionalPropertiesStringTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing AdditionalPropertiesString - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AdditionalPropertiesStringTests - { - // TODO uncomment below to declare an instance variable for AdditionalPropertiesString - //private AdditionalPropertiesString instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of AdditionalPropertiesString - //instance = new AdditionalPropertiesString(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of AdditionalPropertiesString - /// - [Test] - public void AdditionalPropertiesStringInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" AdditionalPropertiesString - //Assert.IsInstanceOf(typeof(AdditionalPropertiesString), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AnimalTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AnimalTests.cs deleted file mode 100644 index f404924f459..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/AnimalTests.cs +++ /dev/null @@ -1,114 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Animal - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class AnimalTests - { - // TODO uncomment below to declare an instance variable for Animal - //private Animal instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Animal - //instance = new Animal(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Animal - /// - [Test] - public void AnimalInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Animal - //Assert.IsInstanceOf(typeof(Animal), instance); - } - - /// - /// Test deserialize a Dog from type Animal - /// - [Test] - public void DogDeserializeFromAnimalTest() - { - // TODO uncomment below to test deserialize a Dog from type Animal - //Assert.IsInstanceOf(typeof(Animal), JsonConvert.DeserializeObject(new Dog().ToJson())); - } - /// - /// Test deserialize a Cat from type Animal - /// - [Test] - public void CatDeserializeFromAnimalTest() - { - // TODO uncomment below to test deserialize a Cat from type Animal - //Assert.IsInstanceOf(typeof(Animal), JsonConvert.DeserializeObject(new Cat().ToJson())); - } - /// - /// Test deserialize a BigCat from type Cat - /// - [Test] - public void BigCatDeserializeFromCatTest() - { - // TODO uncomment below to test deserialize a BigCat from type Cat - //Assert.IsInstanceOf(typeof(Cat), JsonConvert.DeserializeObject(new BigCat().ToJson())); - } - - /// - /// Test the property 'ClassName' - /// - [Test] - public void ClassNameTest() - { - // TODO unit test for the property 'ClassName' - } - /// - /// Test the property 'Color' - /// - [Test] - public void ColorTest() - { - // TODO unit test for the property 'Color' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs deleted file mode 100644 index 2442b4ef55d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ApiResponseTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ApiResponse - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ApiResponseTests - { - // TODO uncomment below to declare an instance variable for ApiResponse - //private ApiResponse instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ApiResponse - //instance = new ApiResponse(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ApiResponse - /// - [Test] - public void ApiResponseInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ApiResponse - //Assert.IsInstanceOf(typeof(ApiResponse), instance); - } - - - /// - /// Test the property 'Code' - /// - [Test] - public void CodeTest() - { - // TODO unit test for the property 'Code' - } - /// - /// Test the property 'Type' - /// - [Test] - public void TypeTest() - { - // TODO unit test for the property 'Type' - } - /// - /// Test the property 'Message' - /// - [Test] - public void MessageTest() - { - // TODO unit test for the property 'Message' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs deleted file mode 100644 index 094432c3361..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ArrayOfArrayOfNumberOnlyTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ArrayOfArrayOfNumberOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ArrayOfArrayOfNumberOnlyTests - { - // TODO uncomment below to declare an instance variable for ArrayOfArrayOfNumberOnly - //private ArrayOfArrayOfNumberOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ArrayOfArrayOfNumberOnly - //instance = new ArrayOfArrayOfNumberOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ArrayOfArrayOfNumberOnly - /// - [Test] - public void ArrayOfArrayOfNumberOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ArrayOfArrayOfNumberOnly - //Assert.IsInstanceOf(typeof(ArrayOfArrayOfNumberOnly), instance); - } - - - /// - /// Test the property 'ArrayArrayNumber' - /// - [Test] - public void ArrayArrayNumberTest() - { - // TODO unit test for the property 'ArrayArrayNumber' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs deleted file mode 100644 index d95bf3883d9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ArrayOfNumberOnlyTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ArrayOfNumberOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ArrayOfNumberOnlyTests - { - // TODO uncomment below to declare an instance variable for ArrayOfNumberOnly - //private ArrayOfNumberOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ArrayOfNumberOnly - //instance = new ArrayOfNumberOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ArrayOfNumberOnly - /// - [Test] - public void ArrayOfNumberOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ArrayOfNumberOnly - //Assert.IsInstanceOf(typeof(ArrayOfNumberOnly), instance); - } - - - /// - /// Test the property 'ArrayNumber' - /// - [Test] - public void ArrayNumberTest() - { - // TODO unit test for the property 'ArrayNumber' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs deleted file mode 100644 index af09220da3c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ArrayTestTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ArrayTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ArrayTestTests - { - // TODO uncomment below to declare an instance variable for ArrayTest - //private ArrayTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ArrayTest - //instance = new ArrayTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ArrayTest - /// - [Test] - public void ArrayTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ArrayTest - //Assert.IsInstanceOf(typeof(ArrayTest), instance); - } - - - /// - /// Test the property 'ArrayOfString' - /// - [Test] - public void ArrayOfStringTest() - { - // TODO unit test for the property 'ArrayOfString' - } - /// - /// Test the property 'ArrayArrayOfInteger' - /// - [Test] - public void ArrayArrayOfIntegerTest() - { - // TODO unit test for the property 'ArrayArrayOfInteger' - } - /// - /// Test the property 'ArrayArrayOfModel' - /// - [Test] - public void ArrayArrayOfModelTest() - { - // TODO unit test for the property 'ArrayArrayOfModel' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs deleted file mode 100644 index 4cbdb4b8a5e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/BigCatAllOfTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing BigCatAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class BigCatAllOfTests - { - // TODO uncomment below to declare an instance variable for BigCatAllOf - //private BigCatAllOf instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of BigCatAllOf - //instance = new BigCatAllOf(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of BigCatAllOf - /// - [Test] - public void BigCatAllOfInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" BigCatAllOf - //Assert.IsInstanceOf(typeof(BigCatAllOf), instance); - } - - - /// - /// Test the property 'Kind' - /// - [Test] - public void KindTest() - { - // TODO unit test for the property 'Kind' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/BigCatTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/BigCatTests.cs deleted file mode 100644 index 1d78ea9f1e6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/BigCatTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing BigCat - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class BigCatTests - { - // TODO uncomment below to declare an instance variable for BigCat - //private BigCat instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of BigCat - //instance = new BigCat(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of BigCat - /// - [Test] - public void BigCatInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" BigCat - //Assert.IsInstanceOf(typeof(BigCat), instance); - } - - - /// - /// Test the property 'Kind' - /// - [Test] - public void KindTest() - { - // TODO unit test for the property 'Kind' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs deleted file mode 100644 index dd2156d3ba8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/CapitalizationTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Capitalization - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CapitalizationTests - { - // TODO uncomment below to declare an instance variable for Capitalization - //private Capitalization instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Capitalization - //instance = new Capitalization(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Capitalization - /// - [Test] - public void CapitalizationInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Capitalization - //Assert.IsInstanceOf(typeof(Capitalization), instance); - } - - - /// - /// Test the property 'SmallCamel' - /// - [Test] - public void SmallCamelTest() - { - // TODO unit test for the property 'SmallCamel' - } - /// - /// Test the property 'CapitalCamel' - /// - [Test] - public void CapitalCamelTest() - { - // TODO unit test for the property 'CapitalCamel' - } - /// - /// Test the property 'SmallSnake' - /// - [Test] - public void SmallSnakeTest() - { - // TODO unit test for the property 'SmallSnake' - } - /// - /// Test the property 'CapitalSnake' - /// - [Test] - public void CapitalSnakeTest() - { - // TODO unit test for the property 'CapitalSnake' - } - /// - /// Test the property 'SCAETHFlowPoints' - /// - [Test] - public void SCAETHFlowPointsTest() - { - // TODO unit test for the property 'SCAETHFlowPoints' - } - /// - /// Test the property 'ATT_NAME' - /// - [Test] - public void ATT_NAMETest() - { - // TODO unit test for the property 'ATT_NAME' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs deleted file mode 100644 index d7afe6310fa..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/CatAllOfTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing CatAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CatAllOfTests - { - // TODO uncomment below to declare an instance variable for CatAllOf - //private CatAllOf instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of CatAllOf - //instance = new CatAllOf(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of CatAllOf - /// - [Test] - public void CatAllOfInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" CatAllOf - //Assert.IsInstanceOf(typeof(CatAllOf), instance); - } - - - /// - /// Test the property 'Declawed' - /// - [Test] - public void DeclawedTest() - { - // TODO unit test for the property 'Declawed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/CatTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/CatTests.cs deleted file mode 100644 index 8b89be0ec8d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/CatTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Cat - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CatTests - { - // TODO uncomment below to declare an instance variable for Cat - //private Cat instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Cat - //instance = new Cat(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Cat - /// - [Test] - public void CatInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Cat - //Assert.IsInstanceOf(typeof(Cat), instance); - } - - - /// - /// Test the property 'Declawed' - /// - [Test] - public void DeclawedTest() - { - // TODO unit test for the property 'Declawed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/CategoryTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/CategoryTests.cs deleted file mode 100644 index e65b9ab1c01..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/CategoryTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Category - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class CategoryTests - { - // TODO uncomment below to declare an instance variable for Category - //private Category instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Category - //instance = new Category(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Category - /// - [Test] - public void CategoryInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Category - //Assert.IsInstanceOf(typeof(Category), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs deleted file mode 100644 index 6302a4d8dd9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ClassModelTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ClassModel - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ClassModelTests - { - // TODO uncomment below to declare an instance variable for ClassModel - //private ClassModel instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ClassModel - //instance = new ClassModel(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ClassModel - /// - [Test] - public void ClassModelInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ClassModel - //Assert.IsInstanceOf(typeof(ClassModel), instance); - } - - - /// - /// Test the property 'Class' - /// - [Test] - public void ClassTest() - { - // TODO unit test for the property 'Class' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs deleted file mode 100644 index 30f5bed38e1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/DogAllOfTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing DogAllOf - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class DogAllOfTests - { - // TODO uncomment below to declare an instance variable for DogAllOf - //private DogAllOf instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of DogAllOf - //instance = new DogAllOf(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of DogAllOf - /// - [Test] - public void DogAllOfInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" DogAllOf - //Assert.IsInstanceOf(typeof(DogAllOf), instance); - } - - - /// - /// Test the property 'Breed' - /// - [Test] - public void BreedTest() - { - // TODO unit test for the property 'Breed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/DogTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/DogTests.cs deleted file mode 100644 index fba682a3f9e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/DogTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Dog - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class DogTests - { - // TODO uncomment below to declare an instance variable for Dog - //private Dog instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Dog - //instance = new Dog(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Dog - /// - [Test] - public void DogInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Dog - //Assert.IsInstanceOf(typeof(Dog), instance); - } - - - /// - /// Test the property 'Breed' - /// - [Test] - public void BreedTest() - { - // TODO unit test for the property 'Breed' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs deleted file mode 100644 index 065ae99b613..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/EnumArraysTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing EnumArrays - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class EnumArraysTests - { - // TODO uncomment below to declare an instance variable for EnumArrays - //private EnumArrays instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of EnumArrays - //instance = new EnumArrays(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of EnumArrays - /// - [Test] - public void EnumArraysInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" EnumArrays - //Assert.IsInstanceOf(typeof(EnumArrays), instance); - } - - - /// - /// Test the property 'JustSymbol' - /// - [Test] - public void JustSymbolTest() - { - // TODO unit test for the property 'JustSymbol' - } - /// - /// Test the property 'ArrayEnum' - /// - [Test] - public void ArrayEnumTest() - { - // TODO unit test for the property 'ArrayEnum' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs deleted file mode 100644 index 2ff4f5ab8b0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/EnumClassTests.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing EnumClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class EnumClassTests - { - // TODO uncomment below to declare an instance variable for EnumClass - //private EnumClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of EnumClass - //instance = new EnumClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of EnumClass - /// - [Test] - public void EnumClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" EnumClass - //Assert.IsInstanceOf(typeof(EnumClass), instance); - } - - - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs deleted file mode 100644 index 0ea4d901d50..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/EnumTestTests.cs +++ /dev/null @@ -1,111 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing EnumTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class EnumTestTests - { - // TODO uncomment below to declare an instance variable for EnumTest - //private EnumTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of EnumTest - //instance = new EnumTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of EnumTest - /// - [Test] - public void EnumTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" EnumTest - //Assert.IsInstanceOf(typeof(EnumTest), instance); - } - - - /// - /// Test the property 'EnumString' - /// - [Test] - public void EnumStringTest() - { - // TODO unit test for the property 'EnumString' - } - /// - /// Test the property 'EnumStringRequired' - /// - [Test] - public void EnumStringRequiredTest() - { - // TODO unit test for the property 'EnumStringRequired' - } - /// - /// Test the property 'EnumInteger' - /// - [Test] - public void EnumIntegerTest() - { - // TODO unit test for the property 'EnumInteger' - } - /// - /// Test the property 'EnumNumber' - /// - [Test] - public void EnumNumberTest() - { - // TODO unit test for the property 'EnumNumber' - } - /// - /// Test the property 'OuterEnum' - /// - [Test] - public void OuterEnumTest() - { - // TODO unit test for the property 'OuterEnum' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs deleted file mode 100644 index 02ae51ce37e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/FileSchemaTestClassTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing FileSchemaTestClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class FileSchemaTestClassTests - { - // TODO uncomment below to declare an instance variable for FileSchemaTestClass - //private FileSchemaTestClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of FileSchemaTestClass - //instance = new FileSchemaTestClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FileSchemaTestClass - /// - [Test] - public void FileSchemaTestClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" FileSchemaTestClass - //Assert.IsInstanceOf(typeof(FileSchemaTestClass), instance); - } - - - /// - /// Test the property 'File' - /// - [Test] - public void FileTest() - { - // TODO unit test for the property 'File' - } - /// - /// Test the property 'Files' - /// - [Test] - public void FilesTest() - { - // TODO unit test for the property 'Files' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/FileTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/FileTests.cs deleted file mode 100644 index b18213afe49..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/FileTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing File - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class FileTests - { - // TODO uncomment below to declare an instance variable for File - //private File instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of File - //instance = new File(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of File - /// - [Test] - public void FileInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" File - //Assert.IsInstanceOf(typeof(File), instance); - } - - - /// - /// Test the property 'SourceURI' - /// - [Test] - public void SourceURITest() - { - // TODO unit test for the property 'SourceURI' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs deleted file mode 100644 index d5b7b0ba885..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/FormatTestTests.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing FormatTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class FormatTestTests - { - // TODO uncomment below to declare an instance variable for FormatTest - //private FormatTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of FormatTest - //instance = new FormatTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of FormatTest - /// - [Test] - public void FormatTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" FormatTest - //Assert.IsInstanceOf(typeof(FormatTest), instance); - } - - - /// - /// Test the property 'Integer' - /// - [Test] - public void IntegerTest() - { - // TODO unit test for the property 'Integer' - } - /// - /// Test the property 'Int32' - /// - [Test] - public void Int32Test() - { - // TODO unit test for the property 'Int32' - } - /// - /// Test the property 'Int64' - /// - [Test] - public void Int64Test() - { - // TODO unit test for the property 'Int64' - } - /// - /// Test the property 'Number' - /// - [Test] - public void NumberTest() - { - // TODO unit test for the property 'Number' - } - /// - /// Test the property 'Float' - /// - [Test] - public void FloatTest() - { - // TODO unit test for the property 'Float' - } - /// - /// Test the property 'Double' - /// - [Test] - public void DoubleTest() - { - // TODO unit test for the property 'Double' - } - /// - /// Test the property 'String' - /// - [Test] - public void StringTest() - { - // TODO unit test for the property 'String' - } - /// - /// Test the property 'Byte' - /// - [Test] - public void ByteTest() - { - // TODO unit test for the property 'Byte' - } - /// - /// Test the property 'Binary' - /// - [Test] - public void BinaryTest() - { - // TODO unit test for the property 'Binary' - } - /// - /// Test the property 'Date' - /// - [Test] - public void DateTest() - { - // TODO unit test for the property 'Date' - } - /// - /// Test the property 'DateTime' - /// - [Test] - public void DateTimeTest() - { - // TODO unit test for the property 'DateTime' - } - /// - /// Test the property 'Uuid' - /// - [Test] - public void UuidTest() - { - // TODO unit test for the property 'Uuid' - } - /// - /// Test the property 'Password' - /// - [Test] - public void PasswordTest() - { - // TODO unit test for the property 'Password' - } - /// - /// Test the property 'BigDecimal' - /// - [Test] - public void BigDecimalTest() - { - // TODO unit test for the property 'BigDecimal' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs deleted file mode 100644 index 0c1ec60ef46..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/HasOnlyReadOnlyTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing HasOnlyReadOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class HasOnlyReadOnlyTests - { - // TODO uncomment below to declare an instance variable for HasOnlyReadOnly - //private HasOnlyReadOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of HasOnlyReadOnly - //instance = new HasOnlyReadOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of HasOnlyReadOnly - /// - [Test] - public void HasOnlyReadOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" HasOnlyReadOnly - //Assert.IsInstanceOf(typeof(HasOnlyReadOnly), instance); - } - - - /// - /// Test the property 'Bar' - /// - [Test] - public void BarTest() - { - // TODO unit test for the property 'Bar' - } - /// - /// Test the property 'Foo' - /// - [Test] - public void FooTest() - { - // TODO unit test for the property 'Foo' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ListTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ListTests.cs deleted file mode 100644 index 57f55da25ed..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ListTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing List - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ListTests - { - // TODO uncomment below to declare an instance variable for List - //private List instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of List - //instance = new List(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of List - /// - [Test] - public void ListInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" List - //Assert.IsInstanceOf(typeof(List), instance); - } - - - /// - /// Test the property '_123List' - /// - [Test] - public void _123ListTest() - { - // TODO unit test for the property '_123List' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/MapTestTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/MapTestTests.cs deleted file mode 100644 index 53220cdd78a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/MapTestTests.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing MapTest - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MapTestTests - { - // TODO uncomment below to declare an instance variable for MapTest - //private MapTest instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of MapTest - //instance = new MapTest(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of MapTest - /// - [Test] - public void MapTestInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" MapTest - //Assert.IsInstanceOf(typeof(MapTest), instance); - } - - - /// - /// Test the property 'MapMapOfString' - /// - [Test] - public void MapMapOfStringTest() - { - // TODO unit test for the property 'MapMapOfString' - } - /// - /// Test the property 'MapOfEnumString' - /// - [Test] - public void MapOfEnumStringTest() - { - // TODO unit test for the property 'MapOfEnumString' - } - /// - /// Test the property 'DirectMap' - /// - [Test] - public void DirectMapTest() - { - // TODO unit test for the property 'DirectMap' - } - /// - /// Test the property 'IndirectMap' - /// - [Test] - public void IndirectMapTest() - { - // TODO unit test for the property 'IndirectMap' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs deleted file mode 100644 index 792db793c52..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/MixedPropertiesAndAdditionalPropertiesClassTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing MixedPropertiesAndAdditionalPropertiesClass - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class MixedPropertiesAndAdditionalPropertiesClassTests - { - // TODO uncomment below to declare an instance variable for MixedPropertiesAndAdditionalPropertiesClass - //private MixedPropertiesAndAdditionalPropertiesClass instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of MixedPropertiesAndAdditionalPropertiesClass - //instance = new MixedPropertiesAndAdditionalPropertiesClass(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of MixedPropertiesAndAdditionalPropertiesClass - /// - [Test] - public void MixedPropertiesAndAdditionalPropertiesClassInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" MixedPropertiesAndAdditionalPropertiesClass - //Assert.IsInstanceOf(typeof(MixedPropertiesAndAdditionalPropertiesClass), instance); - } - - - /// - /// Test the property 'Uuid' - /// - [Test] - public void UuidTest() - { - // TODO unit test for the property 'Uuid' - } - /// - /// Test the property 'DateTime' - /// - [Test] - public void DateTimeTest() - { - // TODO unit test for the property 'DateTime' - } - /// - /// Test the property 'Map' - /// - [Test] - public void MapTest() - { - // TODO unit test for the property 'Map' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs deleted file mode 100644 index 68ed58223de..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/Model200ResponseTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Model200Response - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class Model200ResponseTests - { - // TODO uncomment below to declare an instance variable for Model200Response - //private Model200Response instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Model200Response - //instance = new Model200Response(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Model200Response - /// - [Test] - public void Model200ResponseInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Model200Response - //Assert.IsInstanceOf(typeof(Model200Response), instance); - } - - - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'Class' - /// - [Test] - public void ClassTest() - { - // TODO unit test for the property 'Class' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs deleted file mode 100644 index 0313c8fd1a6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ModelClientTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ModelClient - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ModelClientTests - { - // TODO uncomment below to declare an instance variable for ModelClient - //private ModelClient instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ModelClient - //instance = new ModelClient(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ModelClient - /// - [Test] - public void ModelClientInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ModelClient - //Assert.IsInstanceOf(typeof(ModelClient), instance); - } - - - /// - /// Test the property '__Client' - /// - [Test] - public void __ClientTest() - { - // TODO unit test for the property '__Client' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/NameTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/NameTests.cs deleted file mode 100644 index eb5fb91b0f5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/NameTests.cs +++ /dev/null @@ -1,103 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Name - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class NameTests - { - // TODO uncomment below to declare an instance variable for Name - //private Name instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Name - //instance = new Name(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Name - /// - [Test] - public void NameInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Name - //Assert.IsInstanceOf(typeof(Name), instance); - } - - - /// - /// Test the property '_Name' - /// - [Test] - public void _NameTest() - { - // TODO unit test for the property '_Name' - } - /// - /// Test the property 'SnakeCase' - /// - [Test] - public void SnakeCaseTest() - { - // TODO unit test for the property 'SnakeCase' - } - /// - /// Test the property 'Property' - /// - [Test] - public void PropertyTest() - { - // TODO unit test for the property 'Property' - } - /// - /// Test the property '_123Number' - /// - [Test] - public void _123NumberTest() - { - // TODO unit test for the property '_123Number' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs deleted file mode 100644 index 5f90f85f79c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/NumberOnlyTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing NumberOnly - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class NumberOnlyTests - { - // TODO uncomment below to declare an instance variable for NumberOnly - //private NumberOnly instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of NumberOnly - //instance = new NumberOnly(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of NumberOnly - /// - [Test] - public void NumberOnlyInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" NumberOnly - //Assert.IsInstanceOf(typeof(NumberOnly), instance); - } - - - /// - /// Test the property 'JustNumber' - /// - [Test] - public void JustNumberTest() - { - // TODO unit test for the property 'JustNumber' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/OrderTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/OrderTests.cs deleted file mode 100644 index 7d155bb54cd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/OrderTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Order - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OrderTests - { - // TODO uncomment below to declare an instance variable for Order - //private Order instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Order - //instance = new Order(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Order - /// - [Test] - public void OrderInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Order - //Assert.IsInstanceOf(typeof(Order), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'PetId' - /// - [Test] - public void PetIdTest() - { - // TODO unit test for the property 'PetId' - } - /// - /// Test the property 'Quantity' - /// - [Test] - public void QuantityTest() - { - // TODO unit test for the property 'Quantity' - } - /// - /// Test the property 'ShipDate' - /// - [Test] - public void ShipDateTest() - { - // TODO unit test for the property 'ShipDate' - } - /// - /// Test the property 'Status' - /// - [Test] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } - /// - /// Test the property 'Complete' - /// - [Test] - public void CompleteTest() - { - // TODO unit test for the property 'Complete' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs deleted file mode 100644 index 6dd51d6f49e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/OuterCompositeTests.cs +++ /dev/null @@ -1,95 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing OuterComposite - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OuterCompositeTests - { - // TODO uncomment below to declare an instance variable for OuterComposite - //private OuterComposite instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of OuterComposite - //instance = new OuterComposite(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of OuterComposite - /// - [Test] - public void OuterCompositeInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" OuterComposite - //Assert.IsInstanceOf(typeof(OuterComposite), instance); - } - - - /// - /// Test the property 'MyNumber' - /// - [Test] - public void MyNumberTest() - { - // TODO unit test for the property 'MyNumber' - } - /// - /// Test the property 'MyString' - /// - [Test] - public void MyStringTest() - { - // TODO unit test for the property 'MyString' - } - /// - /// Test the property 'MyBoolean' - /// - [Test] - public void MyBooleanTest() - { - // TODO unit test for the property 'MyBoolean' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs deleted file mode 100644 index eb7688835a0..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/OuterEnumTests.cs +++ /dev/null @@ -1,71 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing OuterEnum - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class OuterEnumTests - { - // TODO uncomment below to declare an instance variable for OuterEnum - //private OuterEnum instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of OuterEnum - //instance = new OuterEnum(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of OuterEnum - /// - [Test] - public void OuterEnumInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" OuterEnum - //Assert.IsInstanceOf(typeof(OuterEnum), instance); - } - - - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/PetTests.cs deleted file mode 100644 index 37f2c09d2d3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/PetTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Pet - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class PetTests - { - // TODO uncomment below to declare an instance variable for Pet - //private Pet instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Pet - //instance = new Pet(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Pet - /// - [Test] - public void PetInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Pet - //Assert.IsInstanceOf(typeof(Pet), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Category' - /// - [Test] - public void CategoryTest() - { - // TODO unit test for the property 'Category' - } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - /// - /// Test the property 'PhotoUrls' - /// - [Test] - public void PhotoUrlsTest() - { - // TODO unit test for the property 'PhotoUrls' - } - /// - /// Test the property 'Tags' - /// - [Test] - public void TagsTest() - { - // TODO unit test for the property 'Tags' - } - /// - /// Test the property 'Status' - /// - [Test] - public void StatusTest() - { - // TODO unit test for the property 'Status' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs deleted file mode 100644 index c870caf786c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ReadOnlyFirstTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing ReadOnlyFirst - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ReadOnlyFirstTests - { - // TODO uncomment below to declare an instance variable for ReadOnlyFirst - //private ReadOnlyFirst instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of ReadOnlyFirst - //instance = new ReadOnlyFirst(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of ReadOnlyFirst - /// - [Test] - public void ReadOnlyFirstInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" ReadOnlyFirst - //Assert.IsInstanceOf(typeof(ReadOnlyFirst), instance); - } - - - /// - /// Test the property 'Bar' - /// - [Test] - public void BarTest() - { - // TODO unit test for the property 'Bar' - } - /// - /// Test the property 'Baz' - /// - [Test] - public void BazTest() - { - // TODO unit test for the property 'Baz' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ReturnTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ReturnTests.cs deleted file mode 100644 index e744ff4f711..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/ReturnTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Return - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class ReturnTests - { - // TODO uncomment below to declare an instance variable for Return - //private Return instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Return - //instance = new Return(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Return - /// - [Test] - public void ReturnInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Return - //Assert.IsInstanceOf(typeof(Return), instance); - } - - - /// - /// Test the property '_Return' - /// - [Test] - public void _ReturnTest() - { - // TODO unit test for the property '_Return' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs deleted file mode 100644 index 274d9db265d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/SpecialModelNameTests.cs +++ /dev/null @@ -1,79 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing SpecialModelName - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class SpecialModelNameTests - { - // TODO uncomment below to declare an instance variable for SpecialModelName - //private SpecialModelName instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of SpecialModelName - //instance = new SpecialModelName(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of SpecialModelName - /// - [Test] - public void SpecialModelNameInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" SpecialModelName - //Assert.IsInstanceOf(typeof(SpecialModelName), instance); - } - - - /// - /// Test the property 'SpecialPropertyName' - /// - [Test] - public void SpecialPropertyNameTest() - { - // TODO unit test for the property 'SpecialPropertyName' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/TagTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/TagTests.cs deleted file mode 100644 index 22c9058e65d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/TagTests.cs +++ /dev/null @@ -1,87 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing Tag - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TagTests - { - // TODO uncomment below to declare an instance variable for Tag - //private Tag instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of Tag - //instance = new Tag(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of Tag - /// - [Test] - public void TagInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" Tag - //Assert.IsInstanceOf(typeof(Tag), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Name' - /// - [Test] - public void NameTest() - { - // TODO unit test for the property 'Name' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs deleted file mode 100644 index 18c3dc5d60e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/TypeHolderDefaultTests.cs +++ /dev/null @@ -1,111 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing TypeHolderDefault - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TypeHolderDefaultTests - { - // TODO uncomment below to declare an instance variable for TypeHolderDefault - //private TypeHolderDefault instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of TypeHolderDefault - //instance = new TypeHolderDefault(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of TypeHolderDefault - /// - [Test] - public void TypeHolderDefaultInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" TypeHolderDefault - //Assert.IsInstanceOf(typeof(TypeHolderDefault), instance); - } - - - /// - /// Test the property 'StringItem' - /// - [Test] - public void StringItemTest() - { - // TODO unit test for the property 'StringItem' - } - /// - /// Test the property 'NumberItem' - /// - [Test] - public void NumberItemTest() - { - // TODO unit test for the property 'NumberItem' - } - /// - /// Test the property 'IntegerItem' - /// - [Test] - public void IntegerItemTest() - { - // TODO unit test for the property 'IntegerItem' - } - /// - /// Test the property 'BoolItem' - /// - [Test] - public void BoolItemTest() - { - // TODO unit test for the property 'BoolItem' - } - /// - /// Test the property 'ArrayItem' - /// - [Test] - public void ArrayItemTest() - { - // TODO unit test for the property 'ArrayItem' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs deleted file mode 100644 index b1e63784346..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/TypeHolderExampleTests.cs +++ /dev/null @@ -1,119 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing TypeHolderExample - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class TypeHolderExampleTests - { - // TODO uncomment below to declare an instance variable for TypeHolderExample - //private TypeHolderExample instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of TypeHolderExample - //instance = new TypeHolderExample(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of TypeHolderExample - /// - [Test] - public void TypeHolderExampleInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" TypeHolderExample - //Assert.IsInstanceOf(typeof(TypeHolderExample), instance); - } - - - /// - /// Test the property 'StringItem' - /// - [Test] - public void StringItemTest() - { - // TODO unit test for the property 'StringItem' - } - /// - /// Test the property 'NumberItem' - /// - [Test] - public void NumberItemTest() - { - // TODO unit test for the property 'NumberItem' - } - /// - /// Test the property 'FloatItem' - /// - [Test] - public void FloatItemTest() - { - // TODO unit test for the property 'FloatItem' - } - /// - /// Test the property 'IntegerItem' - /// - [Test] - public void IntegerItemTest() - { - // TODO unit test for the property 'IntegerItem' - } - /// - /// Test the property 'BoolItem' - /// - [Test] - public void BoolItemTest() - { - // TODO unit test for the property 'BoolItem' - } - /// - /// Test the property 'ArrayItem' - /// - [Test] - public void ArrayItemTest() - { - // TODO unit test for the property 'ArrayItem' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/UserTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/UserTests.cs deleted file mode 100644 index 0f37935e9a2..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/UserTests.cs +++ /dev/null @@ -1,135 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing User - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class UserTests - { - // TODO uncomment below to declare an instance variable for User - //private User instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of User - //instance = new User(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of User - /// - [Test] - public void UserInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" User - //Assert.IsInstanceOf(typeof(User), instance); - } - - - /// - /// Test the property 'Id' - /// - [Test] - public void IdTest() - { - // TODO unit test for the property 'Id' - } - /// - /// Test the property 'Username' - /// - [Test] - public void UsernameTest() - { - // TODO unit test for the property 'Username' - } - /// - /// Test the property 'FirstName' - /// - [Test] - public void FirstNameTest() - { - // TODO unit test for the property 'FirstName' - } - /// - /// Test the property 'LastName' - /// - [Test] - public void LastNameTest() - { - // TODO unit test for the property 'LastName' - } - /// - /// Test the property 'Email' - /// - [Test] - public void EmailTest() - { - // TODO unit test for the property 'Email' - } - /// - /// Test the property 'Password' - /// - [Test] - public void PasswordTest() - { - // TODO unit test for the property 'Password' - } - /// - /// Test the property 'Phone' - /// - [Test] - public void PhoneTest() - { - // TODO unit test for the property 'Phone' - } - /// - /// Test the property 'UserStatus' - /// - [Test] - public void UserStatusTest() - { - // TODO unit test for the property 'UserStatus' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs deleted file mode 100644 index 5ab42bab1c6..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Model/XmlItemTests.cs +++ /dev/null @@ -1,303 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using NUnit.Framework; - -using System; -using System.Linq; -using System.IO; -using System.Collections.Generic; -using Org.OpenAPITools.Api; -using Org.OpenAPITools.Model; -using Org.OpenAPITools.Client; -using System.Reflection; -using Newtonsoft.Json; - -namespace Org.OpenAPITools.Test -{ - /// - /// Class for testing XmlItem - /// - /// - /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech). - /// Please update the test case below to test the model. - /// - public class XmlItemTests - { - // TODO uncomment below to declare an instance variable for XmlItem - //private XmlItem instance; - - /// - /// Setup before each test - /// - [SetUp] - public void Init() - { - // TODO uncomment below to create an instance of XmlItem - //instance = new XmlItem(); - } - - /// - /// Clean up after each test - /// - [TearDown] - public void Cleanup() - { - - } - - /// - /// Test an instance of XmlItem - /// - [Test] - public void XmlItemInstanceTest() - { - // TODO uncomment below to test "IsInstanceOf" XmlItem - //Assert.IsInstanceOf(typeof(XmlItem), instance); - } - - - /// - /// Test the property 'AttributeString' - /// - [Test] - public void AttributeStringTest() - { - // TODO unit test for the property 'AttributeString' - } - /// - /// Test the property 'AttributeNumber' - /// - [Test] - public void AttributeNumberTest() - { - // TODO unit test for the property 'AttributeNumber' - } - /// - /// Test the property 'AttributeInteger' - /// - [Test] - public void AttributeIntegerTest() - { - // TODO unit test for the property 'AttributeInteger' - } - /// - /// Test the property 'AttributeBoolean' - /// - [Test] - public void AttributeBooleanTest() - { - // TODO unit test for the property 'AttributeBoolean' - } - /// - /// Test the property 'WrappedArray' - /// - [Test] - public void WrappedArrayTest() - { - // TODO unit test for the property 'WrappedArray' - } - /// - /// Test the property 'NameString' - /// - [Test] - public void NameStringTest() - { - // TODO unit test for the property 'NameString' - } - /// - /// Test the property 'NameNumber' - /// - [Test] - public void NameNumberTest() - { - // TODO unit test for the property 'NameNumber' - } - /// - /// Test the property 'NameInteger' - /// - [Test] - public void NameIntegerTest() - { - // TODO unit test for the property 'NameInteger' - } - /// - /// Test the property 'NameBoolean' - /// - [Test] - public void NameBooleanTest() - { - // TODO unit test for the property 'NameBoolean' - } - /// - /// Test the property 'NameArray' - /// - [Test] - public void NameArrayTest() - { - // TODO unit test for the property 'NameArray' - } - /// - /// Test the property 'NameWrappedArray' - /// - [Test] - public void NameWrappedArrayTest() - { - // TODO unit test for the property 'NameWrappedArray' - } - /// - /// Test the property 'PrefixString' - /// - [Test] - public void PrefixStringTest() - { - // TODO unit test for the property 'PrefixString' - } - /// - /// Test the property 'PrefixNumber' - /// - [Test] - public void PrefixNumberTest() - { - // TODO unit test for the property 'PrefixNumber' - } - /// - /// Test the property 'PrefixInteger' - /// - [Test] - public void PrefixIntegerTest() - { - // TODO unit test for the property 'PrefixInteger' - } - /// - /// Test the property 'PrefixBoolean' - /// - [Test] - public void PrefixBooleanTest() - { - // TODO unit test for the property 'PrefixBoolean' - } - /// - /// Test the property 'PrefixArray' - /// - [Test] - public void PrefixArrayTest() - { - // TODO unit test for the property 'PrefixArray' - } - /// - /// Test the property 'PrefixWrappedArray' - /// - [Test] - public void PrefixWrappedArrayTest() - { - // TODO unit test for the property 'PrefixWrappedArray' - } - /// - /// Test the property 'NamespaceString' - /// - [Test] - public void NamespaceStringTest() - { - // TODO unit test for the property 'NamespaceString' - } - /// - /// Test the property 'NamespaceNumber' - /// - [Test] - public void NamespaceNumberTest() - { - // TODO unit test for the property 'NamespaceNumber' - } - /// - /// Test the property 'NamespaceInteger' - /// - [Test] - public void NamespaceIntegerTest() - { - // TODO unit test for the property 'NamespaceInteger' - } - /// - /// Test the property 'NamespaceBoolean' - /// - [Test] - public void NamespaceBooleanTest() - { - // TODO unit test for the property 'NamespaceBoolean' - } - /// - /// Test the property 'NamespaceArray' - /// - [Test] - public void NamespaceArrayTest() - { - // TODO unit test for the property 'NamespaceArray' - } - /// - /// Test the property 'NamespaceWrappedArray' - /// - [Test] - public void NamespaceWrappedArrayTest() - { - // TODO unit test for the property 'NamespaceWrappedArray' - } - /// - /// Test the property 'PrefixNsString' - /// - [Test] - public void PrefixNsStringTest() - { - // TODO unit test for the property 'PrefixNsString' - } - /// - /// Test the property 'PrefixNsNumber' - /// - [Test] - public void PrefixNsNumberTest() - { - // TODO unit test for the property 'PrefixNsNumber' - } - /// - /// Test the property 'PrefixNsInteger' - /// - [Test] - public void PrefixNsIntegerTest() - { - // TODO unit test for the property 'PrefixNsInteger' - } - /// - /// Test the property 'PrefixNsBoolean' - /// - [Test] - public void PrefixNsBooleanTest() - { - // TODO unit test for the property 'PrefixNsBoolean' - } - /// - /// Test the property 'PrefixNsArray' - /// - [Test] - public void PrefixNsArrayTest() - { - // TODO unit test for the property 'PrefixNsArray' - } - /// - /// Test the property 'PrefixNsWrappedArray' - /// - [Test] - public void PrefixNsWrappedArrayTest() - { - // TODO unit test for the property 'PrefixNsWrappedArray' - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj deleted file mode 100644 index ec874a21566..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj +++ /dev/null @@ -1,89 +0,0 @@ - - - - - Debug - AnyCPU - {19F1DEBC-DE5E-4517-8062-F000CD499087} - Library - Properties - Org.OpenAPITools.Test - Org.OpenAPITools.Test - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - - - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll - - - $(SolutionDir)\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\..\packages\NUnit.3.11.0\lib\net45\nunit.framework.dll - ..\..\vendor\NUnit.3.11.0\lib\net45\nunit.framework.dll - - - - - - - - - - - - {5CD900DE-8266-412F-A758-28E1F9C623D5} - Org.OpenAPITools - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/packages.config b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/packages.config deleted file mode 100644 index a3a1bab3510..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools.Test/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/AnotherFakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/AnotherFakeApi.cs deleted file mode 100644 index 875c9270a40..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/AnotherFakeApi.cs +++ /dev/null @@ -1,337 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IAnotherFakeApi : IApiAccessor - { - #region Synchronous Operations - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient Call123TestSpecialTags (ModelClient body); - - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse Call123TestSpecialTagsWithHttpInfo (ModelClient body); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - System.Threading.Tasks.Task Call123TestSpecialTagsAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test special tags - /// - /// - /// To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class AnotherFakeApi : IAnotherFakeApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public AnotherFakeApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public AnotherFakeApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public AnotherFakeApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient Call123TestSpecialTags (ModelClient body) - { - ApiResponse localVarResponse = Call123TestSpecialTagsWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse Call123TestSpecialTagsWithHttpInfo (ModelClient body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->Call123TestSpecialTags"); - - var localVarPath = "/another-fake/dummy"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Call123TestSpecialTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - public async System.Threading.Tasks.Task Call123TestSpecialTagsAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await Call123TestSpecialTagsWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// To test special tags To test special tags and operation ID starting with number - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> Call123TestSpecialTagsWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling AnotherFakeApi->Call123TestSpecialTags"); - - var localVarPath = "/another-fake/dummy"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("Call123TestSpecialTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs deleted file mode 100644 index 9ea5a109792..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeApi.cs +++ /dev/null @@ -1,3122 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IFakeApi : IApiAccessor - { - #region Synchronous Operations - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// - void CreateXmlItem (XmlItem xmlItem); - - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// ApiResponse of Object(void) - ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem); - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// bool - bool FakeOuterBooleanSerialize (bool? body = default(bool?)); - - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// ApiResponse of bool - ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)); - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// OuterComposite - OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)); - - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// ApiResponse of OuterComposite - ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)); - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// decimal - decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)); - - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// ApiResponse of decimal - ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)); - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// string - string FakeOuterStringSerialize (string body = default(string)); - - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// ApiResponse of string - ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)); - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// - void TestBodyWithFileSchema (FileSchemaTestClass body); - - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass body); - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - void TestBodyWithQueryParams (string query, User body); - - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, User body); - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient TestClientModel (ModelClient body); - - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse TestClientModelWithHttpInfo (ModelClient body); - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// - void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)); - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// ApiResponse of Object(void) - ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), 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 test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// - void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); - - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// ApiResponse of Object(void) - ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)); - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// - void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); - - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// ApiResponse of Object(void) - ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)); - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// - void TestInlineAdditionalProperties (Dictionary param); - - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// ApiResponse of Object(void) - ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Dictionary param); - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// - void TestJsonFormData (string param, string param2); - - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// ApiResponse of Object(void) - ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2); - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context); - - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// ApiResponse of Object(void) - ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task CreateXmlItemAsync (XmlItem xmlItem, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// creates an XmlItem - /// - /// - /// this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateXmlItemWithHttpInfoAsync (XmlItem xmlItem, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of bool - System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (bool) - System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of OuterComposite - System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (OuterComposite) - System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync (OuterComposite body = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of decimal - System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (decimal) - System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of string - System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestBodyWithFileSchemaAsync (FileSchemaTestClass body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync (FileSchemaTestClass body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestBodyWithQueryParamsAsync (string query, User body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync (string query, User body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - System.Threading.Tasks.Task TestClientModelAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test \"client\" model - /// - /// - /// To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test enum parameters - /// - /// - /// To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Fake endpoint to test group parameters (optional) - /// - /// - /// Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync (Dictionary param, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// test inline additionalProperties - /// - /// - /// - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync (Dictionary param, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestJsonFormDataAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// test json serialization of form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List pipe, List ioutil, List http, List url, List context, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// - /// - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync (List pipe, List ioutil, List http, List url, List context, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class FakeApi : IFakeApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public FakeApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public FakeApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public FakeApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// - public void CreateXmlItem (XmlItem xmlItem) - { - CreateXmlItemWithHttpInfo(xmlItem); - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// ApiResponse of Object(void) - public ApiResponse CreateXmlItemWithHttpInfo (XmlItem xmlItem) - { - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) - throw new ApiException(400, "Missing required parameter 'xmlItem' when calling FakeApi->CreateXmlItem"); - - var localVarPath = "/fake/create_xml_item"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/xml", - "application/xml; charset=utf-8", - "application/xml; charset=utf-16", - "text/xml", - "text/xml; charset=utf-8", - "text/xml; charset=utf-16" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (xmlItem != null && xmlItem.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(xmlItem); // http body (model) parameter - } - else - { - localVarPostBody = xmlItem; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateXmlItem", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateXmlItemAsync (XmlItem xmlItem, CancellationToken cancellationToken = default(CancellationToken)) - { - await CreateXmlItemWithHttpInfoAsync(xmlItem, cancellationToken); - - } - - /// - /// creates an XmlItem this route creates an XmlItem - /// - /// Thrown when fails to make API call - /// XmlItem Body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateXmlItemWithHttpInfoAsync (XmlItem xmlItem, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'xmlItem' is set - if (xmlItem == null) - throw new ApiException(400, "Missing required parameter 'xmlItem' when calling FakeApi->CreateXmlItem"); - - var localVarPath = "/fake/create_xml_item"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/xml", - "application/xml; charset=utf-8", - "application/xml; charset=utf-16", - "text/xml", - "text/xml; charset=utf-8", - "text/xml; charset=utf-16" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (xmlItem != null && xmlItem.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(xmlItem); // http body (model) parameter - } - else - { - localVarPostBody = xmlItem; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateXmlItem", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// bool - public bool FakeOuterBooleanSerialize (bool? body = default(bool?)) - { - ApiResponse localVarResponse = FakeOuterBooleanSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// ApiResponse of bool - public ApiResponse FakeOuterBooleanSerializeWithHttpInfo (bool? body = default(bool?)) - { - - var localVarPath = "/fake/outer/boolean"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (bool) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(bool))); - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of bool - public async System.Threading.Tasks.Task FakeOuterBooleanSerializeAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterBooleanSerializeWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of outer boolean types - /// - /// Thrown when fails to make API call - /// Input boolean as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (bool) - public async System.Threading.Tasks.Task> FakeOuterBooleanSerializeWithHttpInfoAsync (bool? body = default(bool?), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/fake/outer/boolean"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterBooleanSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (bool) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(bool))); - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// OuterComposite - public OuterComposite FakeOuterCompositeSerialize (OuterComposite body = default(OuterComposite)) - { - ApiResponse localVarResponse = FakeOuterCompositeSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// ApiResponse of OuterComposite - public ApiResponse FakeOuterCompositeSerializeWithHttpInfo (OuterComposite body = default(OuterComposite)) - { - - var localVarPath = "/fake/outer/composite"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (OuterComposite) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite))); - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of OuterComposite - public async System.Threading.Tasks.Task FakeOuterCompositeSerializeAsync (OuterComposite body = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterCompositeSerializeWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of object with outer number type - /// - /// Thrown when fails to make API call - /// Input composite as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (OuterComposite) - public async System.Threading.Tasks.Task> FakeOuterCompositeSerializeWithHttpInfoAsync (OuterComposite body = default(OuterComposite), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/fake/outer/composite"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterCompositeSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (OuterComposite) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(OuterComposite))); - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// decimal - public decimal FakeOuterNumberSerialize (decimal? body = default(decimal?)) - { - ApiResponse localVarResponse = FakeOuterNumberSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// ApiResponse of decimal - public ApiResponse FakeOuterNumberSerializeWithHttpInfo (decimal? body = default(decimal?)) - { - - var localVarPath = "/fake/outer/number"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (decimal) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(decimal))); - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of decimal - public async System.Threading.Tasks.Task FakeOuterNumberSerializeAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterNumberSerializeWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of outer number types - /// - /// Thrown when fails to make API call - /// Input number as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (decimal) - public async System.Threading.Tasks.Task> FakeOuterNumberSerializeWithHttpInfoAsync (decimal? body = default(decimal?), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/fake/outer/number"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterNumberSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (decimal) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(decimal))); - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// string - public string FakeOuterStringSerialize (string body = default(string)) - { - ApiResponse localVarResponse = FakeOuterStringSerializeWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// ApiResponse of string - public ApiResponse FakeOuterStringSerializeWithHttpInfo (string body = default(string)) - { - - var localVarPath = "/fake/outer/string"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of string - public async System.Threading.Tasks.Task FakeOuterStringSerializeAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await FakeOuterStringSerializeWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Test serialization of outer string types - /// - /// Thrown when fails to make API call - /// Input string as post body (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> FakeOuterStringSerializeWithHttpInfoAsync (string body = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/fake/outer/string"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - "*/*" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FakeOuterStringSerialize", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// - public void TestBodyWithFileSchema (FileSchemaTestClass body) - { - TestBodyWithFileSchemaWithHttpInfo(body); - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// ApiResponse of Object(void) - public ApiResponse TestBodyWithFileSchemaWithHttpInfo (FileSchemaTestClass body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithFileSchema"); - - var localVarPath = "/fake/body-with-file-schema"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithFileSchema", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestBodyWithFileSchemaAsync (FileSchemaTestClass body, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestBodyWithFileSchemaWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// For this test, the body for this request much reference a schema named `File`. - /// - /// Thrown when fails to make API call - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithFileSchemaWithHttpInfoAsync (FileSchemaTestClass body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithFileSchema"); - - var localVarPath = "/fake/body-with-file-schema"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithFileSchema", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// - public void TestBodyWithQueryParams (string query, User body) - { - TestBodyWithQueryParamsWithHttpInfo(query, body); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// ApiResponse of Object(void) - public ApiResponse TestBodyWithQueryParamsWithHttpInfo (string query, User body) - { - // verify the required parameter 'query' is set - if (query == null) - throw new ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams"); - - var localVarPath = "/fake/body-with-query-params"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithQueryParams", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestBodyWithQueryParamsAsync (string query, User body, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestBodyWithQueryParamsWithHttpInfoAsync(query, body, cancellationToken); - - } - - /// - /// - /// - /// Thrown when fails to make API call - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestBodyWithQueryParamsWithHttpInfoAsync (string query, User body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'query' is set - if (query == null) - throw new ApiException(400, "Missing required parameter 'query' when calling FakeApi->TestBodyWithQueryParams"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestBodyWithQueryParams"); - - var localVarPath = "/fake/body-with-query-params"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (query != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "query", query)); // query parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestBodyWithQueryParams", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient TestClientModel (ModelClient body) - { - ApiResponse localVarResponse = TestClientModelWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse TestClientModelWithHttpInfo (ModelClient body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClientModel", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - public async System.Threading.Tasks.Task TestClientModelAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await TestClientModelWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// To test \"client\" model To test \"client\" model - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClientModelWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeApi->TestClientModel"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClientModel", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// - public void TestEndpointParameters (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) - { - TestEndpointParametersWithHttpInfo(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// ApiResponse of Object(void) - public ApiResponse TestEndpointParametersWithHttpInfo (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string)) - { - // verify the required parameter 'number' is set - if (number == null) - throw new ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_double' is set - if (_double == null) - throw new ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'patternWithoutDelimiter' is set - if (patternWithoutDelimiter == null) - throw new ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_byte' is set - if (_byte == null) - throw new ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (integer != null) localVarFormParams.Add("integer", this.Configuration.ApiClient.ParameterToString(integer)); // form parameter - if (int32 != null) localVarFormParams.Add("int32", this.Configuration.ApiClient.ParameterToString(int32)); // form parameter - if (int64 != null) localVarFormParams.Add("int64", this.Configuration.ApiClient.ParameterToString(int64)); // form parameter - if (number != null) localVarFormParams.Add("number", this.Configuration.ApiClient.ParameterToString(number)); // form parameter - if (_float != null) localVarFormParams.Add("float", this.Configuration.ApiClient.ParameterToString(_float)); // form parameter - if (_double != null) localVarFormParams.Add("double", this.Configuration.ApiClient.ParameterToString(_double)); // form parameter - if (_string != null) localVarFormParams.Add("string", this.Configuration.ApiClient.ParameterToString(_string)); // form parameter - if (patternWithoutDelimiter != null) localVarFormParams.Add("pattern_without_delimiter", this.Configuration.ApiClient.ParameterToString(patternWithoutDelimiter)); // form parameter - if (_byte != null) localVarFormParams.Add("byte", this.Configuration.ApiClient.ParameterToString(_byte)); // form parameter - if (binary != null) localVarFileParams.Add("binary", this.Configuration.ApiClient.ParameterToFile("binary", binary)); - if (date != null) localVarFormParams.Add("date", this.Configuration.ApiClient.ParameterToString(date)); // form parameter - if (dateTime != null) localVarFormParams.Add("dateTime", this.Configuration.ApiClient.ParameterToString(dateTime)); // form parameter - if (password != null) localVarFormParams.Add("password", this.Configuration.ApiClient.ParameterToString(password)); // form parameter - if (callback != null) localVarFormParams.Add("callback", this.Configuration.ApiClient.ParameterToString(callback)); // form parameter - - // authentication (http_basic_test) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestEndpointParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestEndpointParametersAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await TestEndpointParametersWithHttpInfoAsync(number, _double, patternWithoutDelimiter, _byte, integer, int32, int64, _float, _string, binary, date, dateTime, password, callback, cancellationToken); - - } - - /// - /// Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 - /// - /// Thrown when fails to make API call - /// None - /// None - /// None - /// None - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// None (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEndpointParametersWithHttpInfoAsync (decimal number, double _double, string patternWithoutDelimiter, byte[] _byte, int? integer = default(int?), int? int32 = default(int?), long? int64 = default(long?), float? _float = default(float?), string _string = default(string), System.IO.Stream binary = default(System.IO.Stream), DateTime? date = default(DateTime?), DateTime? dateTime = default(DateTime?), string password = default(string), string callback = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'number' is set - if (number == null) - throw new ApiException(400, "Missing required parameter 'number' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_double' is set - if (_double == null) - throw new ApiException(400, "Missing required parameter '_double' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter 'patternWithoutDelimiter' is set - if (patternWithoutDelimiter == null) - throw new ApiException(400, "Missing required parameter 'patternWithoutDelimiter' when calling FakeApi->TestEndpointParameters"); - // verify the required parameter '_byte' is set - if (_byte == null) - throw new ApiException(400, "Missing required parameter '_byte' when calling FakeApi->TestEndpointParameters"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (integer != null) localVarFormParams.Add("integer", this.Configuration.ApiClient.ParameterToString(integer)); // form parameter - if (int32 != null) localVarFormParams.Add("int32", this.Configuration.ApiClient.ParameterToString(int32)); // form parameter - if (int64 != null) localVarFormParams.Add("int64", this.Configuration.ApiClient.ParameterToString(int64)); // form parameter - if (number != null) localVarFormParams.Add("number", this.Configuration.ApiClient.ParameterToString(number)); // form parameter - if (_float != null) localVarFormParams.Add("float", this.Configuration.ApiClient.ParameterToString(_float)); // form parameter - if (_double != null) localVarFormParams.Add("double", this.Configuration.ApiClient.ParameterToString(_double)); // form parameter - if (_string != null) localVarFormParams.Add("string", this.Configuration.ApiClient.ParameterToString(_string)); // form parameter - if (patternWithoutDelimiter != null) localVarFormParams.Add("pattern_without_delimiter", this.Configuration.ApiClient.ParameterToString(patternWithoutDelimiter)); // form parameter - if (_byte != null) localVarFormParams.Add("byte", this.Configuration.ApiClient.ParameterToString(_byte)); // form parameter - if (binary != null) localVarFileParams.Add("binary", this.Configuration.ApiClient.ParameterToFile("binary", binary)); - if (date != null) localVarFormParams.Add("date", this.Configuration.ApiClient.ParameterToString(date)); // form parameter - if (dateTime != null) localVarFormParams.Add("dateTime", this.Configuration.ApiClient.ParameterToString(dateTime)); // form parameter - if (password != null) localVarFormParams.Add("password", this.Configuration.ApiClient.ParameterToString(password)); // form parameter - if (callback != null) localVarFormParams.Add("callback", this.Configuration.ApiClient.ParameterToString(callback)); // form parameter - - // authentication (http_basic_test) required - // http basic authentication required - if (!String.IsNullOrEmpty(this.Configuration.Username) || !String.IsNullOrEmpty(this.Configuration.Password)) - { - localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestEndpointParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// - public void TestEnumParameters (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) - { - TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// ApiResponse of Object(void) - public ApiResponse TestEnumParametersWithHttpInfo (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string)) - { - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter - if (enumQueryString != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_string", enumQueryString)); // query parameter - if (enumQueryInteger != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_integer", enumQueryInteger)); // query parameter - if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter - if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter - if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter - if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter - if (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter - - - // 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("TestEnumParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestEnumParametersAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await TestEnumParametersWithHttpInfoAsync(enumHeaderStringArray, enumHeaderString, enumQueryStringArray, enumQueryString, enumQueryInteger, enumQueryDouble, enumFormStringArray, enumFormString, cancellationToken); - - } - - /// - /// To test enum parameters To test enum parameters - /// - /// Thrown when fails to make API call - /// Header parameter enum test (string array) (optional) - /// Header parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (string array) (optional) - /// Query parameter enum test (string) (optional, default to -efg) - /// Query parameter enum test (double) (optional) - /// Query parameter enum test (double) (optional) - /// Form parameter enum test (string array) (optional, default to $) - /// Form parameter enum test (string) (optional, default to -efg) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestEnumParametersWithHttpInfoAsync (List enumHeaderStringArray = default(List), string enumHeaderString = default(string), List enumQueryStringArray = default(List), string enumQueryString = default(string), int? enumQueryInteger = default(int?), double? enumQueryDouble = default(double?), List enumFormStringArray = default(List), string enumFormString = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (enumQueryStringArray != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "enum_query_string_array", enumQueryStringArray)); // query parameter - if (enumQueryString != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_string", enumQueryString)); // query parameter - if (enumQueryInteger != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_integer", enumQueryInteger)); // query parameter - if (enumQueryDouble != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "enum_query_double", enumQueryDouble)); // query parameter - if (enumHeaderStringArray != null) localVarHeaderParams.Add("enum_header_string_array", this.Configuration.ApiClient.ParameterToString(enumHeaderStringArray)); // header parameter - if (enumHeaderString != null) localVarHeaderParams.Add("enum_header_string", this.Configuration.ApiClient.ParameterToString(enumHeaderString)); // header parameter - if (enumFormStringArray != null) localVarFormParams.Add("enum_form_string_array", this.Configuration.ApiClient.Serialize(enumFormStringArray)); // form parameter - if (enumFormString != null) localVarFormParams.Add("enum_form_string", this.Configuration.ApiClient.ParameterToString(enumFormString)); // form parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestEnumParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// - public void TestGroupParameters (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) - { - TestGroupParametersWithHttpInfo(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// ApiResponse of Object(void) - public ApiResponse TestGroupParametersWithHttpInfo (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?)) - { - // verify the required parameter 'requiredStringGroup' is set - if (requiredStringGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredBooleanGroup' is set - if (requiredBooleanGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredInt64Group' is set - if (requiredInt64Group == null) - throw new ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (requiredStringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_string_group", requiredStringGroup)); // query parameter - if (requiredInt64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_int64_group", requiredInt64Group)); // query parameter - if (stringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "string_group", stringGroup)); // query parameter - if (int64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "int64_group", int64Group)); // query parameter - if (requiredBooleanGroup != null) localVarHeaderParams.Add("required_boolean_group", this.Configuration.ApiClient.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) localVarHeaderParams.Add("boolean_group", this.Configuration.ApiClient.ParameterToString(booleanGroup)); // header parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestGroupParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestGroupParametersAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)) - { - await TestGroupParametersWithHttpInfoAsync(requiredStringGroup, requiredBooleanGroup, requiredInt64Group, stringGroup, booleanGroup, int64Group, cancellationToken); - - } - - /// - /// Fake endpoint to test group parameters (optional) Fake endpoint to test group parameters (optional) - /// - /// Thrown when fails to make API call - /// Required String in group parameters - /// Required Boolean in group parameters - /// Required Integer in group parameters - /// String in group parameters (optional) - /// Boolean in group parameters (optional) - /// Integer in group parameters (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestGroupParametersWithHttpInfoAsync (int requiredStringGroup, bool requiredBooleanGroup, long requiredInt64Group, int? stringGroup = default(int?), bool? booleanGroup = default(bool?), long? int64Group = default(long?), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'requiredStringGroup' is set - if (requiredStringGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredStringGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredBooleanGroup' is set - if (requiredBooleanGroup == null) - throw new ApiException(400, "Missing required parameter 'requiredBooleanGroup' when calling FakeApi->TestGroupParameters"); - // verify the required parameter 'requiredInt64Group' is set - if (requiredInt64Group == null) - throw new ApiException(400, "Missing required parameter 'requiredInt64Group' when calling FakeApi->TestGroupParameters"); - - var localVarPath = "/fake"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (requiredStringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_string_group", requiredStringGroup)); // query parameter - if (requiredInt64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "required_int64_group", requiredInt64Group)); // query parameter - if (stringGroup != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "string_group", stringGroup)); // query parameter - if (int64Group != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "int64_group", int64Group)); // query parameter - if (requiredBooleanGroup != null) localVarHeaderParams.Add("required_boolean_group", this.Configuration.ApiClient.ParameterToString(requiredBooleanGroup)); // header parameter - if (booleanGroup != null) localVarHeaderParams.Add("boolean_group", this.Configuration.ApiClient.ParameterToString(booleanGroup)); // header parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestGroupParameters", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// - public void TestInlineAdditionalProperties (Dictionary param) - { - TestInlineAdditionalPropertiesWithHttpInfo(param); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// ApiResponse of Object(void) - public ApiResponse TestInlineAdditionalPropertiesWithHttpInfo (Dictionary param) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties"); - - var localVarPath = "/fake/inline-additionalProperties"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null && param.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(param); // http body (model) parameter - } - else - { - localVarPostBody = param; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestInlineAdditionalPropertiesAsync (Dictionary param, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestInlineAdditionalPropertiesWithHttpInfoAsync(param, cancellationToken); - - } - - /// - /// test inline additionalProperties - /// - /// Thrown when fails to make API call - /// request body - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestInlineAdditionalPropertiesWithHttpInfoAsync (Dictionary param, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestInlineAdditionalProperties"); - - var localVarPath = "/fake/inline-additionalProperties"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null && param.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(param); // http body (model) parameter - } - else - { - localVarPostBody = param; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestInlineAdditionalProperties", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// - public void TestJsonFormData (string param, string param2) - { - TestJsonFormDataWithHttpInfo(param, param2); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// ApiResponse of Object(void) - public ApiResponse TestJsonFormDataWithHttpInfo (string param, string param2) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - // verify the required parameter 'param2' is set - if (param2 == null) - throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - - var localVarPath = "/fake/jsonFormData"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null) localVarFormParams.Add("param", this.Configuration.ApiClient.ParameterToString(param)); // form parameter - if (param2 != null) localVarFormParams.Add("param2", this.Configuration.ApiClient.ParameterToString(param2)); // form parameter - - - // 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("TestJsonFormData", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestJsonFormDataAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestJsonFormDataWithHttpInfoAsync(param, param2, cancellationToken); - - } - - /// - /// test json serialization of form data - /// - /// Thrown when fails to make API call - /// field1 - /// field2 - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestJsonFormDataWithHttpInfoAsync (string param, string param2, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'param' is set - if (param == null) - throw new ApiException(400, "Missing required parameter 'param' when calling FakeApi->TestJsonFormData"); - // verify the required parameter 'param2' is set - if (param2 == null) - throw new ApiException(400, "Missing required parameter 'param2' when calling FakeApi->TestJsonFormData"); - - var localVarPath = "/fake/jsonFormData"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (param != null) localVarFormParams.Add("param", this.Configuration.ApiClient.ParameterToString(param)); // form parameter - if (param2 != null) localVarFormParams.Add("param2", this.Configuration.ApiClient.ParameterToString(param2)); // form parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestJsonFormData", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// - public void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context) - { - TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// ApiResponse of Object(void) - public ApiResponse TestQueryParameterCollectionFormatWithHttpInfo (List pipe, List ioutil, List http, List url, List context) - { - // verify the required parameter 'pipe' is set - if (pipe == null) - throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'ioutil' is set - if (ioutil == null) - throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'http' is set - if (http == null) - throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'url' is set - if (url == null) - throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'context' is set - if (context == null) - throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - - var localVarPath = "/fake/test-query-parameters"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter - if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter - if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("ssv", "http", http)); // query parameter - if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter - if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task TestQueryParameterCollectionFormatAsync (List pipe, List ioutil, List http, List url, List context, CancellationToken cancellationToken = default(CancellationToken)) - { - await TestQueryParameterCollectionFormatWithHttpInfoAsync(pipe, ioutil, http, url, context, cancellationToken); - - } - - /// - /// To test the collection format in query parameters - /// - /// Thrown when fails to make API call - /// - /// - /// - /// - /// - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> TestQueryParameterCollectionFormatWithHttpInfoAsync (List pipe, List ioutil, List http, List url, List context, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'pipe' is set - if (pipe == null) - throw new ApiException(400, "Missing required parameter 'pipe' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'ioutil' is set - if (ioutil == null) - throw new ApiException(400, "Missing required parameter 'ioutil' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'http' is set - if (http == null) - throw new ApiException(400, "Missing required parameter 'http' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'url' is set - if (url == null) - throw new ApiException(400, "Missing required parameter 'url' when calling FakeApi->TestQueryParameterCollectionFormat"); - // verify the required parameter 'context' is set - if (context == null) - throw new ApiException(400, "Missing required parameter 'context' when calling FakeApi->TestQueryParameterCollectionFormat"); - - var localVarPath = "/fake/test-query-parameters"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (pipe != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "pipe", pipe)); // query parameter - if (ioutil != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "ioutil", ioutil)); // query parameter - if (http != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("ssv", "http", http)); // query parameter - if (url != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "url", url)); // query parameter - if (context != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("multi", "context", context)); // query parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestQueryParameterCollectionFormat", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs deleted file mode 100644 index a9c5bd9d836..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/FakeClassnameTags123Api.cs +++ /dev/null @@ -1,347 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IFakeClassnameTags123Api : IApiAccessor - { - #region Synchronous Operations - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - ModelClient TestClassname (ModelClient body); - - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - ApiResponse TestClassnameWithHttpInfo (ModelClient body); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - System.Threading.Tasks.Task TestClassnameAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// To test class name in snake case - /// - /// - /// To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class FakeClassnameTags123Api : IFakeClassnameTags123Api - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public FakeClassnameTags123Api(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public FakeClassnameTags123Api() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public FakeClassnameTags123Api(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ModelClient - public ModelClient TestClassname (ModelClient body) - { - ApiResponse localVarResponse = TestClassnameWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// ApiResponse of ModelClient - public ApiResponse TestClassnameWithHttpInfo (ModelClient body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname"); - - var localVarPath = "/fake_classname_test"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (api_key_query) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClassname", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ModelClient - public async System.Threading.Tasks.Task TestClassnameAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await TestClassnameWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// To test class name in snake case To test class name in snake case - /// - /// Thrown when fails to make API call - /// client model - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ModelClient) - public async System.Threading.Tasks.Task> TestClassnameWithHttpInfoAsync (ModelClient body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling FakeClassnameTags123Api->TestClassname"); - - var localVarPath = "/fake_classname_test"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json" - }; - 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); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (api_key_query) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key_query"))) - { - localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "api_key_query", this.Configuration.GetApiKeyWithPrefix("api_key_query"))); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PATCH, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("TestClassname", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ModelClient) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ModelClient))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/PetApi.cs deleted file mode 100644 index 223e05ce52d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/PetApi.cs +++ /dev/null @@ -1,1975 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IPetApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - void AddPet (Pet body); - - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - ApiResponse AddPetWithHttpInfo (Pet body); - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// - void DeletePet (long petId, string apiKey = default(string)); - - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// ApiResponse of Object(void) - ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)); - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// List<Pet> - List FindPetsByStatus (List status); - - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// ApiResponse of List<Pet> - ApiResponse> FindPetsByStatusWithHttpInfo (List status); - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// List<Pet> - [Obsolete] - List FindPetsByTags (List tags); - - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// ApiResponse of List<Pet> - [Obsolete] - ApiResponse> FindPetsByTagsWithHttpInfo (List tags); - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Pet - Pet GetPetById (long petId); - - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// ApiResponse of Pet - ApiResponse GetPetByIdWithHttpInfo (long petId); - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - void UpdatePet (Pet body); - - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - ApiResponse UpdatePetWithHttpInfo (Pet body); - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)); - - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// ApiResponse of Object(void) - ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)); - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); - - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task AddPetAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Add a new pet to the store - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> AddPetWithHttpInfoAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Deletes a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> - System.Threading.Tasks.Task> FindPetsByStatusAsync (List status, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Finds Pets by status - /// - /// - /// Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync (List status, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> - [Obsolete] - System.Threading.Tasks.Task> FindPetsByTagsAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Finds Pets by tags - /// - /// - /// Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - [Obsolete] - System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of Pet - System.Threading.Tasks.Task GetPetByIdAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Find pet by ID - /// - /// - /// Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Pet) - System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task UpdatePetAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Update an existing pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Updates a pet in the store with form data - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// uploads an image - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)); - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// uploads an image (required) - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class PetApi : IPetApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public PetApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public PetApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public PetApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - public void AddPet (Pet body) - { - AddPetWithHttpInfo(body); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - public ApiResponse AddPetWithHttpInfo (Pet body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet"); - - var localVarPath = "/pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("AddPet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task AddPetAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)) - { - await AddPetWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// Add a new pet to the store - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> AddPetWithHttpInfoAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->AddPet"); - - var localVarPath = "/pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("AddPet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// - public void DeletePet (long petId, string apiKey = default(string)) - { - DeletePetWithHttpInfo(petId, apiKey); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// ApiResponse of Object(void) - public ApiResponse DeletePetWithHttpInfo (long petId, string apiKey = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (apiKey != null) localVarHeaderParams.Add("api_key", this.Configuration.ApiClient.ParameterToString(apiKey)); // header parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeletePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeletePetAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await DeletePetWithHttpInfoAsync(petId, apiKey, cancellationToken); - - } - - /// - /// Deletes a pet - /// - /// Thrown when fails to make API call - /// Pet id to delete - /// (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeletePetWithHttpInfoAsync (long petId, string apiKey = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->DeletePet"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (apiKey != null) localVarHeaderParams.Add("api_key", this.Configuration.ApiClient.ParameterToString(apiKey)); // header parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeletePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// List<Pet> - public List FindPetsByStatus (List status) - { - ApiResponse> localVarResponse = FindPetsByStatusWithHttpInfo(status); - return localVarResponse.Data; - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// ApiResponse of List<Pet> - public ApiResponse> FindPetsByStatusWithHttpInfo (List status) - { - // verify the required parameter 'status' is set - if (status == null) - throw new ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - - var localVarPath = "/pet/findByStatus"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "status", status)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // 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("FindPetsByStatus", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> - public async System.Threading.Tasks.Task> FindPetsByStatusAsync (List status, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await FindPetsByStatusWithHttpInfoAsync(status, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Finds Pets by status Multiple status values can be provided with comma separated strings - /// - /// Thrown when fails to make API call - /// Status values that need to be considered for filter - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - public async System.Threading.Tasks.Task>> FindPetsByStatusWithHttpInfoAsync (List status, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'status' is set - if (status == null) - throw new ApiException(400, "Missing required parameter 'status' when calling PetApi->FindPetsByStatus"); - - var localVarPath = "/pet/findByStatus"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (status != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "status", status)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FindPetsByStatus", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// List<Pet> - [Obsolete] - public List FindPetsByTags (List tags) - { - ApiResponse> localVarResponse = FindPetsByTagsWithHttpInfo(tags); - return localVarResponse.Data; - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// ApiResponse of List<Pet> - [Obsolete] - public ApiResponse> FindPetsByTagsWithHttpInfo (List tags) - { - // verify the required parameter 'tags' is set - if (tags == null) - throw new ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - - var localVarPath = "/pet/findByTags"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (tags != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "tags", tags)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // 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("FindPetsByTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of List<Pet> - [Obsolete] - public async System.Threading.Tasks.Task> FindPetsByTagsAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await FindPetsByTagsWithHttpInfoAsync(tags, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Finds Pets by tags Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. - /// - /// Thrown when fails to make API call - /// Tags to filter by - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (List<Pet>) - [Obsolete] - public async System.Threading.Tasks.Task>> FindPetsByTagsWithHttpInfoAsync (List tags, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'tags' is set - if (tags == null) - throw new ApiException(400, "Missing required parameter 'tags' when calling PetApi->FindPetsByTags"); - - var localVarPath = "/pet/findByTags"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (tags != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("csv", "tags", tags)); // query parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("FindPetsByTags", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (List) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(List))); - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Pet - public Pet GetPetById (long petId) - { - ApiResponse localVarResponse = GetPetByIdWithHttpInfo(petId); - return localVarResponse.Data; - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// ApiResponse of Pet - public ApiResponse GetPetByIdWithHttpInfo (long petId) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // 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("GetPetById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Pet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet))); - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of Pet - public async System.Threading.Tasks.Task GetPetByIdAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetPetByIdWithHttpInfoAsync(petId, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Find pet by ID Returns a single pet - /// - /// Thrown when fails to make API call - /// ID of pet to return - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Pet) - public async System.Threading.Tasks.Task> GetPetByIdWithHttpInfoAsync (long petId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->GetPetById"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetPetById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Pet) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Pet))); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// - public void UpdatePet (Pet body) - { - UpdatePetWithHttpInfo(body); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// ApiResponse of Object(void) - public ApiResponse UpdatePetWithHttpInfo (Pet body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet"); - - var localVarPath = "/pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task UpdatePetAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)) - { - await UpdatePetWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// Update an existing pet - /// - /// Thrown when fails to make API call - /// Pet object that needs to be added to the store - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithHttpInfoAsync (Pet body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling PetApi->UpdatePet"); - - var localVarPath = "/pet"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/json", - "application/xml" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePet", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// - public void UpdatePetWithForm (long petId, string name = default(string), string status = default(string)) - { - UpdatePetWithFormWithHttpInfo(petId, name, status); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// ApiResponse of Object(void) - public ApiResponse UpdatePetWithFormWithHttpInfo (long petId, string name = default(string), string status = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (name != null) localVarFormParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // form parameter - if (status != null) localVarFormParams.Add("status", this.Configuration.ApiClient.ParameterToString(status)); // form parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePetWithForm", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task UpdatePetWithFormAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - await UpdatePetWithFormWithHttpInfoAsync(petId, name, status, cancellationToken); - - } - - /// - /// Updates a pet in the store with form data - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be updated - /// Updated name of the pet (optional) - /// Updated status of the pet (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdatePetWithFormWithHttpInfoAsync (long petId, string name = default(string), string status = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UpdatePetWithForm"); - - var localVarPath = "/pet/{petId}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "application/x-www-form-urlencoded" - }; - String localVarHttpContentType = this.Configuration.ApiClient.SelectHeaderContentType(localVarHttpContentTypes); - - // to determine the Accept header - String[] localVarHttpHeaderAccepts = new String[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (name != null) localVarFormParams.Add("name", this.Configuration.ApiClient.ParameterToString(name)); // form parameter - if (status != null) localVarFormParams.Add("status", this.Configuration.ApiClient.ParameterToString(status)); // form parameter - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdatePetWithForm", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse - public ApiResponse UploadFile (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) - { - ApiResponse localVarResponse = UploadFileWithHttpInfo(petId, additionalMetadata, file); - return localVarResponse.Data; - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// ApiResponse of ApiResponse - public ApiResponse UploadFileWithHttpInfo (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - - var localVarPath = "/pet/{petId}/uploadImage"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UploadFileWithHttpInfoAsync(petId, additionalMetadata, file, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// uploads an image - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// Additional data to pass to server (optional) - /// file to upload (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithHttpInfoAsync (long petId, string additionalMetadata = default(string), System.IO.Stream file = default(System.IO.Stream), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFile"); - - var localVarPath = "/pet/{petId}/uploadImage"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (file != null) localVarFileParams.Add("file", this.Configuration.ApiClient.ParameterToFile("file", file)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse - public ApiResponse UploadFileWithRequiredFile (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) - { - ApiResponse localVarResponse = UploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata); - return localVarResponse.Data; - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// ApiResponse of ApiResponse - public ApiResponse UploadFileWithRequiredFileWithHttpInfo (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'requiredFile' is set - if (requiredFile == null) - throw new ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (requiredFile != null) localVarFileParams.Add("requiredFile", this.Configuration.ApiClient.ParameterToFile("requiredFile", requiredFile)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task UploadFileWithRequiredFileAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await UploadFileWithRequiredFileWithHttpInfoAsync(petId, requiredFile, additionalMetadata, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// uploads an image (required) - /// - /// Thrown when fails to make API call - /// ID of pet to update - /// file to upload - /// Additional data to pass to server (optional) - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (ApiResponse) - public async System.Threading.Tasks.Task> UploadFileWithRequiredFileWithHttpInfoAsync (long petId, System.IO.Stream requiredFile, string additionalMetadata = default(string), CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'petId' is set - if (petId == null) - throw new ApiException(400, "Missing required parameter 'petId' when calling PetApi->UploadFileWithRequiredFile"); - // verify the required parameter 'requiredFile' is set - if (requiredFile == null) - throw new ApiException(400, "Missing required parameter 'requiredFile' when calling PetApi->UploadFileWithRequiredFile"); - - var localVarPath = "/fake/{petId}/uploadImageWithRequiredFile"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - Object localVarPostBody = null; - - // to determine the Content-Type header - String[] localVarHttpContentTypes = new String[] { - "multipart/form-data" - }; - 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); - - if (petId != null) localVarPathParams.Add("petId", this.Configuration.ApiClient.ParameterToString(petId)); // path parameter - if (additionalMetadata != null) localVarFormParams.Add("additionalMetadata", this.Configuration.ApiClient.ParameterToString(additionalMetadata)); // form parameter - if (requiredFile != null) localVarFileParams.Add("requiredFile", this.Configuration.ApiClient.ParameterToFile("requiredFile", requiredFile)); - - // authentication (petstore_auth) required - // oauth required - if (!String.IsNullOrEmpty(this.Configuration.AccessToken)) - { - localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken; - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UploadFileWithRequiredFile", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (ApiResponse) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(ApiResponse))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/StoreApi.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/StoreApi.cs deleted file mode 100644 index d05925d2e45..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/StoreApi.cs +++ /dev/null @@ -1,866 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IStoreApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// - void DeleteOrder (string orderId); - - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// ApiResponse of Object(void) - ApiResponse DeleteOrderWithHttpInfo (string orderId); - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Dictionary<string, int> - Dictionary GetInventory (); - - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, int> - ApiResponse> GetInventoryWithHttpInfo (); - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Order - Order GetOrderById (long orderId); - - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// ApiResponse of Order - ApiResponse GetOrderByIdWithHttpInfo (long orderId); - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Order - Order PlaceOrder (Order body); - - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// ApiResponse of Order - ApiResponse PlaceOrderWithHttpInfo (Order body); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteOrderAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Delete purchase order by ID - /// - /// - /// For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of Dictionary<string, int> - System.Threading.Tasks.Task> GetInventoryAsync (CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Returns pet inventories by status - /// - /// - /// Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Dictionary<string, int>) - System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of Order - System.Threading.Tasks.Task GetOrderByIdAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Find purchase order by ID - /// - /// - /// For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of Order - System.Threading.Tasks.Task PlaceOrderAsync (Order body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Place an order for a pet - /// - /// - /// - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync (Order body, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class StoreApi : IStoreApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public StoreApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public StoreApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public StoreApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// - public void DeleteOrder (string orderId) - { - DeleteOrderWithHttpInfo(orderId); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// ApiResponse of Object(void) - public ApiResponse DeleteOrderWithHttpInfo (string orderId) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - - var localVarPath = "/store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteOrderAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteOrderWithHttpInfoAsync(orderId, cancellationToken); - - } - - /// - /// Delete purchase order by ID For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors - /// - /// Thrown when fails to make API call - /// ID of the order that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteOrderWithHttpInfoAsync (string orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->DeleteOrder"); - - var localVarPath = "/store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Dictionary<string, int> - public Dictionary GetInventory () - { - ApiResponse> localVarResponse = GetInventoryWithHttpInfo(); - return localVarResponse.Data; - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// ApiResponse of Dictionary<string, int> - public ApiResponse> GetInventoryWithHttpInfo () - { - - var localVarPath = "/store/inventory"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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); - - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // 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("GetInventory", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of Dictionary<string, int> - public async System.Threading.Tasks.Task> GetInventoryAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse> localVarResponse = await GetInventoryWithHttpInfoAsync(cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Returns pet inventories by status Returns a map of status codes to quantities - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Dictionary<string, int>) - public async System.Threading.Tasks.Task>> GetInventoryWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/store/inventory"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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); - - - // authentication (api_key) required - if (!String.IsNullOrEmpty(this.Configuration.GetApiKeyWithPrefix("api_key"))) - { - localVarHeaderParams["api_key"] = this.Configuration.GetApiKeyWithPrefix("api_key"); - } - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetInventory", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse>(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Dictionary) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Dictionary))); - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Order - public Order GetOrderById (long orderId) - { - ApiResponse localVarResponse = GetOrderByIdWithHttpInfo(orderId); - return localVarResponse.Data; - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// ApiResponse of Order - public ApiResponse GetOrderByIdWithHttpInfo (long orderId) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - - var localVarPath = "/store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // 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("GetOrderById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of Order - public async System.Threading.Tasks.Task GetOrderByIdAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetOrderByIdWithHttpInfoAsync(orderId, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Find purchase order by ID For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions - /// - /// Thrown when fails to make API call - /// ID of pet that needs to be fetched - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> GetOrderByIdWithHttpInfoAsync (long orderId, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'orderId' is set - if (orderId == null) - throw new ApiException(400, "Missing required parameter 'orderId' when calling StoreApi->GetOrderById"); - - var localVarPath = "/store/order/{order_id}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (orderId != null) localVarPathParams.Add("order_id", this.Configuration.ApiClient.ParameterToString(orderId)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetOrderById", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Order - public Order PlaceOrder (Order body) - { - ApiResponse localVarResponse = PlaceOrderWithHttpInfo(body); - return localVarResponse.Data; - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// ApiResponse of Order - public ApiResponse PlaceOrderWithHttpInfo (Order body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder"); - - var localVarPath = "/store/order"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("PlaceOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of Order - public async System.Threading.Tasks.Task PlaceOrderAsync (Order body, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await PlaceOrderWithHttpInfoAsync(body, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Place an order for a pet - /// - /// Thrown when fails to make API call - /// order placed for purchasing the pet - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (Order) - public async System.Threading.Tasks.Task> PlaceOrderWithHttpInfoAsync (Order body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling StoreApi->PlaceOrder"); - - var localVarPath = "/store/order"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("PlaceOrder", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (Order) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(Order))); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/UserApi.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/UserApi.cs deleted file mode 100644 index 13703badf4d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Api/UserApi.cs +++ /dev/null @@ -1,1626 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using System.Threading; -using RestSharp; -using Org.OpenAPITools.Client; -using Org.OpenAPITools.Model; - -namespace Org.OpenAPITools.Api -{ - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public interface IUserApi : IApiAccessor - { - #region Synchronous Operations - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// - void CreateUser (User body); - - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// ApiResponse of Object(void) - ApiResponse CreateUserWithHttpInfo (User body); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// - void CreateUsersWithArrayInput (List body); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - ApiResponse CreateUsersWithArrayInputWithHttpInfo (List body); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// - void CreateUsersWithListInput (List body); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - ApiResponse CreateUsersWithListInputWithHttpInfo (List body); - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// - void DeleteUser (string username); - - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// ApiResponse of Object(void) - ApiResponse DeleteUserWithHttpInfo (string username); - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// User - User GetUserByName (string username); - - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// ApiResponse of User - ApiResponse GetUserByNameWithHttpInfo (string username); - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// string - string LoginUser (string username, string password); - - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// ApiResponse of string - ApiResponse LoginUserWithHttpInfo (string username, string password); - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// - void LogoutUser (); - - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - ApiResponse LogoutUserWithHttpInfo (); - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// - void UpdateUser (string username, User body); - - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// ApiResponse of Object(void) - ApiResponse UpdateUserWithHttpInfo (string username, User body); - #endregion Synchronous Operations - #region Asynchronous Operations - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task CreateUserAsync (User body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Create user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync (User body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync (List body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task CreateUsersWithListInputAsync (List body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Creates list of users with given input array - /// - /// - /// - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync (List body, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task DeleteUserAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Delete user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of User - System.Threading.Tasks.Task GetUserByNameAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Get user by user name - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (User) - System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of string - System.Threading.Tasks.Task LoginUserAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Logs user into the system - /// - /// - /// - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task LogoutUserAsync (CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Logs out current logged in user session - /// - /// - /// - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of void - System.Threading.Tasks.Task UpdateUserAsync (string username, User body, CancellationToken cancellationToken = default(CancellationToken)); - - /// - /// Updated user - /// - /// - /// This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync (string username, User body, CancellationToken cancellationToken = default(CancellationToken)); - #endregion Asynchronous Operations - } - - /// - /// Represents a collection of functions to interact with the API endpoints - /// - public partial class UserApi : IUserApi - { - private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null; - - /// - /// Initializes a new instance of the class. - /// - /// - public UserApi(String basePath) - { - this.Configuration = new Org.OpenAPITools.Client.Configuration { BasePath = basePath }; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// - /// - public UserApi() - { - this.Configuration = Org.OpenAPITools.Client.Configuration.Default; - - ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory; - } - - /// - /// Initializes a new instance of the class - /// using Configuration object - /// - /// An instance of Configuration - /// - public UserApi(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; - } - - /// - /// Gets the base path of the API client. - /// - /// The base path - public String GetBasePath() - { - return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); - } - - /// - /// Sets the base path of the API client. - /// - /// The base path - [Obsolete("SetBasePath is deprecated, please do 'Configuration.ApiClient = new ApiClient(\"http://new-path\")' instead.")] - public void SetBasePath(String basePath) - { - // do nothing - } - - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - public Org.OpenAPITools.Client.Configuration Configuration {get; set;} - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - 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; } - } - - /// - /// Gets the default header. - /// - /// Dictionary of HTTP header - [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] - public IDictionary DefaultHeader() - { - return new ReadOnlyDictionary(this.Configuration.DefaultHeader); - } - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] - public void AddDefaultHeader(string key, string value) - { - this.Configuration.AddDefaultHeader(key, value); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// - public void CreateUser (User body) - { - CreateUserWithHttpInfo(body); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// ApiResponse of Object(void) - public ApiResponse CreateUserWithHttpInfo (User body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser"); - - var localVarPath = "/user"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateUserAsync (User body, CancellationToken cancellationToken = default(CancellationToken)) - { - await CreateUserWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// Create user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// Created user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUserWithHttpInfoAsync (User body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUser"); - - var localVarPath = "/user"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// - public void CreateUsersWithArrayInput (List body) - { - CreateUsersWithArrayInputWithHttpInfo(body); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - public ApiResponse CreateUsersWithArrayInputWithHttpInfo (List body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput"); - - var localVarPath = "/user/createWithArray"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithArrayInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithArrayInputAsync (List body, CancellationToken cancellationToken = default(CancellationToken)) - { - await CreateUsersWithArrayInputWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithArrayInputWithHttpInfoAsync (List body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithArrayInput"); - - var localVarPath = "/user/createWithArray"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithArrayInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// - public void CreateUsersWithListInput (List body) - { - CreateUsersWithListInputWithHttpInfo(body); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// ApiResponse of Object(void) - public ApiResponse CreateUsersWithListInputWithHttpInfo (List body) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput"); - - var localVarPath = "/user/createWithList"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithListInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task CreateUsersWithListInputAsync (List body, CancellationToken cancellationToken = default(CancellationToken)) - { - await CreateUsersWithListInputWithHttpInfoAsync(body, cancellationToken); - - } - - /// - /// Creates list of users with given input array - /// - /// Thrown when fails to make API call - /// List of user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> CreateUsersWithListInputWithHttpInfoAsync (List body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->CreateUsersWithListInput"); - - var localVarPath = "/user/createWithList"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.POST, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("CreateUsersWithListInput", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// - public void DeleteUser (string username) - { - DeleteUserWithHttpInfo(username); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// ApiResponse of Object(void) - public ApiResponse DeleteUserWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task DeleteUserAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - await DeleteUserWithHttpInfoAsync(username, cancellationToken); - - } - - /// - /// Delete user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// The name that needs to be deleted - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> DeleteUserWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->DeleteUser"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.DELETE, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("DeleteUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// User - public User GetUserByName (string username) - { - ApiResponse localVarResponse = GetUserByNameWithHttpInfo(username); - return localVarResponse.Data; - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// ApiResponse of User - public ApiResponse GetUserByNameWithHttpInfo (string username) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // 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("GetUserByName", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User))); - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of User - public async System.Threading.Tasks.Task GetUserByNameAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await GetUserByNameWithHttpInfoAsync(username, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Get user by user name - /// - /// Thrown when fails to make API call - /// The name that needs to be fetched. Use user1 for testing. - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (User) - public async System.Threading.Tasks.Task> GetUserByNameWithHttpInfoAsync (string username, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->GetUserByName"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("GetUserByName", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (User) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(User))); - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// string - public string LoginUser (string username, string password) - { - ApiResponse localVarResponse = LoginUserWithHttpInfo(username, password); - return localVarResponse.Data; - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// ApiResponse of string - public ApiResponse LoginUserWithHttpInfo (string username, string password) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - // verify the required parameter 'password' is set - if (password == null) - throw new ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - - var localVarPath = "/user/login"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "username", username)); // query parameter - if (password != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "password", password)); // query parameter - - - // 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("LoginUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of string - public async System.Threading.Tasks.Task LoginUserAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)) - { - ApiResponse localVarResponse = await LoginUserWithHttpInfoAsync(username, password, cancellationToken); - return localVarResponse.Data; - - } - - /// - /// Logs user into the system - /// - /// Thrown when fails to make API call - /// The user name for login - /// The password for login in clear text - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse (string) - public async System.Threading.Tasks.Task> LoginUserWithHttpInfoAsync (string username, string password, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->LoginUser"); - // verify the required parameter 'password' is set - if (password == null) - throw new ApiException(400, "Missing required parameter 'password' when calling UserApi->LoginUser"); - - var localVarPath = "/user/login"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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/xml", - "application/json" - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "username", username)); // query parameter - if (password != null) localVarQueryParams.AddRange(this.Configuration.ApiClient.ParameterToKeyValuePairs("", "password", password)); // query parameter - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.GET, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("LoginUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - (string) this.Configuration.ApiClient.Deserialize(localVarResponse, typeof(string))); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// - public void LogoutUser () - { - LogoutUserWithHttpInfo(); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// ApiResponse of Object(void) - public ApiResponse LogoutUserWithHttpInfo () - { - - var localVarPath = "/user/logout"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - 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("LogoutUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task LogoutUserAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - await LogoutUserWithHttpInfoAsync(cancellationToken); - - } - - /// - /// Logs out current logged in user session - /// - /// Thrown when fails to make API call - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> LogoutUserWithHttpInfoAsync (CancellationToken cancellationToken = default(CancellationToken)) - { - - var localVarPath = "/user/logout"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - 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, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("LogoutUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// - public void UpdateUser (string username, User body) - { - UpdateUserWithHttpInfo(username, body); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// ApiResponse of Object(void) - public ApiResponse UpdateUserWithHttpInfo (string username, User body) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) this.Configuration.ApiClient.CallApi(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of void - public async System.Threading.Tasks.Task UpdateUserAsync (string username, User body, CancellationToken cancellationToken = default(CancellationToken)) - { - await UpdateUserWithHttpInfoAsync(username, body, cancellationToken); - - } - - /// - /// Updated user This can only be done by the logged in user. - /// - /// Thrown when fails to make API call - /// name that need to be deleted - /// Updated user object - /// Cancellation Token to cancel request (optional) - /// Task of ApiResponse - public async System.Threading.Tasks.Task> UpdateUserWithHttpInfoAsync (string username, User body, CancellationToken cancellationToken = default(CancellationToken)) - { - // verify the required parameter 'username' is set - if (username == null) - throw new ApiException(400, "Missing required parameter 'username' when calling UserApi->UpdateUser"); - // verify the required parameter 'body' is set - if (body == null) - throw new ApiException(400, "Missing required parameter 'body' when calling UserApi->UpdateUser"); - - var localVarPath = "/user/{username}"; - var localVarPathParams = new Dictionary(); - var localVarQueryParams = new List>(); - var localVarHeaderParams = new Dictionary(this.Configuration.DefaultHeader); - var localVarFormParams = new Dictionary(); - var localVarFileParams = new Dictionary(); - 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[] { - }; - String localVarHttpHeaderAccept = this.Configuration.ApiClient.SelectHeaderAccept(localVarHttpHeaderAccepts); - if (localVarHttpHeaderAccept != null) - localVarHeaderParams.Add("Accept", localVarHttpHeaderAccept); - - if (username != null) localVarPathParams.Add("username", this.Configuration.ApiClient.ParameterToString(username)); // path parameter - if (body != null && body.GetType() != typeof(byte[])) - { - localVarPostBody = this.Configuration.ApiClient.Serialize(body); // http body (model) parameter - } - else - { - localVarPostBody = body; // byte array - } - - - // make the HTTP request - IRestResponse localVarResponse = (IRestResponse) await this.Configuration.ApiClient.CallApiAsync(localVarPath, - Method.PUT, localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarFileParams, - localVarPathParams, localVarHttpContentType, cancellationToken); - - int localVarStatusCode = (int) localVarResponse.StatusCode; - - if (ExceptionFactory != null) - { - Exception exception = ExceptionFactory("UpdateUser", localVarResponse); - if (exception != null) throw exception; - } - - return new ApiResponse(localVarStatusCode, - localVarResponse.Headers.ToDictionary(x => x.Name, x => string.Join(",", x.Value)), - null); - } - - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs deleted file mode 100644 index 21a140ed84e..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiClient.cs +++ /dev/null @@ -1,536 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections; -using System.Collections.Generic; -using System.Globalization; -using System.Text.RegularExpressions; -using System.IO; -using System.Threading; -using System.Web; -using System.Linq; -using System.Net; -using System.Text; -using Newtonsoft.Json; -using RestSharp; - -namespace Org.OpenAPITools.Client -{ - /// - /// API client is mainly responsible for making the HTTP call to the API backend. - /// - public partial class ApiClient - { - private JsonSerializerSettings serializerSettings = new JsonSerializerSettings - { - ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor - }; - - /// - /// Allows for extending request processing for generated code. - /// - /// The RestSharp request object - partial void InterceptRequest(IRestRequest request); - - /// - /// Allows for extending response processing for generated code. - /// - /// The RestSharp request object - /// The RestSharp response object - partial void InterceptResponse(IRestRequest request, IRestResponse response); - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - public ApiClient() - { - Configuration = Org.OpenAPITools.Client.Configuration.Default; - RestClient = new RestClient("http://petstore.swagger.io:80/v2"); - } - - /// - /// Initializes a new instance of the class - /// with default base path (http://petstore.swagger.io:80/v2). - /// - /// An instance of Configuration. - public ApiClient(Configuration config) - { - Configuration = config ?? Org.OpenAPITools.Client.Configuration.Default; - - RestClient = new RestClient(Configuration.BasePath); - } - - /// - /// Initializes a new instance of the class - /// with default configuration. - /// - /// The base path. - public ApiClient(String basePath = "http://petstore.swagger.io:80/v2") - { - if (String.IsNullOrEmpty(basePath)) - throw new ArgumentException("basePath cannot be empty"); - - RestClient = new RestClient(basePath); - Configuration = Client.Configuration.Default; - } - - /// - /// Gets or sets the default API client for making HTTP calls. - /// - /// The default API client. - [Obsolete("ApiClient.Default is deprecated, please use 'Configuration.Default.ApiClient' instead.")] - public static ApiClient Default; - - /// - /// Gets or sets an instance of the IReadableConfiguration. - /// - /// An instance of the IReadableConfiguration. - /// - /// helps us to avoid modifying possibly global - /// configuration values from within a given client. It does not guarantee thread-safety - /// of the instance in any way. - /// - public IReadableConfiguration Configuration { get; set; } - - /// - /// Gets or sets the RestClient. - /// - /// An instance of the RestClient - public RestClient RestClient { get; set; } - - // Creates and sets up a RestRequest prior to a call. - private RestRequest PrepareRequest( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = new RestRequest(path, method); - - // add path parameter, if any - foreach(var param in pathParams) - request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); - - // add header parameter, if any - foreach(var param in headerParams) - request.AddHeader(param.Key, param.Value); - - // add query parameter, if any - foreach(var param in queryParams) - request.AddQueryParameter(param.Key, param.Value); - - // add form parameter, if any - foreach(var param in formParams) - request.AddParameter(param.Key, param.Value); - - // add file parameter, if any - foreach(var param in fileParams) - { - request.AddFile(param.Value.Name, param.Value.Writer, param.Value.FileName, param.Value.ContentType); - } - - if (postBody != null) // http body (model or byte[]) parameter - { - request.AddParameter(contentType, postBody, ParameterType.RequestBody); - } - - return request; - } - - /// - /// Makes the HTTP request (Sync). - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content Type of the request - /// Object - public Object CallApi( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - - // set timeout - - RestClient.Timeout = Configuration.Timeout; - // set user agent - RestClient.UserAgent = Configuration.UserAgent; - - InterceptRequest(request); - var response = RestClient.Execute(request); - InterceptResponse(request, response); - - return (Object) response; - } - /// - /// Makes the asynchronous HTTP request. - /// - /// URL path. - /// HTTP method. - /// Query parameters. - /// HTTP body (POST request). - /// Header parameters. - /// Form parameters. - /// File parameters. - /// Path parameters. - /// Content type. - /// Cancellation Token. - /// The Task instance. - public async System.Threading.Tasks.Task CallApiAsync( - String path, RestSharp.Method method, List> queryParams, Object postBody, - Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, - String contentType, CancellationToken cancellationToken) - { - var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, - pathParams, contentType); - RestClient.UserAgent = Configuration.UserAgent; - InterceptRequest(request); - var response = await RestClient.ExecuteTaskAsync(request, cancellationToken); - InterceptResponse(request, response); - return (Object)response; - } - - /// - /// Escape string (url-encoded). - /// - /// String to be escaped. - /// Escaped string. - public string EscapeString(string str) - { - return UrlEncode(str); - } - - /// - /// Create FileParameter based on Stream. - /// - /// Parameter name. - /// Input stream. - /// FileParameter. - public FileParameter ParameterToFile(string name, Stream stream) - { - if (stream is FileStream) - return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); - else - return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); - } - - /// - /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. - /// If parameter is a list, join the list with ",". - /// Otherwise just return the string. - /// - /// The parameter (header, path, query, form). - /// Formatted string. - public string ParameterToString(object obj) - { - if (obj is DateTime) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTime)obj).ToString (Configuration.DateTimeFormat); - else if (obj is DateTimeOffset) - // Return a formatted date string - Can be customized with Configuration.DateTimeFormat - // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") - // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 - // For example: 2009-06-15T13:45:30.0000000 - return ((DateTimeOffset)obj).ToString (Configuration.DateTimeFormat); - else if (obj is bool) - return (bool)obj ? "true" : "false"; - else if (obj is IList) - { - var flattenedString = new StringBuilder(); - foreach (var param in (IList)obj) - { - if (flattenedString.Length > 0) - flattenedString.Append(","); - flattenedString.Append(param); - } - return flattenedString.ToString(); - } - else - return Convert.ToString (obj); - } - - /// - /// Deserialize the JSON string into a proper object. - /// - /// The HTTP response. - /// Object type. - /// Object representation of the JSON string. - public object Deserialize(IRestResponse response, Type type) - { - IList headers = response.Headers; - if (type == typeof(byte[])) // return byte array - { - return response.RawBytes; - } - - // TODO: ? if (type.IsAssignableFrom(typeof(Stream))) - if (type == typeof(Stream)) - { - if (headers != null) - { - var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) - ? Path.GetTempPath() - : Configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); - foreach (var header in headers) - { - var match = regex.Match(header.ToString()); - if (match.Success) - { - string fileName = filePath + SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", "")); - File.WriteAllBytes(fileName, response.RawBytes); - return new FileStream(fileName, FileMode.Open); - } - } - } - var stream = new MemoryStream(response.RawBytes); - return stream; - } - - if (type.Name.StartsWith("System.Nullable`1[[System.DateTime")) // return a datetime object - { - return DateTime.Parse(response.Content, null, System.Globalization.DateTimeStyles.RoundtripKind); - } - - if (type == typeof(String) || type.Name.StartsWith("System.Nullable")) // return primitive type - { - return ConvertType(response.Content, type); - } - - // at this point, it must be a model (json) - try - { - return JsonConvert.DeserializeObject(response.Content, type, serializerSettings); - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - /// Serialize an input (model) into JSON string - /// - /// Object. - /// JSON string. - public String Serialize(object obj) - { - try - { - return obj != null ? JsonConvert.SerializeObject(obj) : null; - } - catch (Exception e) - { - throw new ApiException(500, e.Message); - } - } - - /// - ///Check if the given MIME is a JSON MIME. - ///JSON MIME examples: - /// application/json - /// application/json; charset=UTF8 - /// APPLICATION/JSON - /// application/vnd.company+json - /// - /// MIME - /// Returns True if MIME type is json. - public bool IsJsonMime(String mime) - { - var jsonRegex = new Regex("(?i)^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$"); - return mime != null && (jsonRegex.IsMatch(mime) || mime.Equals("application/json-patch+json")); - } - - /// - /// Select the Content-Type header's value from the given content-type array: - /// if JSON type exists in the given array, use it; - /// otherwise use the first one defined in 'consumes' - /// - /// The Content-Type array to select from. - /// The Content-Type header to use. - public String SelectHeaderContentType(String[] contentTypes) - { - if (contentTypes.Length == 0) - return "application/json"; - - foreach (var contentType in contentTypes) - { - if (IsJsonMime(contentType.ToLower())) - return contentType; - } - - return contentTypes[0]; // use the first content type specified in 'consumes' - } - - /// - /// Select the Accept header's value from the given accepts array: - /// if JSON exists in the given array, use it; - /// otherwise use all of them (joining into a string) - /// - /// The accepts array to select from. - /// The Accept header to use. - public String SelectHeaderAccept(String[] accepts) - { - if (accepts.Length == 0) - return null; - - if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) - return "application/json"; - - return String.Join(",", accepts); - } - - /// - /// Encode string in base64 format. - /// - /// String to be encoded. - /// Encoded string. - public static string Base64Encode(string text) - { - return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); - } - - /// - /// Dynamically cast the object into target type. - /// - /// Object to be casted - /// Target type - /// Casted object - public static dynamic ConvertType(dynamic fromObject, Type toObject) - { - return Convert.ChangeType(fromObject, toObject); - } - - /// - /// Convert stream to byte array - /// - /// Input stream to be converted - /// Byte array - public static byte[] ReadAsBytes(Stream inputStream) - { - byte[] buf = new byte[16*1024]; - using (MemoryStream ms = new MemoryStream()) - { - int count; - while ((count = inputStream.Read(buf, 0, buf.Length)) > 0) - { - ms.Write(buf, 0, count); - } - return ms.ToArray(); - } - } - - /// - /// URL encode a string - /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 - /// - /// String to be URL encoded - /// Byte array - public static string UrlEncode(string input) - { - const int maxLength = 32766; - - if (input == null) - { - throw new ArgumentNullException("input"); - } - - if (input.Length <= maxLength) - { - return Uri.EscapeDataString(input); - } - - StringBuilder sb = new StringBuilder(input.Length * 2); - int index = 0; - - while (index < input.Length) - { - int length = Math.Min(input.Length - index, maxLength); - string subString = input.Substring(index, length); - - sb.Append(Uri.EscapeDataString(subString)); - index += subString.Length; - } - - return sb.ToString(); - } - - /// - /// Sanitize filename by removing the path - /// - /// Filename - /// Filename - public static string SanitizeFilename(string filename) - { - Match match = Regex.Match(filename, @".*[/\\](.*)$"); - - if (match.Success) - { - return match.Groups[1].Value; - } - else - { - return filename; - } - } - - /// - /// Convert params to key/value pairs. - /// Use collectionFormat to properly format lists and collections. - /// - /// Collection format. - /// Key name. - /// Value object. - /// A list of KeyValuePairs - public IEnumerable> ParameterToKeyValuePairs(string collectionFormat, string name, object value) - { - var parameters = new List>(); - - if (IsCollection(value) && collectionFormat == "multi") - { - var valueCollection = value as IEnumerable; - parameters.AddRange(from object item in valueCollection select new KeyValuePair(name, ParameterToString(item))); - } - else - { - parameters.Add(new KeyValuePair(name, ParameterToString(value))); - } - - return parameters; - } - - /// - /// Check if generic object is a collection. - /// - /// - /// True if object is a collection type - private static bool IsCollection(object value) - { - return value is IList || value is ICollection; - } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiException.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiException.cs deleted file mode 100644 index e7ac15569b9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiException.cs +++ /dev/null @@ -1,60 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; - -namespace Org.OpenAPITools.Client -{ - /// - /// API Exception - /// - public class ApiException : Exception - { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public dynamic ErrorContent { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() {} - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) - { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) - { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiResponse.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiResponse.cs deleted file mode 100644 index 4b462cf5424..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ApiResponse.cs +++ /dev/null @@ -1,54 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Collections.Generic; - -namespace Org.OpenAPITools.Client -{ - /// - /// API Response - /// - public class ApiResponse - { - /// - /// Gets or sets the status code (HTTP status code) - /// - /// The status code. - public int StatusCode { get; private set; } - - /// - /// Gets or sets the HTTP headers - /// - /// HTTP headers - public IDictionary Headers { get; private set; } - - /// - /// Gets or sets the data (parsed HTTP body) - /// - /// The data. - public T Data { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// HTTP headers. - /// Data (parsed HTTP body) - public ApiResponse(int statusCode, IDictionary headers, T data) - { - this.StatusCode= statusCode; - this.Headers = headers; - this.Data = data; - } - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/Configuration.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/Configuration.cs deleted file mode 100644 index 926007e22ca..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/Configuration.cs +++ /dev/null @@ -1,452 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Reflection; -using System.Collections.Concurrent; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents a set of configuration settings - /// - public class Configuration : IReadableConfiguration - { - #region Constants - - /// - /// Version of the package. - /// - /// Version of the package. - public const string Version = "1.0.0"; - - /// - /// Identifier for ISO 8601 DateTime Format - /// - /// See https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 for more information. - // ReSharper disable once InconsistentNaming - public const string ISO8601_DATETIME_FORMAT = "o"; - - #endregion Constants - - #region Static Members - - private static readonly object GlobalConfigSync = new { }; - private static Configuration _globalConfiguration; - - /// - /// Default creation of exceptions for a given method name and response object - /// - public static readonly ExceptionFactory DefaultExceptionFactory = (methodName, response) => - { - var status = (int)response.StatusCode; - if (status >= 400) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.Content), - response.Content); - } - if (status == 0) - { - return new ApiException(status, - string.Format("Error calling {0}: {1}", methodName, response.ErrorMessage), response.ErrorMessage); - } - return null; - }; - - /// - /// Gets or sets the default Configuration. - /// - /// Configuration. - public static Configuration Default - { - get { return _globalConfiguration; } - set - { - lock (GlobalConfigSync) - { - _globalConfiguration = value; - } - } - } - - #endregion Static Members - - #region Private Members - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - private IDictionary _apiKey = null; - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - private IDictionary _apiKeyPrefix = null; - - private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; - private string _tempFolderPath = Path.GetTempPath(); - - #endregion Private Members - - #region Constructors - - static Configuration() - { - _globalConfiguration = new GlobalConfiguration(); - } - - /// - /// Initializes a new instance of the class - /// - public Configuration() - { - UserAgent = "OpenAPI-Generator/1.0.0/csharp"; - BasePath = "http://petstore.swagger.io:80/v2"; - DefaultHeader = new ConcurrentDictionary(); - ApiKey = new ConcurrentDictionary(); - ApiKeyPrefix = new ConcurrentDictionary(); - - // Setting Timeout has side effects (forces ApiClient creation). - Timeout = 100000; - } - - /// - /// Initializes a new instance of the class - /// - public Configuration( - IDictionary defaultHeader, - IDictionary apiKey, - IDictionary apiKeyPrefix, - string basePath = "http://petstore.swagger.io:80/v2") : this() - { - if (string.IsNullOrWhiteSpace(basePath)) - throw new ArgumentException("The provided basePath is invalid.", "basePath"); - if (defaultHeader == null) - throw new ArgumentNullException("defaultHeader"); - if (apiKey == null) - throw new ArgumentNullException("apiKey"); - if (apiKeyPrefix == null) - throw new ArgumentNullException("apiKeyPrefix"); - - BasePath = basePath; - - foreach (var keyValuePair in defaultHeader) - { - DefaultHeader.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKey) - { - ApiKey.Add(keyValuePair); - } - - foreach (var keyValuePair in apiKeyPrefix) - { - ApiKeyPrefix.Add(keyValuePair); - } - } - - /// - /// Initializes a new instance of the class with different settings - /// - /// Api client - /// Dictionary of default HTTP header - /// Username - /// Password - /// accessToken - /// Dictionary of API key - /// Dictionary of API key prefix - /// Temp folder path - /// DateTime format string - /// HTTP connection timeout (in milliseconds) - /// HTTP user agent - [Obsolete("Use explicit object construction and setting of properties.", true)] - public Configuration( - // ReSharper disable UnusedParameter.Local - ApiClient apiClient = null, - IDictionary defaultHeader = null, - string username = null, - string password = null, - string accessToken = null, - IDictionary apiKey = null, - IDictionary apiKeyPrefix = null, - string tempFolderPath = null, - string dateTimeFormat = null, - int timeout = 100000, - string userAgent = "OpenAPI-Generator/1.0.0/csharp" - // ReSharper restore UnusedParameter.Local - ) - { - - } - - /// - /// Initializes a new instance of the Configuration class. - /// - /// Api client. - [Obsolete("This constructor caused unexpected sharing of static data. It is no longer supported.", true)] - // ReSharper disable once UnusedParameter.Local - public Configuration(ApiClient apiClient) - { - - } - - #endregion Constructors - - - #region Properties - - private ApiClient _apiClient = null; - /// - /// Gets an instance of an ApiClient for this configuration - /// - public virtual ApiClient ApiClient - { - get - { - if (_apiClient == null) _apiClient = CreateApiClient(); - return _apiClient; - } - } - - private String _basePath = null; - /// - /// Gets or sets the base path for API access. - /// - public virtual string BasePath { - get { return _basePath; } - set { - _basePath = value; - // pass-through to ApiClient if it's set. - if(_apiClient != null) { - _apiClient.RestClient.BaseUrl = new Uri(_basePath); - } - } - } - - /// - /// Gets or sets the default header. - /// - public virtual IDictionary DefaultHeader { get; set; } - - /// - /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. - /// - public virtual int Timeout - { - - get { return ApiClient.RestClient.Timeout; } - set { ApiClient.RestClient.Timeout = value; } - } - - /// - /// Gets or sets the HTTP user agent. - /// - /// Http user agent. - public virtual string UserAgent { get; set; } - - /// - /// Gets or sets the username (HTTP basic authentication). - /// - /// The username. - public virtual string Username { get; set; } - - /// - /// Gets or sets the password (HTTP basic authentication). - /// - /// The password. - public virtual string Password { get; set; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix(string apiKeyIdentifier) - { - var apiKeyValue = ""; - ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); - var apiKeyPrefix = ""; - if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) - return apiKeyPrefix + " " + apiKeyValue; - else - return apiKeyValue; - } - - /// - /// Gets or sets the access token for OAuth2 authentication. - /// - /// The access token. - public virtual string AccessToken { get; set; } - - /// - /// Gets or sets the temporary folder path to store the files downloaded from the server. - /// - /// Folder path. - public virtual string TempFolderPath - { - get { return _tempFolderPath; } - - set - { - if (string.IsNullOrEmpty(value)) - { - _tempFolderPath = Path.GetTempPath(); - return; - } - - // create the directory if it does not exist - if (!Directory.Exists(value)) - { - Directory.CreateDirectory(value); - } - - // check if the path contains directory separator at the end - if (value[value.Length - 1] == Path.DirectorySeparatorChar) - { - _tempFolderPath = value; - } - else - { - _tempFolderPath = value + Path.DirectorySeparatorChar; - } - } - } - - /// - /// Gets or sets the date time format used when serializing in the ApiClient - /// By default, it's set to ISO 8601 - "o", for others see: - /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx - /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx - /// No validation is done to ensure that the string you're providing is valid - /// - /// The DateTimeFormat string - public virtual string DateTimeFormat - { - get { return _dateTimeFormat; } - set - { - if (string.IsNullOrEmpty(value)) - { - // Never allow a blank or null string, go back to the default - _dateTimeFormat = ISO8601_DATETIME_FORMAT; - return; - } - - // Caution, no validation when you choose date time format other than ISO 8601 - // Take a look at the above links - _dateTimeFormat = value; - } - } - - /// - /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. - /// - /// The prefix of the API key. - public virtual IDictionary ApiKeyPrefix - { - get { return _apiKeyPrefix; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKeyPrefix collection may not be null."); - } - _apiKeyPrefix = value; - } - } - - /// - /// Gets or sets the API key based on the authentication name. - /// - /// The API key. - public virtual IDictionary ApiKey - { - get { return _apiKey; } - set - { - if (value == null) - { - throw new InvalidOperationException("ApiKey collection may not be null."); - } - _apiKey = value; - } - } - - #endregion Properties - - #region Methods - - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - public void AddDefaultHeader(string key, string value) - { - DefaultHeader[key] = value; - } - - /// - /// Creates a new based on this instance. - /// - /// - public ApiClient CreateApiClient() - { - return new ApiClient(BasePath) { Configuration = this }; - } - - - /// - /// Returns a string with essential information for debugging. - /// - public static String ToDebugReport() - { - String report = "C# SDK (Org.OpenAPITools) Debug Report:\n"; - report += " OS: " + System.Environment.OSVersion + "\n"; - report += " .NET Framework Version: " + System.Environment.Version + "\n"; - report += " Version of the API: 1.0.0\n"; - report += " SDK Package Version: 1.0.0\n"; - - return report; - } - - /// - /// Add Api Key Header. - /// - /// Api Key name. - /// Api Key value. - /// - public void AddApiKey(string key, string value) - { - ApiKey[key] = value; - } - - /// - /// Sets the API key prefix. - /// - /// Api Key name. - /// Api Key value. - public void AddApiKeyPrefix(string key, string value) - { - ApiKeyPrefix[key] = value; - } - - #endregion Methods - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ExceptionFactory.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ExceptionFactory.cs deleted file mode 100644 index d855d96821f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/ExceptionFactory.cs +++ /dev/null @@ -1,24 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using RestSharp; - -namespace Org.OpenAPITools.Client -{ - /// - /// A delegate to ExceptionFactory method - /// - /// Method name - /// Response - /// Exceptions - public delegate Exception ExceptionFactory(string methodName, IRestResponse response); -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/GlobalConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/GlobalConfiguration.cs deleted file mode 100644 index a79bea966bd..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/GlobalConfiguration.cs +++ /dev/null @@ -1,34 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Reflection; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Text; -using System.Threading; - -namespace Org.OpenAPITools.Client -{ - /// - /// provides a compile-time extension point for globally configuring - /// API Clients. - /// - /// - /// A customized implementation via partial class may reside in another file and may - /// be excluded from automatic generation via a .openapi-generator-ignore file. - /// - public partial class GlobalConfiguration : Configuration - { - - } -} \ No newline at end of file diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/IApiAccessor.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/IApiAccessor.cs deleted file mode 100644 index cd03e8c1f97..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/IApiAccessor.cs +++ /dev/null @@ -1,42 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Linq; -using RestSharp; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents configuration aspects required to interact with the API endpoints. - /// - public interface IApiAccessor - { - /// - /// Gets or sets the configuration object - /// - /// An instance of the Configuration - Configuration Configuration {get; set;} - - /// - /// Gets the base path of the API client. - /// - /// The base path - String GetBasePath(); - - /// - /// Provides a factory method hook for the creation of exceptions. - /// - ExceptionFactory ExceptionFactory { get; set; } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/IReadableConfiguration.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/IReadableConfiguration.cs deleted file mode 100644 index 43ed169c6a1..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/IReadableConfiguration.cs +++ /dev/null @@ -1,94 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - - -using System.Collections.Generic; - -namespace Org.OpenAPITools.Client -{ - /// - /// Represents a readable-only configuration contract. - /// - public interface IReadableConfiguration - { - /// - /// Gets the access token. - /// - /// Access token. - string AccessToken { get; } - - /// - /// Gets the API key. - /// - /// API key. - IDictionary ApiKey { get; } - - /// - /// Gets the API key prefix. - /// - /// API key prefix. - IDictionary ApiKeyPrefix { get; } - - /// - /// Gets the base path. - /// - /// Base path. - string BasePath { get; } - - /// - /// Gets the date time format. - /// - /// Date time format. - string DateTimeFormat { get; } - - /// - /// Gets the default header. - /// - /// Default header. - IDictionary DefaultHeader { get; } - - /// - /// Gets the temp folder path. - /// - /// Temp folder path. - string TempFolderPath { get; } - - /// - /// Gets the HTTP connection timeout (in milliseconds) - /// - /// HTTP connection timeout. - int Timeout { get; } - - /// - /// Gets the user agent. - /// - /// User agent. - string UserAgent { get; } - - /// - /// Gets the username. - /// - /// Username. - string Username { get; } - - /// - /// Gets the password. - /// - /// Password. - string Password { get; } - - /// - /// Gets the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - string GetApiKeyWithPrefix(string apiKeyIdentifier); - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs deleted file mode 100644 index a1bd6b08f3b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs +++ /dev/null @@ -1,30 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using Newtonsoft.Json.Converters; - -namespace Org.OpenAPITools.Client -{ - /// - /// Formatter for 'date' openapi formats ss defined by full-date - RFC3339 - /// see https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md#data-types - /// - public class OpenAPIDateConverter : IsoDateTimeConverter - { - /// - /// Initializes a new instance of the class. - /// - public OpenAPIDateConverter() - { - // full-date = date-fullyear "-" date-month "-" date-mday - DateTimeFormat = "yyyy-MM-dd"; - } - } -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/FodyWeavers.xml b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/FodyWeavers.xml deleted file mode 100644 index da017fcbf60..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/FodyWeavers.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs deleted file mode 100644 index 7d83ea63868..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesAnyType.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesAnyType - /// - [DataContract] - [ImplementPropertyChanged] - public partial class AdditionalPropertiesAnyType : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesAnyType(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesAnyType {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesAnyType); - } - - /// - /// Returns true if AdditionalPropertiesAnyType instances are equal - /// - /// Instance of AdditionalPropertiesAnyType to be compared - /// Boolean - public bool Equals(AdditionalPropertiesAnyType input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs deleted file mode 100644 index d0205420529..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesArray.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesArray - /// - [DataContract] - [ImplementPropertyChanged] - public partial class AdditionalPropertiesArray : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesArray(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesArray {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesArray); - } - - /// - /// Returns true if AdditionalPropertiesArray instances are equal - /// - /// Instance of AdditionalPropertiesArray to be compared - /// Boolean - public bool Equals(AdditionalPropertiesArray input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs deleted file mode 100644 index e50520a9744..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesBoolean.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesBoolean - /// - [DataContract] - [ImplementPropertyChanged] - public partial class AdditionalPropertiesBoolean : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesBoolean(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesBoolean {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesBoolean); - } - - /// - /// Returns true if AdditionalPropertiesBoolean instances are equal - /// - /// Instance of AdditionalPropertiesBoolean to be compared - /// Boolean - public bool Equals(AdditionalPropertiesBoolean input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs deleted file mode 100644 index 53e2fbc1d03..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesClass.cs +++ /dev/null @@ -1,315 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesClass - /// - [DataContract] - [ImplementPropertyChanged] - public partial class AdditionalPropertiesClass : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// mapString. - /// mapNumber. - /// mapInteger. - /// mapBoolean. - /// mapArrayInteger. - /// mapArrayAnytype. - /// mapMapString. - /// mapMapAnytype. - /// anytype1. - /// anytype2. - /// anytype3. - public AdditionalPropertiesClass(Dictionary mapString = default(Dictionary), Dictionary mapNumber = default(Dictionary), Dictionary mapInteger = default(Dictionary), Dictionary mapBoolean = default(Dictionary), Dictionary> mapArrayInteger = default(Dictionary>), Dictionary> mapArrayAnytype = default(Dictionary>), Dictionary> mapMapString = default(Dictionary>), Dictionary> mapMapAnytype = default(Dictionary>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) - { - this.MapString = mapString; - this.MapNumber = mapNumber; - this.MapInteger = mapInteger; - this.MapBoolean = mapBoolean; - this.MapArrayInteger = mapArrayInteger; - this.MapArrayAnytype = mapArrayAnytype; - this.MapMapString = mapMapString; - this.MapMapAnytype = mapMapAnytype; - this.Anytype1 = anytype1; - this.Anytype2 = anytype2; - this.Anytype3 = anytype3; - } - - /// - /// Gets or Sets MapString - /// - [DataMember(Name="map_string", EmitDefaultValue=true)] - public Dictionary MapString { get; set; } - - /// - /// Gets or Sets MapNumber - /// - [DataMember(Name="map_number", EmitDefaultValue=true)] - public Dictionary MapNumber { get; set; } - - /// - /// Gets or Sets MapInteger - /// - [DataMember(Name="map_integer", EmitDefaultValue=true)] - public Dictionary MapInteger { get; set; } - - /// - /// Gets or Sets MapBoolean - /// - [DataMember(Name="map_boolean", EmitDefaultValue=true)] - public Dictionary MapBoolean { get; set; } - - /// - /// Gets or Sets MapArrayInteger - /// - [DataMember(Name="map_array_integer", EmitDefaultValue=true)] - public Dictionary> MapArrayInteger { get; set; } - - /// - /// Gets or Sets MapArrayAnytype - /// - [DataMember(Name="map_array_anytype", EmitDefaultValue=true)] - public Dictionary> MapArrayAnytype { get; set; } - - /// - /// Gets or Sets MapMapString - /// - [DataMember(Name="map_map_string", EmitDefaultValue=true)] - public Dictionary> MapMapString { get; set; } - - /// - /// Gets or Sets MapMapAnytype - /// - [DataMember(Name="map_map_anytype", EmitDefaultValue=true)] - public Dictionary> MapMapAnytype { get; set; } - - /// - /// Gets or Sets Anytype1 - /// - [DataMember(Name="anytype_1", EmitDefaultValue=true)] - public Object Anytype1 { get; set; } - - /// - /// Gets or Sets Anytype2 - /// - [DataMember(Name="anytype_2", EmitDefaultValue=true)] - public Object Anytype2 { get; set; } - - /// - /// Gets or Sets Anytype3 - /// - [DataMember(Name="anytype_3", EmitDefaultValue=true)] - public Object Anytype3 { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesClass {\n"); - sb.Append(" MapString: ").Append(MapString).Append("\n"); - sb.Append(" MapNumber: ").Append(MapNumber).Append("\n"); - sb.Append(" MapInteger: ").Append(MapInteger).Append("\n"); - sb.Append(" MapBoolean: ").Append(MapBoolean).Append("\n"); - sb.Append(" MapArrayInteger: ").Append(MapArrayInteger).Append("\n"); - sb.Append(" MapArrayAnytype: ").Append(MapArrayAnytype).Append("\n"); - sb.Append(" MapMapString: ").Append(MapMapString).Append("\n"); - sb.Append(" MapMapAnytype: ").Append(MapMapAnytype).Append("\n"); - sb.Append(" Anytype1: ").Append(Anytype1).Append("\n"); - sb.Append(" Anytype2: ").Append(Anytype2).Append("\n"); - sb.Append(" Anytype3: ").Append(Anytype3).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesClass); - } - - /// - /// Returns true if AdditionalPropertiesClass instances are equal - /// - /// Instance of AdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(AdditionalPropertiesClass input) - { - if (input == null) - return false; - - return - ( - this.MapString == input.MapString || - this.MapString != null && - input.MapString != null && - this.MapString.SequenceEqual(input.MapString) - ) && - ( - this.MapNumber == input.MapNumber || - this.MapNumber != null && - input.MapNumber != null && - this.MapNumber.SequenceEqual(input.MapNumber) - ) && - ( - this.MapInteger == input.MapInteger || - this.MapInteger != null && - input.MapInteger != null && - this.MapInteger.SequenceEqual(input.MapInteger) - ) && - ( - this.MapBoolean == input.MapBoolean || - this.MapBoolean != null && - input.MapBoolean != null && - this.MapBoolean.SequenceEqual(input.MapBoolean) - ) && - ( - this.MapArrayInteger == input.MapArrayInteger || - this.MapArrayInteger != null && - input.MapArrayInteger != null && - this.MapArrayInteger.SequenceEqual(input.MapArrayInteger) - ) && - ( - this.MapArrayAnytype == input.MapArrayAnytype || - this.MapArrayAnytype != null && - input.MapArrayAnytype != null && - this.MapArrayAnytype.SequenceEqual(input.MapArrayAnytype) - ) && - ( - this.MapMapString == input.MapMapString || - this.MapMapString != null && - input.MapMapString != null && - this.MapMapString.SequenceEqual(input.MapMapString) - ) && - ( - this.MapMapAnytype == input.MapMapAnytype || - this.MapMapAnytype != null && - input.MapMapAnytype != null && - this.MapMapAnytype.SequenceEqual(input.MapMapAnytype) - ) && - ( - this.Anytype1 == input.Anytype1 || - (this.Anytype1 != null && - this.Anytype1.Equals(input.Anytype1)) - ) && - ( - this.Anytype2 == input.Anytype2 || - (this.Anytype2 != null && - this.Anytype2.Equals(input.Anytype2)) - ) && - ( - this.Anytype3 == input.Anytype3 || - (this.Anytype3 != null && - this.Anytype3.Equals(input.Anytype3)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapString != null) - hashCode = hashCode * 59 + this.MapString.GetHashCode(); - if (this.MapNumber != null) - hashCode = hashCode * 59 + this.MapNumber.GetHashCode(); - if (this.MapInteger != null) - hashCode = hashCode * 59 + this.MapInteger.GetHashCode(); - if (this.MapBoolean != null) - hashCode = hashCode * 59 + this.MapBoolean.GetHashCode(); - if (this.MapArrayInteger != null) - hashCode = hashCode * 59 + this.MapArrayInteger.GetHashCode(); - if (this.MapArrayAnytype != null) - hashCode = hashCode * 59 + this.MapArrayAnytype.GetHashCode(); - if (this.MapMapString != null) - hashCode = hashCode * 59 + this.MapMapString.GetHashCode(); - if (this.MapMapAnytype != null) - hashCode = hashCode * 59 + this.MapMapAnytype.GetHashCode(); - if (this.Anytype1 != null) - hashCode = hashCode * 59 + this.Anytype1.GetHashCode(); - if (this.Anytype2 != null) - hashCode = hashCode * 59 + this.Anytype2.GetHashCode(); - if (this.Anytype3 != null) - hashCode = hashCode * 59 + this.Anytype3.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs deleted file mode 100644 index 804cf620155..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesInteger.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesInteger - /// - [DataContract] - [ImplementPropertyChanged] - public partial class AdditionalPropertiesInteger : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesInteger(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesInteger {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesInteger); - } - - /// - /// Returns true if AdditionalPropertiesInteger instances are equal - /// - /// Instance of AdditionalPropertiesInteger to be compared - /// Boolean - public bool Equals(AdditionalPropertiesInteger input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs deleted file mode 100644 index 9416cce1c79..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesNumber.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesNumber - /// - [DataContract] - [ImplementPropertyChanged] - public partial class AdditionalPropertiesNumber : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesNumber(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesNumber {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesNumber); - } - - /// - /// Returns true if AdditionalPropertiesNumber instances are equal - /// - /// Instance of AdditionalPropertiesNumber to be compared - /// Boolean - public bool Equals(AdditionalPropertiesNumber input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs deleted file mode 100644 index 47677884f4d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesObject.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesObject - /// - [DataContract] - [ImplementPropertyChanged] - public partial class AdditionalPropertiesObject : Dictionary>, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesObject(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesObject {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesObject); - } - - /// - /// Returns true if AdditionalPropertiesObject instances are equal - /// - /// Instance of AdditionalPropertiesObject to be compared - /// Boolean - public bool Equals(AdditionalPropertiesObject input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs deleted file mode 100644 index a61e6ea1477..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/AdditionalPropertiesString.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// AdditionalPropertiesString - /// - [DataContract] - [ImplementPropertyChanged] - public partial class AdditionalPropertiesString : Dictionary, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - public AdditionalPropertiesString(string name = default(string)) : base() - { - this.Name = name; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class AdditionalPropertiesString {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as AdditionalPropertiesString); - } - - /// - /// Returns true if AdditionalPropertiesString instances are equal - /// - /// Instance of AdditionalPropertiesString to be compared - /// Boolean - public bool Equals(AdditionalPropertiesString input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Animal.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Animal.cs deleted file mode 100644 index e51ad5f9cbb..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Animal.cs +++ /dev/null @@ -1,200 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using JsonSubTypes; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Animal - /// - [DataContract] - [JsonConverter(typeof(JsonSubtypes), "className")] - [JsonSubtypes.KnownSubType(typeof(Dog), "Dog")] - [JsonSubtypes.KnownSubType(typeof(Cat), "Cat")] - [JsonSubtypes.KnownSubType(typeof(BigCat), "BigCat")] - [ImplementPropertyChanged] - public partial class Animal : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Animal() { } - /// - /// Initializes a new instance of the class. - /// - /// className (required). - /// color (default to "red"). - public Animal(string className = default(string), string color = "red") - { - // to ensure "className" is required (not null) - if (className == null) - { - throw new InvalidDataException("className is a required property for Animal and cannot be null"); - } - else - { - this.ClassName = className; - } - - // use default value if no "color" provided - if (color == null) - { - this.Color = "red"; - } - else - { - this.Color = color; - } - } - - /// - /// Gets or Sets ClassName - /// - [DataMember(Name="className", EmitDefaultValue=true)] - public string ClassName { get; set; } - - /// - /// Gets or Sets Color - /// - [DataMember(Name="color", EmitDefaultValue=true)] - public string Color { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Animal {\n"); - sb.Append(" ClassName: ").Append(ClassName).Append("\n"); - sb.Append(" Color: ").Append(Color).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Animal); - } - - /// - /// Returns true if Animal instances are equal - /// - /// Instance of Animal to be compared - /// Boolean - public bool Equals(Animal input) - { - if (input == null) - return false; - - return - ( - this.ClassName == input.ClassName || - (this.ClassName != null && - this.ClassName.Equals(input.ClassName)) - ) && - ( - this.Color == input.Color || - (this.Color != null && - this.Color.Equals(input.Color)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ClassName != null) - hashCode = hashCode * 59 + this.ClassName.GetHashCode(); - if (this.Color != null) - hashCode = hashCode * 59 + this.Color.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ApiResponse.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ApiResponse.cs deleted file mode 100644 index c0bf6f61b1b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ApiResponse.cs +++ /dev/null @@ -1,179 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ApiResponse - /// - [DataContract] - [ImplementPropertyChanged] - public partial class ApiResponse : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// code. - /// type. - /// message. - public ApiResponse(int code = default(int), string type = default(string), string message = default(string)) - { - this.Code = code; - this.Type = type; - this.Message = message; - } - - /// - /// Gets or Sets Code - /// - [DataMember(Name="code", EmitDefaultValue=true)] - public int Code { get; set; } - - /// - /// Gets or Sets Type - /// - [DataMember(Name="type", EmitDefaultValue=true)] - public string Type { get; set; } - - /// - /// Gets or Sets Message - /// - [DataMember(Name="message", EmitDefaultValue=true)] - public string Message { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ApiResponse {\n"); - sb.Append(" Code: ").Append(Code).Append("\n"); - sb.Append(" Type: ").Append(Type).Append("\n"); - sb.Append(" Message: ").Append(Message).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ApiResponse); - } - - /// - /// Returns true if ApiResponse instances are equal - /// - /// Instance of ApiResponse to be compared - /// Boolean - public bool Equals(ApiResponse input) - { - if (input == null) - return false; - - return - ( - this.Code == input.Code || - (this.Code != null && - this.Code.Equals(input.Code)) - ) && - ( - this.Type == input.Type || - (this.Type != null && - this.Type.Equals(input.Type)) - ) && - ( - this.Message == input.Message || - (this.Message != null && - this.Message.Equals(input.Message)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Code != null) - hashCode = hashCode * 59 + this.Code.GetHashCode(); - if (this.Type != null) - hashCode = hashCode * 59 + this.Type.GetHashCode(); - if (this.Message != null) - hashCode = hashCode * 59 + this.Message.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs deleted file mode 100644 index 8a778695abf..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayOfArrayOfNumberOnly.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ArrayOfArrayOfNumberOnly - /// - [DataContract] - [ImplementPropertyChanged] - public partial class ArrayOfArrayOfNumberOnly : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// arrayArrayNumber. - public ArrayOfArrayOfNumberOnly(List> arrayArrayNumber = default(List>)) - { - this.ArrayArrayNumber = arrayArrayNumber; - } - - /// - /// Gets or Sets ArrayArrayNumber - /// - [DataMember(Name="ArrayArrayNumber", EmitDefaultValue=true)] - public List> ArrayArrayNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayOfArrayOfNumberOnly {\n"); - sb.Append(" ArrayArrayNumber: ").Append(ArrayArrayNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayOfArrayOfNumberOnly); - } - - /// - /// Returns true if ArrayOfArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfArrayOfNumberOnly input) - { - if (input == null) - return false; - - return - ( - this.ArrayArrayNumber == input.ArrayArrayNumber || - this.ArrayArrayNumber != null && - input.ArrayArrayNumber != null && - this.ArrayArrayNumber.SequenceEqual(input.ArrayArrayNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayArrayNumber != null) - hashCode = hashCode * 59 + this.ArrayArrayNumber.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs deleted file mode 100644 index 18389f1b048..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayOfNumberOnly.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ArrayOfNumberOnly - /// - [DataContract] - [ImplementPropertyChanged] - public partial class ArrayOfNumberOnly : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// arrayNumber. - public ArrayOfNumberOnly(List arrayNumber = default(List)) - { - this.ArrayNumber = arrayNumber; - } - - /// - /// Gets or Sets ArrayNumber - /// - [DataMember(Name="ArrayNumber", EmitDefaultValue=true)] - public List ArrayNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayOfNumberOnly {\n"); - sb.Append(" ArrayNumber: ").Append(ArrayNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayOfNumberOnly); - } - - /// - /// Returns true if ArrayOfNumberOnly instances are equal - /// - /// Instance of ArrayOfNumberOnly to be compared - /// Boolean - public bool Equals(ArrayOfNumberOnly input) - { - if (input == null) - return false; - - return - ( - this.ArrayNumber == input.ArrayNumber || - this.ArrayNumber != null && - input.ArrayNumber != null && - this.ArrayNumber.SequenceEqual(input.ArrayNumber) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayNumber != null) - hashCode = hashCode * 59 + this.ArrayNumber.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayTest.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayTest.cs deleted file mode 100644 index 77de3dea9a4..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ArrayTest.cs +++ /dev/null @@ -1,182 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ArrayTest - /// - [DataContract] - [ImplementPropertyChanged] - public partial class ArrayTest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// arrayOfString. - /// arrayArrayOfInteger. - /// arrayArrayOfModel. - public ArrayTest(List arrayOfString = default(List), List> arrayArrayOfInteger = default(List>), List> arrayArrayOfModel = default(List>)) - { - this.ArrayOfString = arrayOfString; - this.ArrayArrayOfInteger = arrayArrayOfInteger; - this.ArrayArrayOfModel = arrayArrayOfModel; - } - - /// - /// Gets or Sets ArrayOfString - /// - [DataMember(Name="array_of_string", EmitDefaultValue=true)] - public List ArrayOfString { get; set; } - - /// - /// Gets or Sets ArrayArrayOfInteger - /// - [DataMember(Name="array_array_of_integer", EmitDefaultValue=true)] - public List> ArrayArrayOfInteger { get; set; } - - /// - /// Gets or Sets ArrayArrayOfModel - /// - [DataMember(Name="array_array_of_model", EmitDefaultValue=true)] - public List> ArrayArrayOfModel { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ArrayTest {\n"); - sb.Append(" ArrayOfString: ").Append(ArrayOfString).Append("\n"); - sb.Append(" ArrayArrayOfInteger: ").Append(ArrayArrayOfInteger).Append("\n"); - sb.Append(" ArrayArrayOfModel: ").Append(ArrayArrayOfModel).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ArrayTest); - } - - /// - /// Returns true if ArrayTest instances are equal - /// - /// Instance of ArrayTest to be compared - /// Boolean - public bool Equals(ArrayTest input) - { - if (input == null) - return false; - - return - ( - this.ArrayOfString == input.ArrayOfString || - this.ArrayOfString != null && - input.ArrayOfString != null && - this.ArrayOfString.SequenceEqual(input.ArrayOfString) - ) && - ( - this.ArrayArrayOfInteger == input.ArrayArrayOfInteger || - this.ArrayArrayOfInteger != null && - input.ArrayArrayOfInteger != null && - this.ArrayArrayOfInteger.SequenceEqual(input.ArrayArrayOfInteger) - ) && - ( - this.ArrayArrayOfModel == input.ArrayArrayOfModel || - this.ArrayArrayOfModel != null && - input.ArrayArrayOfModel != null && - this.ArrayArrayOfModel.SequenceEqual(input.ArrayArrayOfModel) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.ArrayOfString != null) - hashCode = hashCode * 59 + this.ArrayOfString.GetHashCode(); - if (this.ArrayArrayOfInteger != null) - hashCode = hashCode * 59 + this.ArrayArrayOfInteger.GetHashCode(); - if (this.ArrayArrayOfModel != null) - hashCode = hashCode * 59 + this.ArrayArrayOfModel.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/BigCat.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/BigCat.cs deleted file mode 100644 index af701bbc6f7..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/BigCat.cs +++ /dev/null @@ -1,186 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// BigCat - /// - [DataContract] - [ImplementPropertyChanged] - public partial class BigCat : Cat, IEquatable, IValidatableObject - { - /// - /// Defines Kind - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum KindEnum - { - /// - /// Enum Lions for value: lions - /// - [EnumMember(Value = "lions")] - Lions = 1, - - /// - /// Enum Tigers for value: tigers - /// - [EnumMember(Value = "tigers")] - Tigers = 2, - - /// - /// Enum Leopards for value: leopards - /// - [EnumMember(Value = "leopards")] - Leopards = 3, - - /// - /// Enum Jaguars for value: jaguars - /// - [EnumMember(Value = "jaguars")] - Jaguars = 4 - - } - - /// - /// Gets or Sets Kind - /// - [DataMember(Name="kind", EmitDefaultValue=true)] - public KindEnum? Kind { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected BigCat() { } - /// - /// Initializes a new instance of the class. - /// - /// kind. - public BigCat(KindEnum? kind = default(KindEnum?), string className = default(string), string color = "red", bool declawed = default(bool)) : base(declawed) - { - this.Kind = kind; - } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BigCat {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Kind: ").Append(Kind).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BigCat); - } - - /// - /// Returns true if BigCat instances are equal - /// - /// Instance of BigCat to be compared - /// Boolean - public bool Equals(BigCat input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Kind == input.Kind || - (this.Kind != null && - this.Kind.Equals(input.Kind)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Kind != null) - hashCode = hashCode * 59 + this.Kind.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/BigCatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/BigCatAllOf.cs deleted file mode 100644 index f99b5acebac..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/BigCatAllOf.cs +++ /dev/null @@ -1,179 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// BigCatAllOf - /// - [DataContract] - [ImplementPropertyChanged] - public partial class BigCatAllOf : IEquatable, IValidatableObject - { - /// - /// Defines Kind - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum KindEnum - { - /// - /// Enum Lions for value: lions - /// - [EnumMember(Value = "lions")] - Lions = 1, - - /// - /// Enum Tigers for value: tigers - /// - [EnumMember(Value = "tigers")] - Tigers = 2, - - /// - /// Enum Leopards for value: leopards - /// - [EnumMember(Value = "leopards")] - Leopards = 3, - - /// - /// Enum Jaguars for value: jaguars - /// - [EnumMember(Value = "jaguars")] - Jaguars = 4 - - } - - /// - /// Gets or Sets Kind - /// - [DataMember(Name="kind", EmitDefaultValue=true)] - public KindEnum? Kind { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// kind. - public BigCatAllOf(KindEnum? kind = default(KindEnum?)) - { - this.Kind = kind; - } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class BigCatAllOf {\n"); - sb.Append(" Kind: ").Append(Kind).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as BigCatAllOf); - } - - /// - /// Returns true if BigCatAllOf instances are equal - /// - /// Instance of BigCatAllOf to be compared - /// Boolean - public bool Equals(BigCatAllOf input) - { - if (input == null) - return false; - - return - ( - this.Kind == input.Kind || - (this.Kind != null && - this.Kind.Equals(input.Kind)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Kind != null) - hashCode = hashCode * 59 + this.Kind.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Capitalization.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Capitalization.cs deleted file mode 100644 index e70ef300f16..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Capitalization.cs +++ /dev/null @@ -1,228 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Capitalization - /// - [DataContract] - [ImplementPropertyChanged] - public partial class Capitalization : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// smallCamel. - /// capitalCamel. - /// smallSnake. - /// capitalSnake. - /// sCAETHFlowPoints. - /// Name of the pet . - public Capitalization(string smallCamel = default(string), string capitalCamel = default(string), string smallSnake = default(string), string capitalSnake = default(string), string sCAETHFlowPoints = default(string), string aTTNAME = default(string)) - { - this.SmallCamel = smallCamel; - this.CapitalCamel = capitalCamel; - this.SmallSnake = smallSnake; - this.CapitalSnake = capitalSnake; - this.SCAETHFlowPoints = sCAETHFlowPoints; - this.ATT_NAME = aTTNAME; - } - - /// - /// Gets or Sets SmallCamel - /// - [DataMember(Name="smallCamel", EmitDefaultValue=true)] - public string SmallCamel { get; set; } - - /// - /// Gets or Sets CapitalCamel - /// - [DataMember(Name="CapitalCamel", EmitDefaultValue=true)] - public string CapitalCamel { get; set; } - - /// - /// Gets or Sets SmallSnake - /// - [DataMember(Name="small_Snake", EmitDefaultValue=true)] - public string SmallSnake { get; set; } - - /// - /// Gets or Sets CapitalSnake - /// - [DataMember(Name="Capital_Snake", EmitDefaultValue=true)] - public string CapitalSnake { get; set; } - - /// - /// Gets or Sets SCAETHFlowPoints - /// - [DataMember(Name="SCA_ETH_Flow_Points", EmitDefaultValue=true)] - public string SCAETHFlowPoints { get; set; } - - /// - /// Name of the pet - /// - /// Name of the pet - [DataMember(Name="ATT_NAME", EmitDefaultValue=true)] - public string ATT_NAME { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Capitalization {\n"); - sb.Append(" SmallCamel: ").Append(SmallCamel).Append("\n"); - sb.Append(" CapitalCamel: ").Append(CapitalCamel).Append("\n"); - sb.Append(" SmallSnake: ").Append(SmallSnake).Append("\n"); - sb.Append(" CapitalSnake: ").Append(CapitalSnake).Append("\n"); - sb.Append(" SCAETHFlowPoints: ").Append(SCAETHFlowPoints).Append("\n"); - sb.Append(" ATT_NAME: ").Append(ATT_NAME).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Capitalization); - } - - /// - /// Returns true if Capitalization instances are equal - /// - /// Instance of Capitalization to be compared - /// Boolean - public bool Equals(Capitalization input) - { - if (input == null) - return false; - - return - ( - this.SmallCamel == input.SmallCamel || - (this.SmallCamel != null && - this.SmallCamel.Equals(input.SmallCamel)) - ) && - ( - this.CapitalCamel == input.CapitalCamel || - (this.CapitalCamel != null && - this.CapitalCamel.Equals(input.CapitalCamel)) - ) && - ( - this.SmallSnake == input.SmallSnake || - (this.SmallSnake != null && - this.SmallSnake.Equals(input.SmallSnake)) - ) && - ( - this.CapitalSnake == input.CapitalSnake || - (this.CapitalSnake != null && - this.CapitalSnake.Equals(input.CapitalSnake)) - ) && - ( - this.SCAETHFlowPoints == input.SCAETHFlowPoints || - (this.SCAETHFlowPoints != null && - this.SCAETHFlowPoints.Equals(input.SCAETHFlowPoints)) - ) && - ( - this.ATT_NAME == input.ATT_NAME || - (this.ATT_NAME != null && - this.ATT_NAME.Equals(input.ATT_NAME)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SmallCamel != null) - hashCode = hashCode * 59 + this.SmallCamel.GetHashCode(); - if (this.CapitalCamel != null) - hashCode = hashCode * 59 + this.CapitalCamel.GetHashCode(); - if (this.SmallSnake != null) - hashCode = hashCode * 59 + this.SmallSnake.GetHashCode(); - if (this.CapitalSnake != null) - hashCode = hashCode * 59 + this.CapitalSnake.GetHashCode(); - if (this.SCAETHFlowPoints != null) - hashCode = hashCode * 59 + this.SCAETHFlowPoints.GetHashCode(); - if (this.ATT_NAME != null) - hashCode = hashCode * 59 + this.ATT_NAME.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Cat.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Cat.cs deleted file mode 100644 index 1c2c2baf297..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Cat.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Cat - /// - [DataContract] - [ImplementPropertyChanged] - public partial class Cat : Animal, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Cat() { } - /// - /// Initializes a new instance of the class. - /// - /// declawed. - public Cat(bool declawed = default(bool), string className = "Cat", string color = "red") : base(className, color) - { - this.Declawed = declawed; - } - - /// - /// Gets or Sets Declawed - /// - [DataMember(Name="declawed", EmitDefaultValue=true)] - public bool Declawed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Cat {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Cat); - } - - /// - /// Returns true if Cat instances are equal - /// - /// Instance of Cat to be compared - /// Boolean - public bool Equals(Cat input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Declawed == input.Declawed || - (this.Declawed != null && - this.Declawed.Equals(input.Declawed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Declawed != null) - hashCode = hashCode * 59 + this.Declawed.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - return this.BaseValidate(validationContext); - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - protected IEnumerable BaseValidate(ValidationContext validationContext) - { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/CatAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/CatAllOf.cs deleted file mode 100644 index c6fdafbba55..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/CatAllOf.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// CatAllOf - /// - [DataContract] - [ImplementPropertyChanged] - public partial class CatAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// declawed. - public CatAllOf(bool declawed = default(bool)) - { - this.Declawed = declawed; - } - - /// - /// Gets or Sets Declawed - /// - [DataMember(Name="declawed", EmitDefaultValue=true)] - public bool Declawed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class CatAllOf {\n"); - sb.Append(" Declawed: ").Append(Declawed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as CatAllOf); - } - - /// - /// Returns true if CatAllOf instances are equal - /// - /// Instance of CatAllOf to be compared - /// Boolean - public bool Equals(CatAllOf input) - { - if (input == null) - return false; - - return - ( - this.Declawed == input.Declawed || - (this.Declawed != null && - this.Declawed.Equals(input.Declawed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Declawed != null) - hashCode = hashCode * 59 + this.Declawed.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Category.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Category.cs deleted file mode 100644 index 9fa1212599a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Category.cs +++ /dev/null @@ -1,177 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Category - /// - [DataContract] - [ImplementPropertyChanged] - public partial class Category : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Category() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name (required) (default to "default-name"). - 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; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=true)] - public long Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Category {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Category); - } - - /// - /// Returns true if Category instances are equal - /// - /// Instance of Category to be compared - /// Boolean - public bool Equals(Category input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ClassModel.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ClassModel.cs deleted file mode 100644 index 0acefc362f9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ClassModel.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing model with \"_class\" property - /// - [DataContract] - [ImplementPropertyChanged] - public partial class ClassModel : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// _class. - public ClassModel(string _class = default(string)) - { - this.Class = _class; - } - - /// - /// Gets or Sets Class - /// - [DataMember(Name="_class", EmitDefaultValue=true)] - public string Class { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ClassModel {\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ClassModel); - } - - /// - /// Returns true if ClassModel instances are equal - /// - /// Instance of ClassModel to be compared - /// Boolean - public bool Equals(ClassModel input) - { - if (input == null) - return false; - - return - ( - this.Class == input.Class || - (this.Class != null && - this.Class.Equals(input.Class)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Class != null) - hashCode = hashCode * 59 + this.Class.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Dog.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Dog.cs deleted file mode 100644 index b60019d438f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Dog.cs +++ /dev/null @@ -1,154 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Dog - /// - [DataContract] - [ImplementPropertyChanged] - public partial class Dog : Animal, IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Dog() { } - /// - /// Initializes a new instance of the class. - /// - /// breed. - public Dog(string breed = default(string), string className = "Dog", string color = "red") : base(className, color) - { - this.Breed = breed; - } - - /// - /// Gets or Sets Breed - /// - [DataMember(Name="breed", EmitDefaultValue=true)] - public string Breed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Dog {\n"); - sb.Append(" ").Append(base.ToString().Replace("\n", "\n ")).Append("\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public override string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Dog); - } - - /// - /// Returns true if Dog instances are equal - /// - /// Instance of Dog to be compared - /// Boolean - public bool Equals(Dog input) - { - if (input == null) - return false; - - return base.Equals(input) && - ( - this.Breed == input.Breed || - (this.Breed != null && - this.Breed.Equals(input.Breed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = base.GetHashCode(); - if (this.Breed != null) - hashCode = hashCode * 59 + this.Breed.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - foreach(var x in base.BaseValidate(validationContext)) yield return x; - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/DogAllOf.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/DogAllOf.cs deleted file mode 100644 index 76a6ec39680..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/DogAllOf.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// DogAllOf - /// - [DataContract] - [ImplementPropertyChanged] - public partial class DogAllOf : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// breed. - public DogAllOf(string breed = default(string)) - { - this.Breed = breed; - } - - /// - /// Gets or Sets Breed - /// - [DataMember(Name="breed", EmitDefaultValue=true)] - public string Breed { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class DogAllOf {\n"); - sb.Append(" Breed: ").Append(Breed).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as DogAllOf); - } - - /// - /// Returns true if DogAllOf instances are equal - /// - /// Instance of DogAllOf to be compared - /// Boolean - public bool Equals(DogAllOf input) - { - if (input == null) - return false; - - return - ( - this.Breed == input.Breed || - (this.Breed != null && - this.Breed.Equals(input.Breed)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Breed != null) - hashCode = hashCode * 59 + this.Breed.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumArrays.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumArrays.cs deleted file mode 100644 index 1b1c8ddd861..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumArrays.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// EnumArrays - /// - [DataContract] - [ImplementPropertyChanged] - public partial class EnumArrays : IEquatable, IValidatableObject - { - /// - /// Defines JustSymbol - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum JustSymbolEnum - { - /// - /// Enum GreaterThanOrEqualTo for value: >= - /// - [EnumMember(Value = ">=")] - GreaterThanOrEqualTo = 1, - - /// - /// Enum Dollar for value: $ - /// - [EnumMember(Value = "$")] - Dollar = 2 - - } - - /// - /// Gets or Sets JustSymbol - /// - [DataMember(Name="just_symbol", EmitDefaultValue=true)] - public JustSymbolEnum? JustSymbol { get; set; } - /// - /// Defines ArrayEnum - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum ArrayEnumEnum - { - /// - /// Enum Fish for value: fish - /// - [EnumMember(Value = "fish")] - Fish = 1, - - /// - /// Enum Crab for value: crab - /// - [EnumMember(Value = "crab")] - Crab = 2 - - } - - - /// - /// Gets or Sets ArrayEnum - /// - [DataMember(Name="array_enum", EmitDefaultValue=true)] - public List ArrayEnum { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// justSymbol. - /// arrayEnum. - public EnumArrays(JustSymbolEnum? justSymbol = default(JustSymbolEnum?), List arrayEnum = default(List)) - { - this.JustSymbol = justSymbol; - this.ArrayEnum = arrayEnum; - } - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class EnumArrays {\n"); - sb.Append(" JustSymbol: ").Append(JustSymbol).Append("\n"); - sb.Append(" ArrayEnum: ").Append(ArrayEnum).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EnumArrays); - } - - /// - /// Returns true if EnumArrays instances are equal - /// - /// Instance of EnumArrays to be compared - /// Boolean - public bool Equals(EnumArrays input) - { - if (input == null) - return false; - - return - ( - this.JustSymbol == input.JustSymbol || - (this.JustSymbol != null && - this.JustSymbol.Equals(input.JustSymbol)) - ) && - ( - this.ArrayEnum == input.ArrayEnum || - this.ArrayEnum != null && - input.ArrayEnum != null && - this.ArrayEnum.SequenceEqual(input.ArrayEnum) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.JustSymbol != null) - hashCode = hashCode * 59 + this.JustSymbol.GetHashCode(); - if (this.ArrayEnum != null) - hashCode = hashCode * 59 + this.ArrayEnum.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumClass.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumClass.cs deleted file mode 100644 index 5703d185d5a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumClass.cs +++ /dev/null @@ -1,57 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Defines EnumClass - /// - - [JsonConverter(typeof(StringEnumConverter))] - - public enum EnumClass - { - /// - /// Enum Abc for value: _abc - /// - [EnumMember(Value = "_abc")] - Abc = 1, - - /// - /// Enum Efg for value: -efg - /// - [EnumMember(Value = "-efg")] - Efg = 2, - - /// - /// Enum Xyz for value: (xyz) - /// - [EnumMember(Value = "(xyz)")] - Xyz = 3 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumTest.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumTest.cs deleted file mode 100644 index d8c3e6f1cab..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/EnumTest.cs +++ /dev/null @@ -1,314 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// EnumTest - /// - [DataContract] - [ImplementPropertyChanged] - public partial class EnumTest : IEquatable, IValidatableObject - { - /// - /// Defines EnumString - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumStringEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumString - /// - [DataMember(Name="enum_string", EmitDefaultValue=true)] - public EnumStringEnum? EnumString { get; set; } - /// - /// Defines EnumStringRequired - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumStringRequiredEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2, - - /// - /// Enum Empty for value: - /// - [EnumMember(Value = "")] - Empty = 3 - - } - - /// - /// Gets or Sets EnumStringRequired - /// - [DataMember(Name="enum_string_required", EmitDefaultValue=true)] - public EnumStringRequiredEnum EnumStringRequired { get; set; } - /// - /// Defines EnumInteger - /// - public enum EnumIntegerEnum - { - /// - /// Enum NUMBER_1 for value: 1 - /// - NUMBER_1 = 1, - - /// - /// Enum NUMBER_MINUS_1 for value: -1 - /// - NUMBER_MINUS_1 = -1 - - } - - /// - /// Gets or Sets EnumInteger - /// - [DataMember(Name="enum_integer", EmitDefaultValue=true)] - public EnumIntegerEnum? EnumInteger { get; set; } - /// - /// Defines EnumNumber - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum EnumNumberEnum - { - /// - /// Enum NUMBER_1_DOT_1 for value: 1.1 - /// - [EnumMember(Value = "1.1")] - NUMBER_1_DOT_1 = 1, - - /// - /// Enum NUMBER_MINUS_1_DOT_2 for value: -1.2 - /// - [EnumMember(Value = "-1.2")] - NUMBER_MINUS_1_DOT_2 = 2 - - } - - /// - /// Gets or Sets EnumNumber - /// - [DataMember(Name="enum_number", EmitDefaultValue=true)] - public EnumNumberEnum? EnumNumber { get; set; } - /// - /// Gets or Sets OuterEnum - /// - [DataMember(Name="outerEnum", EmitDefaultValue=true)] - public OuterEnum? OuterEnum { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected EnumTest() { } - /// - /// Initializes a new instance of the class. - /// - /// enumString. - /// enumStringRequired (required). - /// enumInteger. - /// enumNumber. - /// outerEnum. - public EnumTest(EnumStringEnum? enumString = default(EnumStringEnum?), EnumStringRequiredEnum enumStringRequired = default(EnumStringRequiredEnum), EnumIntegerEnum? enumInteger = default(EnumIntegerEnum?), EnumNumberEnum? enumNumber = default(EnumNumberEnum?), OuterEnum? outerEnum = default(OuterEnum?)) - { - // to ensure "enumStringRequired" is required (not null) - if (enumStringRequired == null) - { - throw new InvalidDataException("enumStringRequired is a required property for EnumTest and cannot be null"); - } - else - { - this.EnumStringRequired = enumStringRequired; - } - - this.EnumString = enumString; - this.EnumInteger = enumInteger; - this.EnumNumber = enumNumber; - this.OuterEnum = outerEnum; - } - - - - - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class EnumTest {\n"); - sb.Append(" EnumString: ").Append(EnumString).Append("\n"); - sb.Append(" EnumStringRequired: ").Append(EnumStringRequired).Append("\n"); - sb.Append(" EnumInteger: ").Append(EnumInteger).Append("\n"); - sb.Append(" EnumNumber: ").Append(EnumNumber).Append("\n"); - sb.Append(" OuterEnum: ").Append(OuterEnum).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as EnumTest); - } - - /// - /// Returns true if EnumTest instances are equal - /// - /// Instance of EnumTest to be compared - /// Boolean - public bool Equals(EnumTest input) - { - if (input == null) - return false; - - return - ( - this.EnumString == input.EnumString || - (this.EnumString != null && - this.EnumString.Equals(input.EnumString)) - ) && - ( - this.EnumStringRequired == input.EnumStringRequired || - (this.EnumStringRequired != null && - this.EnumStringRequired.Equals(input.EnumStringRequired)) - ) && - ( - this.EnumInteger == input.EnumInteger || - (this.EnumInteger != null && - this.EnumInteger.Equals(input.EnumInteger)) - ) && - ( - this.EnumNumber == input.EnumNumber || - (this.EnumNumber != null && - this.EnumNumber.Equals(input.EnumNumber)) - ) && - ( - this.OuterEnum == input.OuterEnum || - (this.OuterEnum != null && - this.OuterEnum.Equals(input.OuterEnum)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.EnumString != null) - hashCode = hashCode * 59 + this.EnumString.GetHashCode(); - if (this.EnumStringRequired != null) - hashCode = hashCode * 59 + this.EnumStringRequired.GetHashCode(); - if (this.EnumInteger != null) - hashCode = hashCode * 59 + this.EnumInteger.GetHashCode(); - if (this.EnumNumber != null) - hashCode = hashCode * 59 + this.EnumNumber.GetHashCode(); - if (this.OuterEnum != null) - hashCode = hashCode * 59 + this.OuterEnum.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/File.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/File.cs deleted file mode 100644 index c4f5fe75423..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/File.cs +++ /dev/null @@ -1,148 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Must be named `File` for test. - /// - [DataContract] - [ImplementPropertyChanged] - public partial class File : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// Test capitalization. - public File(string sourceURI = default(string)) - { - this.SourceURI = sourceURI; - } - - /// - /// Test capitalization - /// - /// Test capitalization - [DataMember(Name="sourceURI", EmitDefaultValue=true)] - public string SourceURI { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class File {\n"); - sb.Append(" SourceURI: ").Append(SourceURI).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as File); - } - - /// - /// Returns true if File instances are equal - /// - /// Instance of File to be compared - /// Boolean - public bool Equals(File input) - { - if (input == null) - return false; - - return - ( - this.SourceURI == input.SourceURI || - (this.SourceURI != null && - this.SourceURI.Equals(input.SourceURI)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SourceURI != null) - hashCode = hashCode * 59 + this.SourceURI.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs deleted file mode 100644 index 9cb575ad45d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FileSchemaTestClass.cs +++ /dev/null @@ -1,164 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// FileSchemaTestClass - /// - [DataContract] - [ImplementPropertyChanged] - public partial class FileSchemaTestClass : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// file. - /// files. - public FileSchemaTestClass(File file = default(File), List files = default(List)) - { - this.File = file; - this.Files = files; - } - - /// - /// Gets or Sets File - /// - [DataMember(Name="file", EmitDefaultValue=true)] - public File File { get; set; } - - /// - /// Gets or Sets Files - /// - [DataMember(Name="files", EmitDefaultValue=true)] - public List Files { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class FileSchemaTestClass {\n"); - sb.Append(" File: ").Append(File).Append("\n"); - sb.Append(" Files: ").Append(Files).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FileSchemaTestClass); - } - - /// - /// Returns true if FileSchemaTestClass instances are equal - /// - /// Instance of FileSchemaTestClass to be compared - /// Boolean - public bool Equals(FileSchemaTestClass input) - { - if (input == null) - return false; - - return - ( - this.File == input.File || - (this.File != null && - this.File.Equals(input.File)) - ) && - ( - this.Files == input.Files || - this.Files != null && - input.Files != null && - this.Files.SequenceEqual(input.Files) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.File != null) - hashCode = hashCode * 59 + this.File.GetHashCode(); - if (this.Files != null) - hashCode = hashCode * 59 + this.Files.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FormatTest.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FormatTest.cs deleted file mode 100644 index b3ebc9f373b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/FormatTest.cs +++ /dev/null @@ -1,490 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// FormatTest - /// - [DataContract] - [ImplementPropertyChanged] - public partial class FormatTest : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected FormatTest() { } - /// - /// Initializes a new instance of the class. - /// - /// integer. - /// int32. - /// int64. - /// number (required). - /// _float. - /// _double. - /// _string. - /// _byte (required). - /// binary. - /// date (required). - /// dateTime. - /// uuid. - /// password (required). - /// bigDecimal. - public FormatTest(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), byte[] _byte = default(byte[]), System.IO.Stream binary = default(System.IO.Stream), DateTime date = default(DateTime), DateTime dateTime = default(DateTime), Guid uuid = default(Guid), string password = default(string), decimal bigDecimal = default(decimal)) - { - // to ensure "number" is required (not null) - if (number == null) - { - throw new InvalidDataException("number is a required property for FormatTest and cannot be null"); - } - else - { - this.Number = number; - } - - // to ensure "_byte" is required (not null) - if (_byte == null) - { - throw new InvalidDataException("_byte is a required property for FormatTest and cannot be null"); - } - else - { - this.Byte = _byte; - } - - // to ensure "date" is required (not null) - if (date == null) - { - throw new InvalidDataException("date is a required property for FormatTest and cannot be null"); - } - else - { - this.Date = date; - } - - // to ensure "password" is required (not null) - if (password == null) - { - throw new InvalidDataException("password is a required property for FormatTest and cannot be null"); - } - else - { - this.Password = password; - } - - this.Integer = integer; - this.Int32 = int32; - this.Int64 = int64; - this.Float = _float; - this.Double = _double; - this.String = _string; - this.Binary = binary; - this.DateTime = dateTime; - this.Uuid = uuid; - this.BigDecimal = bigDecimal; - } - - /// - /// Gets or Sets Integer - /// - [DataMember(Name="integer", EmitDefaultValue=true)] - public int Integer { get; set; } - - /// - /// Gets or Sets Int32 - /// - [DataMember(Name="int32", EmitDefaultValue=true)] - public int Int32 { get; set; } - - /// - /// Gets or Sets Int64 - /// - [DataMember(Name="int64", EmitDefaultValue=true)] - public long Int64 { get; set; } - - /// - /// Gets or Sets Number - /// - [DataMember(Name="number", EmitDefaultValue=true)] - public decimal Number { get; set; } - - /// - /// Gets or Sets Float - /// - [DataMember(Name="float", EmitDefaultValue=true)] - public float Float { get; set; } - - /// - /// Gets or Sets Double - /// - [DataMember(Name="double", EmitDefaultValue=true)] - public double Double { get; set; } - - /// - /// Gets or Sets String - /// - [DataMember(Name="string", EmitDefaultValue=true)] - public string String { get; set; } - - /// - /// Gets or Sets Byte - /// - [DataMember(Name="byte", EmitDefaultValue=true)] - public byte[] Byte { get; set; } - - /// - /// Gets or Sets Binary - /// - [DataMember(Name="binary", EmitDefaultValue=true)] - public System.IO.Stream Binary { get; set; } - - /// - /// Gets or Sets Date - /// - [DataMember(Name="date", EmitDefaultValue=true)] - [JsonConverter(typeof(OpenAPIDateConverter))] - public DateTime Date { get; set; } - - /// - /// Gets or Sets DateTime - /// - [DataMember(Name="dateTime", EmitDefaultValue=true)] - public DateTime DateTime { get; set; } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name="uuid", EmitDefaultValue=true)] - public Guid Uuid { get; set; } - - /// - /// Gets or Sets Password - /// - [DataMember(Name="password", EmitDefaultValue=true)] - public string Password { get; set; } - - /// - /// Gets or Sets BigDecimal - /// - [DataMember(Name="BigDecimal", EmitDefaultValue=true)] - public decimal BigDecimal { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class FormatTest {\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(" 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(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" BigDecimal: ").Append(BigDecimal).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as FormatTest); - } - - /// - /// Returns true if FormatTest instances are equal - /// - /// Instance of FormatTest to be compared - /// Boolean - public bool Equals(FormatTest 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.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.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.BigDecimal == input.BigDecimal || - (this.BigDecimal != null && - this.BigDecimal.Equals(input.BigDecimal)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.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.Uuid != null) - hashCode = hashCode * 59 + this.Uuid.GetHashCode(); - if (this.Password != null) - hashCode = hashCode * 59 + this.Password.GetHashCode(); - if (this.BigDecimal != null) - hashCode = hashCode * 59 + this.BigDecimal.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable 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" }); - } - - // Float (float) minimum - if(this.Float < (float)54.3) - { - yield return new System.ComponentModel.DataAnnotations.ValidationResult("Invalid value for Float, must be a value greater than or equal to 54.3.", 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" }); - } - - - - // 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; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs deleted file mode 100644 index e724c7ca643..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/HasOnlyReadOnly.cs +++ /dev/null @@ -1,160 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// HasOnlyReadOnly - /// - [DataContract] - [ImplementPropertyChanged] - public partial class HasOnlyReadOnly : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - public HasOnlyReadOnly() - { - } - - /// - /// Gets or Sets Bar - /// - [DataMember(Name="bar", EmitDefaultValue=true)] - public string Bar { get; private set; } - - /// - /// Gets or Sets Foo - /// - [DataMember(Name="foo", EmitDefaultValue=true)] - public string Foo { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class HasOnlyReadOnly {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Foo: ").Append(Foo).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as HasOnlyReadOnly); - } - - /// - /// Returns true if HasOnlyReadOnly instances are equal - /// - /// Instance of HasOnlyReadOnly to be compared - /// Boolean - public bool Equals(HasOnlyReadOnly input) - { - if (input == null) - return false; - - return - ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) - ) && - ( - this.Foo == input.Foo || - (this.Foo != null && - this.Foo.Equals(input.Foo)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bar != null) - hashCode = hashCode * 59 + this.Bar.GetHashCode(); - if (this.Foo != null) - hashCode = hashCode * 59 + this.Foo.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/List.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/List.cs deleted file mode 100644 index 01efc109c14..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/List.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// List - /// - [DataContract] - [ImplementPropertyChanged] - public partial class List : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// _123list. - public List(string _123list = default(string)) - { - this._123List = _123list; - } - - /// - /// Gets or Sets _123List - /// - [DataMember(Name="123-list", EmitDefaultValue=true)] - public string _123List { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class List {\n"); - sb.Append(" _123List: ").Append(_123List).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as List); - } - - /// - /// Returns true if List instances are equal - /// - /// Instance of List to be compared - /// Boolean - public bool Equals(List input) - { - if (input == null) - return false; - - return - ( - this._123List == input._123List || - (this._123List != null && - this._123List.Equals(input._123List)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._123List != null) - hashCode = hashCode * 59 + this._123List.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/MapTest.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/MapTest.cs deleted file mode 100644 index c7aea9f5b94..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/MapTest.cs +++ /dev/null @@ -1,220 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// MapTest - /// - [DataContract] - [ImplementPropertyChanged] - public partial class MapTest : IEquatable, IValidatableObject - { - /// - /// Defines Inner - /// - [JsonConverter(typeof(StringEnumConverter))] - public enum InnerEnum - { - /// - /// Enum UPPER for value: UPPER - /// - [EnumMember(Value = "UPPER")] - UPPER = 1, - - /// - /// Enum Lower for value: lower - /// - [EnumMember(Value = "lower")] - Lower = 2 - - } - - - /// - /// Gets or Sets MapOfEnumString - /// - [DataMember(Name="map_of_enum_string", EmitDefaultValue=true)] - public Dictionary MapOfEnumString { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// mapMapOfString. - /// mapOfEnumString. - /// directMap. - /// indirectMap. - public MapTest(Dictionary> mapMapOfString = default(Dictionary>), Dictionary mapOfEnumString = default(Dictionary), Dictionary directMap = default(Dictionary), Dictionary indirectMap = default(Dictionary)) - { - this.MapMapOfString = mapMapOfString; - this.MapOfEnumString = mapOfEnumString; - this.DirectMap = directMap; - this.IndirectMap = indirectMap; - } - - /// - /// Gets or Sets MapMapOfString - /// - [DataMember(Name="map_map_of_string", EmitDefaultValue=true)] - public Dictionary> MapMapOfString { get; set; } - - - /// - /// Gets or Sets DirectMap - /// - [DataMember(Name="direct_map", EmitDefaultValue=true)] - public Dictionary DirectMap { get; set; } - - /// - /// Gets or Sets IndirectMap - /// - [DataMember(Name="indirect_map", EmitDefaultValue=true)] - public Dictionary IndirectMap { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MapTest {\n"); - sb.Append(" MapMapOfString: ").Append(MapMapOfString).Append("\n"); - sb.Append(" MapOfEnumString: ").Append(MapOfEnumString).Append("\n"); - sb.Append(" DirectMap: ").Append(DirectMap).Append("\n"); - sb.Append(" IndirectMap: ").Append(IndirectMap).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MapTest); - } - - /// - /// Returns true if MapTest instances are equal - /// - /// Instance of MapTest to be compared - /// Boolean - public bool Equals(MapTest input) - { - if (input == null) - return false; - - return - ( - this.MapMapOfString == input.MapMapOfString || - this.MapMapOfString != null && - input.MapMapOfString != null && - this.MapMapOfString.SequenceEqual(input.MapMapOfString) - ) && - ( - this.MapOfEnumString == input.MapOfEnumString || - this.MapOfEnumString != null && - input.MapOfEnumString != null && - this.MapOfEnumString.SequenceEqual(input.MapOfEnumString) - ) && - ( - this.DirectMap == input.DirectMap || - this.DirectMap != null && - input.DirectMap != null && - this.DirectMap.SequenceEqual(input.DirectMap) - ) && - ( - this.IndirectMap == input.IndirectMap || - this.IndirectMap != null && - input.IndirectMap != null && - this.IndirectMap.SequenceEqual(input.IndirectMap) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MapMapOfString != null) - hashCode = hashCode * 59 + this.MapMapOfString.GetHashCode(); - if (this.MapOfEnumString != null) - hashCode = hashCode * 59 + this.MapOfEnumString.GetHashCode(); - if (this.DirectMap != null) - hashCode = hashCode * 59 + this.DirectMap.GetHashCode(); - if (this.IndirectMap != null) - hashCode = hashCode * 59 + this.IndirectMap.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs deleted file mode 100644 index f27d3cf0c9f..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/MixedPropertiesAndAdditionalPropertiesClass.cs +++ /dev/null @@ -1,180 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// MixedPropertiesAndAdditionalPropertiesClass - /// - [DataContract] - [ImplementPropertyChanged] - public partial class MixedPropertiesAndAdditionalPropertiesClass : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// uuid. - /// dateTime. - /// map. - public MixedPropertiesAndAdditionalPropertiesClass(Guid uuid = default(Guid), DateTime dateTime = default(DateTime), Dictionary map = default(Dictionary)) - { - this.Uuid = uuid; - this.DateTime = dateTime; - this.Map = map; - } - - /// - /// Gets or Sets Uuid - /// - [DataMember(Name="uuid", EmitDefaultValue=true)] - public Guid Uuid { get; set; } - - /// - /// Gets or Sets DateTime - /// - [DataMember(Name="dateTime", EmitDefaultValue=true)] - public DateTime DateTime { get; set; } - - /// - /// Gets or Sets Map - /// - [DataMember(Name="map", EmitDefaultValue=true)] - public Dictionary Map { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class MixedPropertiesAndAdditionalPropertiesClass {\n"); - sb.Append(" Uuid: ").Append(Uuid).Append("\n"); - sb.Append(" DateTime: ").Append(DateTime).Append("\n"); - sb.Append(" Map: ").Append(Map).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as MixedPropertiesAndAdditionalPropertiesClass); - } - - /// - /// Returns true if MixedPropertiesAndAdditionalPropertiesClass instances are equal - /// - /// Instance of MixedPropertiesAndAdditionalPropertiesClass to be compared - /// Boolean - public bool Equals(MixedPropertiesAndAdditionalPropertiesClass input) - { - if (input == null) - return false; - - return - ( - this.Uuid == input.Uuid || - (this.Uuid != null && - this.Uuid.Equals(input.Uuid)) - ) && - ( - this.DateTime == input.DateTime || - (this.DateTime != null && - this.DateTime.Equals(input.DateTime)) - ) && - ( - this.Map == input.Map || - this.Map != null && - input.Map != null && - this.Map.SequenceEqual(input.Map) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Uuid != null) - hashCode = hashCode * 59 + this.Uuid.GetHashCode(); - if (this.DateTime != null) - hashCode = hashCode * 59 + this.DateTime.GetHashCode(); - if (this.Map != null) - hashCode = hashCode * 59 + this.Map.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Model200Response.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Model200Response.cs deleted file mode 100644 index 964a9356b1d..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Model200Response.cs +++ /dev/null @@ -1,163 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing model name starting with number - /// - [DataContract] - [ImplementPropertyChanged] - public partial class Model200Response : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// name. - /// _class. - public Model200Response(int name = default(int), string _class = default(string)) - { - this.Name = name; - this.Class = _class; - } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public int Name { get; set; } - - /// - /// Gets or Sets Class - /// - [DataMember(Name="class", EmitDefaultValue=true)] - public string Class { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Model200Response {\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" Class: ").Append(Class).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Model200Response); - } - - /// - /// Returns true if Model200Response instances are equal - /// - /// Instance of Model200Response to be compared - /// Boolean - public bool Equals(Model200Response input) - { - if (input == null) - return false; - - return - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.Class == input.Class || - (this.Class != null && - this.Class.Equals(input.Class)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.Class != null) - hashCode = hashCode * 59 + this.Class.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ModelClient.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ModelClient.cs deleted file mode 100644 index 9475dae0c17..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ModelClient.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ModelClient - /// - [DataContract] - [ImplementPropertyChanged] - public partial class ModelClient : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// _client. - public ModelClient(string _client = default(string)) - { - this.__Client = _client; - } - - /// - /// Gets or Sets __Client - /// - [DataMember(Name="client", EmitDefaultValue=true)] - public string __Client { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ModelClient {\n"); - sb.Append(" __Client: ").Append(__Client).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ModelClient); - } - - /// - /// Returns true if ModelClient instances are equal - /// - /// Instance of ModelClient to be compared - /// Boolean - public bool Equals(ModelClient input) - { - if (input == null) - return false; - - return - ( - this.__Client == input.__Client || - (this.__Client != null && - this.__Client.Equals(input.__Client)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.__Client != null) - hashCode = hashCode * 59 + this.__Client.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Name.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Name.cs deleted file mode 100644 index 375b734096c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Name.cs +++ /dev/null @@ -1,205 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing model name same as property name - /// - [DataContract] - [ImplementPropertyChanged] - public partial class Name : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Name() { } - /// - /// Initializes a new instance of the class. - /// - /// name (required). - /// property. - public Name(int name = default(int), string property = default(string)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Name and cannot be null"); - } - else - { - this._Name = name; - } - - this.Property = property; - } - - /// - /// Gets or Sets _Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public int _Name { get; set; } - - /// - /// Gets or Sets SnakeCase - /// - [DataMember(Name="snake_case", EmitDefaultValue=true)] - public int SnakeCase { get; private set; } - - /// - /// Gets or Sets Property - /// - [DataMember(Name="property", EmitDefaultValue=true)] - public string Property { get; set; } - - /// - /// Gets or Sets _123Number - /// - [DataMember(Name="123Number", EmitDefaultValue=true)] - public int _123Number { get; private set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Name {\n"); - sb.Append(" _Name: ").Append(_Name).Append("\n"); - sb.Append(" SnakeCase: ").Append(SnakeCase).Append("\n"); - sb.Append(" Property: ").Append(Property).Append("\n"); - sb.Append(" _123Number: ").Append(_123Number).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Name); - } - - /// - /// Returns true if Name instances are equal - /// - /// Instance of Name to be compared - /// Boolean - public bool Equals(Name input) - { - if (input == null) - return false; - - return - ( - this._Name == input._Name || - (this._Name != null && - this._Name.Equals(input._Name)) - ) && - ( - this.SnakeCase == input.SnakeCase || - (this.SnakeCase != null && - this.SnakeCase.Equals(input.SnakeCase)) - ) && - ( - this.Property == input.Property || - (this.Property != null && - this.Property.Equals(input.Property)) - ) && - ( - this._123Number == input._123Number || - (this._123Number != null && - this._123Number.Equals(input._123Number)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - 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.SnakeCase != null) - hashCode = hashCode * 59 + this.SnakeCase.GetHashCode(); - if (this.Property != null) - hashCode = hashCode * 59 + this.Property.GetHashCode(); - if (this._123Number != null) - hashCode = hashCode * 59 + this._123Number.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/NumberOnly.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/NumberOnly.cs deleted file mode 100644 index 9177961e48c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/NumberOnly.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// NumberOnly - /// - [DataContract] - [ImplementPropertyChanged] - public partial class NumberOnly : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// justNumber. - public NumberOnly(decimal justNumber = default(decimal)) - { - this.JustNumber = justNumber; - } - - /// - /// Gets or Sets JustNumber - /// - [DataMember(Name="JustNumber", EmitDefaultValue=true)] - public decimal JustNumber { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class NumberOnly {\n"); - sb.Append(" JustNumber: ").Append(JustNumber).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as NumberOnly); - } - - /// - /// Returns true if NumberOnly instances are equal - /// - /// Instance of NumberOnly to be compared - /// Boolean - public bool Equals(NumberOnly input) - { - if (input == null) - return false; - - return - ( - this.JustNumber == input.JustNumber || - (this.JustNumber != null && - this.JustNumber.Equals(input.JustNumber)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.JustNumber != null) - hashCode = hashCode * 59 + this.JustNumber.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Order.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Order.cs deleted file mode 100644 index 3f6a949034b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Order.cs +++ /dev/null @@ -1,263 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Order - /// - [DataContract] - [ImplementPropertyChanged] - public partial class Order : IEquatable, IValidatableObject - { - /// - /// Order Status - /// - /// Order Status - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Placed for value: placed - /// - [EnumMember(Value = "placed")] - Placed = 1, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 2, - - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 3 - - } - - /// - /// Order Status - /// - /// Order Status - [DataMember(Name="status", EmitDefaultValue=true)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// petId. - /// quantity. - /// shipDate. - /// Order Status. - /// complete (default to false). - public Order(long id = default(long), long petId = default(long), int quantity = default(int), DateTime shipDate = default(DateTime), StatusEnum? status = default(StatusEnum?), bool complete = false) - { - this.Id = id; - this.PetId = petId; - this.Quantity = quantity; - this.ShipDate = shipDate; - this.Status = status; - // use default value if no "complete" provided - if (complete == null) - { - this.Complete = false; - } - else - { - this.Complete = complete; - } - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=true)] - public long Id { get; set; } - - /// - /// Gets or Sets PetId - /// - [DataMember(Name="petId", EmitDefaultValue=true)] - public long PetId { get; set; } - - /// - /// Gets or Sets Quantity - /// - [DataMember(Name="quantity", EmitDefaultValue=true)] - public int Quantity { get; set; } - - /// - /// Gets or Sets ShipDate - /// - [DataMember(Name="shipDate", EmitDefaultValue=true)] - public DateTime ShipDate { get; set; } - - - /// - /// Gets or Sets Complete - /// - [DataMember(Name="complete", EmitDefaultValue=true)] - public bool Complete { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Order {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" PetId: ").Append(PetId).Append("\n"); - sb.Append(" Quantity: ").Append(Quantity).Append("\n"); - sb.Append(" ShipDate: ").Append(ShipDate).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append(" Complete: ").Append(Complete).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Order); - } - - /// - /// Returns true if Order instances are equal - /// - /// Instance of Order to be compared - /// Boolean - public bool Equals(Order input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.PetId == input.PetId || - (this.PetId != null && - this.PetId.Equals(input.PetId)) - ) && - ( - this.Quantity == input.Quantity || - (this.Quantity != null && - this.Quantity.Equals(input.Quantity)) - ) && - ( - this.ShipDate == input.ShipDate || - (this.ShipDate != null && - this.ShipDate.Equals(input.ShipDate)) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ) && - ( - this.Complete == input.Complete || - (this.Complete != null && - this.Complete.Equals(input.Complete)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.PetId != null) - hashCode = hashCode * 59 + this.PetId.GetHashCode(); - if (this.Quantity != null) - hashCode = hashCode * 59 + this.Quantity.GetHashCode(); - if (this.ShipDate != null) - hashCode = hashCode * 59 + this.ShipDate.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - if (this.Complete != null) - hashCode = hashCode * 59 + this.Complete.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/OuterComposite.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/OuterComposite.cs deleted file mode 100644 index ea3efcaccdf..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/OuterComposite.cs +++ /dev/null @@ -1,179 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// OuterComposite - /// - [DataContract] - [ImplementPropertyChanged] - public partial class OuterComposite : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// myNumber. - /// myString. - /// myBoolean. - public OuterComposite(decimal myNumber = default(decimal), string myString = default(string), bool myBoolean = default(bool)) - { - this.MyNumber = myNumber; - this.MyString = myString; - this.MyBoolean = myBoolean; - } - - /// - /// Gets or Sets MyNumber - /// - [DataMember(Name="my_number", EmitDefaultValue=true)] - public decimal MyNumber { get; set; } - - /// - /// Gets or Sets MyString - /// - [DataMember(Name="my_string", EmitDefaultValue=true)] - public string MyString { get; set; } - - /// - /// Gets or Sets MyBoolean - /// - [DataMember(Name="my_boolean", EmitDefaultValue=true)] - public bool MyBoolean { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class OuterComposite {\n"); - sb.Append(" MyNumber: ").Append(MyNumber).Append("\n"); - sb.Append(" MyString: ").Append(MyString).Append("\n"); - sb.Append(" MyBoolean: ").Append(MyBoolean).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as OuterComposite); - } - - /// - /// Returns true if OuterComposite instances are equal - /// - /// Instance of OuterComposite to be compared - /// Boolean - public bool Equals(OuterComposite input) - { - if (input == null) - return false; - - return - ( - this.MyNumber == input.MyNumber || - (this.MyNumber != null && - this.MyNumber.Equals(input.MyNumber)) - ) && - ( - this.MyString == input.MyString || - (this.MyString != null && - this.MyString.Equals(input.MyString)) - ) && - ( - this.MyBoolean == input.MyBoolean || - (this.MyBoolean != null && - this.MyBoolean.Equals(input.MyBoolean)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.MyNumber != null) - hashCode = hashCode * 59 + this.MyNumber.GetHashCode(); - if (this.MyString != null) - hashCode = hashCode * 59 + this.MyString.GetHashCode(); - if (this.MyBoolean != null) - hashCode = hashCode * 59 + this.MyBoolean.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/OuterEnum.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/OuterEnum.cs deleted file mode 100644 index 904a68eb898..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/OuterEnum.cs +++ /dev/null @@ -1,57 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Defines OuterEnum - /// - - [JsonConverter(typeof(StringEnumConverter))] - - public enum OuterEnum - { - /// - /// Enum Placed for value: placed - /// - [EnumMember(Value = "placed")] - Placed = 1, - - /// - /// Enum Approved for value: approved - /// - [EnumMember(Value = "approved")] - Approved = 2, - - /// - /// Enum Delivered for value: delivered - /// - [EnumMember(Value = "delivered")] - Delivered = 3 - - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Pet.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Pet.cs deleted file mode 100644 index bc97933a002..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Pet.cs +++ /dev/null @@ -1,280 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Pet - /// - [DataContract] - [ImplementPropertyChanged] - public partial class Pet : IEquatable, IValidatableObject - { - /// - /// pet status in the store - /// - /// pet status in the store - [JsonConverter(typeof(StringEnumConverter))] - public enum StatusEnum - { - /// - /// Enum Available for value: available - /// - [EnumMember(Value = "available")] - Available = 1, - - /// - /// Enum Pending for value: pending - /// - [EnumMember(Value = "pending")] - Pending = 2, - - /// - /// Enum Sold for value: sold - /// - [EnumMember(Value = "sold")] - Sold = 3 - - } - - /// - /// pet status in the store - /// - /// pet status in the store - [DataMember(Name="status", EmitDefaultValue=true)] - public StatusEnum? Status { get; set; } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected Pet() { } - /// - /// Initializes a new instance of the class. - /// - /// id. - /// category. - /// name (required). - /// photoUrls (required). - /// tags. - /// pet status in the store. - public Pet(long id = default(long), Category category = default(Category), string name = default(string), List photoUrls = default(List), List tags = default(List), StatusEnum? status = default(StatusEnum?)) - { - // to ensure "name" is required (not null) - if (name == null) - { - throw new InvalidDataException("name is a required property for Pet and cannot be null"); - } - else - { - this.Name = name; - } - - // to ensure "photoUrls" is required (not null) - if (photoUrls == null) - { - throw new InvalidDataException("photoUrls is a required property for Pet and cannot be null"); - } - else - { - this.PhotoUrls = photoUrls; - } - - this.Id = id; - this.Category = category; - this.Tags = tags; - this.Status = status; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=true)] - public long Id { get; set; } - - /// - /// Gets or Sets Category - /// - [DataMember(Name="category", EmitDefaultValue=true)] - public Category Category { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Gets or Sets PhotoUrls - /// - [DataMember(Name="photoUrls", EmitDefaultValue=true)] - public List PhotoUrls { get; set; } - - /// - /// Gets or Sets Tags - /// - [DataMember(Name="tags", EmitDefaultValue=true)] - public List Tags { get; set; } - - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Pet {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Category: ").Append(Category).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append(" PhotoUrls: ").Append(PhotoUrls).Append("\n"); - sb.Append(" Tags: ").Append(Tags).Append("\n"); - sb.Append(" Status: ").Append(Status).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Pet); - } - - /// - /// Returns true if Pet instances are equal - /// - /// Instance of Pet to be compared - /// Boolean - public bool Equals(Pet input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Category == input.Category || - (this.Category != null && - this.Category.Equals(input.Category)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ) && - ( - this.PhotoUrls == input.PhotoUrls || - this.PhotoUrls != null && - input.PhotoUrls != null && - this.PhotoUrls.SequenceEqual(input.PhotoUrls) - ) && - ( - this.Tags == input.Tags || - this.Tags != null && - input.Tags != null && - this.Tags.SequenceEqual(input.Tags) - ) && - ( - this.Status == input.Status || - (this.Status != null && - this.Status.Equals(input.Status)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Category != null) - hashCode = hashCode * 59 + this.Category.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - if (this.PhotoUrls != null) - hashCode = hashCode * 59 + this.PhotoUrls.GetHashCode(); - if (this.Tags != null) - hashCode = hashCode * 59 + this.Tags.GetHashCode(); - if (this.Status != null) - hashCode = hashCode * 59 + this.Status.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs deleted file mode 100644 index 12321ca239b..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/ReadOnlyFirst.cs +++ /dev/null @@ -1,161 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// ReadOnlyFirst - /// - [DataContract] - [ImplementPropertyChanged] - public partial class ReadOnlyFirst : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// baz. - public ReadOnlyFirst(string baz = default(string)) - { - this.Baz = baz; - } - - /// - /// Gets or Sets Bar - /// - [DataMember(Name="bar", EmitDefaultValue=true)] - public string Bar { get; private set; } - - /// - /// Gets or Sets Baz - /// - [DataMember(Name="baz", EmitDefaultValue=true)] - public string Baz { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class ReadOnlyFirst {\n"); - sb.Append(" Bar: ").Append(Bar).Append("\n"); - sb.Append(" Baz: ").Append(Baz).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as ReadOnlyFirst); - } - - /// - /// Returns true if ReadOnlyFirst instances are equal - /// - /// Instance of ReadOnlyFirst to be compared - /// Boolean - public bool Equals(ReadOnlyFirst input) - { - if (input == null) - return false; - - return - ( - this.Bar == input.Bar || - (this.Bar != null && - this.Bar.Equals(input.Bar)) - ) && - ( - this.Baz == input.Baz || - (this.Baz != null && - this.Baz.Equals(input.Baz)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Bar != null) - hashCode = hashCode * 59 + this.Bar.GetHashCode(); - if (this.Baz != null) - hashCode = hashCode * 59 + this.Baz.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Return.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Return.cs deleted file mode 100644 index 0fbcfc2d0c9..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Return.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Model for testing reserved words - /// - [DataContract] - [ImplementPropertyChanged] - public partial class Return : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// _return. - public Return(int _return = default(int)) - { - this._Return = _return; - } - - /// - /// Gets or Sets _Return - /// - [DataMember(Name="return", EmitDefaultValue=true)] - public int _Return { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Return {\n"); - sb.Append(" _Return: ").Append(_Return).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Return); - } - - /// - /// Returns true if Return instances are equal - /// - /// Instance of Return to be compared - /// Boolean - public bool Equals(Return input) - { - if (input == null) - return false; - - return - ( - this._Return == input._Return || - (this._Return != null && - this._Return.Equals(input._Return)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this._Return != null) - hashCode = hashCode * 59 + this._Return.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/SpecialModelName.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/SpecialModelName.cs deleted file mode 100644 index b53ca1f9243..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/SpecialModelName.cs +++ /dev/null @@ -1,147 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// SpecialModelName - /// - [DataContract] - [ImplementPropertyChanged] - public partial class SpecialModelName : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// specialPropertyName. - public SpecialModelName(long specialPropertyName = default(long)) - { - this.SpecialPropertyName = specialPropertyName; - } - - /// - /// Gets or Sets SpecialPropertyName - /// - [DataMember(Name="$special[property.name]", EmitDefaultValue=true)] - public long SpecialPropertyName { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class SpecialModelName {\n"); - sb.Append(" SpecialPropertyName: ").Append(SpecialPropertyName).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as SpecialModelName); - } - - /// - /// Returns true if SpecialModelName instances are equal - /// - /// Instance of SpecialModelName to be compared - /// Boolean - public bool Equals(SpecialModelName input) - { - if (input == null) - return false; - - return - ( - this.SpecialPropertyName == input.SpecialPropertyName || - (this.SpecialPropertyName != null && - this.SpecialPropertyName.Equals(input.SpecialPropertyName)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.SpecialPropertyName != null) - hashCode = hashCode * 59 + this.SpecialPropertyName.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Tag.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Tag.cs deleted file mode 100644 index 13645a7fef5..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/Tag.cs +++ /dev/null @@ -1,163 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// Tag - /// - [DataContract] - [ImplementPropertyChanged] - public partial class Tag : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// name. - public Tag(long id = default(long), string name = default(string)) - { - this.Id = id; - this.Name = name; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=true)] - public long Id { get; set; } - - /// - /// Gets or Sets Name - /// - [DataMember(Name="name", EmitDefaultValue=true)] - public string Name { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class Tag {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Name: ").Append(Name).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as Tag); - } - - /// - /// Returns true if Tag instances are equal - /// - /// Instance of Tag to be compared - /// Boolean - public bool Equals(Tag input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Name == input.Name || - (this.Name != null && - this.Name.Equals(input.Name)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Name != null) - hashCode = hashCode * 59 + this.Name.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/TypeHolderDefault.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/TypeHolderDefault.cs deleted file mode 100644 index a2659db1fc3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/TypeHolderDefault.cs +++ /dev/null @@ -1,262 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// TypeHolderDefault - /// - [DataContract] - [ImplementPropertyChanged] - public partial class TypeHolderDefault : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TypeHolderDefault() { } - /// - /// Initializes a new instance of the class. - /// - /// stringItem (required) (default to "what"). - /// numberItem (required). - /// integerItem (required). - /// boolItem (required) (default to true). - /// arrayItem (required). - public TypeHolderDefault(string stringItem = "what", decimal numberItem = default(decimal), int integerItem = default(int), bool boolItem = true, List arrayItem = default(List)) - { - // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - - // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderDefault and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - - } - - /// - /// Gets or Sets StringItem - /// - [DataMember(Name="string_item", EmitDefaultValue=true)] - public string StringItem { get; set; } - - /// - /// Gets or Sets NumberItem - /// - [DataMember(Name="number_item", EmitDefaultValue=true)] - public decimal NumberItem { get; set; } - - /// - /// Gets or Sets IntegerItem - /// - [DataMember(Name="integer_item", EmitDefaultValue=true)] - public int IntegerItem { get; set; } - - /// - /// Gets or Sets BoolItem - /// - [DataMember(Name="bool_item", EmitDefaultValue=true)] - public bool BoolItem { get; set; } - - /// - /// Gets or Sets ArrayItem - /// - [DataMember(Name="array_item", EmitDefaultValue=true)] - public List ArrayItem { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TypeHolderDefault {\n"); - sb.Append(" StringItem: ").Append(StringItem).Append("\n"); - sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); - sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); - sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); - sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TypeHolderDefault); - } - - /// - /// Returns true if TypeHolderDefault instances are equal - /// - /// Instance of TypeHolderDefault to be compared - /// Boolean - public bool Equals(TypeHolderDefault input) - { - if (input == null) - return false; - - return - ( - this.StringItem == input.StringItem || - (this.StringItem != null && - this.StringItem.Equals(input.StringItem)) - ) && - ( - this.NumberItem == input.NumberItem || - (this.NumberItem != null && - this.NumberItem.Equals(input.NumberItem)) - ) && - ( - this.IntegerItem == input.IntegerItem || - (this.IntegerItem != null && - this.IntegerItem.Equals(input.IntegerItem)) - ) && - ( - this.BoolItem == input.BoolItem || - (this.BoolItem != null && - this.BoolItem.Equals(input.BoolItem)) - ) && - ( - this.ArrayItem == input.ArrayItem || - this.ArrayItem != null && - input.ArrayItem != null && - this.ArrayItem.SequenceEqual(input.ArrayItem) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.StringItem != null) - hashCode = hashCode * 59 + this.StringItem.GetHashCode(); - if (this.NumberItem != null) - hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); - if (this.IntegerItem != null) - hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); - if (this.BoolItem != null) - hashCode = hashCode * 59 + this.BoolItem.GetHashCode(); - if (this.ArrayItem != null) - hashCode = hashCode * 59 + this.ArrayItem.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/TypeHolderExample.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/TypeHolderExample.cs deleted file mode 100644 index 92c91656e8c..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/TypeHolderExample.cs +++ /dev/null @@ -1,287 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// TypeHolderExample - /// - [DataContract] - [ImplementPropertyChanged] - public partial class TypeHolderExample : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - [JsonConstructorAttribute] - protected TypeHolderExample() { } - /// - /// Initializes a new instance of the class. - /// - /// stringItem (required). - /// numberItem (required). - /// floatItem (required). - /// integerItem (required). - /// boolItem (required). - /// arrayItem (required). - public TypeHolderExample(string stringItem = default(string), decimal numberItem = default(decimal), float floatItem = default(float), int integerItem = default(int), bool boolItem = default(bool), List arrayItem = default(List)) - { - // to ensure "stringItem" is required (not null) - if (stringItem == null) - { - throw new InvalidDataException("stringItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.StringItem = stringItem; - } - - // to ensure "numberItem" is required (not null) - if (numberItem == null) - { - throw new InvalidDataException("numberItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.NumberItem = numberItem; - } - - // to ensure "floatItem" is required (not null) - if (floatItem == null) - { - throw new InvalidDataException("floatItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.FloatItem = floatItem; - } - - // to ensure "integerItem" is required (not null) - if (integerItem == null) - { - throw new InvalidDataException("integerItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.IntegerItem = integerItem; - } - - // to ensure "boolItem" is required (not null) - if (boolItem == null) - { - throw new InvalidDataException("boolItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.BoolItem = boolItem; - } - - // to ensure "arrayItem" is required (not null) - if (arrayItem == null) - { - throw new InvalidDataException("arrayItem is a required property for TypeHolderExample and cannot be null"); - } - else - { - this.ArrayItem = arrayItem; - } - - } - - /// - /// Gets or Sets StringItem - /// - [DataMember(Name="string_item", EmitDefaultValue=true)] - public string StringItem { get; set; } - - /// - /// Gets or Sets NumberItem - /// - [DataMember(Name="number_item", EmitDefaultValue=true)] - public decimal NumberItem { get; set; } - - /// - /// Gets or Sets FloatItem - /// - [DataMember(Name="float_item", EmitDefaultValue=true)] - public float FloatItem { get; set; } - - /// - /// Gets or Sets IntegerItem - /// - [DataMember(Name="integer_item", EmitDefaultValue=true)] - public int IntegerItem { get; set; } - - /// - /// Gets or Sets BoolItem - /// - [DataMember(Name="bool_item", EmitDefaultValue=true)] - public bool BoolItem { get; set; } - - /// - /// Gets or Sets ArrayItem - /// - [DataMember(Name="array_item", EmitDefaultValue=true)] - public List ArrayItem { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class TypeHolderExample {\n"); - sb.Append(" StringItem: ").Append(StringItem).Append("\n"); - sb.Append(" NumberItem: ").Append(NumberItem).Append("\n"); - sb.Append(" FloatItem: ").Append(FloatItem).Append("\n"); - sb.Append(" IntegerItem: ").Append(IntegerItem).Append("\n"); - sb.Append(" BoolItem: ").Append(BoolItem).Append("\n"); - sb.Append(" ArrayItem: ").Append(ArrayItem).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as TypeHolderExample); - } - - /// - /// Returns true if TypeHolderExample instances are equal - /// - /// Instance of TypeHolderExample to be compared - /// Boolean - public bool Equals(TypeHolderExample input) - { - if (input == null) - return false; - - return - ( - this.StringItem == input.StringItem || - (this.StringItem != null && - this.StringItem.Equals(input.StringItem)) - ) && - ( - this.NumberItem == input.NumberItem || - (this.NumberItem != null && - this.NumberItem.Equals(input.NumberItem)) - ) && - ( - this.FloatItem == input.FloatItem || - (this.FloatItem != null && - this.FloatItem.Equals(input.FloatItem)) - ) && - ( - this.IntegerItem == input.IntegerItem || - (this.IntegerItem != null && - this.IntegerItem.Equals(input.IntegerItem)) - ) && - ( - this.BoolItem == input.BoolItem || - (this.BoolItem != null && - this.BoolItem.Equals(input.BoolItem)) - ) && - ( - this.ArrayItem == input.ArrayItem || - this.ArrayItem != null && - input.ArrayItem != null && - this.ArrayItem.SequenceEqual(input.ArrayItem) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.StringItem != null) - hashCode = hashCode * 59 + this.StringItem.GetHashCode(); - if (this.NumberItem != null) - hashCode = hashCode * 59 + this.NumberItem.GetHashCode(); - if (this.FloatItem != null) - hashCode = hashCode * 59 + this.FloatItem.GetHashCode(); - if (this.IntegerItem != null) - hashCode = hashCode * 59 + this.IntegerItem.GetHashCode(); - if (this.BoolItem != null) - hashCode = hashCode * 59 + this.BoolItem.GetHashCode(); - if (this.ArrayItem != null) - hashCode = hashCode * 59 + this.ArrayItem.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/User.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/User.cs deleted file mode 100644 index 85697872994..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/User.cs +++ /dev/null @@ -1,260 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// User - /// - [DataContract] - [ImplementPropertyChanged] - public partial class User : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// id. - /// username. - /// firstName. - /// lastName. - /// email. - /// password. - /// phone. - /// User Status. - public User(long id = default(long), string username = default(string), string firstName = default(string), string lastName = default(string), string email = default(string), string password = default(string), string phone = default(string), int userStatus = default(int)) - { - this.Id = id; - this.Username = username; - this.FirstName = firstName; - this.LastName = lastName; - this.Email = email; - this.Password = password; - this.Phone = phone; - this.UserStatus = userStatus; - } - - /// - /// Gets or Sets Id - /// - [DataMember(Name="id", EmitDefaultValue=true)] - public long Id { get; set; } - - /// - /// Gets or Sets Username - /// - [DataMember(Name="username", EmitDefaultValue=true)] - public string Username { get; set; } - - /// - /// Gets or Sets FirstName - /// - [DataMember(Name="firstName", EmitDefaultValue=true)] - public string FirstName { get; set; } - - /// - /// Gets or Sets LastName - /// - [DataMember(Name="lastName", EmitDefaultValue=true)] - public string LastName { get; set; } - - /// - /// Gets or Sets Email - /// - [DataMember(Name="email", EmitDefaultValue=true)] - public string Email { get; set; } - - /// - /// Gets or Sets Password - /// - [DataMember(Name="password", EmitDefaultValue=true)] - public string Password { get; set; } - - /// - /// Gets or Sets Phone - /// - [DataMember(Name="phone", EmitDefaultValue=true)] - public string Phone { get; set; } - - /// - /// User Status - /// - /// User Status - [DataMember(Name="userStatus", EmitDefaultValue=true)] - public int UserStatus { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class User {\n"); - sb.Append(" Id: ").Append(Id).Append("\n"); - sb.Append(" Username: ").Append(Username).Append("\n"); - sb.Append(" FirstName: ").Append(FirstName).Append("\n"); - sb.Append(" LastName: ").Append(LastName).Append("\n"); - sb.Append(" Email: ").Append(Email).Append("\n"); - sb.Append(" Password: ").Append(Password).Append("\n"); - sb.Append(" Phone: ").Append(Phone).Append("\n"); - sb.Append(" UserStatus: ").Append(UserStatus).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as User); - } - - /// - /// Returns true if User instances are equal - /// - /// Instance of User to be compared - /// Boolean - public bool Equals(User input) - { - if (input == null) - return false; - - return - ( - this.Id == input.Id || - (this.Id != null && - this.Id.Equals(input.Id)) - ) && - ( - this.Username == input.Username || - (this.Username != null && - this.Username.Equals(input.Username)) - ) && - ( - this.FirstName == input.FirstName || - (this.FirstName != null && - this.FirstName.Equals(input.FirstName)) - ) && - ( - this.LastName == input.LastName || - (this.LastName != null && - this.LastName.Equals(input.LastName)) - ) && - ( - this.Email == input.Email || - (this.Email != null && - this.Email.Equals(input.Email)) - ) && - ( - this.Password == input.Password || - (this.Password != null && - this.Password.Equals(input.Password)) - ) && - ( - this.Phone == input.Phone || - (this.Phone != null && - this.Phone.Equals(input.Phone)) - ) && - ( - this.UserStatus == input.UserStatus || - (this.UserStatus != null && - this.UserStatus.Equals(input.UserStatus)) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.Id != null) - hashCode = hashCode * 59 + this.Id.GetHashCode(); - if (this.Username != null) - hashCode = hashCode * 59 + this.Username.GetHashCode(); - if (this.FirstName != null) - hashCode = hashCode * 59 + this.FirstName.GetHashCode(); - if (this.LastName != null) - hashCode = hashCode * 59 + this.LastName.GetHashCode(); - if (this.Email != null) - hashCode = hashCode * 59 + this.Email.GetHashCode(); - if (this.Password != null) - hashCode = hashCode * 59 + this.Password.GetHashCode(); - if (this.Phone != null) - hashCode = hashCode * 59 + this.Phone.GetHashCode(); - if (this.UserStatus != null) - hashCode = hashCode * 59 + this.UserStatus.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/XmlItem.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/XmlItem.cs deleted file mode 100644 index d107d64cfc8..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Model/XmlItem.cs +++ /dev/null @@ -1,604 +0,0 @@ -/* - * OpenAPI Petstore - * - * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ - * - * The version of the OpenAPI document: 1.0.0 - * - * Generated by: https://github.com/openapitools/openapi-generator.git - */ - -using System; -using System.Linq; -using System.IO; -using System.Text; -using System.Text.RegularExpressions; -using System.Collections; -using System.Collections.Generic; -using System.Collections.ObjectModel; -using System.Runtime.Serialization; -using Newtonsoft.Json; -using Newtonsoft.Json.Converters; -using PropertyChanged; -using System.ComponentModel; -using System.ComponentModel.DataAnnotations; -using OpenAPIDateConverter = Org.OpenAPITools.Client.OpenAPIDateConverter; - -namespace Org.OpenAPITools.Model -{ - /// - /// XmlItem - /// - [DataContract] - [ImplementPropertyChanged] - public partial class XmlItem : IEquatable, IValidatableObject - { - /// - /// Initializes a new instance of the class. - /// - /// attributeString. - /// attributeNumber. - /// attributeInteger. - /// attributeBoolean. - /// wrappedArray. - /// nameString. - /// nameNumber. - /// nameInteger. - /// nameBoolean. - /// nameArray. - /// nameWrappedArray. - /// prefixString. - /// prefixNumber. - /// prefixInteger. - /// prefixBoolean. - /// prefixArray. - /// prefixWrappedArray. - /// namespaceString. - /// namespaceNumber. - /// namespaceInteger. - /// namespaceBoolean. - /// namespaceArray. - /// namespaceWrappedArray. - /// prefixNsString. - /// prefixNsNumber. - /// prefixNsInteger. - /// prefixNsBoolean. - /// prefixNsArray. - /// prefixNsWrappedArray. - public XmlItem(string attributeString = default(string), decimal attributeNumber = default(decimal), int attributeInteger = default(int), bool attributeBoolean = default(bool), List wrappedArray = default(List), string nameString = default(string), decimal nameNumber = default(decimal), int nameInteger = default(int), bool nameBoolean = default(bool), List nameArray = default(List), List nameWrappedArray = default(List), string prefixString = default(string), decimal prefixNumber = default(decimal), int prefixInteger = default(int), bool prefixBoolean = default(bool), List prefixArray = default(List), List prefixWrappedArray = default(List), string namespaceString = default(string), decimal namespaceNumber = default(decimal), int namespaceInteger = default(int), bool namespaceBoolean = default(bool), List namespaceArray = default(List), List namespaceWrappedArray = default(List), string prefixNsString = default(string), decimal prefixNsNumber = default(decimal), int prefixNsInteger = default(int), bool prefixNsBoolean = default(bool), List prefixNsArray = default(List), List prefixNsWrappedArray = default(List)) - { - this.AttributeString = attributeString; - this.AttributeNumber = attributeNumber; - this.AttributeInteger = attributeInteger; - this.AttributeBoolean = attributeBoolean; - this.WrappedArray = wrappedArray; - this.NameString = nameString; - this.NameNumber = nameNumber; - this.NameInteger = nameInteger; - this.NameBoolean = nameBoolean; - this.NameArray = nameArray; - this.NameWrappedArray = nameWrappedArray; - this.PrefixString = prefixString; - this.PrefixNumber = prefixNumber; - this.PrefixInteger = prefixInteger; - this.PrefixBoolean = prefixBoolean; - this.PrefixArray = prefixArray; - this.PrefixWrappedArray = prefixWrappedArray; - this.NamespaceString = namespaceString; - this.NamespaceNumber = namespaceNumber; - this.NamespaceInteger = namespaceInteger; - this.NamespaceBoolean = namespaceBoolean; - this.NamespaceArray = namespaceArray; - this.NamespaceWrappedArray = namespaceWrappedArray; - this.PrefixNsString = prefixNsString; - this.PrefixNsNumber = prefixNsNumber; - this.PrefixNsInteger = prefixNsInteger; - this.PrefixNsBoolean = prefixNsBoolean; - this.PrefixNsArray = prefixNsArray; - this.PrefixNsWrappedArray = prefixNsWrappedArray; - } - - /// - /// Gets or Sets AttributeString - /// - [DataMember(Name="attribute_string", EmitDefaultValue=true)] - public string AttributeString { get; set; } - - /// - /// Gets or Sets AttributeNumber - /// - [DataMember(Name="attribute_number", EmitDefaultValue=true)] - public decimal AttributeNumber { get; set; } - - /// - /// Gets or Sets AttributeInteger - /// - [DataMember(Name="attribute_integer", EmitDefaultValue=true)] - public int AttributeInteger { get; set; } - - /// - /// Gets or Sets AttributeBoolean - /// - [DataMember(Name="attribute_boolean", EmitDefaultValue=true)] - public bool AttributeBoolean { get; set; } - - /// - /// Gets or Sets WrappedArray - /// - [DataMember(Name="wrapped_array", EmitDefaultValue=true)] - public List WrappedArray { get; set; } - - /// - /// Gets or Sets NameString - /// - [DataMember(Name="name_string", EmitDefaultValue=true)] - public string NameString { get; set; } - - /// - /// Gets or Sets NameNumber - /// - [DataMember(Name="name_number", EmitDefaultValue=true)] - public decimal NameNumber { get; set; } - - /// - /// Gets or Sets NameInteger - /// - [DataMember(Name="name_integer", EmitDefaultValue=true)] - public int NameInteger { get; set; } - - /// - /// Gets or Sets NameBoolean - /// - [DataMember(Name="name_boolean", EmitDefaultValue=true)] - public bool NameBoolean { get; set; } - - /// - /// Gets or Sets NameArray - /// - [DataMember(Name="name_array", EmitDefaultValue=true)] - public List NameArray { get; set; } - - /// - /// Gets or Sets NameWrappedArray - /// - [DataMember(Name="name_wrapped_array", EmitDefaultValue=true)] - public List NameWrappedArray { get; set; } - - /// - /// Gets or Sets PrefixString - /// - [DataMember(Name="prefix_string", EmitDefaultValue=true)] - public string PrefixString { get; set; } - - /// - /// Gets or Sets PrefixNumber - /// - [DataMember(Name="prefix_number", EmitDefaultValue=true)] - public decimal PrefixNumber { get; set; } - - /// - /// Gets or Sets PrefixInteger - /// - [DataMember(Name="prefix_integer", EmitDefaultValue=true)] - public int PrefixInteger { get; set; } - - /// - /// Gets or Sets PrefixBoolean - /// - [DataMember(Name="prefix_boolean", EmitDefaultValue=true)] - public bool PrefixBoolean { get; set; } - - /// - /// Gets or Sets PrefixArray - /// - [DataMember(Name="prefix_array", EmitDefaultValue=true)] - public List PrefixArray { get; set; } - - /// - /// Gets or Sets PrefixWrappedArray - /// - [DataMember(Name="prefix_wrapped_array", EmitDefaultValue=true)] - public List PrefixWrappedArray { get; set; } - - /// - /// Gets or Sets NamespaceString - /// - [DataMember(Name="namespace_string", EmitDefaultValue=true)] - public string NamespaceString { get; set; } - - /// - /// Gets or Sets NamespaceNumber - /// - [DataMember(Name="namespace_number", EmitDefaultValue=true)] - public decimal NamespaceNumber { get; set; } - - /// - /// Gets or Sets NamespaceInteger - /// - [DataMember(Name="namespace_integer", EmitDefaultValue=true)] - public int NamespaceInteger { get; set; } - - /// - /// Gets or Sets NamespaceBoolean - /// - [DataMember(Name="namespace_boolean", EmitDefaultValue=true)] - public bool NamespaceBoolean { get; set; } - - /// - /// Gets or Sets NamespaceArray - /// - [DataMember(Name="namespace_array", EmitDefaultValue=true)] - public List NamespaceArray { get; set; } - - /// - /// Gets or Sets NamespaceWrappedArray - /// - [DataMember(Name="namespace_wrapped_array", EmitDefaultValue=true)] - public List NamespaceWrappedArray { get; set; } - - /// - /// Gets or Sets PrefixNsString - /// - [DataMember(Name="prefix_ns_string", EmitDefaultValue=true)] - public string PrefixNsString { get; set; } - - /// - /// Gets or Sets PrefixNsNumber - /// - [DataMember(Name="prefix_ns_number", EmitDefaultValue=true)] - public decimal PrefixNsNumber { get; set; } - - /// - /// Gets or Sets PrefixNsInteger - /// - [DataMember(Name="prefix_ns_integer", EmitDefaultValue=true)] - public int PrefixNsInteger { get; set; } - - /// - /// Gets or Sets PrefixNsBoolean - /// - [DataMember(Name="prefix_ns_boolean", EmitDefaultValue=true)] - public bool PrefixNsBoolean { get; set; } - - /// - /// Gets or Sets PrefixNsArray - /// - [DataMember(Name="prefix_ns_array", EmitDefaultValue=true)] - public List PrefixNsArray { get; set; } - - /// - /// Gets or Sets PrefixNsWrappedArray - /// - [DataMember(Name="prefix_ns_wrapped_array", EmitDefaultValue=true)] - public List PrefixNsWrappedArray { get; set; } - - /// - /// Returns the string presentation of the object - /// - /// String presentation of the object - public override string ToString() - { - var sb = new StringBuilder(); - sb.Append("class XmlItem {\n"); - sb.Append(" AttributeString: ").Append(AttributeString).Append("\n"); - sb.Append(" AttributeNumber: ").Append(AttributeNumber).Append("\n"); - sb.Append(" AttributeInteger: ").Append(AttributeInteger).Append("\n"); - sb.Append(" AttributeBoolean: ").Append(AttributeBoolean).Append("\n"); - sb.Append(" WrappedArray: ").Append(WrappedArray).Append("\n"); - sb.Append(" NameString: ").Append(NameString).Append("\n"); - sb.Append(" NameNumber: ").Append(NameNumber).Append("\n"); - sb.Append(" NameInteger: ").Append(NameInteger).Append("\n"); - sb.Append(" NameBoolean: ").Append(NameBoolean).Append("\n"); - sb.Append(" NameArray: ").Append(NameArray).Append("\n"); - sb.Append(" NameWrappedArray: ").Append(NameWrappedArray).Append("\n"); - sb.Append(" PrefixString: ").Append(PrefixString).Append("\n"); - sb.Append(" PrefixNumber: ").Append(PrefixNumber).Append("\n"); - sb.Append(" PrefixInteger: ").Append(PrefixInteger).Append("\n"); - sb.Append(" PrefixBoolean: ").Append(PrefixBoolean).Append("\n"); - sb.Append(" PrefixArray: ").Append(PrefixArray).Append("\n"); - sb.Append(" PrefixWrappedArray: ").Append(PrefixWrappedArray).Append("\n"); - sb.Append(" NamespaceString: ").Append(NamespaceString).Append("\n"); - sb.Append(" NamespaceNumber: ").Append(NamespaceNumber).Append("\n"); - sb.Append(" NamespaceInteger: ").Append(NamespaceInteger).Append("\n"); - sb.Append(" NamespaceBoolean: ").Append(NamespaceBoolean).Append("\n"); - sb.Append(" NamespaceArray: ").Append(NamespaceArray).Append("\n"); - sb.Append(" NamespaceWrappedArray: ").Append(NamespaceWrappedArray).Append("\n"); - sb.Append(" PrefixNsString: ").Append(PrefixNsString).Append("\n"); - sb.Append(" PrefixNsNumber: ").Append(PrefixNsNumber).Append("\n"); - sb.Append(" PrefixNsInteger: ").Append(PrefixNsInteger).Append("\n"); - sb.Append(" PrefixNsBoolean: ").Append(PrefixNsBoolean).Append("\n"); - sb.Append(" PrefixNsArray: ").Append(PrefixNsArray).Append("\n"); - sb.Append(" PrefixNsWrappedArray: ").Append(PrefixNsWrappedArray).Append("\n"); - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Returns the JSON string presentation of the object - /// - /// JSON string presentation of the object - public virtual string ToJson() - { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - - /// - /// Returns true if objects are equal - /// - /// Object to be compared - /// Boolean - public override bool Equals(object input) - { - return this.Equals(input as XmlItem); - } - - /// - /// Returns true if XmlItem instances are equal - /// - /// Instance of XmlItem to be compared - /// Boolean - public bool Equals(XmlItem input) - { - if (input == null) - return false; - - return - ( - this.AttributeString == input.AttributeString || - (this.AttributeString != null && - this.AttributeString.Equals(input.AttributeString)) - ) && - ( - this.AttributeNumber == input.AttributeNumber || - (this.AttributeNumber != null && - this.AttributeNumber.Equals(input.AttributeNumber)) - ) && - ( - this.AttributeInteger == input.AttributeInteger || - (this.AttributeInteger != null && - this.AttributeInteger.Equals(input.AttributeInteger)) - ) && - ( - this.AttributeBoolean == input.AttributeBoolean || - (this.AttributeBoolean != null && - this.AttributeBoolean.Equals(input.AttributeBoolean)) - ) && - ( - this.WrappedArray == input.WrappedArray || - this.WrappedArray != null && - input.WrappedArray != null && - this.WrappedArray.SequenceEqual(input.WrappedArray) - ) && - ( - this.NameString == input.NameString || - (this.NameString != null && - this.NameString.Equals(input.NameString)) - ) && - ( - this.NameNumber == input.NameNumber || - (this.NameNumber != null && - this.NameNumber.Equals(input.NameNumber)) - ) && - ( - this.NameInteger == input.NameInteger || - (this.NameInteger != null && - this.NameInteger.Equals(input.NameInteger)) - ) && - ( - this.NameBoolean == input.NameBoolean || - (this.NameBoolean != null && - this.NameBoolean.Equals(input.NameBoolean)) - ) && - ( - this.NameArray == input.NameArray || - this.NameArray != null && - input.NameArray != null && - this.NameArray.SequenceEqual(input.NameArray) - ) && - ( - this.NameWrappedArray == input.NameWrappedArray || - this.NameWrappedArray != null && - input.NameWrappedArray != null && - this.NameWrappedArray.SequenceEqual(input.NameWrappedArray) - ) && - ( - this.PrefixString == input.PrefixString || - (this.PrefixString != null && - this.PrefixString.Equals(input.PrefixString)) - ) && - ( - this.PrefixNumber == input.PrefixNumber || - (this.PrefixNumber != null && - this.PrefixNumber.Equals(input.PrefixNumber)) - ) && - ( - this.PrefixInteger == input.PrefixInteger || - (this.PrefixInteger != null && - this.PrefixInteger.Equals(input.PrefixInteger)) - ) && - ( - this.PrefixBoolean == input.PrefixBoolean || - (this.PrefixBoolean != null && - this.PrefixBoolean.Equals(input.PrefixBoolean)) - ) && - ( - this.PrefixArray == input.PrefixArray || - this.PrefixArray != null && - input.PrefixArray != null && - this.PrefixArray.SequenceEqual(input.PrefixArray) - ) && - ( - this.PrefixWrappedArray == input.PrefixWrappedArray || - this.PrefixWrappedArray != null && - input.PrefixWrappedArray != null && - this.PrefixWrappedArray.SequenceEqual(input.PrefixWrappedArray) - ) && - ( - this.NamespaceString == input.NamespaceString || - (this.NamespaceString != null && - this.NamespaceString.Equals(input.NamespaceString)) - ) && - ( - this.NamespaceNumber == input.NamespaceNumber || - (this.NamespaceNumber != null && - this.NamespaceNumber.Equals(input.NamespaceNumber)) - ) && - ( - this.NamespaceInteger == input.NamespaceInteger || - (this.NamespaceInteger != null && - this.NamespaceInteger.Equals(input.NamespaceInteger)) - ) && - ( - this.NamespaceBoolean == input.NamespaceBoolean || - (this.NamespaceBoolean != null && - this.NamespaceBoolean.Equals(input.NamespaceBoolean)) - ) && - ( - this.NamespaceArray == input.NamespaceArray || - this.NamespaceArray != null && - input.NamespaceArray != null && - this.NamespaceArray.SequenceEqual(input.NamespaceArray) - ) && - ( - this.NamespaceWrappedArray == input.NamespaceWrappedArray || - this.NamespaceWrappedArray != null && - input.NamespaceWrappedArray != null && - this.NamespaceWrappedArray.SequenceEqual(input.NamespaceWrappedArray) - ) && - ( - this.PrefixNsString == input.PrefixNsString || - (this.PrefixNsString != null && - this.PrefixNsString.Equals(input.PrefixNsString)) - ) && - ( - this.PrefixNsNumber == input.PrefixNsNumber || - (this.PrefixNsNumber != null && - this.PrefixNsNumber.Equals(input.PrefixNsNumber)) - ) && - ( - this.PrefixNsInteger == input.PrefixNsInteger || - (this.PrefixNsInteger != null && - this.PrefixNsInteger.Equals(input.PrefixNsInteger)) - ) && - ( - this.PrefixNsBoolean == input.PrefixNsBoolean || - (this.PrefixNsBoolean != null && - this.PrefixNsBoolean.Equals(input.PrefixNsBoolean)) - ) && - ( - this.PrefixNsArray == input.PrefixNsArray || - this.PrefixNsArray != null && - input.PrefixNsArray != null && - this.PrefixNsArray.SequenceEqual(input.PrefixNsArray) - ) && - ( - this.PrefixNsWrappedArray == input.PrefixNsWrappedArray || - this.PrefixNsWrappedArray != null && - input.PrefixNsWrappedArray != null && - this.PrefixNsWrappedArray.SequenceEqual(input.PrefixNsWrappedArray) - ); - } - - /// - /// Gets the hash code - /// - /// Hash code - public override int GetHashCode() - { - unchecked // Overflow is fine, just wrap - { - int hashCode = 41; - if (this.AttributeString != null) - hashCode = hashCode * 59 + this.AttributeString.GetHashCode(); - if (this.AttributeNumber != null) - hashCode = hashCode * 59 + this.AttributeNumber.GetHashCode(); - if (this.AttributeInteger != null) - hashCode = hashCode * 59 + this.AttributeInteger.GetHashCode(); - if (this.AttributeBoolean != null) - hashCode = hashCode * 59 + this.AttributeBoolean.GetHashCode(); - if (this.WrappedArray != null) - hashCode = hashCode * 59 + this.WrappedArray.GetHashCode(); - if (this.NameString != null) - hashCode = hashCode * 59 + this.NameString.GetHashCode(); - if (this.NameNumber != null) - hashCode = hashCode * 59 + this.NameNumber.GetHashCode(); - if (this.NameInteger != null) - hashCode = hashCode * 59 + this.NameInteger.GetHashCode(); - if (this.NameBoolean != null) - hashCode = hashCode * 59 + this.NameBoolean.GetHashCode(); - if (this.NameArray != null) - hashCode = hashCode * 59 + this.NameArray.GetHashCode(); - if (this.NameWrappedArray != null) - hashCode = hashCode * 59 + this.NameWrappedArray.GetHashCode(); - if (this.PrefixString != null) - hashCode = hashCode * 59 + this.PrefixString.GetHashCode(); - if (this.PrefixNumber != null) - hashCode = hashCode * 59 + this.PrefixNumber.GetHashCode(); - if (this.PrefixInteger != null) - hashCode = hashCode * 59 + this.PrefixInteger.GetHashCode(); - if (this.PrefixBoolean != null) - hashCode = hashCode * 59 + this.PrefixBoolean.GetHashCode(); - if (this.PrefixArray != null) - hashCode = hashCode * 59 + this.PrefixArray.GetHashCode(); - if (this.PrefixWrappedArray != null) - hashCode = hashCode * 59 + this.PrefixWrappedArray.GetHashCode(); - if (this.NamespaceString != null) - hashCode = hashCode * 59 + this.NamespaceString.GetHashCode(); - if (this.NamespaceNumber != null) - hashCode = hashCode * 59 + this.NamespaceNumber.GetHashCode(); - if (this.NamespaceInteger != null) - hashCode = hashCode * 59 + this.NamespaceInteger.GetHashCode(); - if (this.NamespaceBoolean != null) - hashCode = hashCode * 59 + this.NamespaceBoolean.GetHashCode(); - if (this.NamespaceArray != null) - hashCode = hashCode * 59 + this.NamespaceArray.GetHashCode(); - if (this.NamespaceWrappedArray != null) - hashCode = hashCode * 59 + this.NamespaceWrappedArray.GetHashCode(); - if (this.PrefixNsString != null) - hashCode = hashCode * 59 + this.PrefixNsString.GetHashCode(); - if (this.PrefixNsNumber != null) - hashCode = hashCode * 59 + this.PrefixNsNumber.GetHashCode(); - if (this.PrefixNsInteger != null) - hashCode = hashCode * 59 + this.PrefixNsInteger.GetHashCode(); - if (this.PrefixNsBoolean != null) - hashCode = hashCode * 59 + this.PrefixNsBoolean.GetHashCode(); - if (this.PrefixNsArray != null) - hashCode = hashCode * 59 + this.PrefixNsArray.GetHashCode(); - if (this.PrefixNsWrappedArray != null) - hashCode = hashCode * 59 + this.PrefixNsWrappedArray.GetHashCode(); - return hashCode; - } - } - - /// - /// Property changed event handler - /// - public event PropertyChangedEventHandler PropertyChanged; - - /// - /// Trigger when a property changed - /// - /// Property Name - 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)); - } - } - - /// - /// To validate all properties of the instance - /// - /// Validation context - /// Validation Result - IEnumerable IValidatableObject.Validate(ValidationContext validationContext) - { - yield break; - } - } - -} diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.csproj b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.csproj deleted file mode 100644 index 6b2e4484c92..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.csproj +++ /dev/null @@ -1,85 +0,0 @@ - - - - - - Debug - AnyCPU - {5CD900DE-8266-412F-A758-28E1F9C623D5} - Library - Properties - Org.OpenAPITools - Org.OpenAPITools - v4.5 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - bin\Debug\Org.OpenAPITools.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - bin\Release\Org.OpenAPITools.xml - - - - - - - - - - - - - $(SolutionDir)\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - ..\..\vendor\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll - - - $(SolutionDir)\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - ..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - ..\..\packages\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - ..\..\vendor\JsonSubTypes.1.6.0\lib\net45\JsonSubTypes.dll - - - $(SolutionDir)\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\packages\RestSharp.105.1.0\lib\net45\RestSharp.dll - ..\..\vendor\RestSharp.105.1.0\lib\net45\RestSharp.dll - - - ..\..\packages\PropertyChanged.Fody.1.51.3\Lib\portable-net4+sl4+wp8+win8+wpa81+MonoAndroid16+MonoTouch40\PropertyChanged.dll - - - - - - - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec deleted file mode 100644 index a68da9335f3..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Org.OpenAPITools.nuspec +++ /dev/null @@ -1,44 +0,0 @@ - - - - - $id$ - OpenAPI Library - - - $version$ - - - $author$ - - - $author$ - false - false - - - A library generated from a OpenAPI doc - https://www.apache.org/licenses/LICENSE-2.0.html - - - - - - - - - - - - - - - - - - - - - diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Properties/AssemblyInfo.cs b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Properties/AssemblyInfo.cs deleted file mode 100644 index d1abdf7936a..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,32 +0,0 @@ -using System.Reflection; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("OpenAPI Library")] -[assembly: AssemblyDescription("A library generated from a OpenAPI doc")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("OpenAPI")] -[assembly: AssemblyProduct("OpenAPILibrary")] -[assembly: AssemblyCopyright("No Copyright")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0")] -[assembly: AssemblyFileVersion("1.0.0")] diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/packages.config b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/packages.config deleted file mode 100644 index ae907440b13..00000000000 --- a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/src/Org.OpenAPITools/packages.config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - -