diff --git a/.github/workflows/samples-dotnet6-client-echo-api.yaml b/.github/workflows/samples-dotnet6-client-echo-api.yaml
new file mode 100644
index 00000000000..8b07b368600
--- /dev/null
+++ b/.github/workflows/samples-dotnet6-client-echo-api.yaml
@@ -0,0 +1,31 @@
+name: Samples C# .Net 6
+
+on:
+ push:
+ paths:
+ - samples/client/echo_api/csharp-restsharp/**
+ pull_request:
+ paths:
+ - samples/client/echo_api/csharp-restsharp/**
+jobs:
+ build:
+ name: Build .Net clients
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ sample:
+ # clients
+ - samples/client/echo_api/csharp-restsharp/
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-dotnet@v3.2.0
+ with:
+ dotnet-version: '6.0.x'
+ - name: Run echo server
+ run: |
+ git clone https://github.com/wing328/http-echo-server -b openapi-generator-test-server
+ (cd http-echo-server && npm install && npm start &)
+ - name: Build
+ working-directory: ${{ matrix.sample }}
+ run: dotnet build Org.OpenAPITools.sln
diff --git a/bin/configs/csharp-restsharp-echo-api.yaml b/bin/configs/csharp-restsharp-echo-api.yaml
new file mode 100644
index 00000000000..3380ae3c3d2
--- /dev/null
+++ b/bin/configs/csharp-restsharp-echo-api.yaml
@@ -0,0 +1,9 @@
+generatorName: csharp
+outputDir: samples/client/echo_api/csharp-restsharp
+inputSpec: modules/openapi-generator/src/test/resources/3_0/echo_api.yaml
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{322C8CAF-0156-40C1-AE42-D59761FB9B6C}'
+ targetFramework: net6.0
+ setCompareNetObjects: "true"
+ hideGenerationTimestamp: "true"
diff --git a/modules/openapi-generator/src/main/resources/csharp/validatable.mustache b/modules/openapi-generator/src/main/resources/csharp/validatable.mustache
index fc848517a79..0e9cd35a477 100644
--- a/modules/openapi-generator/src/main/resources/csharp/validatable.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/validatable.mustache
@@ -18,6 +18,7 @@
{
{{/discriminator}}
{{^discriminator}}
+ {{#parent}}
///
/// To validate all properties of the instance
///
@@ -25,6 +26,26 @@
/// 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)
+ {
+ {{/parent}}
+ {{^parent}}
+ ///
+ /// To validate all properties of the instance
+ ///
+ /// Validation context
+ /// Validation Result
+ IEnumerable IValidatableObject.Validate(ValidationContext validationContext)
+ {
+ {{/parent}}
{{/discriminator}}
{{#parent}}
{{^isArray}}
diff --git a/samples/client/echo_api/csharp-restsharp/.gitignore b/samples/client/echo_api/csharp-restsharp/.gitignore
new file mode 100644
index 00000000000..1ee53850b84
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/.gitignore
@@ -0,0 +1,362 @@
+## 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/echo_api/csharp-restsharp/.openapi-generator-ignore b/samples/client/echo_api/csharp-restsharp/.openapi-generator-ignore
new file mode 100644
index 00000000000..7484ee590a3
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# 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/echo_api/csharp-restsharp/.openapi-generator/FILES b/samples/client/echo_api/csharp-restsharp/.openapi-generator/FILES
new file mode 100644
index 00000000000..bcdb24f868e
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/.openapi-generator/FILES
@@ -0,0 +1,57 @@
+.gitignore
+Org.OpenAPITools.sln
+README.md
+api/openapi.yaml
+appveyor.yml
+docs/Bird.md
+docs/BodyApi.md
+docs/Category.md
+docs/DataQuery.md
+docs/DefaultValue.md
+docs/FormApi.md
+docs/HeaderApi.md
+docs/NumberPropertiesOnly.md
+docs/PathApi.md
+docs/Pet.md
+docs/Query.md
+docs/QueryApi.md
+docs/StringEnumRef.md
+docs/Tag.md
+docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md
+docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md
+git_push.sh
+src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+src/Org.OpenAPITools/Api/BodyApi.cs
+src/Org.OpenAPITools/Api/FormApi.cs
+src/Org.OpenAPITools/Api/HeaderApi.cs
+src/Org.OpenAPITools/Api/PathApi.cs
+src/Org.OpenAPITools/Api/QueryApi.cs
+src/Org.OpenAPITools/Client/ApiClient.cs
+src/Org.OpenAPITools/Client/ApiException.cs
+src/Org.OpenAPITools/Client/ApiResponse.cs
+src/Org.OpenAPITools/Client/ClientUtils.cs
+src/Org.OpenAPITools/Client/Configuration.cs
+src/Org.OpenAPITools/Client/ExceptionFactory.cs
+src/Org.OpenAPITools/Client/GlobalConfiguration.cs
+src/Org.OpenAPITools/Client/HttpMethod.cs
+src/Org.OpenAPITools/Client/IApiAccessor.cs
+src/Org.OpenAPITools/Client/IAsynchronousClient.cs
+src/Org.OpenAPITools/Client/IReadableConfiguration.cs
+src/Org.OpenAPITools/Client/ISynchronousClient.cs
+src/Org.OpenAPITools/Client/Multimap.cs
+src/Org.OpenAPITools/Client/OpenAPIDateConverter.cs
+src/Org.OpenAPITools/Client/RequestOptions.cs
+src/Org.OpenAPITools/Client/RetryConfiguration.cs
+src/Org.OpenAPITools/Model/AbstractOpenAPISchema.cs
+src/Org.OpenAPITools/Model/Bird.cs
+src/Org.OpenAPITools/Model/Category.cs
+src/Org.OpenAPITools/Model/DataQuery.cs
+src/Org.OpenAPITools/Model/DefaultValue.cs
+src/Org.OpenAPITools/Model/NumberPropertiesOnly.cs
+src/Org.OpenAPITools/Model/Pet.cs
+src/Org.OpenAPITools/Model/Query.cs
+src/Org.OpenAPITools/Model/StringEnumRef.cs
+src/Org.OpenAPITools/Model/Tag.cs
+src/Org.OpenAPITools/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.cs
+src/Org.OpenAPITools/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.cs
+src/Org.OpenAPITools/Org.OpenAPITools.csproj
diff --git a/samples/client/echo_api/csharp-restsharp/.openapi-generator/VERSION b/samples/client/echo_api/csharp-restsharp/.openapi-generator/VERSION
new file mode 100644
index 00000000000..757e6740040
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.0.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/echo_api/csharp-restsharp/Org.OpenAPITools.sln b/samples/client/echo_api/csharp-restsharp/Org.OpenAPITools.sln
new file mode 100644
index 00000000000..e481dc01664
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/Org.OpenAPITools.sln
@@ -0,0 +1,27 @@
+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", "{322C8CAF-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
+ {322C8CAF-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {322C8CAF-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {322C8CAF-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {322C8CAF-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/echo_api/csharp-restsharp/README.md b/samples/client/echo_api/csharp-restsharp/README.md
new file mode 100644
index 00000000000..f71e7d8b43d
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/README.md
@@ -0,0 +1,154 @@
+# Org.OpenAPITools - the C# library for the Echo Server API
+
+Echo Server API
+
+This C# SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
+
+- API version: 0.1.0
+- SDK version: 1.0.0
+- Build package: org.openapitools.codegen.languages.CSharpClientCodegen
+
+
+## Frameworks supported
+
+
+## Dependencies
+
+- [RestSharp](https://www.nuget.org/packages/RestSharp) - 106.13.0 or later
+- [Json.NET](https://www.nuget.org/packages/Newtonsoft.Json/) - 13.0.2 or later
+- [JsonSubTypes](https://www.nuget.org/packages/JsonSubTypes/) - 1.8.0 or later
+- [System.ComponentModel.Annotations](https://www.nuget.org/packages/System.ComponentModel.Annotations) - 5.0.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
+Install-Package System.ComponentModel.Annotations
+```
+
+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).
+NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See [RestSharp#1406](https://github.com/restsharp/RestSharp/issues/1406).
+
+
+## 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.
+
+
+## Usage
+
+To use the API client with a HTTP proxy, setup a `System.Net.WebProxy`
+```csharp
+Configuration c = new Configuration();
+System.Net.WebProxy webProxy = new System.Net.WebProxy("http://myProxyUrl:80/");
+webProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
+c.Proxy = webProxy;
+```
+
+
+## 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 config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new BodyApi(config);
+
+ try
+ {
+ // Test binary (gif) response body
+ System.IO.Stream result = apiInstance.TestBinaryGif();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling BodyApi.TestBinaryGif: " + e.Message );
+ Debug.Print("Status Code: "+ e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+
+ }
+ }
+}
+```
+
+
+## Documentation for API Endpoints
+
+All URIs are relative to *http://localhost:3000*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*BodyApi* | [**TestBinaryGif**](docs/BodyApi.md#testbinarygif) | **POST** /binary/gif | Test binary (gif) response body
+*BodyApi* | [**TestBodyApplicationOctetstreamBinary**](docs/BodyApi.md#testbodyapplicationoctetstreambinary) | **POST** /body/application/octetstream/binary | Test body parameter(s)
+*BodyApi* | [**TestEchoBodyFreeFormObjectResponseString**](docs/BodyApi.md#testechobodyfreeformobjectresponsestring) | **POST** /echo/body/FreeFormObject/response_string | Test free form object
+*BodyApi* | [**TestEchoBodyPet**](docs/BodyApi.md#testechobodypet) | **POST** /echo/body/Pet | Test body parameter(s)
+*BodyApi* | [**TestEchoBodyPetResponseString**](docs/BodyApi.md#testechobodypetresponsestring) | **POST** /echo/body/Pet/response_string | Test empty response body
+*BodyApi* | [**TestEchoBodyTagResponseString**](docs/BodyApi.md#testechobodytagresponsestring) | **POST** /echo/body/Tag/response_string | Test empty json (request body)
+*FormApi* | [**TestFormIntegerBooleanString**](docs/FormApi.md#testformintegerbooleanstring) | **POST** /form/integer/boolean/string | Test form parameter(s)
+*HeaderApi* | [**TestHeaderIntegerBooleanString**](docs/HeaderApi.md#testheaderintegerbooleanstring) | **GET** /header/integer/boolean/string | Test header parameter(s)
+*PathApi* | [**TestsPathStringPathStringIntegerPathInteger**](docs/PathApi.md#testspathstringpathstringintegerpathinteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s)
+*QueryApi* | [**TestEnumRefString**](docs/QueryApi.md#testenumrefstring) | **GET** /query/enum_ref_string | Test query parameter(s)
+*QueryApi* | [**TestQueryDatetimeDateString**](docs/QueryApi.md#testquerydatetimedatestring) | **GET** /query/datetime/date/string | Test query parameter(s)
+*QueryApi* | [**TestQueryIntegerBooleanString**](docs/QueryApi.md#testqueryintegerbooleanstring) | **GET** /query/integer/boolean/string | Test query parameter(s)
+*QueryApi* | [**TestQueryStyleDeepObjectExplodeTrueObject**](docs/QueryApi.md#testquerystyledeepobjectexplodetrueobject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s)
+*QueryApi* | [**TestQueryStyleDeepObjectExplodeTrueObjectAllOf**](docs/QueryApi.md#testquerystyledeepobjectexplodetrueobjectallof) | **GET** /query/style_deepObject/explode_true/object/allOf | Test query parameter(s)
+*QueryApi* | [**TestQueryStyleFormExplodeTrueArrayString**](docs/QueryApi.md#testquerystyleformexplodetruearraystring) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s)
+*QueryApi* | [**TestQueryStyleFormExplodeTrueObject**](docs/QueryApi.md#testquerystyleformexplodetrueobject) | **GET** /query/style_form/explode_true/object | Test query parameter(s)
+*QueryApi* | [**TestQueryStyleFormExplodeTrueObjectAllOf**](docs/QueryApi.md#testquerystyleformexplodetrueobjectallof) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s)
+
+
+
+## Documentation for Models
+
+ - [Model.Bird](docs/Bird.md)
+ - [Model.Category](docs/Category.md)
+ - [Model.DataQuery](docs/DataQuery.md)
+ - [Model.DefaultValue](docs/DefaultValue.md)
+ - [Model.NumberPropertiesOnly](docs/NumberPropertiesOnly.md)
+ - [Model.Pet](docs/Pet.md)
+ - [Model.Query](docs/Query.md)
+ - [Model.StringEnumRef](docs/StringEnumRef.md)
+ - [Model.Tag](docs/Tag.md)
+ - [Model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter](docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md)
+ - [Model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter](docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md)
+
+
+
+## Documentation for Authorization
+
+Endpoints do not require authorization.
+
diff --git a/samples/client/echo_api/csharp-restsharp/api/openapi.yaml b/samples/client/echo_api/csharp-restsharp/api/openapi.yaml
new file mode 100644
index 00000000000..5187a656de6
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/api/openapi.yaml
@@ -0,0 +1,637 @@
+openapi: 3.0.3
+info:
+ contact:
+ email: team@openapitools.org
+ description: Echo Server API
+ license:
+ name: Apache 2.0
+ url: http://www.apache.org/licenses/LICENSE-2.0.html
+ title: Echo Server API
+ version: 0.1.0
+servers:
+- url: http://localhost:3000/
+paths:
+ /path/string/{path_string}/integer/{path_integer}:
+ get:
+ description: Test path parameter(s)
+ operationId: "tests/path/string/{path_string}/integer/{path_integer}"
+ parameters:
+ - explode: false
+ in: path
+ name: path_string
+ required: true
+ schema:
+ type: string
+ style: simple
+ - explode: false
+ in: path
+ name: path_integer
+ required: true
+ schema:
+ type: integer
+ style: simple
+ responses:
+ "200":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Successful operation
+ summary: Test path parameter(s)
+ tags:
+ - path
+ /form/integer/boolean/string:
+ post:
+ description: Test form parameter(s)
+ operationId: test/form/integer/boolean/string
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: '#/components/schemas/test_form_integer_boolean_string_request'
+ responses:
+ "200":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Successful operation
+ summary: Test form parameter(s)
+ tags:
+ - form
+ /header/integer/boolean/string:
+ get:
+ description: Test header parameter(s)
+ operationId: test/header/integer/boolean/string
+ parameters:
+ - explode: true
+ in: header
+ name: integer_header
+ required: false
+ schema:
+ type: integer
+ style: form
+ - explode: true
+ in: header
+ name: boolean_header
+ required: false
+ schema:
+ type: boolean
+ style: form
+ - explode: true
+ in: header
+ name: string_header
+ required: false
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Successful operation
+ summary: Test header parameter(s)
+ tags:
+ - header
+ /query/enum_ref_string:
+ get:
+ description: Test query parameter(s)
+ operationId: test/enum_ref_string
+ parameters:
+ - explode: true
+ in: query
+ name: enum_ref_string_query
+ required: false
+ schema:
+ $ref: '#/components/schemas/StringEnumRef'
+ style: form
+ responses:
+ "200":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Successful operation
+ summary: Test query parameter(s)
+ tags:
+ - query
+ /query/datetime/date/string:
+ get:
+ description: Test query parameter(s)
+ operationId: test/query/datetime/date/string
+ parameters:
+ - explode: true
+ in: query
+ name: datetime_query
+ required: false
+ schema:
+ format: date-time
+ type: string
+ style: form
+ - explode: true
+ in: query
+ name: date_query
+ required: false
+ schema:
+ format: date
+ type: string
+ style: form
+ - explode: true
+ in: query
+ name: string_query
+ required: false
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Successful operation
+ summary: Test query parameter(s)
+ tags:
+ - query
+ /query/integer/boolean/string:
+ get:
+ description: Test query parameter(s)
+ operationId: test/query/integer/boolean/string
+ parameters:
+ - explode: true
+ in: query
+ name: integer_query
+ required: false
+ schema:
+ type: integer
+ style: form
+ - explode: true
+ in: query
+ name: boolean_query
+ required: false
+ schema:
+ type: boolean
+ style: form
+ - explode: true
+ in: query
+ name: string_query
+ required: false
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Successful operation
+ summary: Test query parameter(s)
+ tags:
+ - query
+ /query/style_form/explode_true/array_string:
+ get:
+ description: Test query parameter(s)
+ operationId: test/query/style_form/explode_true/array_string
+ parameters:
+ - explode: true
+ in: query
+ name: query_object
+ required: false
+ schema:
+ $ref: '#/components/schemas/test_query_style_form_explode_true_array_string_query_object_parameter'
+ style: form
+ responses:
+ "200":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Successful operation
+ summary: Test query parameter(s)
+ tags:
+ - query
+ /query/style_form/explode_true/object:
+ get:
+ description: Test query parameter(s)
+ operationId: test/query/style_form/explode_true/object
+ parameters:
+ - explode: true
+ in: query
+ name: query_object
+ required: false
+ schema:
+ $ref: '#/components/schemas/Pet'
+ style: form
+ responses:
+ "200":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Successful operation
+ summary: Test query parameter(s)
+ tags:
+ - query
+ /query/style_form/explode_true/object/allOf:
+ get:
+ description: Test query parameter(s)
+ operationId: test/query/style_form/explode_true/object/allOf
+ parameters:
+ - explode: true
+ in: query
+ name: query_object
+ required: false
+ schema:
+ $ref: '#/components/schemas/DataQuery'
+ style: form
+ responses:
+ "200":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Successful operation
+ summary: Test query parameter(s)
+ tags:
+ - query
+ /query/style_deepObject/explode_true/object:
+ get:
+ description: Test query parameter(s)
+ operationId: test/query/style_deepObject/explode_true/object
+ parameters:
+ - explode: true
+ in: query
+ name: query_object
+ required: false
+ schema:
+ $ref: '#/components/schemas/Pet'
+ style: deepObject
+ responses:
+ "200":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Successful operation
+ summary: Test query parameter(s)
+ tags:
+ - query
+ /query/style_deepObject/explode_true/object/allOf:
+ get:
+ description: Test query parameter(s)
+ operationId: test/query/style_deepObject/explode_true/object/allOf
+ parameters:
+ - explode: true
+ in: query
+ name: query_object
+ required: false
+ schema:
+ $ref: '#/components/schemas/test_query_style_deepObject_explode_true_object_allOf_query_object_parameter'
+ style: deepObject
+ responses:
+ "200":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Successful operation
+ summary: Test query parameter(s)
+ tags:
+ - query
+ /body/application/octetstream/binary:
+ post:
+ description: Test body parameter(s)
+ operationId: test/body/application/octetstream/binary
+ requestBody:
+ content:
+ application/octet-stream:
+ schema:
+ format: binary
+ type: string
+ responses:
+ "200":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Successful operation
+ summary: Test body parameter(s)
+ tags:
+ - body
+ /echo/body/Pet:
+ post:
+ description: Test body parameter(s)
+ operationId: test/echo/body/Pet
+ requestBody:
+ $ref: '#/components/requestBodies/Pet'
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ description: Successful operation
+ summary: Test body parameter(s)
+ tags:
+ - body
+ /echo/body/Pet/response_string:
+ post:
+ description: Test empty response body
+ operationId: test/echo/body/Pet/response_string
+ requestBody:
+ $ref: '#/components/requestBodies/Pet'
+ responses:
+ "200":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Successful operation
+ summary: Test empty response body
+ tags:
+ - body
+ /echo/body/Tag/response_string:
+ post:
+ description: Test empty json (request body)
+ operationId: test/echo/body/Tag/response_string
+ requestBody:
+ $ref: '#/components/requestBodies/Tag'
+ responses:
+ "200":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Successful operation
+ summary: Test empty json (request body)
+ tags:
+ - body
+ /echo/body/FreeFormObject/response_string:
+ post:
+ description: Test free form object
+ operationId: test/echo/body/FreeFormObject/response_string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ type: object
+ description: Free form object
+ responses:
+ "200":
+ content:
+ text/plain:
+ schema:
+ type: string
+ description: Successful operation
+ summary: Test free form object
+ tags:
+ - body
+ /binary/gif:
+ post:
+ description: Test binary (gif) response body
+ operationId: test/binary/gif
+ responses:
+ "200":
+ content:
+ image/gif:
+ schema:
+ format: binary
+ type: string
+ description: Successful operation
+ summary: Test binary (gif) response body
+ tags:
+ - body
+components:
+ requestBodies:
+ Pet:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ description: Pet object that needs to be added to the store
+ Tag:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Tag'
+ description: Tag object
+ schemas:
+ Category:
+ example:
+ name: Dogs
+ id: 1
+ properties:
+ id:
+ example: 1
+ format: int64
+ type: integer
+ name:
+ example: Dogs
+ type: string
+ type: object
+ xml:
+ name: category
+ Tag:
+ example:
+ name: name
+ id: 0
+ properties:
+ id:
+ format: int64
+ type: integer
+ name:
+ type: string
+ type: object
+ xml:
+ name: tag
+ Pet:
+ example:
+ photoUrls:
+ - photoUrls
+ - photoUrls
+ name: doggie
+ id: 10
+ category:
+ name: Dogs
+ id: 1
+ tags:
+ - name: name
+ id: 0
+ - name: name
+ id: 0
+ status: available
+ properties:
+ id:
+ example: 10
+ format: int64
+ type: integer
+ name:
+ example: doggie
+ type: string
+ category:
+ $ref: '#/components/schemas/Category'
+ photoUrls:
+ items:
+ type: string
+ xml:
+ name: photoUrl
+ type: array
+ xml:
+ wrapped: true
+ tags:
+ items:
+ $ref: '#/components/schemas/Tag'
+ type: array
+ xml:
+ wrapped: true
+ status:
+ description: pet status in the store
+ enum:
+ - available
+ - pending
+ - sold
+ type: string
+ required:
+ - name
+ - photoUrls
+ type: object
+ xml:
+ name: pet
+ StringEnumRef:
+ enum:
+ - success
+ - failure
+ - unclassified
+ type: string
+ DefaultValue:
+ description: to test the default value of properties
+ properties:
+ array_string_enum_ref_default:
+ default:
+ - success
+ - failure
+ items:
+ $ref: '#/components/schemas/StringEnumRef'
+ type: array
+ array_string_enum_default:
+ default:
+ - success
+ - failure
+ items:
+ enum:
+ - success
+ - failure
+ - unclassified
+ type: string
+ type: array
+ array_string_default:
+ default:
+ - failure
+ - skipped
+ items:
+ type: string
+ type: array
+ array_integer_default:
+ default:
+ - 1
+ - 3
+ items:
+ type: integer
+ type: array
+ array_string:
+ items:
+ type: string
+ type: array
+ array_string_nullable:
+ items:
+ type: string
+ nullable: true
+ type: array
+ array_string_extension_nullable:
+ items:
+ type: string
+ type: array
+ x-nullable: true
+ string_nullable:
+ nullable: true
+ type: string
+ type: object
+ Bird:
+ properties:
+ size:
+ type: string
+ color:
+ type: string
+ type: object
+ Query:
+ properties:
+ id:
+ description: Query
+ format: int64
+ type: integer
+ outcomes:
+ default:
+ - SUCCESS
+ - FAILURE
+ items:
+ enum:
+ - SUCCESS
+ - FAILURE
+ - SKIPPED
+ type: string
+ type: array
+ type: object
+ x-parent: true
+ DataQuery:
+ allOf:
+ - properties:
+ suffix:
+ description: test suffix
+ type: string
+ text:
+ description: Some text containing white spaces
+ example: Some text
+ type: string
+ date:
+ description: A date
+ format: date-time
+ type: string
+ type: object
+ - $ref: '#/components/schemas/Query'
+ NumberPropertiesOnly:
+ properties:
+ number:
+ type: number
+ float:
+ format: float
+ type: number
+ double:
+ format: double
+ maximum: 50.2
+ minimum: 0.8
+ type: number
+ type: object
+ test_form_integer_boolean_string_request:
+ properties:
+ integer_form:
+ type: integer
+ boolean_form:
+ type: boolean
+ string_form:
+ type: string
+ type: object
+ test_query_style_form_explode_true_array_string_query_object_parameter:
+ properties:
+ values:
+ items:
+ type: string
+ type: array
+ type: object
+ test_query_style_deepObject_explode_true_object_allOf_query_object_parameter:
+ allOf:
+ - $ref: '#/components/schemas/Bird'
+ - $ref: '#/components/schemas/Category'
+
diff --git a/samples/client/echo_api/csharp-restsharp/appveyor.yml b/samples/client/echo_api/csharp-restsharp/appveyor.yml
new file mode 100644
index 00000000000..f76f63cee50
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/appveyor.yml
@@ -0,0 +1,9 @@
+# auto-generated by OpenAPI Generator (https://github.com/OpenAPITools/openapi-generator)
+#
+image: Visual Studio 2019
+clone_depth: 1
+build_script:
+- dotnet build -c Release
+- dotnet test -c Release
+after_build:
+- dotnet pack .\src\Org.OpenAPITools\Org.OpenAPITools.csproj -o ../../output -c Release --no-build
diff --git a/samples/client/echo_api/csharp-restsharp/docs/Bird.md b/samples/client/echo_api/csharp-restsharp/docs/Bird.md
new file mode 100644
index 00000000000..ad2a13da189
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/Bird.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.Bird
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Size** | **string** | | [optional]
+**Color** | **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/echo_api/csharp-restsharp/docs/BodyApi.md b/samples/client/echo_api/csharp-restsharp/docs/BodyApi.md
new file mode 100644
index 00000000000..c698a02564e
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/BodyApi.md
@@ -0,0 +1,554 @@
+# Org.OpenAPITools.Api.BodyApi
+
+All URIs are relative to *http://localhost:3000*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**TestBinaryGif**](BodyApi.md#testbinarygif) | **POST** /binary/gif | Test binary (gif) response body |
+| [**TestBodyApplicationOctetstreamBinary**](BodyApi.md#testbodyapplicationoctetstreambinary) | **POST** /body/application/octetstream/binary | Test body parameter(s) |
+| [**TestEchoBodyFreeFormObjectResponseString**](BodyApi.md#testechobodyfreeformobjectresponsestring) | **POST** /echo/body/FreeFormObject/response_string | Test free form object |
+| [**TestEchoBodyPet**](BodyApi.md#testechobodypet) | **POST** /echo/body/Pet | Test body parameter(s) |
+| [**TestEchoBodyPetResponseString**](BodyApi.md#testechobodypetresponsestring) | **POST** /echo/body/Pet/response_string | Test empty response body |
+| [**TestEchoBodyTagResponseString**](BodyApi.md#testechobodytagresponsestring) | **POST** /echo/body/Tag/response_string | Test empty json (request body) |
+
+
+# **TestBinaryGif**
+> System.IO.Stream TestBinaryGif ()
+
+Test binary (gif) response body
+
+Test binary (gif) response 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 TestBinaryGifExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new BodyApi(config);
+
+ try
+ {
+ // Test binary (gif) response body
+ System.IO.Stream result = apiInstance.TestBinaryGif();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling BodyApi.TestBinaryGif: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestBinaryGifWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test binary (gif) response body
+ ApiResponse response = apiInstance.TestBinaryGifWithHttpInfo();
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling BodyApi.TestBinaryGifWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+**System.IO.Stream**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: image/gif
+
+
+### 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)
+
+
+# **TestBodyApplicationOctetstreamBinary**
+> string TestBodyApplicationOctetstreamBinary (System.IO.Stream? body = null)
+
+Test body parameter(s)
+
+Test body parameter(s)
+
+### 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 TestBodyApplicationOctetstreamBinaryExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new BodyApi(config);
+ var body = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream? | (optional)
+
+ try
+ {
+ // Test body parameter(s)
+ string result = apiInstance.TestBodyApplicationOctetstreamBinary(body);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling BodyApi.TestBodyApplicationOctetstreamBinary: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestBodyApplicationOctetstreamBinaryWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test body parameter(s)
+ ApiResponse response = apiInstance.TestBodyApplicationOctetstreamBinaryWithHttpInfo(body);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling BodyApi.TestBodyApplicationOctetstreamBinaryWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **body** | **System.IO.Stream?****System.IO.Stream?** | | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/octet-stream
+ - **Accept**: text/plain
+
+
+### 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)
+
+
+# **TestEchoBodyFreeFormObjectResponseString**
+> string TestEchoBodyFreeFormObjectResponseString (Object? body = null)
+
+Test free form object
+
+Test free form object
+
+### 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 TestEchoBodyFreeFormObjectResponseStringExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new BodyApi(config);
+ var body = null; // Object? | Free form object (optional)
+
+ try
+ {
+ // Test free form object
+ string result = apiInstance.TestEchoBodyFreeFormObjectResponseString(body);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling BodyApi.TestEchoBodyFreeFormObjectResponseString: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestEchoBodyFreeFormObjectResponseStringWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test free form object
+ ApiResponse response = apiInstance.TestEchoBodyFreeFormObjectResponseStringWithHttpInfo(body);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling BodyApi.TestEchoBodyFreeFormObjectResponseStringWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **body** | **Object?** | Free form object | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: text/plain
+
+
+### 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)
+
+
+# **TestEchoBodyPet**
+> Pet TestEchoBodyPet (Pet? pet = null)
+
+Test body parameter(s)
+
+Test body parameter(s)
+
+### 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 TestEchoBodyPetExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new BodyApi(config);
+ var pet = new Pet?(); // Pet? | Pet object that needs to be added to the store (optional)
+
+ try
+ {
+ // Test body parameter(s)
+ Pet result = apiInstance.TestEchoBodyPet(pet);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling BodyApi.TestEchoBodyPet: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestEchoBodyPetWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test body parameter(s)
+ ApiResponse response = apiInstance.TestEchoBodyPetWithHttpInfo(pet);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling BodyApi.TestEchoBodyPetWithHttpInfo: " + 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 | [optional] |
+
+### Return type
+
+[**Pet**](Pet.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)
+
+
+# **TestEchoBodyPetResponseString**
+> string TestEchoBodyPetResponseString (Pet? pet = null)
+
+Test empty response body
+
+Test empty response 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 TestEchoBodyPetResponseStringExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new BodyApi(config);
+ var pet = new Pet?(); // Pet? | Pet object that needs to be added to the store (optional)
+
+ try
+ {
+ // Test empty response body
+ string result = apiInstance.TestEchoBodyPetResponseString(pet);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling BodyApi.TestEchoBodyPetResponseString: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestEchoBodyPetResponseStringWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test empty response body
+ ApiResponse response = apiInstance.TestEchoBodyPetResponseStringWithHttpInfo(pet);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling BodyApi.TestEchoBodyPetResponseStringWithHttpInfo: " + 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 | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: text/plain
+
+
+### 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)
+
+
+# **TestEchoBodyTagResponseString**
+> string TestEchoBodyTagResponseString (Tag? tag = null)
+
+Test empty json (request body)
+
+Test empty json (request 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 TestEchoBodyTagResponseStringExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new BodyApi(config);
+ var tag = new Tag?(); // Tag? | Tag object (optional)
+
+ try
+ {
+ // Test empty json (request body)
+ string result = apiInstance.TestEchoBodyTagResponseString(tag);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling BodyApi.TestEchoBodyTagResponseString: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestEchoBodyTagResponseStringWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test empty json (request body)
+ ApiResponse response = apiInstance.TestEchoBodyTagResponseStringWithHttpInfo(tag);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling BodyApi.TestEchoBodyTagResponseStringWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **tag** | [**Tag?**](Tag?.md) | Tag object | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: text/plain
+
+
+### 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/echo_api/csharp-restsharp/docs/Category.md b/samples/client/echo_api/csharp-restsharp/docs/Category.md
new file mode 100644
index 00000000000..fd3c5e2b257
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/Category.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.Category
+
+## 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/echo_api/csharp-restsharp/docs/DataQuery.md b/samples/client/echo_api/csharp-restsharp/docs/DataQuery.md
new file mode 100644
index 00000000000..0f1f76302ef
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/DataQuery.md
@@ -0,0 +1,14 @@
+# Org.OpenAPITools.Model.DataQuery
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **long** | Query | [optional]
+**Outcomes** | **List<Query.OutcomesEnum>** | | [optional]
+**Suffix** | **string** | test suffix | [optional]
+**Text** | **string** | Some text containing white spaces | [optional]
+**Date** | **DateTime** | A date | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/echo_api/csharp-restsharp/docs/DefaultValue.md b/samples/client/echo_api/csharp-restsharp/docs/DefaultValue.md
new file mode 100644
index 00000000000..981eda3340e
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/DefaultValue.md
@@ -0,0 +1,18 @@
+# Org.OpenAPITools.Model.DefaultValue
+to test the default value of properties
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ArrayStringEnumRefDefault** | [**List<StringEnumRef>**](StringEnumRef.md) | | [optional]
+**ArrayStringEnumDefault** | **List<DefaultValue.ArrayStringEnumDefaultEnum>** | | [optional]
+**ArrayStringDefault** | **List<string>** | | [optional]
+**ArrayIntegerDefault** | **List<int>** | | [optional]
+**ArrayString** | **List<string>** | | [optional]
+**ArrayStringNullable** | **List<string>** | | [optional]
+**ArrayStringExtensionNullable** | **List<string>** | | [optional]
+**StringNullable** | **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/echo_api/csharp-restsharp/docs/FormApi.md b/samples/client/echo_api/csharp-restsharp/docs/FormApi.md
new file mode 100644
index 00000000000..3783717ed31
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/FormApi.md
@@ -0,0 +1,103 @@
+# Org.OpenAPITools.Api.FormApi
+
+All URIs are relative to *http://localhost:3000*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**TestFormIntegerBooleanString**](FormApi.md#testformintegerbooleanstring) | **POST** /form/integer/boolean/string | Test form parameter(s) |
+
+
+# **TestFormIntegerBooleanString**
+> string TestFormIntegerBooleanString (int? integerForm = null, bool? booleanForm = null, string? stringForm = null)
+
+Test form parameter(s)
+
+Test form parameter(s)
+
+### 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 TestFormIntegerBooleanStringExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new FormApi(config);
+ var integerForm = 56; // int? | (optional)
+ var booleanForm = true; // bool? | (optional)
+ var stringForm = "stringForm_example"; // string? | (optional)
+
+ try
+ {
+ // Test form parameter(s)
+ string result = apiInstance.TestFormIntegerBooleanString(integerForm, booleanForm, stringForm);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FormApi.TestFormIntegerBooleanString: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestFormIntegerBooleanStringWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test form parameter(s)
+ ApiResponse response = apiInstance.TestFormIntegerBooleanStringWithHttpInfo(integerForm, booleanForm, stringForm);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FormApi.TestFormIntegerBooleanStringWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **integerForm** | **int?** | | [optional] |
+| **booleanForm** | **bool?** | | [optional] |
+| **stringForm** | **string?** | | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: text/plain
+
+
+### 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/echo_api/csharp-restsharp/docs/HeaderApi.md b/samples/client/echo_api/csharp-restsharp/docs/HeaderApi.md
new file mode 100644
index 00000000000..6310d569f01
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/HeaderApi.md
@@ -0,0 +1,103 @@
+# Org.OpenAPITools.Api.HeaderApi
+
+All URIs are relative to *http://localhost:3000*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**TestHeaderIntegerBooleanString**](HeaderApi.md#testheaderintegerbooleanstring) | **GET** /header/integer/boolean/string | Test header parameter(s) |
+
+
+# **TestHeaderIntegerBooleanString**
+> string TestHeaderIntegerBooleanString (int? integerHeader = null, bool? booleanHeader = null, string? stringHeader = null)
+
+Test header parameter(s)
+
+Test header parameter(s)
+
+### 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 TestHeaderIntegerBooleanStringExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new HeaderApi(config);
+ var integerHeader = 56; // int? | (optional)
+ var booleanHeader = true; // bool? | (optional)
+ var stringHeader = "stringHeader_example"; // string? | (optional)
+
+ try
+ {
+ // Test header parameter(s)
+ string result = apiInstance.TestHeaderIntegerBooleanString(integerHeader, booleanHeader, stringHeader);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling HeaderApi.TestHeaderIntegerBooleanString: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestHeaderIntegerBooleanStringWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test header parameter(s)
+ ApiResponse response = apiInstance.TestHeaderIntegerBooleanStringWithHttpInfo(integerHeader, booleanHeader, stringHeader);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling HeaderApi.TestHeaderIntegerBooleanStringWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **integerHeader** | **int?** | | [optional] |
+| **booleanHeader** | **bool?** | | [optional] |
+| **stringHeader** | **string?** | | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain
+
+
+### 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/echo_api/csharp-restsharp/docs/NumberPropertiesOnly.md b/samples/client/echo_api/csharp-restsharp/docs/NumberPropertiesOnly.md
new file mode 100644
index 00000000000..3235b4dd22b
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/NumberPropertiesOnly.md
@@ -0,0 +1,12 @@
+# Org.OpenAPITools.Model.NumberPropertiesOnly
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Number** | **decimal** | | [optional]
+**VarFloat** | **float** | | [optional]
+**VarDouble** | **double** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/echo_api/csharp-restsharp/docs/PathApi.md b/samples/client/echo_api/csharp-restsharp/docs/PathApi.md
new file mode 100644
index 00000000000..2eb64be53ad
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/PathApi.md
@@ -0,0 +1,101 @@
+# Org.OpenAPITools.Api.PathApi
+
+All URIs are relative to *http://localhost:3000*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**TestsPathStringPathStringIntegerPathInteger**](PathApi.md#testspathstringpathstringintegerpathinteger) | **GET** /path/string/{path_string}/integer/{path_integer} | Test path parameter(s) |
+
+
+# **TestsPathStringPathStringIntegerPathInteger**
+> string TestsPathStringPathStringIntegerPathInteger (string pathString, int pathInteger)
+
+Test path parameter(s)
+
+Test path parameter(s)
+
+### 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 TestsPathStringPathStringIntegerPathIntegerExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new PathApi(config);
+ var pathString = "pathString_example"; // string |
+ var pathInteger = 56; // int |
+
+ try
+ {
+ // Test path parameter(s)
+ string result = apiInstance.TestsPathStringPathStringIntegerPathInteger(pathString, pathInteger);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PathApi.TestsPathStringPathStringIntegerPathInteger: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestsPathStringPathStringIntegerPathIntegerWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test path parameter(s)
+ ApiResponse response = apiInstance.TestsPathStringPathStringIntegerPathIntegerWithHttpInfo(pathString, pathInteger);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling PathApi.TestsPathStringPathStringIntegerPathIntegerWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **pathString** | **string** | | |
+| **pathInteger** | **int** | | |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain
+
+
+### 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/echo_api/csharp-restsharp/docs/Pet.md b/samples/client/echo_api/csharp-restsharp/docs/Pet.md
new file mode 100644
index 00000000000..ff2f348d392
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/Pet.md
@@ -0,0 +1,15 @@
+# Org.OpenAPITools.Model.Pet
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **long** | | [optional]
+**Name** | **string** | |
+**Category** | [**Category**](Category.md) | | [optional]
+**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/echo_api/csharp-restsharp/docs/Query.md b/samples/client/echo_api/csharp-restsharp/docs/Query.md
new file mode 100644
index 00000000000..c79503ef2a6
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/Query.md
@@ -0,0 +1,11 @@
+# Org.OpenAPITools.Model.Query
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **long** | Query | [optional]
+**Outcomes** | **List<Query.OutcomesEnum>** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/client/echo_api/csharp-restsharp/docs/QueryApi.md b/samples/client/echo_api/csharp-restsharp/docs/QueryApi.md
new file mode 100644
index 00000000000..4447e6d9e9b
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/QueryApi.md
@@ -0,0 +1,751 @@
+# Org.OpenAPITools.Api.QueryApi
+
+All URIs are relative to *http://localhost:3000*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**TestEnumRefString**](QueryApi.md#testenumrefstring) | **GET** /query/enum_ref_string | Test query parameter(s) |
+| [**TestQueryDatetimeDateString**](QueryApi.md#testquerydatetimedatestring) | **GET** /query/datetime/date/string | Test query parameter(s) |
+| [**TestQueryIntegerBooleanString**](QueryApi.md#testqueryintegerbooleanstring) | **GET** /query/integer/boolean/string | Test query parameter(s) |
+| [**TestQueryStyleDeepObjectExplodeTrueObject**](QueryApi.md#testquerystyledeepobjectexplodetrueobject) | **GET** /query/style_deepObject/explode_true/object | Test query parameter(s) |
+| [**TestQueryStyleDeepObjectExplodeTrueObjectAllOf**](QueryApi.md#testquerystyledeepobjectexplodetrueobjectallof) | **GET** /query/style_deepObject/explode_true/object/allOf | Test query parameter(s) |
+| [**TestQueryStyleFormExplodeTrueArrayString**](QueryApi.md#testquerystyleformexplodetruearraystring) | **GET** /query/style_form/explode_true/array_string | Test query parameter(s) |
+| [**TestQueryStyleFormExplodeTrueObject**](QueryApi.md#testquerystyleformexplodetrueobject) | **GET** /query/style_form/explode_true/object | Test query parameter(s) |
+| [**TestQueryStyleFormExplodeTrueObjectAllOf**](QueryApi.md#testquerystyleformexplodetrueobjectallof) | **GET** /query/style_form/explode_true/object/allOf | Test query parameter(s) |
+
+
+# **TestEnumRefString**
+> string TestEnumRefString (StringEnumRef? enumRefStringQuery = null)
+
+Test query parameter(s)
+
+Test query parameter(s)
+
+### 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 TestEnumRefStringExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new QueryApi(config);
+ var enumRefStringQuery = new StringEnumRef?(); // StringEnumRef? | (optional)
+
+ try
+ {
+ // Test query parameter(s)
+ string result = apiInstance.TestEnumRefString(enumRefStringQuery);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling QueryApi.TestEnumRefString: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestEnumRefStringWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test query parameter(s)
+ ApiResponse response = apiInstance.TestEnumRefStringWithHttpInfo(enumRefStringQuery);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling QueryApi.TestEnumRefStringWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **enumRefStringQuery** | [**StringEnumRef?**](StringEnumRef?.md) | | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain
+
+
+### 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)
+
+
+# **TestQueryDatetimeDateString**
+> string TestQueryDatetimeDateString (DateTime? datetimeQuery = null, DateTime? dateQuery = null, string? stringQuery = null)
+
+Test query parameter(s)
+
+Test query parameter(s)
+
+### 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 TestQueryDatetimeDateStringExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new QueryApi(config);
+ var datetimeQuery = DateTime.Parse("2013-10-20T19:20:30+01:00"); // DateTime? | (optional)
+ var dateQuery = DateTime.Parse("2013-10-20"); // DateTime? | (optional)
+ var stringQuery = "stringQuery_example"; // string? | (optional)
+
+ try
+ {
+ // Test query parameter(s)
+ string result = apiInstance.TestQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling QueryApi.TestQueryDatetimeDateString: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestQueryDatetimeDateStringWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test query parameter(s)
+ ApiResponse response = apiInstance.TestQueryDatetimeDateStringWithHttpInfo(datetimeQuery, dateQuery, stringQuery);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling QueryApi.TestQueryDatetimeDateStringWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **datetimeQuery** | **DateTime?** | | [optional] |
+| **dateQuery** | **DateTime?** | | [optional] |
+| **stringQuery** | **string?** | | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain
+
+
+### 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)
+
+
+# **TestQueryIntegerBooleanString**
+> string TestQueryIntegerBooleanString (int? integerQuery = null, bool? booleanQuery = null, string? stringQuery = null)
+
+Test query parameter(s)
+
+Test query parameter(s)
+
+### 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 TestQueryIntegerBooleanStringExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new QueryApi(config);
+ var integerQuery = 56; // int? | (optional)
+ var booleanQuery = true; // bool? | (optional)
+ var stringQuery = "stringQuery_example"; // string? | (optional)
+
+ try
+ {
+ // Test query parameter(s)
+ string result = apiInstance.TestQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling QueryApi.TestQueryIntegerBooleanString: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestQueryIntegerBooleanStringWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test query parameter(s)
+ ApiResponse response = apiInstance.TestQueryIntegerBooleanStringWithHttpInfo(integerQuery, booleanQuery, stringQuery);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling QueryApi.TestQueryIntegerBooleanStringWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **integerQuery** | **int?** | | [optional] |
+| **booleanQuery** | **bool?** | | [optional] |
+| **stringQuery** | **string?** | | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain
+
+
+### 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)
+
+
+# **TestQueryStyleDeepObjectExplodeTrueObject**
+> string TestQueryStyleDeepObjectExplodeTrueObject (Pet? queryObject = null)
+
+Test query parameter(s)
+
+Test query parameter(s)
+
+### 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 TestQueryStyleDeepObjectExplodeTrueObjectExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new QueryApi(config);
+ var queryObject = new Pet?(); // Pet? | (optional)
+
+ try
+ {
+ // Test query parameter(s)
+ string result = apiInstance.TestQueryStyleDeepObjectExplodeTrueObject(queryObject);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling QueryApi.TestQueryStyleDeepObjectExplodeTrueObject: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test query parameter(s)
+ ApiResponse response = apiInstance.TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(queryObject);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling QueryApi.TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **queryObject** | [**Pet?**](Pet?.md) | | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain
+
+
+### 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)
+
+
+# **TestQueryStyleDeepObjectExplodeTrueObjectAllOf**
+> string TestQueryStyleDeepObjectExplodeTrueObjectAllOf (TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = null)
+
+Test query parameter(s)
+
+Test query parameter(s)
+
+### 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 TestQueryStyleDeepObjectExplodeTrueObjectAllOfExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new QueryApi(config);
+ var queryObject = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?(); // TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? | (optional)
+
+ try
+ {
+ // Test query parameter(s)
+ string result = apiInstance.TestQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling QueryApi.TestQueryStyleDeepObjectExplodeTrueObjectAllOf: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test query parameter(s)
+ ApiResponse response = apiInstance.TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(queryObject);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling QueryApi.TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **queryObject** | [**TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?**](TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?.md) | | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain
+
+
+### 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)
+
+
+# **TestQueryStyleFormExplodeTrueArrayString**
+> string TestQueryStyleFormExplodeTrueArrayString (TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = null)
+
+Test query parameter(s)
+
+Test query parameter(s)
+
+### 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 TestQueryStyleFormExplodeTrueArrayStringExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new QueryApi(config);
+ var queryObject = new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?(); // TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? | (optional)
+
+ try
+ {
+ // Test query parameter(s)
+ string result = apiInstance.TestQueryStyleFormExplodeTrueArrayString(queryObject);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling QueryApi.TestQueryStyleFormExplodeTrueArrayString: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test query parameter(s)
+ ApiResponse response = apiInstance.TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling QueryApi.TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **queryObject** | [**TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?**](TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?.md) | | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain
+
+
+### 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)
+
+
+# **TestQueryStyleFormExplodeTrueObject**
+> string TestQueryStyleFormExplodeTrueObject (Pet? queryObject = null)
+
+Test query parameter(s)
+
+Test query parameter(s)
+
+### 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 TestQueryStyleFormExplodeTrueObjectExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new QueryApi(config);
+ var queryObject = new Pet?(); // Pet? | (optional)
+
+ try
+ {
+ // Test query parameter(s)
+ string result = apiInstance.TestQueryStyleFormExplodeTrueObject(queryObject);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling QueryApi.TestQueryStyleFormExplodeTrueObject: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestQueryStyleFormExplodeTrueObjectWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test query parameter(s)
+ ApiResponse response = apiInstance.TestQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling QueryApi.TestQueryStyleFormExplodeTrueObjectWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **queryObject** | [**Pet?**](Pet?.md) | | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain
+
+
+### 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)
+
+
+# **TestQueryStyleFormExplodeTrueObjectAllOf**
+> string TestQueryStyleFormExplodeTrueObjectAllOf (DataQuery? queryObject = null)
+
+Test query parameter(s)
+
+Test query parameter(s)
+
+### 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 TestQueryStyleFormExplodeTrueObjectAllOfExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://localhost:3000";
+ var apiInstance = new QueryApi(config);
+ var queryObject = new DataQuery?(); // DataQuery? | (optional)
+
+ try
+ {
+ // Test query parameter(s)
+ string result = apiInstance.TestQueryStyleFormExplodeTrueObjectAllOf(queryObject);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling QueryApi.TestQueryStyleFormExplodeTrueObjectAllOf: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Test query parameter(s)
+ ApiResponse response = apiInstance.TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(queryObject);
+ Debug.Write("Status Code: " + response.StatusCode);
+ Debug.Write("Response Headers: " + response.Headers);
+ Debug.Write("Response Body: " + response.Data);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling QueryApi.TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **queryObject** | [**DataQuery?**](DataQuery?.md) | | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/plain
+
+
+### 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/echo_api/csharp-restsharp/docs/StringEnumRef.md b/samples/client/echo_api/csharp-restsharp/docs/StringEnumRef.md
new file mode 100644
index 00000000000..02068845647
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/StringEnumRef.md
@@ -0,0 +1,9 @@
+# Org.OpenAPITools.Model.StringEnumRef
+
+## 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/echo_api/csharp-restsharp/docs/Tag.md b/samples/client/echo_api/csharp-restsharp/docs/Tag.md
new file mode 100644
index 00000000000..fdd22eb31fd
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/Tag.md
@@ -0,0 +1,11 @@
+# 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/echo_api/csharp-restsharp/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md b/samples/client/echo_api/csharp-restsharp/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md
new file mode 100644
index 00000000000..dec380556c8
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter.md
@@ -0,0 +1,13 @@
+# Org.OpenAPITools.Model.TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Size** | **string** | | [optional]
+**Color** | **string** | | [optional]
+**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/echo_api/csharp-restsharp/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md b/samples/client/echo_api/csharp-restsharp/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md
new file mode 100644
index 00000000000..2dbead26eb1
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/docs/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Values** | **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/echo_api/csharp-restsharp/git_push.sh b/samples/client/echo_api/csharp-restsharp/git_push.sh
new file mode 100644
index 00000000000..f53a75d4fab
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/git_push.sh
@@ -0,0 +1,57 @@
+#!/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/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/BodyApiTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/BodyApiTests.cs
new file mode 100644
index 00000000000..8ea3a5dd65f
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/BodyApiTests.cs
@@ -0,0 +1,129 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * 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 Xunit;
+
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Api;
+// uncomment below to import models
+//using Org.OpenAPITools.Model;
+
+namespace Org.OpenAPITools.Test.Api
+{
+ ///
+ /// Class for testing BodyApi
+ ///
+ ///
+ /// 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 BodyApiTests : IDisposable
+ {
+ private BodyApi instance;
+
+ public BodyApiTests()
+ {
+ instance = new BodyApi();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of BodyApi
+ ///
+ [Fact]
+ public void InstanceTest()
+ {
+ // TODO uncomment below to test 'IsType' BodyApi
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test TestBinaryGif
+ ///
+ [Fact]
+ public void TestBinaryGifTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //var response = instance.TestBinaryGif();
+ //Assert.IsType(response);
+ }
+
+ ///
+ /// Test TestBodyApplicationOctetstreamBinary
+ ///
+ [Fact]
+ public void TestBodyApplicationOctetstreamBinaryTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //System.IO.Stream? body = null;
+ //var response = instance.TestBodyApplicationOctetstreamBinary(body);
+ //Assert.IsType(response);
+ }
+
+ ///
+ /// Test TestEchoBodyFreeFormObjectResponseString
+ ///
+ [Fact]
+ public void TestEchoBodyFreeFormObjectResponseStringTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //Object? body = null;
+ //var response = instance.TestEchoBodyFreeFormObjectResponseString(body);
+ //Assert.IsType(response);
+ }
+
+ ///
+ /// Test TestEchoBodyPet
+ ///
+ [Fact]
+ public void TestEchoBodyPetTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //Pet? pet = null;
+ //var response = instance.TestEchoBodyPet(pet);
+ //Assert.IsType(response);
+ }
+
+ ///
+ /// Test TestEchoBodyPetResponseString
+ ///
+ [Fact]
+ public void TestEchoBodyPetResponseStringTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //Pet? pet = null;
+ //var response = instance.TestEchoBodyPetResponseString(pet);
+ //Assert.IsType(response);
+ }
+
+ ///
+ /// Test TestEchoBodyTagResponseString
+ ///
+ [Fact]
+ public void TestEchoBodyTagResponseStringTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //Tag? tag = null;
+ //var response = instance.TestEchoBodyTagResponseString(tag);
+ //Assert.IsType(response);
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/FormApiTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/FormApiTests.cs
new file mode 100644
index 00000000000..d5bc490bdde
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/FormApiTests.cs
@@ -0,0 +1,70 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * 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 Xunit;
+
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Api;
+
+namespace Org.OpenAPITools.Test.Api
+{
+ ///
+ /// Class for testing FormApi
+ ///
+ ///
+ /// 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 FormApiTests : IDisposable
+ {
+ private FormApi instance;
+
+ public FormApiTests()
+ {
+ instance = new FormApi();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of FormApi
+ ///
+ [Fact]
+ public void InstanceTest()
+ {
+ // TODO uncomment below to test 'IsType' FormApi
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test TestFormIntegerBooleanString
+ ///
+ [Fact]
+ public void TestFormIntegerBooleanStringTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //int? integerForm = null;
+ //bool? booleanForm = null;
+ //string? stringForm = null;
+ //var response = instance.TestFormIntegerBooleanString(integerForm, booleanForm, stringForm);
+ //Assert.IsType(response);
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/HeaderApiTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/HeaderApiTests.cs
new file mode 100644
index 00000000000..a2e6d2032ed
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/HeaderApiTests.cs
@@ -0,0 +1,70 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * 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 Xunit;
+
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Api;
+
+namespace Org.OpenAPITools.Test.Api
+{
+ ///
+ /// Class for testing HeaderApi
+ ///
+ ///
+ /// 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 HeaderApiTests : IDisposable
+ {
+ private HeaderApi instance;
+
+ public HeaderApiTests()
+ {
+ instance = new HeaderApi();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of HeaderApi
+ ///
+ [Fact]
+ public void InstanceTest()
+ {
+ // TODO uncomment below to test 'IsType' HeaderApi
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test TestHeaderIntegerBooleanString
+ ///
+ [Fact]
+ public void TestHeaderIntegerBooleanStringTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //int? integerHeader = null;
+ //bool? booleanHeader = null;
+ //string? stringHeader = null;
+ //var response = instance.TestHeaderIntegerBooleanString(integerHeader, booleanHeader, stringHeader);
+ //Assert.IsType(response);
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/PathApiTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/PathApiTests.cs
new file mode 100644
index 00000000000..f2879c217df
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/PathApiTests.cs
@@ -0,0 +1,69 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * 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 Xunit;
+
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Api;
+
+namespace Org.OpenAPITools.Test.Api
+{
+ ///
+ /// Class for testing PathApi
+ ///
+ ///
+ /// 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 PathApiTests : IDisposable
+ {
+ private PathApi instance;
+
+ public PathApiTests()
+ {
+ instance = new PathApi();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of PathApi
+ ///
+ [Fact]
+ public void InstanceTest()
+ {
+ // TODO uncomment below to test 'IsType' PathApi
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test TestsPathStringPathStringIntegerPathInteger
+ ///
+ [Fact]
+ public void TestsPathStringPathStringIntegerPathIntegerTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //string pathString = null;
+ //int pathInteger = null;
+ //var response = instance.TestsPathStringPathStringIntegerPathInteger(pathString, pathInteger);
+ //Assert.IsType(response);
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/QueryApiTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/QueryApiTests.cs
new file mode 100644
index 00000000000..d551bb07dbc
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Api/QueryApiTests.cs
@@ -0,0 +1,158 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * 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 Xunit;
+
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Api;
+// uncomment below to import models
+//using Org.OpenAPITools.Model;
+
+namespace Org.OpenAPITools.Test.Api
+{
+ ///
+ /// Class for testing QueryApi
+ ///
+ ///
+ /// 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 QueryApiTests : IDisposable
+ {
+ private QueryApi instance;
+
+ public QueryApiTests()
+ {
+ instance = new QueryApi();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of QueryApi
+ ///
+ [Fact]
+ public void InstanceTest()
+ {
+ // TODO uncomment below to test 'IsType' QueryApi
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test TestEnumRefString
+ ///
+ [Fact]
+ public void TestEnumRefStringTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //StringEnumRef? enumRefStringQuery = null;
+ //var response = instance.TestEnumRefString(enumRefStringQuery);
+ //Assert.IsType(response);
+ }
+
+ ///
+ /// Test TestQueryDatetimeDateString
+ ///
+ [Fact]
+ public void TestQueryDatetimeDateStringTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //DateTime? datetimeQuery = null;
+ //DateTime? dateQuery = null;
+ //string? stringQuery = null;
+ //var response = instance.TestQueryDatetimeDateString(datetimeQuery, dateQuery, stringQuery);
+ //Assert.IsType(response);
+ }
+
+ ///
+ /// Test TestQueryIntegerBooleanString
+ ///
+ [Fact]
+ public void TestQueryIntegerBooleanStringTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //int? integerQuery = null;
+ //bool? booleanQuery = null;
+ //string? stringQuery = null;
+ //var response = instance.TestQueryIntegerBooleanString(integerQuery, booleanQuery, stringQuery);
+ //Assert.IsType(response);
+ }
+
+ ///
+ /// Test TestQueryStyleDeepObjectExplodeTrueObject
+ ///
+ [Fact]
+ public void TestQueryStyleDeepObjectExplodeTrueObjectTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //Pet? queryObject = null;
+ //var response = instance.TestQueryStyleDeepObjectExplodeTrueObject(queryObject);
+ //Assert.IsType(response);
+ }
+
+ ///
+ /// Test TestQueryStyleDeepObjectExplodeTrueObjectAllOf
+ ///
+ [Fact]
+ public void TestQueryStyleDeepObjectExplodeTrueObjectAllOfTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = null;
+ //var response = instance.TestQueryStyleDeepObjectExplodeTrueObjectAllOf(queryObject);
+ //Assert.IsType(response);
+ }
+
+ ///
+ /// Test TestQueryStyleFormExplodeTrueArrayString
+ ///
+ [Fact]
+ public void TestQueryStyleFormExplodeTrueArrayStringTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = null;
+ //var response = instance.TestQueryStyleFormExplodeTrueArrayString(queryObject);
+ //Assert.IsType(response);
+ }
+
+ ///
+ /// Test TestQueryStyleFormExplodeTrueObject
+ ///
+ [Fact]
+ public void TestQueryStyleFormExplodeTrueObjectTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //Pet? queryObject = null;
+ //var response = instance.TestQueryStyleFormExplodeTrueObject(queryObject);
+ //Assert.IsType(response);
+ }
+
+ ///
+ /// Test TestQueryStyleFormExplodeTrueObjectAllOf
+ ///
+ [Fact]
+ public void TestQueryStyleFormExplodeTrueObjectAllOfTest()
+ {
+ // TODO uncomment below to test the method and replace null with proper value
+ //DataQuery? queryObject = null;
+ //var response = instance.TestQueryStyleFormExplodeTrueObjectAllOf(queryObject);
+ //Assert.IsType(response);
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/BirdTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/BirdTests.cs
new file mode 100644
index 00000000000..92828375d57
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/BirdTests.cs
@@ -0,0 +1,76 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// Class for testing Bird
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class BirdTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for Bird
+ //private Bird instance;
+
+ public BirdTests()
+ {
+ // TODO uncomment below to create an instance of Bird
+ //instance = new Bird();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of Bird
+ ///
+ [Fact]
+ public void BirdInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" Bird
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test the property 'Size'
+ ///
+ [Fact]
+ public void SizeTest()
+ {
+ // TODO unit test for the property 'Size'
+ }
+
+ ///
+ /// Test the property 'Color'
+ ///
+ [Fact]
+ public void ColorTest()
+ {
+ // TODO unit test for the property 'Color'
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/CategoryTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/CategoryTests.cs
new file mode 100644
index 00000000000..fe7ccbecc0b
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/CategoryTests.cs
@@ -0,0 +1,76 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// 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 : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for Category
+ //private Category instance;
+
+ public CategoryTests()
+ {
+ // TODO uncomment below to create an instance of Category
+ //instance = new Category();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of Category
+ ///
+ [Fact]
+ public void CategoryInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" Category
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test the property 'Id'
+ ///
+ [Fact]
+ public void IdTest()
+ {
+ // TODO unit test for the property 'Id'
+ }
+
+ ///
+ /// Test the property 'Name'
+ ///
+ [Fact]
+ public void NameTest()
+ {
+ // TODO unit test for the property 'Name'
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/DataQueryTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/DataQueryTests.cs
new file mode 100644
index 00000000000..64517bed105
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/DataQueryTests.cs
@@ -0,0 +1,85 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// Class for testing DataQuery
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class DataQueryTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for DataQuery
+ //private DataQuery instance;
+
+ public DataQueryTests()
+ {
+ // TODO uncomment below to create an instance of DataQuery
+ //instance = new DataQuery();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of DataQuery
+ ///
+ [Fact]
+ public void DataQueryInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" DataQuery
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test the property 'Suffix'
+ ///
+ [Fact]
+ public void SuffixTest()
+ {
+ // TODO unit test for the property 'Suffix'
+ }
+
+ ///
+ /// Test the property 'Text'
+ ///
+ [Fact]
+ public void TextTest()
+ {
+ // TODO unit test for the property 'Text'
+ }
+
+ ///
+ /// Test the property 'Date'
+ ///
+ [Fact]
+ public void DateTest()
+ {
+ // TODO unit test for the property 'Date'
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/DefaultValueTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/DefaultValueTests.cs
new file mode 100644
index 00000000000..0d8fac989f4
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/DefaultValueTests.cs
@@ -0,0 +1,130 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// Class for testing DefaultValue
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class DefaultValueTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for DefaultValue
+ //private DefaultValue instance;
+
+ public DefaultValueTests()
+ {
+ // TODO uncomment below to create an instance of DefaultValue
+ //instance = new DefaultValue();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of DefaultValue
+ ///
+ [Fact]
+ public void DefaultValueInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" DefaultValue
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test the property 'ArrayStringEnumRefDefault'
+ ///
+ [Fact]
+ public void ArrayStringEnumRefDefaultTest()
+ {
+ // TODO unit test for the property 'ArrayStringEnumRefDefault'
+ }
+
+ ///
+ /// Test the property 'ArrayStringEnumDefault'
+ ///
+ [Fact]
+ public void ArrayStringEnumDefaultTest()
+ {
+ // TODO unit test for the property 'ArrayStringEnumDefault'
+ }
+
+ ///
+ /// Test the property 'ArrayStringDefault'
+ ///
+ [Fact]
+ public void ArrayStringDefaultTest()
+ {
+ // TODO unit test for the property 'ArrayStringDefault'
+ }
+
+ ///
+ /// Test the property 'ArrayIntegerDefault'
+ ///
+ [Fact]
+ public void ArrayIntegerDefaultTest()
+ {
+ // TODO unit test for the property 'ArrayIntegerDefault'
+ }
+
+ ///
+ /// Test the property 'ArrayString'
+ ///
+ [Fact]
+ public void ArrayStringTest()
+ {
+ // TODO unit test for the property 'ArrayString'
+ }
+
+ ///
+ /// Test the property 'ArrayStringNullable'
+ ///
+ [Fact]
+ public void ArrayStringNullableTest()
+ {
+ // TODO unit test for the property 'ArrayStringNullable'
+ }
+
+ ///
+ /// Test the property 'ArrayStringExtensionNullable'
+ ///
+ [Fact]
+ public void ArrayStringExtensionNullableTest()
+ {
+ // TODO unit test for the property 'ArrayStringExtensionNullable'
+ }
+
+ ///
+ /// Test the property 'StringNullable'
+ ///
+ [Fact]
+ public void StringNullableTest()
+ {
+ // TODO unit test for the property 'StringNullable'
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/NumberPropertiesOnlyTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/NumberPropertiesOnlyTests.cs
new file mode 100644
index 00000000000..e889f6a7a2c
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/NumberPropertiesOnlyTests.cs
@@ -0,0 +1,85 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// Class for testing NumberPropertiesOnly
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class NumberPropertiesOnlyTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for NumberPropertiesOnly
+ //private NumberPropertiesOnly instance;
+
+ public NumberPropertiesOnlyTests()
+ {
+ // TODO uncomment below to create an instance of NumberPropertiesOnly
+ //instance = new NumberPropertiesOnly();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of NumberPropertiesOnly
+ ///
+ [Fact]
+ public void NumberPropertiesOnlyInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" NumberPropertiesOnly
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test the property 'Number'
+ ///
+ [Fact]
+ public void NumberTest()
+ {
+ // TODO unit test for the property 'Number'
+ }
+
+ ///
+ /// Test the property 'VarFloat'
+ ///
+ [Fact]
+ public void VarFloatTest()
+ {
+ // TODO unit test for the property 'VarFloat'
+ }
+
+ ///
+ /// Test the property 'VarDouble'
+ ///
+ [Fact]
+ public void VarDoubleTest()
+ {
+ // TODO unit test for the property 'VarDouble'
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/PetTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/PetTests.cs
new file mode 100644
index 00000000000..9059dad6378
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/PetTests.cs
@@ -0,0 +1,112 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// 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 : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for Pet
+ //private Pet instance;
+
+ public PetTests()
+ {
+ // TODO uncomment below to create an instance of Pet
+ //instance = new Pet();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of Pet
+ ///
+ [Fact]
+ public void PetInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" Pet
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test the property 'Id'
+ ///
+ [Fact]
+ public void IdTest()
+ {
+ // TODO unit test for the property 'Id'
+ }
+
+ ///
+ /// Test the property 'Name'
+ ///
+ [Fact]
+ public void NameTest()
+ {
+ // TODO unit test for the property 'Name'
+ }
+
+ ///
+ /// Test the property 'Category'
+ ///
+ [Fact]
+ public void CategoryTest()
+ {
+ // TODO unit test for the property 'Category'
+ }
+
+ ///
+ /// Test the property 'PhotoUrls'
+ ///
+ [Fact]
+ public void PhotoUrlsTest()
+ {
+ // TODO unit test for the property 'PhotoUrls'
+ }
+
+ ///
+ /// Test the property 'Tags'
+ ///
+ [Fact]
+ public void TagsTest()
+ {
+ // TODO unit test for the property 'Tags'
+ }
+
+ ///
+ /// Test the property 'Status'
+ ///
+ [Fact]
+ public void StatusTest()
+ {
+ // TODO unit test for the property 'Status'
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/QueryTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/QueryTests.cs
new file mode 100644
index 00000000000..ec61f864055
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/QueryTests.cs
@@ -0,0 +1,76 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// Class for testing Query
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class QueryTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for Query
+ //private Query instance;
+
+ public QueryTests()
+ {
+ // TODO uncomment below to create an instance of Query
+ //instance = new Query();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of Query
+ ///
+ [Fact]
+ public void QueryInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" Query
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test the property 'Id'
+ ///
+ [Fact]
+ public void IdTest()
+ {
+ // TODO unit test for the property 'Id'
+ }
+
+ ///
+ /// Test the property 'Outcomes'
+ ///
+ [Fact]
+ public void OutcomesTest()
+ {
+ // TODO unit test for the property 'Outcomes'
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/StringEnumRefTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/StringEnumRefTests.cs
new file mode 100644
index 00000000000..0a54d45ff19
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/StringEnumRefTests.cs
@@ -0,0 +1,58 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// Class for testing StringEnumRef
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class StringEnumRefTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for StringEnumRef
+ //private StringEnumRef instance;
+
+ public StringEnumRefTests()
+ {
+ // TODO uncomment below to create an instance of StringEnumRef
+ //instance = new StringEnumRef();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of StringEnumRef
+ ///
+ [Fact]
+ public void StringEnumRefInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" StringEnumRef
+ //Assert.IsType(instance);
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/TagTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/TagTests.cs
new file mode 100644
index 00000000000..6686aa326df
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/TagTests.cs
@@ -0,0 +1,76 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// 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 : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for Tag
+ //private Tag instance;
+
+ public TagTests()
+ {
+ // TODO uncomment below to create an instance of Tag
+ //instance = new Tag();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of Tag
+ ///
+ [Fact]
+ public void TagInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" Tag
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test the property 'Id'
+ ///
+ [Fact]
+ public void IdTest()
+ {
+ // TODO unit test for the property 'Id'
+ }
+
+ ///
+ /// Test the property 'Name'
+ ///
+ [Fact]
+ public void NameTest()
+ {
+ // TODO unit test for the property 'Name'
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTests.cs
new file mode 100644
index 00000000000..603644dbf10
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTests.cs
@@ -0,0 +1,94 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// Class for testing TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
+ //private TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter instance;
+
+ public TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterTests()
+ {
+ // TODO uncomment below to create an instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
+ //instance = new TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
+ ///
+ [Fact]
+ public void TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameterInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test the property 'Size'
+ ///
+ [Fact]
+ public void SizeTest()
+ {
+ // TODO unit test for the property 'Size'
+ }
+
+ ///
+ /// Test the property 'Color'
+ ///
+ [Fact]
+ public void ColorTest()
+ {
+ // TODO unit test for the property 'Color'
+ }
+
+ ///
+ /// Test the property 'Id'
+ ///
+ [Fact]
+ public void IdTest()
+ {
+ // TODO unit test for the property 'Id'
+ }
+
+ ///
+ /// Test the property 'Name'
+ ///
+ [Fact]
+ public void NameTest()
+ {
+ // TODO unit test for the property 'Name'
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTests.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTests.cs
new file mode 100644
index 00000000000..28ddd106ebe
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Model/TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTests.cs
@@ -0,0 +1,67 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+using Newtonsoft.Json;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// Class for testing TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
+ //private TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter instance;
+
+ public TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterTests()
+ {
+ // TODO uncomment below to create an instance of TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
+ //instance = new TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
+ ///
+ [Fact]
+ public void TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameterInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test the property 'Values'
+ ///
+ [Fact]
+ public void ValuesTest()
+ {
+ // TODO unit test for the property 'Values'
+ }
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
new file mode 100644
index 00000000000..ebda386b94d
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -0,0 +1,20 @@
+
+
+
+ Org.OpenAPITools.Test
+ Org.OpenAPITools.Test
+ net6.0
+ false
+ annotations
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/BodyApi.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/BodyApi.cs
new file mode 100644
index 00000000000..e6f87fa36e9
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/BodyApi.cs
@@ -0,0 +1,1240 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Mime;
+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 IBodyApiSync : IApiAccessor
+ {
+ #region Synchronous Operations
+ ///
+ /// Test binary (gif) response body
+ ///
+ ///
+ /// Test binary (gif) response body
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// System.IO.Stream
+ System.IO.Stream TestBinaryGif(int operationIndex = 0);
+
+ ///
+ /// Test binary (gif) response body
+ ///
+ ///
+ /// Test binary (gif) response body
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// ApiResponse of System.IO.Stream
+ ApiResponse TestBinaryGifWithHttpInfo(int operationIndex = 0);
+ ///
+ /// Test body parameter(s)
+ ///
+ ///
+ /// Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ string TestBodyApplicationOctetstreamBinary(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0);
+
+ ///
+ /// Test body parameter(s)
+ ///
+ ///
+ /// Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ ApiResponse TestBodyApplicationOctetstreamBinaryWithHttpInfo(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0);
+ ///
+ /// Test free form object
+ ///
+ ///
+ /// Test free form object
+ ///
+ /// Thrown when fails to make API call
+ /// Free form object (optional)
+ /// Index associated with the operation.
+ /// string
+ string TestEchoBodyFreeFormObjectResponseString(Object? body = default(Object?), int operationIndex = 0);
+
+ ///
+ /// Test free form object
+ ///
+ ///
+ /// Test free form object
+ ///
+ /// Thrown when fails to make API call
+ /// Free form object (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ ApiResponse TestEchoBodyFreeFormObjectResponseStringWithHttpInfo(Object? body = default(Object?), int operationIndex = 0);
+ ///
+ /// Test body parameter(s)
+ ///
+ ///
+ /// Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// Pet
+ Pet TestEchoBodyPet(Pet? pet = default(Pet?), int operationIndex = 0);
+
+ ///
+ /// Test body parameter(s)
+ ///
+ ///
+ /// Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of Pet
+ ApiResponse TestEchoBodyPetWithHttpInfo(Pet? pet = default(Pet?), int operationIndex = 0);
+ ///
+ /// Test empty response body
+ ///
+ ///
+ /// Test empty response body
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// string
+ string TestEchoBodyPetResponseString(Pet? pet = default(Pet?), int operationIndex = 0);
+
+ ///
+ /// Test empty response body
+ ///
+ ///
+ /// Test empty response body
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ ApiResponse TestEchoBodyPetResponseStringWithHttpInfo(Pet? pet = default(Pet?), int operationIndex = 0);
+ ///
+ /// Test empty json (request body)
+ ///
+ ///
+ /// Test empty json (request body)
+ ///
+ /// Thrown when fails to make API call
+ /// Tag object (optional)
+ /// Index associated with the operation.
+ /// string
+ string TestEchoBodyTagResponseString(Tag? tag = default(Tag?), int operationIndex = 0);
+
+ ///
+ /// Test empty json (request body)
+ ///
+ ///
+ /// Test empty json (request body)
+ ///
+ /// Thrown when fails to make API call
+ /// Tag object (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ ApiResponse TestEchoBodyTagResponseStringWithHttpInfo(Tag? tag = default(Tag?), int operationIndex = 0);
+ #endregion Synchronous Operations
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IBodyApiAsync : IApiAccessor
+ {
+ #region Asynchronous Operations
+ ///
+ /// Test binary (gif) response body
+ ///
+ ///
+ /// Test binary (gif) response body
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of System.IO.Stream
+ System.Threading.Tasks.Task TestBinaryGifAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test binary (gif) response body
+ ///
+ ///
+ /// Test binary (gif) response body
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (System.IO.Stream)
+ System.Threading.Tasks.Task> TestBinaryGifWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Test body parameter(s)
+ ///
+ ///
+ /// Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ System.Threading.Tasks.Task TestBodyApplicationOctetstreamBinaryAsync(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test body parameter(s)
+ ///
+ ///
+ /// Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ System.Threading.Tasks.Task> TestBodyApplicationOctetstreamBinaryWithHttpInfoAsync(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Test free form object
+ ///
+ ///
+ /// Test free form object
+ ///
+ /// Thrown when fails to make API call
+ /// Free form object (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ System.Threading.Tasks.Task TestEchoBodyFreeFormObjectResponseStringAsync(Object? body = default(Object?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test free form object
+ ///
+ ///
+ /// Test free form object
+ ///
+ /// Thrown when fails to make API call
+ /// Free form object (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ System.Threading.Tasks.Task> TestEchoBodyFreeFormObjectResponseStringWithHttpInfoAsync(Object? body = default(Object?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Test body parameter(s)
+ ///
+ ///
+ /// Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of Pet
+ System.Threading.Tasks.Task TestEchoBodyPetAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test body parameter(s)
+ ///
+ ///
+ /// Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (Pet)
+ System.Threading.Tasks.Task> TestEchoBodyPetWithHttpInfoAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Test empty response body
+ ///
+ ///
+ /// Test empty response body
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ System.Threading.Tasks.Task TestEchoBodyPetResponseStringAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test empty response body
+ ///
+ ///
+ /// Test empty response body
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ System.Threading.Tasks.Task> TestEchoBodyPetResponseStringWithHttpInfoAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Test empty json (request body)
+ ///
+ ///
+ /// Test empty json (request body)
+ ///
+ /// Thrown when fails to make API call
+ /// Tag object (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ System.Threading.Tasks.Task TestEchoBodyTagResponseStringAsync(Tag? tag = default(Tag?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test empty json (request body)
+ ///
+ ///
+ /// Test empty json (request body)
+ ///
+ /// Thrown when fails to make API call
+ /// Tag object (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ System.Threading.Tasks.Task> TestEchoBodyTagResponseStringWithHttpInfoAsync(Tag? tag = default(Tag?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ #endregion Asynchronous Operations
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IBodyApi : IBodyApiSync, IBodyApiAsync
+ {
+
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public partial class BodyApi : IBodyApi
+ {
+ private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public BodyApi() : this((string)null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public BodyApi(string basePath)
+ {
+ this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations(
+ Org.OpenAPITools.Client.GlobalConfiguration.Instance,
+ new Org.OpenAPITools.Client.Configuration { BasePath = basePath }
+ );
+ this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// using Configuration object
+ ///
+ /// An instance of Configuration
+ ///
+ public BodyApi(Org.OpenAPITools.Client.Configuration configuration)
+ {
+ if (configuration == null) throw new ArgumentNullException("configuration");
+
+ this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations(
+ Org.OpenAPITools.Client.GlobalConfiguration.Instance,
+ configuration
+ );
+ this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// using a Configuration object and client instance.
+ ///
+ /// The client interface for synchronous API access.
+ /// The client interface for asynchronous API access.
+ /// The configuration object.
+ public BodyApi(Org.OpenAPITools.Client.ISynchronousClient client, Org.OpenAPITools.Client.IAsynchronousClient asyncClient, Org.OpenAPITools.Client.IReadableConfiguration configuration)
+ {
+ if (client == null) throw new ArgumentNullException("client");
+ if (asyncClient == null) throw new ArgumentNullException("asyncClient");
+ if (configuration == null) throw new ArgumentNullException("configuration");
+
+ this.Client = client;
+ this.AsynchronousClient = asyncClient;
+ this.Configuration = configuration;
+ this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// The client for accessing this underlying API asynchronously.
+ ///
+ public Org.OpenAPITools.Client.IAsynchronousClient AsynchronousClient { get; set; }
+
+ ///
+ /// The client for accessing this underlying API synchronously.
+ ///
+ public Org.OpenAPITools.Client.ISynchronousClient Client { get; set; }
+
+ ///
+ /// Gets the base path of the API client.
+ ///
+ /// The base path
+ public string GetBasePath()
+ {
+ return this.Configuration.BasePath;
+ }
+
+ ///
+ /// Gets or sets the configuration object
+ ///
+ /// An instance of the Configuration
+ public Org.OpenAPITools.Client.IReadableConfiguration 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; }
+ }
+
+ ///
+ /// Test binary (gif) response body Test binary (gif) response body
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// System.IO.Stream
+ public System.IO.Stream TestBinaryGif(int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestBinaryGifWithHttpInfo();
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test binary (gif) response body Test binary (gif) response body
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// ApiResponse of System.IO.Stream
+ public Org.OpenAPITools.Client.ApiResponse TestBinaryGifWithHttpInfo(int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "image/gif"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+
+ localVarRequestOptions.Operation = "BodyApi.TestBinaryGif";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Post("/binary/gif", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestBinaryGif", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test binary (gif) response body Test binary (gif) response body
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of System.IO.Stream
+ public async System.Threading.Tasks.Task TestBinaryGifAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestBinaryGifWithHttpInfoAsync(operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test binary (gif) response body Test binary (gif) response body
+ ///
+ /// Thrown when fails to make API call
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (System.IO.Stream)
+ public async System.Threading.Tasks.Task> TestBinaryGifWithHttpInfoAsync(int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "image/gif"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+
+ localVarRequestOptions.Operation = "BodyApi.TestBinaryGif";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.PostAsync("/binary/gif", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestBinaryGif", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test body parameter(s) Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ public string TestBodyApplicationOctetstreamBinary(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestBodyApplicationOctetstreamBinaryWithHttpInfo(body);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test body parameter(s) Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ public Org.OpenAPITools.Client.ApiResponse TestBodyApplicationOctetstreamBinaryWithHttpInfo(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ "application/octet-stream"
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ localVarRequestOptions.Data = body;
+
+ localVarRequestOptions.Operation = "BodyApi.TestBodyApplicationOctetstreamBinary";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Post("/body/application/octetstream/binary", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestBodyApplicationOctetstreamBinary", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test body parameter(s) Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ public async System.Threading.Tasks.Task TestBodyApplicationOctetstreamBinaryAsync(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestBodyApplicationOctetstreamBinaryWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test body parameter(s) Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async System.Threading.Tasks.Task> TestBodyApplicationOctetstreamBinaryWithHttpInfoAsync(System.IO.Stream? body = default(System.IO.Stream?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ "application/octet-stream"
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ localVarRequestOptions.Data = body;
+
+ localVarRequestOptions.Operation = "BodyApi.TestBodyApplicationOctetstreamBinary";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.PostAsync("/body/application/octetstream/binary", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestBodyApplicationOctetstreamBinary", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test free form object Test free form object
+ ///
+ /// Thrown when fails to make API call
+ /// Free form object (optional)
+ /// Index associated with the operation.
+ /// string
+ public string TestEchoBodyFreeFormObjectResponseString(Object? body = default(Object?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestEchoBodyFreeFormObjectResponseStringWithHttpInfo(body);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test free form object Test free form object
+ ///
+ /// Thrown when fails to make API call
+ /// Free form object (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ public Org.OpenAPITools.Client.ApiResponse TestEchoBodyFreeFormObjectResponseStringWithHttpInfo(Object? body = default(Object?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ "application/json"
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ localVarRequestOptions.Data = body;
+
+ localVarRequestOptions.Operation = "BodyApi.TestEchoBodyFreeFormObjectResponseString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Post("/echo/body/FreeFormObject/response_string", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestEchoBodyFreeFormObjectResponseString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test free form object Test free form object
+ ///
+ /// Thrown when fails to make API call
+ /// Free form object (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ public async System.Threading.Tasks.Task TestEchoBodyFreeFormObjectResponseStringAsync(Object? body = default(Object?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestEchoBodyFreeFormObjectResponseStringWithHttpInfoAsync(body, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test free form object Test free form object
+ ///
+ /// Thrown when fails to make API call
+ /// Free form object (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async System.Threading.Tasks.Task> TestEchoBodyFreeFormObjectResponseStringWithHttpInfoAsync(Object? body = default(Object?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ "application/json"
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ localVarRequestOptions.Data = body;
+
+ localVarRequestOptions.Operation = "BodyApi.TestEchoBodyFreeFormObjectResponseString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.PostAsync("/echo/body/FreeFormObject/response_string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestEchoBodyFreeFormObjectResponseString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test body parameter(s) Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// Pet
+ public Pet TestEchoBodyPet(Pet? pet = default(Pet?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestEchoBodyPetWithHttpInfo(pet);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test body parameter(s) Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of Pet
+ public Org.OpenAPITools.Client.ApiResponse TestEchoBodyPetWithHttpInfo(Pet? pet = default(Pet?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ "application/json"
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "application/json"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ localVarRequestOptions.Data = pet;
+
+ localVarRequestOptions.Operation = "BodyApi.TestEchoBodyPet";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Post("/echo/body/Pet", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestEchoBodyPet", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test body parameter(s) Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of Pet
+ public async System.Threading.Tasks.Task TestEchoBodyPetAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestEchoBodyPetWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test body parameter(s) Test body parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (Pet)
+ public async System.Threading.Tasks.Task> TestEchoBodyPetWithHttpInfoAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ "application/json"
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "application/json"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ localVarRequestOptions.Data = pet;
+
+ localVarRequestOptions.Operation = "BodyApi.TestEchoBodyPet";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.PostAsync("/echo/body/Pet", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestEchoBodyPet", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test empty response body Test empty response body
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// string
+ public string TestEchoBodyPetResponseString(Pet? pet = default(Pet?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestEchoBodyPetResponseStringWithHttpInfo(pet);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test empty response body Test empty response body
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ public Org.OpenAPITools.Client.ApiResponse TestEchoBodyPetResponseStringWithHttpInfo(Pet? pet = default(Pet?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ "application/json"
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ localVarRequestOptions.Data = pet;
+
+ localVarRequestOptions.Operation = "BodyApi.TestEchoBodyPetResponseString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Post("/echo/body/Pet/response_string", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestEchoBodyPetResponseString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test empty response body Test empty response body
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ public async System.Threading.Tasks.Task TestEchoBodyPetResponseStringAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestEchoBodyPetResponseStringWithHttpInfoAsync(pet, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test empty response body Test empty response body
+ ///
+ /// Thrown when fails to make API call
+ /// Pet object that needs to be added to the store (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async System.Threading.Tasks.Task> TestEchoBodyPetResponseStringWithHttpInfoAsync(Pet? pet = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ "application/json"
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ localVarRequestOptions.Data = pet;
+
+ localVarRequestOptions.Operation = "BodyApi.TestEchoBodyPetResponseString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.PostAsync("/echo/body/Pet/response_string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestEchoBodyPetResponseString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test empty json (request body) Test empty json (request body)
+ ///
+ /// Thrown when fails to make API call
+ /// Tag object (optional)
+ /// Index associated with the operation.
+ /// string
+ public string TestEchoBodyTagResponseString(Tag? tag = default(Tag?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestEchoBodyTagResponseStringWithHttpInfo(tag);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test empty json (request body) Test empty json (request body)
+ ///
+ /// Thrown when fails to make API call
+ /// Tag object (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ public Org.OpenAPITools.Client.ApiResponse TestEchoBodyTagResponseStringWithHttpInfo(Tag? tag = default(Tag?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ "application/json"
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ localVarRequestOptions.Data = tag;
+
+ localVarRequestOptions.Operation = "BodyApi.TestEchoBodyTagResponseString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Post("/echo/body/Tag/response_string", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestEchoBodyTagResponseString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test empty json (request body) Test empty json (request body)
+ ///
+ /// Thrown when fails to make API call
+ /// Tag object (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ public async System.Threading.Tasks.Task TestEchoBodyTagResponseStringAsync(Tag? tag = default(Tag?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestEchoBodyTagResponseStringWithHttpInfoAsync(tag, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test empty json (request body) Test empty json (request body)
+ ///
+ /// Thrown when fails to make API call
+ /// Tag object (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async System.Threading.Tasks.Task> TestEchoBodyTagResponseStringWithHttpInfoAsync(Tag? tag = default(Tag?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ "application/json"
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ localVarRequestOptions.Data = tag;
+
+ localVarRequestOptions.Operation = "BodyApi.TestEchoBodyTagResponseString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.PostAsync("/echo/body/Tag/response_string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestEchoBodyTagResponseString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/FormApi.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/FormApi.cs
new file mode 100644
index 00000000000..e6c47761094
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/FormApi.cs
@@ -0,0 +1,379 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Mime;
+using Org.OpenAPITools.Client;
+
+namespace Org.OpenAPITools.Api
+{
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IFormApiSync : IApiAccessor
+ {
+ #region Synchronous Operations
+ ///
+ /// Test form parameter(s)
+ ///
+ ///
+ /// Test form parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ string TestFormIntegerBooleanString(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0);
+
+ ///
+ /// Test form parameter(s)
+ ///
+ ///
+ /// Test form parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ ApiResponse TestFormIntegerBooleanStringWithHttpInfo(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0);
+ #endregion Synchronous Operations
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IFormApiAsync : IApiAccessor
+ {
+ #region Asynchronous Operations
+ ///
+ /// Test form parameter(s)
+ ///
+ ///
+ /// Test form parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ System.Threading.Tasks.Task TestFormIntegerBooleanStringAsync(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test form parameter(s)
+ ///
+ ///
+ /// Test form parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ System.Threading.Tasks.Task> TestFormIntegerBooleanStringWithHttpInfoAsync(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ #endregion Asynchronous Operations
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IFormApi : IFormApiSync, IFormApiAsync
+ {
+
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public partial class FormApi : IFormApi
+ {
+ private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public FormApi() : this((string)null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public FormApi(string basePath)
+ {
+ this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations(
+ Org.OpenAPITools.Client.GlobalConfiguration.Instance,
+ new Org.OpenAPITools.Client.Configuration { BasePath = basePath }
+ );
+ this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// using Configuration object
+ ///
+ /// An instance of Configuration
+ ///
+ public FormApi(Org.OpenAPITools.Client.Configuration configuration)
+ {
+ if (configuration == null) throw new ArgumentNullException("configuration");
+
+ this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations(
+ Org.OpenAPITools.Client.GlobalConfiguration.Instance,
+ configuration
+ );
+ this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// using a Configuration object and client instance.
+ ///
+ /// The client interface for synchronous API access.
+ /// The client interface for asynchronous API access.
+ /// The configuration object.
+ public FormApi(Org.OpenAPITools.Client.ISynchronousClient client, Org.OpenAPITools.Client.IAsynchronousClient asyncClient, Org.OpenAPITools.Client.IReadableConfiguration configuration)
+ {
+ if (client == null) throw new ArgumentNullException("client");
+ if (asyncClient == null) throw new ArgumentNullException("asyncClient");
+ if (configuration == null) throw new ArgumentNullException("configuration");
+
+ this.Client = client;
+ this.AsynchronousClient = asyncClient;
+ this.Configuration = configuration;
+ this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// The client for accessing this underlying API asynchronously.
+ ///
+ public Org.OpenAPITools.Client.IAsynchronousClient AsynchronousClient { get; set; }
+
+ ///
+ /// The client for accessing this underlying API synchronously.
+ ///
+ public Org.OpenAPITools.Client.ISynchronousClient Client { get; set; }
+
+ ///
+ /// Gets the base path of the API client.
+ ///
+ /// The base path
+ public string GetBasePath()
+ {
+ return this.Configuration.BasePath;
+ }
+
+ ///
+ /// Gets or sets the configuration object
+ ///
+ /// An instance of the Configuration
+ public Org.OpenAPITools.Client.IReadableConfiguration 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; }
+ }
+
+ ///
+ /// Test form parameter(s) Test form parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ public string TestFormIntegerBooleanString(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestFormIntegerBooleanStringWithHttpInfo(integerForm, booleanForm, stringForm);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test form parameter(s) Test form parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ public Org.OpenAPITools.Client.ApiResponse TestFormIntegerBooleanStringWithHttpInfo(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ "application/x-www-form-urlencoded"
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (integerForm != null)
+ {
+ localVarRequestOptions.FormParameters.Add("integer_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integerForm)); // form parameter
+ }
+ if (booleanForm != null)
+ {
+ localVarRequestOptions.FormParameters.Add("boolean_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanForm)); // form parameter
+ }
+ if (stringForm != null)
+ {
+ localVarRequestOptions.FormParameters.Add("string_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(stringForm)); // form parameter
+ }
+
+ localVarRequestOptions.Operation = "FormApi.TestFormIntegerBooleanString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Post("/form/integer/boolean/string", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestFormIntegerBooleanString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test form parameter(s) Test form parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ public async System.Threading.Tasks.Task TestFormIntegerBooleanStringAsync(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestFormIntegerBooleanStringWithHttpInfoAsync(integerForm, booleanForm, stringForm, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test form parameter(s) Test form parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async System.Threading.Tasks.Task> TestFormIntegerBooleanStringWithHttpInfoAsync(int? integerForm = default(int?), bool? booleanForm = default(bool?), string? stringForm = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ "application/x-www-form-urlencoded"
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (integerForm != null)
+ {
+ localVarRequestOptions.FormParameters.Add("integer_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integerForm)); // form parameter
+ }
+ if (booleanForm != null)
+ {
+ localVarRequestOptions.FormParameters.Add("boolean_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanForm)); // form parameter
+ }
+ if (stringForm != null)
+ {
+ localVarRequestOptions.FormParameters.Add("string_form", Org.OpenAPITools.Client.ClientUtils.ParameterToString(stringForm)); // form parameter
+ }
+
+ localVarRequestOptions.Operation = "FormApi.TestFormIntegerBooleanString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.PostAsync("/form/integer/boolean/string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestFormIntegerBooleanString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/HeaderApi.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/HeaderApi.cs
new file mode 100644
index 00000000000..3c09f433c5d
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/HeaderApi.cs
@@ -0,0 +1,377 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Mime;
+using Org.OpenAPITools.Client;
+
+namespace Org.OpenAPITools.Api
+{
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IHeaderApiSync : IApiAccessor
+ {
+ #region Synchronous Operations
+ ///
+ /// Test header parameter(s)
+ ///
+ ///
+ /// Test header parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ string TestHeaderIntegerBooleanString(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0);
+
+ ///
+ /// Test header parameter(s)
+ ///
+ ///
+ /// Test header parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ ApiResponse TestHeaderIntegerBooleanStringWithHttpInfo(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0);
+ #endregion Synchronous Operations
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IHeaderApiAsync : IApiAccessor
+ {
+ #region Asynchronous Operations
+ ///
+ /// Test header parameter(s)
+ ///
+ ///
+ /// Test header parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ System.Threading.Tasks.Task TestHeaderIntegerBooleanStringAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test header parameter(s)
+ ///
+ ///
+ /// Test header parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ System.Threading.Tasks.Task> TestHeaderIntegerBooleanStringWithHttpInfoAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ #endregion Asynchronous Operations
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IHeaderApi : IHeaderApiSync, IHeaderApiAsync
+ {
+
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public partial class HeaderApi : IHeaderApi
+ {
+ private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public HeaderApi() : this((string)null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public HeaderApi(string basePath)
+ {
+ this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations(
+ Org.OpenAPITools.Client.GlobalConfiguration.Instance,
+ new Org.OpenAPITools.Client.Configuration { BasePath = basePath }
+ );
+ this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// using Configuration object
+ ///
+ /// An instance of Configuration
+ ///
+ public HeaderApi(Org.OpenAPITools.Client.Configuration configuration)
+ {
+ if (configuration == null) throw new ArgumentNullException("configuration");
+
+ this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations(
+ Org.OpenAPITools.Client.GlobalConfiguration.Instance,
+ configuration
+ );
+ this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// using a Configuration object and client instance.
+ ///
+ /// The client interface for synchronous API access.
+ /// The client interface for asynchronous API access.
+ /// The configuration object.
+ public HeaderApi(Org.OpenAPITools.Client.ISynchronousClient client, Org.OpenAPITools.Client.IAsynchronousClient asyncClient, Org.OpenAPITools.Client.IReadableConfiguration configuration)
+ {
+ if (client == null) throw new ArgumentNullException("client");
+ if (asyncClient == null) throw new ArgumentNullException("asyncClient");
+ if (configuration == null) throw new ArgumentNullException("configuration");
+
+ this.Client = client;
+ this.AsynchronousClient = asyncClient;
+ this.Configuration = configuration;
+ this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// The client for accessing this underlying API asynchronously.
+ ///
+ public Org.OpenAPITools.Client.IAsynchronousClient AsynchronousClient { get; set; }
+
+ ///
+ /// The client for accessing this underlying API synchronously.
+ ///
+ public Org.OpenAPITools.Client.ISynchronousClient Client { get; set; }
+
+ ///
+ /// Gets the base path of the API client.
+ ///
+ /// The base path
+ public string GetBasePath()
+ {
+ return this.Configuration.BasePath;
+ }
+
+ ///
+ /// Gets or sets the configuration object
+ ///
+ /// An instance of the Configuration
+ public Org.OpenAPITools.Client.IReadableConfiguration 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; }
+ }
+
+ ///
+ /// Test header parameter(s) Test header parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ public string TestHeaderIntegerBooleanString(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestHeaderIntegerBooleanStringWithHttpInfo(integerHeader, booleanHeader, stringHeader);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test header parameter(s) Test header parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ public Org.OpenAPITools.Client.ApiResponse TestHeaderIntegerBooleanStringWithHttpInfo(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (integerHeader != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("integer_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integerHeader)); // header parameter
+ }
+ if (booleanHeader != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("boolean_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanHeader)); // header parameter
+ }
+ if (stringHeader != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(stringHeader)); // header parameter
+ }
+
+ localVarRequestOptions.Operation = "HeaderApi.TestHeaderIntegerBooleanString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get("/header/integer/boolean/string", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestHeaderIntegerBooleanString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test header parameter(s) Test header parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ public async System.Threading.Tasks.Task TestHeaderIntegerBooleanStringAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestHeaderIntegerBooleanStringWithHttpInfoAsync(integerHeader, booleanHeader, stringHeader, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test header parameter(s) Test header parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async System.Threading.Tasks.Task> TestHeaderIntegerBooleanStringWithHttpInfoAsync(int? integerHeader = default(int?), bool? booleanHeader = default(bool?), string? stringHeader = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (integerHeader != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("integer_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(integerHeader)); // header parameter
+ }
+ if (booleanHeader != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("boolean_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(booleanHeader)); // header parameter
+ }
+ if (stringHeader != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("string_header", Org.OpenAPITools.Client.ClientUtils.ParameterToString(stringHeader)); // header parameter
+ }
+
+ localVarRequestOptions.Operation = "HeaderApi.TestHeaderIntegerBooleanString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.GetAsync("/header/integer/boolean/string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestHeaderIntegerBooleanString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/PathApi.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/PathApi.cs
new file mode 100644
index 00000000000..73abd4aadc1
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/PathApi.cs
@@ -0,0 +1,361 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Mime;
+using Org.OpenAPITools.Client;
+
+namespace Org.OpenAPITools.Api
+{
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IPathApiSync : IApiAccessor
+ {
+ #region Synchronous Operations
+ ///
+ /// Test path parameter(s)
+ ///
+ ///
+ /// Test path parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// Index associated with the operation.
+ /// string
+ string TestsPathStringPathStringIntegerPathInteger(string pathString, int pathInteger, int operationIndex = 0);
+
+ ///
+ /// Test path parameter(s)
+ ///
+ ///
+ /// Test path parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ ApiResponse TestsPathStringPathStringIntegerPathIntegerWithHttpInfo(string pathString, int pathInteger, int operationIndex = 0);
+ #endregion Synchronous Operations
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IPathApiAsync : IApiAccessor
+ {
+ #region Asynchronous Operations
+ ///
+ /// Test path parameter(s)
+ ///
+ ///
+ /// Test path parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ System.Threading.Tasks.Task TestsPathStringPathStringIntegerPathIntegerAsync(string pathString, int pathInteger, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test path parameter(s)
+ ///
+ ///
+ /// Test path parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ System.Threading.Tasks.Task> TestsPathStringPathStringIntegerPathIntegerWithHttpInfoAsync(string pathString, int pathInteger, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ #endregion Asynchronous Operations
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IPathApi : IPathApiSync, IPathApiAsync
+ {
+
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public partial class PathApi : IPathApi
+ {
+ private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public PathApi() : this((string)null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public PathApi(string basePath)
+ {
+ this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations(
+ Org.OpenAPITools.Client.GlobalConfiguration.Instance,
+ new Org.OpenAPITools.Client.Configuration { BasePath = basePath }
+ );
+ this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// using Configuration object
+ ///
+ /// An instance of Configuration
+ ///
+ public PathApi(Org.OpenAPITools.Client.Configuration configuration)
+ {
+ if (configuration == null) throw new ArgumentNullException("configuration");
+
+ this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations(
+ Org.OpenAPITools.Client.GlobalConfiguration.Instance,
+ configuration
+ );
+ this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// using a Configuration object and client instance.
+ ///
+ /// The client interface for synchronous API access.
+ /// The client interface for asynchronous API access.
+ /// The configuration object.
+ public PathApi(Org.OpenAPITools.Client.ISynchronousClient client, Org.OpenAPITools.Client.IAsynchronousClient asyncClient, Org.OpenAPITools.Client.IReadableConfiguration configuration)
+ {
+ if (client == null) throw new ArgumentNullException("client");
+ if (asyncClient == null) throw new ArgumentNullException("asyncClient");
+ if (configuration == null) throw new ArgumentNullException("configuration");
+
+ this.Client = client;
+ this.AsynchronousClient = asyncClient;
+ this.Configuration = configuration;
+ this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// The client for accessing this underlying API asynchronously.
+ ///
+ public Org.OpenAPITools.Client.IAsynchronousClient AsynchronousClient { get; set; }
+
+ ///
+ /// The client for accessing this underlying API synchronously.
+ ///
+ public Org.OpenAPITools.Client.ISynchronousClient Client { get; set; }
+
+ ///
+ /// Gets the base path of the API client.
+ ///
+ /// The base path
+ public string GetBasePath()
+ {
+ return this.Configuration.BasePath;
+ }
+
+ ///
+ /// Gets or sets the configuration object
+ ///
+ /// An instance of the Configuration
+ public Org.OpenAPITools.Client.IReadableConfiguration 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; }
+ }
+
+ ///
+ /// Test path parameter(s) Test path parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// Index associated with the operation.
+ /// string
+ public string TestsPathStringPathStringIntegerPathInteger(string pathString, int pathInteger, int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestsPathStringPathStringIntegerPathIntegerWithHttpInfo(pathString, pathInteger);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test path parameter(s) Test path parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ public Org.OpenAPITools.Client.ApiResponse TestsPathStringPathStringIntegerPathIntegerWithHttpInfo(string pathString, int pathInteger, int operationIndex = 0)
+ {
+ // verify the required parameter 'pathString' is set
+ if (pathString == null)
+ {
+ throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pathString' when calling PathApi->TestsPathStringPathStringIntegerPathInteger");
+ }
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ localVarRequestOptions.PathParameters.Add("path_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(pathString)); // path parameter
+ localVarRequestOptions.PathParameters.Add("path_integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(pathInteger)); // path parameter
+
+ localVarRequestOptions.Operation = "PathApi.TestsPathStringPathStringIntegerPathInteger";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get("/path/string/{path_string}/integer/{path_integer}", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestsPathStringPathStringIntegerPathInteger", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test path parameter(s) Test path parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ public async System.Threading.Tasks.Task TestsPathStringPathStringIntegerPathIntegerAsync(string pathString, int pathInteger, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestsPathStringPathStringIntegerPathIntegerWithHttpInfoAsync(pathString, pathInteger, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test path parameter(s) Test path parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ ///
+ ///
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async System.Threading.Tasks.Task> TestsPathStringPathStringIntegerPathIntegerWithHttpInfoAsync(string pathString, int pathInteger, int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ // verify the required parameter 'pathString' is set
+ if (pathString == null)
+ {
+ throw new Org.OpenAPITools.Client.ApiException(400, "Missing required parameter 'pathString' when calling PathApi->TestsPathStringPathStringIntegerPathInteger");
+ }
+
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ localVarRequestOptions.PathParameters.Add("path_string", Org.OpenAPITools.Client.ClientUtils.ParameterToString(pathString)); // path parameter
+ localVarRequestOptions.PathParameters.Add("path_integer", Org.OpenAPITools.Client.ClientUtils.ParameterToString(pathInteger)); // path parameter
+
+ localVarRequestOptions.Operation = "PathApi.TestsPathStringPathStringIntegerPathInteger";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.GetAsync("/path/string/{path_string}/integer/{path_integer}", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestsPathStringPathStringIntegerPathInteger", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs
new file mode 100644
index 00000000000..8df37880db3
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Api/QueryApi.cs
@@ -0,0 +1,1734 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.Linq;
+using System.Net;
+using System.Net.Mime;
+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 IQueryApiSync : IApiAccessor
+ {
+ #region Synchronous Operations
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ string TestEnumRefString(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0);
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ ApiResponse TestEnumRefStringWithHttpInfo(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0);
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ string TestQueryDatetimeDateString(DateTime? datetimeQuery = default(DateTime?), DateTime? dateQuery = default(DateTime?), string? stringQuery = default(string?), int operationIndex = 0);
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ ApiResponse TestQueryDatetimeDateStringWithHttpInfo(DateTime? datetimeQuery = default(DateTime?), DateTime? dateQuery = default(DateTime?), string? stringQuery = default(string?), int operationIndex = 0);
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ string TestQueryIntegerBooleanString(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0);
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ ApiResponse TestQueryIntegerBooleanStringWithHttpInfo(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0);
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ string TestQueryStyleDeepObjectExplodeTrueObject(Pet? queryObject = default(Pet?), int operationIndex = 0);
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ ApiResponse TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(Pet? queryObject = default(Pet?), int operationIndex = 0);
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ string TestQueryStyleDeepObjectExplodeTrueObjectAllOf(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0);
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ ApiResponse TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0);
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ string TestQueryStyleFormExplodeTrueArrayString(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0);
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ ApiResponse TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0);
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ string TestQueryStyleFormExplodeTrueObject(Pet? queryObject = default(Pet?), int operationIndex = 0);
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ ApiResponse TestQueryStyleFormExplodeTrueObjectWithHttpInfo(Pet? queryObject = default(Pet?), int operationIndex = 0);
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ string TestQueryStyleFormExplodeTrueObjectAllOf(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0);
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ ApiResponse TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0);
+ #endregion Synchronous Operations
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IQueryApiAsync : IApiAccessor
+ {
+ #region Asynchronous Operations
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ System.Threading.Tasks.Task TestEnumRefStringAsync(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ System.Threading.Tasks.Task> TestEnumRefStringWithHttpInfoAsync(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ System.Threading.Tasks.Task TestQueryDatetimeDateStringAsync(DateTime? datetimeQuery = default(DateTime?), DateTime? dateQuery = default(DateTime?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ System.Threading.Tasks.Task> TestQueryDatetimeDateStringWithHttpInfoAsync(DateTime? datetimeQuery = default(DateTime?), DateTime? dateQuery = default(DateTime?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ System.Threading.Tasks.Task TestQueryIntegerBooleanStringAsync(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ System.Threading.Tasks.Task> TestQueryIntegerBooleanStringWithHttpInfoAsync(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ System.Threading.Tasks.Task TestQueryStyleDeepObjectExplodeTrueObjectAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ System.Threading.Tasks.Task> TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfoAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ System.Threading.Tasks.Task TestQueryStyleDeepObjectExplodeTrueObjectAllOfAsync(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ System.Threading.Tasks.Task> TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfoAsync(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueArrayStringAsync(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueArrayStringWithHttpInfoAsync(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueObjectAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueObjectWithHttpInfoAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueObjectAllOfAsync(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+
+ ///
+ /// Test query parameter(s)
+ ///
+ ///
+ /// Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfoAsync(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken));
+ #endregion Asynchronous Operations
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public interface IQueryApi : IQueryApiSync, IQueryApiAsync
+ {
+
+ }
+
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public partial class QueryApi : IQueryApi
+ {
+ private Org.OpenAPITools.Client.ExceptionFactory _exceptionFactory = (name, response) => null;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public QueryApi() : this((string)null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public QueryApi(string basePath)
+ {
+ this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations(
+ Org.OpenAPITools.Client.GlobalConfiguration.Instance,
+ new Org.OpenAPITools.Client.Configuration { BasePath = basePath }
+ );
+ this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// using Configuration object
+ ///
+ /// An instance of Configuration
+ ///
+ public QueryApi(Org.OpenAPITools.Client.Configuration configuration)
+ {
+ if (configuration == null) throw new ArgumentNullException("configuration");
+
+ this.Configuration = Org.OpenAPITools.Client.Configuration.MergeConfigurations(
+ Org.OpenAPITools.Client.GlobalConfiguration.Instance,
+ configuration
+ );
+ this.Client = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ this.AsynchronousClient = new Org.OpenAPITools.Client.ApiClient(this.Configuration.BasePath);
+ ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// Initializes a new instance of the class
+ /// using a Configuration object and client instance.
+ ///
+ /// The client interface for synchronous API access.
+ /// The client interface for asynchronous API access.
+ /// The configuration object.
+ public QueryApi(Org.OpenAPITools.Client.ISynchronousClient client, Org.OpenAPITools.Client.IAsynchronousClient asyncClient, Org.OpenAPITools.Client.IReadableConfiguration configuration)
+ {
+ if (client == null) throw new ArgumentNullException("client");
+ if (asyncClient == null) throw new ArgumentNullException("asyncClient");
+ if (configuration == null) throw new ArgumentNullException("configuration");
+
+ this.Client = client;
+ this.AsynchronousClient = asyncClient;
+ this.Configuration = configuration;
+ this.ExceptionFactory = Org.OpenAPITools.Client.Configuration.DefaultExceptionFactory;
+ }
+
+ ///
+ /// The client for accessing this underlying API asynchronously.
+ ///
+ public Org.OpenAPITools.Client.IAsynchronousClient AsynchronousClient { get; set; }
+
+ ///
+ /// The client for accessing this underlying API synchronously.
+ ///
+ public Org.OpenAPITools.Client.ISynchronousClient Client { get; set; }
+
+ ///
+ /// Gets the base path of the API client.
+ ///
+ /// The base path
+ public string GetBasePath()
+ {
+ return this.Configuration.BasePath;
+ }
+
+ ///
+ /// Gets or sets the configuration object
+ ///
+ /// An instance of the Configuration
+ public Org.OpenAPITools.Client.IReadableConfiguration 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; }
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ public string TestEnumRefString(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestEnumRefStringWithHttpInfo(enumRefStringQuery);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ public Org.OpenAPITools.Client.ApiResponse TestEnumRefStringWithHttpInfo(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (enumRefStringQuery != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_ref_string_query", enumRefStringQuery));
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestEnumRefString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get("/query/enum_ref_string", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestEnumRefString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ public async System.Threading.Tasks.Task TestEnumRefStringAsync(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestEnumRefStringWithHttpInfoAsync(enumRefStringQuery, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async System.Threading.Tasks.Task> TestEnumRefStringWithHttpInfoAsync(StringEnumRef? enumRefStringQuery = default(StringEnumRef?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (enumRefStringQuery != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "enum_ref_string_query", enumRefStringQuery));
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestEnumRefString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.GetAsync("/query/enum_ref_string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestEnumRefString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ public string TestQueryDatetimeDateString(DateTime? datetimeQuery = default(DateTime?), DateTime? dateQuery = default(DateTime?), string? stringQuery = default(string?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryDatetimeDateStringWithHttpInfo(datetimeQuery, dateQuery, stringQuery);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ public Org.OpenAPITools.Client.ApiResponse TestQueryDatetimeDateStringWithHttpInfo(DateTime? datetimeQuery = default(DateTime?), DateTime? dateQuery = default(DateTime?), string? stringQuery = default(string?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (datetimeQuery != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "datetime_query", datetimeQuery));
+ }
+ if (dateQuery != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "date_query", dateQuery));
+ }
+ if (stringQuery != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_query", stringQuery));
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestQueryDatetimeDateString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get("/query/datetime/date/string", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestQueryDatetimeDateString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ public async System.Threading.Tasks.Task TestQueryDatetimeDateStringAsync(DateTime? datetimeQuery = default(DateTime?), DateTime? dateQuery = default(DateTime?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryDatetimeDateStringWithHttpInfoAsync(datetimeQuery, dateQuery, stringQuery, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async System.Threading.Tasks.Task> TestQueryDatetimeDateStringWithHttpInfoAsync(DateTime? datetimeQuery = default(DateTime?), DateTime? dateQuery = default(DateTime?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (datetimeQuery != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "datetime_query", datetimeQuery));
+ }
+ if (dateQuery != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "date_query", dateQuery));
+ }
+ if (stringQuery != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_query", stringQuery));
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestQueryDatetimeDateString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.GetAsync("/query/datetime/date/string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestQueryDatetimeDateString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ public string TestQueryIntegerBooleanString(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryIntegerBooleanStringWithHttpInfo(integerQuery, booleanQuery, stringQuery);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ public Org.OpenAPITools.Client.ApiResponse TestQueryIntegerBooleanStringWithHttpInfo(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (integerQuery != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "integer_query", integerQuery));
+ }
+ if (booleanQuery != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "boolean_query", booleanQuery));
+ }
+ if (stringQuery != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_query", stringQuery));
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestQueryIntegerBooleanString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get("/query/integer/boolean/string", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestQueryIntegerBooleanString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ public async System.Threading.Tasks.Task TestQueryIntegerBooleanStringAsync(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryIntegerBooleanStringWithHttpInfoAsync(integerQuery, booleanQuery, stringQuery, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// (optional)
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async System.Threading.Tasks.Task> TestQueryIntegerBooleanStringWithHttpInfoAsync(int? integerQuery = default(int?), bool? booleanQuery = default(bool?), string? stringQuery = default(string?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (integerQuery != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "integer_query", integerQuery));
+ }
+ if (booleanQuery != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "boolean_query", booleanQuery));
+ }
+ if (stringQuery != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "string_query", stringQuery));
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestQueryIntegerBooleanString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.GetAsync("/query/integer/boolean/string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestQueryIntegerBooleanString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ public string TestQueryStyleDeepObjectExplodeTrueObject(Pet? queryObject = default(Pet?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(queryObject);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ public Org.OpenAPITools.Client.ApiResponse TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(Pet? queryObject = default(Pet?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (queryObject != null)
+ {
+ if (queryObject.Id != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[id]", queryObject.Id));
+ }
+ if (queryObject.Name != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[name]", queryObject.Name));
+ }
+ if (queryObject.Category != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[category]", queryObject.Category));
+ }
+ if (queryObject.PhotoUrls != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[photoUrls]", queryObject.PhotoUrls));
+ }
+ if (queryObject.Tags != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[tags]", queryObject.Tags));
+ }
+ if (queryObject.Status != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "queryObject[status]", queryObject.Status));
+ }
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestQueryStyleDeepObjectExplodeTrueObject";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get("/query/style_deepObject/explode_true/object", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestQueryStyleDeepObjectExplodeTrueObject", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ public async System.Threading.Tasks.Task TestQueryStyleDeepObjectExplodeTrueObjectAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfoAsync(queryObject, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async System.Threading.Tasks.Task> TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfoAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (queryObject != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject));
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestQueryStyleDeepObjectExplodeTrueObject";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.GetAsync("/query/style_deepObject/explode_true/object", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestQueryStyleDeepObjectExplodeTrueObject", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ public string TestQueryStyleDeepObjectExplodeTrueObjectAllOf(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(queryObject);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ public Org.OpenAPITools.Client.ApiResponse TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (queryObject != null)
+ {
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestQueryStyleDeepObjectExplodeTrueObjectAllOf";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get("/query/style_deepObject/explode_true/object/allOf", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestQueryStyleDeepObjectExplodeTrueObjectAllOf", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ public async System.Threading.Tasks.Task TestQueryStyleDeepObjectExplodeTrueObjectAllOfAsync(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfoAsync(queryObject, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async System.Threading.Tasks.Task> TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfoAsync(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter? queryObject = default(TestQueryStyleDeepObjectExplodeTrueObjectAllOfQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (queryObject != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject));
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestQueryStyleDeepObjectExplodeTrueObjectAllOf";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.GetAsync("/query/style_deepObject/explode_true/object/allOf", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestQueryStyleDeepObjectExplodeTrueObjectAllOf", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ public string TestQueryStyleFormExplodeTrueArrayString(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo(queryObject);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ public Org.OpenAPITools.Client.ApiResponse TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (queryObject != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject));
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeTrueArrayString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get("/query/style_form/explode_true/array_string", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestQueryStyleFormExplodeTrueArrayString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ public async System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueArrayStringAsync(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryStyleFormExplodeTrueArrayStringWithHttpInfoAsync(queryObject, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueArrayStringWithHttpInfoAsync(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter? queryObject = default(TestQueryStyleFormExplodeTrueArrayStringQueryObjectParameter?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (queryObject != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject));
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeTrueArrayString";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.GetAsync("/query/style_form/explode_true/array_string", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestQueryStyleFormExplodeTrueArrayString", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ public string TestQueryStyleFormExplodeTrueObject(Pet? queryObject = default(Pet?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryStyleFormExplodeTrueObjectWithHttpInfo(queryObject);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ public Org.OpenAPITools.Client.ApiResponse TestQueryStyleFormExplodeTrueObjectWithHttpInfo(Pet? queryObject = default(Pet?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (queryObject != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject));
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeTrueObject";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get("/query/style_form/explode_true/object", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestQueryStyleFormExplodeTrueObject", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ public async System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueObjectAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryStyleFormExplodeTrueObjectWithHttpInfoAsync(queryObject, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueObjectWithHttpInfoAsync(Pet? queryObject = default(Pet?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (queryObject != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject));
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeTrueObject";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.GetAsync("/query/style_form/explode_true/object", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestQueryStyleFormExplodeTrueObject", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// string
+ public string TestQueryStyleFormExplodeTrueObjectAllOf(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(queryObject);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// ApiResponse of string
+ public Org.OpenAPITools.Client.ApiResponse TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0)
+ {
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (queryObject != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject));
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeTrueObjectAllOf";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = this.Client.Get("/query/style_form/explode_true/object/allOf", localVarRequestOptions, this.Configuration);
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestQueryStyleFormExplodeTrueObjectAllOf", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of string
+ public async System.Threading.Tasks.Task TestQueryStyleFormExplodeTrueObjectAllOfAsync(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ Org.OpenAPITools.Client.ApiResponse localVarResponse = await TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfoAsync(queryObject, operationIndex, cancellationToken).ConfigureAwait(false);
+ return localVarResponse.Data;
+ }
+
+ ///
+ /// Test query parameter(s) Test query parameter(s)
+ ///
+ /// Thrown when fails to make API call
+ /// (optional)
+ /// Index associated with the operation.
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse (string)
+ public async System.Threading.Tasks.Task> TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfoAsync(DataQuery? queryObject = default(DataQuery?), int operationIndex = 0, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+
+ Org.OpenAPITools.Client.RequestOptions localVarRequestOptions = new Org.OpenAPITools.Client.RequestOptions();
+
+ string[] _contentTypes = new string[] {
+ };
+
+ // to determine the Accept header
+ string[] _accepts = new string[] {
+ "text/plain"
+ };
+
+ var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);
+ if (localVarContentType != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Content-Type", localVarContentType);
+ }
+
+ var localVarAccept = Org.OpenAPITools.Client.ClientUtils.SelectHeaderAccept(_accepts);
+ if (localVarAccept != null)
+ {
+ localVarRequestOptions.HeaderParameters.Add("Accept", localVarAccept);
+ }
+
+ if (queryObject != null)
+ {
+ localVarRequestOptions.QueryParameters.Add(Org.OpenAPITools.Client.ClientUtils.ParameterToMultiMap("", "query_object", queryObject));
+ }
+
+ localVarRequestOptions.Operation = "QueryApi.TestQueryStyleFormExplodeTrueObjectAllOf";
+ localVarRequestOptions.OperationIndex = operationIndex;
+
+
+ // make the HTTP request
+ var localVarResponse = await this.AsynchronousClient.GetAsync("/query/style_form/explode_true/object/allOf", localVarRequestOptions, this.Configuration, cancellationToken).ConfigureAwait(false);
+
+ if (this.ExceptionFactory != null)
+ {
+ Exception _exception = this.ExceptionFactory("TestQueryStyleFormExplodeTrueObjectAllOf", localVarResponse);
+ if (_exception != null)
+ {
+ throw _exception;
+ }
+ }
+
+ return localVarResponse;
+ }
+
+ }
+}
diff --git a/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Client/ApiClient.cs b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Client/ApiClient.cs
new file mode 100644
index 00000000000..0d3e29e4de7
--- /dev/null
+++ b/samples/client/echo_api/csharp-restsharp/src/Org.OpenAPITools/Client/ApiClient.cs
@@ -0,0 +1,838 @@
+/*
+ * Echo Server API
+ *
+ * Echo Server API
+ *
+ * The version of the OpenAPI document: 0.1.0
+ * Contact: team@openapitools.org
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Globalization;
+using System.IO;
+using System.Linq;
+using System.Net;
+using System.Reflection;
+using System.Runtime.Serialization;
+using System.Runtime.Serialization.Formatters;
+using System.Text;
+using System.Threading;
+using System.Text.RegularExpressions;
+using System.Threading.Tasks;
+using System.Web;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Serialization;
+using RestSharp;
+using RestSharp.Serializers;
+using RestSharpMethod = RestSharp.Method;
+using Polly;
+
+namespace Org.OpenAPITools.Client
+{
+ ///
+ /// Allows RestSharp to Serialize/Deserialize JSON using our custom logic, but only when ContentType is JSON.
+ ///
+ internal class CustomJsonCodec : IRestSerializer, ISerializer, IDeserializer
+ {
+ private readonly IReadableConfiguration _configuration;
+ private static readonly string _contentType = "application/json";
+ private readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings
+ {
+ // OpenAPI generated types generally hide default constructors.
+ ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor,
+ ContractResolver = new DefaultContractResolver
+ {
+ NamingStrategy = new CamelCaseNamingStrategy
+ {
+ OverrideSpecifiedNames = false
+ }
+ }
+ };
+
+ public CustomJsonCodec(IReadableConfiguration configuration)
+ {
+ _configuration = configuration;
+ }
+
+ public CustomJsonCodec(JsonSerializerSettings serializerSettings, IReadableConfiguration configuration)
+ {
+ _serializerSettings = serializerSettings;
+ _configuration = configuration;
+ }
+
+ ///
+ /// Serialize the object into a JSON string.
+ ///
+ /// Object to be serialized.
+ /// A JSON string.
+ public string Serialize(object obj)
+ {
+ if (obj != null && obj is Org.OpenAPITools.Model.AbstractOpenAPISchema)
+ {
+ // the object to be serialized is an oneOf/anyOf schema
+ return ((Org.OpenAPITools.Model.AbstractOpenAPISchema)obj).ToJson();
+ }
+ else
+ {
+ return JsonConvert.SerializeObject(obj, _serializerSettings);
+ }
+ }
+
+ public string Serialize(Parameter bodyParameter) => Serialize(bodyParameter.Value);
+
+ public T Deserialize(RestResponse response)
+ {
+ var result = (T)Deserialize(response, typeof(T));
+ return result;
+ }
+
+ ///
+ /// Deserialize the JSON string into a proper object.
+ ///
+ /// The HTTP response.
+ /// Object type.
+ /// Object representation of the JSON string.
+ internal object Deserialize(RestResponse response, Type type)
+ {
+ if (type == typeof(byte[])) // return byte array
+ {
+ return response.RawBytes;
+ }
+
+ // TODO: ? if (type.IsAssignableFrom(typeof(Stream)))
+ if (type == typeof(Stream))
+ {
+ var bytes = response.RawBytes;
+ if (response.Headers != null)
+ {
+ var filePath = string.IsNullOrEmpty(_configuration.TempFolderPath)
+ ? Path.GetTempPath()
+ : _configuration.TempFolderPath;
+ var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$");
+ foreach (var header in response.Headers)
+ {
+ var match = regex.Match(header.ToString());
+ if (match.Success)
+ {
+ string fileName = filePath + ClientUtils.SanitizeFilename(match.Groups[1].Value.Replace("\"", "").Replace("'", ""));
+ File.WriteAllBytes(fileName, bytes);
+ return new FileStream(fileName, FileMode.Open);
+ }
+ }
+ }
+ var stream = new MemoryStream(bytes);
+ 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 Convert.ChangeType(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);
+ }
+ }
+
+ public ISerializer Serializer => this;
+ public IDeserializer Deserializer => this;
+
+ public string[] AcceptedContentTypes => RestSharp.Serializers.ContentType.JsonAccept;
+
+ public SupportsContentType SupportsContentType => contentType =>
+ contentType.EndsWith("json", StringComparison.InvariantCultureIgnoreCase) ||
+ contentType.EndsWith("javascript", StringComparison.InvariantCultureIgnoreCase);
+
+ public string ContentType
+ {
+ get { return _contentType; }
+ set { throw new InvalidOperationException("Not allowed to set content type."); }
+ }
+
+ public DataFormat DataFormat => DataFormat.Json;
+ }
+ ///
+ /// Provides a default implementation of an Api client (both synchronous and asynchronous implementations),
+ /// encapsulating general REST accessor use cases.
+ ///
+ public partial class ApiClient : ISynchronousClient, IAsynchronousClient
+ {
+ private readonly string _baseUrl;
+
+ ///
+ /// Specifies the settings on a object.
+ /// These settings can be adjusted to accommodate custom serialization rules.
+ ///
+ public JsonSerializerSettings SerializerSettings { get; set; } = new JsonSerializerSettings
+ {
+ // OpenAPI generated types generally hide default constructors.
+ ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor,
+ ContractResolver = new DefaultContractResolver
+ {
+ NamingStrategy = new CamelCaseNamingStrategy
+ {
+ OverrideSpecifiedNames = false
+ }
+ }
+ };
+
+ ///
+ /// Allows for extending request processing for generated code.
+ ///
+ /// The RestSharp request object
+ partial void InterceptRequest(RestRequest request);
+
+ ///
+ /// Allows for extending response processing for generated code.
+ ///
+ /// The RestSharp request object
+ /// The RestSharp response object
+ partial void InterceptResponse(RestRequest request, RestResponse response);
+
+ ///
+ /// Initializes a new instance of the , defaulting to the global configurations' base url.
+ ///
+ public ApiClient()
+ {
+ _baseUrl = Org.OpenAPITools.Client.GlobalConfiguration.Instance.BasePath;
+ }
+
+ ///
+ /// Initializes a new instance of the
+ ///
+ /// The target service's base path in URL format.
+ ///
+ public ApiClient(string basePath)
+ {
+ if (string.IsNullOrEmpty(basePath))
+ throw new ArgumentException("basePath cannot be empty");
+
+ _baseUrl = basePath;
+ }
+
+ ///
+ /// Constructs the RestSharp version of an http method
+ ///
+ /// Swagger Client Custom HttpMethod
+ /// RestSharp's HttpMethod instance.
+ ///
+ private RestSharpMethod Method(HttpMethod method)
+ {
+ RestSharpMethod other;
+ switch (method)
+ {
+ case HttpMethod.Get:
+ other = RestSharpMethod.Get;
+ break;
+ case HttpMethod.Post:
+ other = RestSharpMethod.Post;
+ break;
+ case HttpMethod.Put:
+ other = RestSharpMethod.Put;
+ break;
+ case HttpMethod.Delete:
+ other = RestSharpMethod.Delete;
+ break;
+ case HttpMethod.Head:
+ other = RestSharpMethod.Head;
+ break;
+ case HttpMethod.Options:
+ other = RestSharpMethod.Options;
+ break;
+ case HttpMethod.Patch:
+ other = RestSharpMethod.Patch;
+ break;
+ default:
+ throw new ArgumentOutOfRangeException("method", method, null);
+ }
+
+ return other;
+ }
+
+ ///
+ /// Provides all logic for constructing a new RestSharp .
+ /// At this point, all information for querying the service is known. Here, it is simply
+ /// mapped into the RestSharp request.
+ ///
+ /// The http verb.
+ /// The target path (or resource).
+ /// The additional request options.
+ /// A per-request configuration object. It is assumed that any merge with
+ /// GlobalConfiguration has been done before calling this method.
+ /// [private] A new RestRequest instance.
+ ///
+ private RestRequest NewRequest(
+ HttpMethod method,
+ string path,
+ RequestOptions options,
+ IReadableConfiguration configuration)
+ {
+ if (path == null) throw new ArgumentNullException("path");
+ if (options == null) throw new ArgumentNullException("options");
+ if (configuration == null) throw new ArgumentNullException("configuration");
+
+ RestRequest request = new RestRequest(path, Method(method));
+
+ if (options.PathParameters != null)
+ {
+ foreach (var pathParam in options.PathParameters)
+ {
+ request.AddParameter(pathParam.Key, pathParam.Value, ParameterType.UrlSegment);
+ }
+ }
+
+ if (options.QueryParameters != null)
+ {
+ foreach (var queryParam in options.QueryParameters)
+ {
+ foreach (var value in queryParam.Value)
+ {
+ request.AddQueryParameter(queryParam.Key, value);
+ }
+ }
+ }
+
+ if (configuration.DefaultHeaders != null)
+ {
+ foreach (var headerParam in configuration.DefaultHeaders)
+ {
+ request.AddHeader(headerParam.Key, headerParam.Value);
+ }
+ }
+
+ if (options.HeaderParameters != null)
+ {
+ foreach (var headerParam in options.HeaderParameters)
+ {
+ foreach (var value in headerParam.Value)
+ {
+ request.AddHeader(headerParam.Key, value);
+ }
+ }
+ }
+
+ if (options.FormParameters != null)
+ {
+ foreach (var formParam in options.FormParameters)
+ {
+ request.AddParameter(formParam.Key, formParam.Value);
+ }
+ }
+
+ if (options.Data != null)
+ {
+ if (options.Data is Stream stream)
+ {
+ var contentType = "application/octet-stream";
+ if (options.HeaderParameters != null)
+ {
+ var contentTypes = options.HeaderParameters["Content-Type"];
+ contentType = contentTypes[0];
+ }
+
+ var bytes = ClientUtils.ReadAsBytes(stream);
+ request.AddParameter(contentType, bytes, ParameterType.RequestBody);
+ }
+ else
+ {
+ if (options.HeaderParameters != null)
+ {
+ var contentTypes = options.HeaderParameters["Content-Type"];
+ if (contentTypes == null || contentTypes.Any(header => header.Contains("application/json")))
+ {
+ request.RequestFormat = DataFormat.Json;
+ }
+ else
+ {
+ // TODO: Generated client user should add additional handlers. RestSharp only supports XML and JSON, with XML as default.
+ }
+ }
+ else
+ {
+ // Here, we'll assume JSON APIs are more common. XML can be forced by adding produces/consumes to openapi spec explicitly.
+ request.RequestFormat = DataFormat.Json;
+ }
+
+ request.AddJsonBody(options.Data);
+ }
+ }
+
+ if (options.FileParameters != null)
+ {
+ foreach (var fileParam in options.FileParameters)
+ {
+ foreach (var file in fileParam.Value)
+ {
+ var bytes = ClientUtils.ReadAsBytes(file);
+ var fileStream = file as FileStream;
+ if (fileStream != null)
+ request.AddFile(fileParam.Key, bytes, System.IO.Path.GetFileName(fileStream.Name));
+ else
+ request.AddFile(fileParam.Key, bytes, "no_file_name_provided");
+ }
+ }
+ }
+
+ return request;
+ }
+
+ private ApiResponse ToApiResponse(RestResponse response)
+ {
+ T result = response.Data;
+ string rawContent = response.Content;
+
+ var transformed = new ApiResponse(response.StatusCode, new Multimap(), result, rawContent)
+ {
+ ErrorText = response.ErrorMessage,
+ Cookies = new List()
+ };
+
+ if (response.Headers != null)
+ {
+ foreach (var responseHeader in response.Headers)
+ {
+ transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value));
+ }
+ }
+
+ if (response.ContentHeaders != null)
+ {
+ foreach (var responseHeader in response.ContentHeaders)
+ {
+ transformed.Headers.Add(responseHeader.Name, ClientUtils.ParameterToString(responseHeader.Value));
+ }
+ }
+
+ if (response.Cookies != null)
+ {
+ foreach (var responseCookies in response.Cookies.Cast())
+ {
+ transformed.Cookies.Add(
+ new Cookie(
+ responseCookies.Name,
+ responseCookies.Value,
+ responseCookies.Path,
+ responseCookies.Domain)
+ );
+ }
+ }
+
+ return transformed;
+ }
+
+ private ApiResponse Exec(RestRequest req, RequestOptions options, IReadableConfiguration configuration)
+ {
+ var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl;
+
+ var cookies = new CookieContainer();
+
+ if (options.Cookies != null && options.Cookies.Count > 0)
+ {
+ foreach (var cookie in options.Cookies)
+ {
+ cookies.Add(new Cookie(cookie.Name, cookie.Value));
+ }
+ }
+
+ var clientOptions = new RestClientOptions(baseUrl)
+ {
+ ClientCertificates = configuration.ClientCertificates,
+ CookieContainer = cookies,
+ MaxTimeout = configuration.Timeout,
+ Proxy = configuration.Proxy,
+ UserAgent = configuration.UserAgent,
+ UseDefaultCredentials = configuration.UseDefaultCredentials,
+ RemoteCertificateValidationCallback = configuration.RemoteCertificateValidationCallback
+ };
+
+ RestClient client = new RestClient(clientOptions)
+ .UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration));
+
+ InterceptRequest(req);
+
+ RestResponse response;
+ if (RetryConfiguration.RetryPolicy != null)
+ {
+ var policy = RetryConfiguration.RetryPolicy;
+ var policyResult = policy.ExecuteAndCapture(() => client.Execute(req));
+ response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse
+ {
+ Request = req,
+ ErrorException = policyResult.FinalException
+ };
+ }
+ else
+ {
+ response = client.Execute(req);
+ }
+
+ // if the response type is oneOf/anyOf, call FromJSON to deserialize the data
+ if (typeof(Org.OpenAPITools.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T)))
+ {
+ try
+ {
+ response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content });
+ }
+ catch (Exception ex)
+ {
+ throw ex.InnerException != null ? ex.InnerException : ex;
+ }
+ }
+ else if (typeof(T).Name == "Stream") // for binary response
+ {
+ response.Data = (T)(object)new MemoryStream(response.RawBytes);
+ }
+ else if (typeof(T).Name == "Byte[]") // for byte response
+ {
+ response.Data = (T)(object)response.RawBytes;
+ }
+ else if (typeof(T).Name == "String") // for string response
+ {
+ response.Data = (T)(object)response.Content;
+ }
+
+ InterceptResponse(req, response);
+
+ var result = ToApiResponse(response);
+ if (response.ErrorMessage != null)
+ {
+ result.ErrorText = response.ErrorMessage;
+ }
+
+ if (response.Cookies != null && response.Cookies.Count > 0)
+ {
+ if (result.Cookies == null) result.Cookies = new List();
+ foreach (var restResponseCookie in response.Cookies.Cast())
+ {
+ var cookie = new Cookie(
+ restResponseCookie.Name,
+ restResponseCookie.Value,
+ restResponseCookie.Path,
+ restResponseCookie.Domain
+ )
+ {
+ Comment = restResponseCookie.Comment,
+ CommentUri = restResponseCookie.CommentUri,
+ Discard = restResponseCookie.Discard,
+ Expired = restResponseCookie.Expired,
+ Expires = restResponseCookie.Expires,
+ HttpOnly = restResponseCookie.HttpOnly,
+ Port = restResponseCookie.Port,
+ Secure = restResponseCookie.Secure,
+ Version = restResponseCookie.Version
+ };
+
+ result.Cookies.Add(cookie);
+ }
+ }
+ return result;
+ }
+
+ private async Task> ExecAsync(RestRequest req, RequestOptions options, IReadableConfiguration configuration, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ var baseUrl = configuration.GetOperationServerUrl(options.Operation, options.OperationIndex) ?? _baseUrl;
+
+ var clientOptions = new RestClientOptions(baseUrl)
+ {
+ ClientCertificates = configuration.ClientCertificates,
+ MaxTimeout = configuration.Timeout,
+ Proxy = configuration.Proxy,
+ UserAgent = configuration.UserAgent,
+ UseDefaultCredentials = configuration.UseDefaultCredentials
+ };
+
+ RestClient client = new RestClient(clientOptions)
+ .UseSerializer(() => new CustomJsonCodec(SerializerSettings, configuration));
+
+ InterceptRequest(req);
+
+ RestResponse response;
+ if (RetryConfiguration.AsyncRetryPolicy != null)
+ {
+ var policy = RetryConfiguration.AsyncRetryPolicy;
+ var policyResult = await policy.ExecuteAndCaptureAsync((ct) => client.ExecuteAsync(req, ct), cancellationToken).ConfigureAwait(false);
+ response = (policyResult.Outcome == OutcomeType.Successful) ? client.Deserialize(policyResult.Result) : new RestResponse
+ {
+ Request = req,
+ ErrorException = policyResult.FinalException
+ };
+ }
+ else
+ {
+ response = await client.ExecuteAsync(req, cancellationToken).ConfigureAwait(false);
+ }
+
+ // if the response type is oneOf/anyOf, call FromJSON to deserialize the data
+ if (typeof(Org.OpenAPITools.Model.AbstractOpenAPISchema).IsAssignableFrom(typeof(T)))
+ {
+ response.Data = (T) typeof(T).GetMethod("FromJson").Invoke(null, new object[] { response.Content });
+ }
+ else if (typeof(T).Name == "Stream") // for binary response
+ {
+ response.Data = (T)(object)new MemoryStream(response.RawBytes);
+ }
+ else if (typeof(T).Name == "Byte[]") // for byte response
+ {
+ response.Data = (T)(object)response.RawBytes;
+ }
+
+ InterceptResponse(req, response);
+
+ var result = ToApiResponse(response);
+ if (response.ErrorMessage != null)
+ {
+ result.ErrorText = response.ErrorMessage;
+ }
+
+ if (response.Cookies != null && response.Cookies.Count > 0)
+ {
+ if (result.Cookies == null) result.Cookies = new List();
+ foreach (var restResponseCookie in response.Cookies.Cast())
+ {
+ var cookie = new Cookie(
+ restResponseCookie.Name,
+ restResponseCookie.Value,
+ restResponseCookie.Path,
+ restResponseCookie.Domain
+ )
+ {
+ Comment = restResponseCookie.Comment,
+ CommentUri = restResponseCookie.CommentUri,
+ Discard = restResponseCookie.Discard,
+ Expired = restResponseCookie.Expired,
+ Expires = restResponseCookie.Expires,
+ HttpOnly = restResponseCookie.HttpOnly,
+ Port = restResponseCookie.Port,
+ Secure = restResponseCookie.Secure,
+ Version = restResponseCookie.Version
+ };
+
+ result.Cookies.Add(cookie);
+ }
+ }
+ return result;
+ }
+
+ #region IAsynchronousClient
+ ///
+ /// Make a HTTP GET request (async).
+ ///
+ /// The target path (or resource).
+ /// The additional request options.
+ /// A per-request configuration object. It is assumed that any merge with
+ /// GlobalConfiguration has been done before calling this method.
+ /// Token that enables callers to cancel the request.
+ /// A Task containing ApiResponse
+ public Task> GetAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ var config = configuration ?? GlobalConfiguration.Instance;
+ return ExecAsync(NewRequest(HttpMethod.Get, path, options, config), options, config, cancellationToken);
+ }
+
+ ///
+ /// Make a HTTP POST request (async).
+ ///
+ /// The target path (or resource).
+ /// The additional request options.
+ /// A per-request configuration object. It is assumed that any merge with
+ /// GlobalConfiguration has been done before calling this method.
+ /// Token that enables callers to cancel the request.
+ /// A Task containing ApiResponse
+ public Task> PostAsync(string path, RequestOptions options, IReadableConfiguration configuration = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
+ {
+ var config = configuration ?? GlobalConfiguration.Instance;
+ return ExecAsync(NewRequest(HttpMethod.Post, path, options, config), options, config, cancellationToken);
+ }
+
+ ///
+ /// Make a HTTP PUT request (async).
+ ///
+ /// The target path (or resource).
+ /// The additional request options.
+ /// A per-request configuration object. It is assumed that any merge with
+ /// GlobalConfiguration has been done before calling this method.
+ /// Token that enables callers to cancel the request.
+ /// A Task containing ApiResponse
+ public Task> PutAsync