diff --git a/.github/workflows/samples-dotnet.yaml b/.github/workflows/samples-dotnet.yaml
index 328a3527c8b4..c345dad28290 100644
--- a/.github/workflows/samples-dotnet.yaml
+++ b/.github/workflows/samples-dotnet.yaml
@@ -4,11 +4,13 @@ on:
push:
paths:
- 'samples/client/petstore/csharp-netcore/**net6.0**/'
+ - 'samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore**/'
- 'samples/server/petstore/aspnetcore-6.0/**'
- 'samples/server/petstore/aspnetcore-6.0-pocoModels/**'
pull_request:
paths:
- 'samples/client/petstore/csharp-netcore/**net6.0**/'
+ - 'samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore**/'
- 'samples/server/petstore/aspnetcore-6.0/**'
- 'samples/server/petstore/aspnetcore-6.0-pocoModels/**'
jobs:
@@ -22,6 +24,9 @@ jobs:
# clients
- samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0
- samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt
+ - samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf
+ - samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf
+ - samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf
- samples/server/petstore/aspnetcore-6.0
- samples/server/petstore/aspnetcore-6.0-pocoModels
- samples/server/petstore/aspnetcore-6.0-project4Models
diff --git a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-allOf.yaml b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-allOf.yaml
new file mode 100644
index 000000000000..7c2d2e4c4c29
--- /dev/null
+++ b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-allOf.yaml
@@ -0,0 +1,12 @@
+# for csharp-netcore generichost
+generatorName: csharp-netcore
+outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf
+inputSpec: modules/openapi-generator/src/test/resources/3_0/allOf.yaml
+library: generichost
+templateDir: modules/openapi-generator/src/main/resources/csharp-netcore
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ targetFramework: net7.0
+ nullableReferenceTypes: true
diff --git a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-anyOf.yaml b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-anyOf.yaml
new file mode 100644
index 000000000000..98ec98991588
--- /dev/null
+++ b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-anyOf.yaml
@@ -0,0 +1,12 @@
+# for csharp-netcore generichost
+generatorName: csharp-netcore
+outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf
+inputSpec: modules/openapi-generator/src/test/resources/3_0/anyOf.yaml
+library: generichost
+templateDir: modules/openapi-generator/src/main/resources/csharp-netcore
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ targetFramework: net7.0
+ nullableReferenceTypes: true
diff --git a/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-oneOf.yaml b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-oneOf.yaml
new file mode 100644
index 000000000000..a670bb581218
--- /dev/null
+++ b/bin/configs/csharp-netcore-OpenAPIClient-generichost-netcore-latest-oneOf.yaml
@@ -0,0 +1,12 @@
+# for csharp-netcore generichost
+generatorName: csharp-netcore
+outputDir: samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf
+inputSpec: modules/openapi-generator/src/test/resources/3_0/oneOf.yaml
+library: generichost
+templateDir: modules/openapi-generator/src/main/resources/csharp-netcore
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ targetFramework: net7.0
+ nullableReferenceTypes: true
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.gitignore b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.gitignore
new file mode 100644
index 000000000000..1ee53850b84c
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.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/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator-ignore b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator-ignore
new file mode 100644
index 000000000000..7484ee590a38
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.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/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator/FILES
new file mode 100644
index 000000000000..f71328b618e2
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator/FILES
@@ -0,0 +1,41 @@
+.gitignore
+Org.OpenAPITools.sln
+README.md
+appveyor.yml
+docs/apis/DefaultApi.md
+docs/models/Adult.md
+docs/models/AdultAllOf.md
+docs/models/Child.md
+docs/models/ChildAllOf.md
+docs/models/Person.md
+docs/scripts/git_push.ps1
+docs/scripts/git_push.sh
+src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs
+src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
+src/Org.OpenAPITools.Test/README.md
+src/Org.OpenAPITools/Api/DefaultApi.cs
+src/Org.OpenAPITools/Api/IApi.cs
+src/Org.OpenAPITools/Client/ApiException.cs
+src/Org.OpenAPITools/Client/ApiFactory.cs
+src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs
+src/Org.OpenAPITools/Client/ApiResponse`1.cs
+src/Org.OpenAPITools/Client/ClientUtils.cs
+src/Org.OpenAPITools/Client/CookieContainer.cs
+src/Org.OpenAPITools/Client/DateTimeJsonConverter.cs
+src/Org.OpenAPITools/Client/DateTimeNullableJsonConverter.cs
+src/Org.OpenAPITools/Client/HostConfiguration.cs
+src/Org.OpenAPITools/Client/JsonSerializerOptionsProvider.cs
+src/Org.OpenAPITools/Client/RateLimitProvider`1.cs
+src/Org.OpenAPITools/Client/TokenBase.cs
+src/Org.OpenAPITools/Client/TokenContainer`1.cs
+src/Org.OpenAPITools/Client/TokenProvider`1.cs
+src/Org.OpenAPITools/Extensions/IHostBuilderExtensions.cs
+src/Org.OpenAPITools/Extensions/IHttpClientBuilderExtensions.cs
+src/Org.OpenAPITools/Extensions/IServiceCollectionExtensions.cs
+src/Org.OpenAPITools/Model/Adult.cs
+src/Org.OpenAPITools/Model/AdultAllOf.cs
+src/Org.OpenAPITools/Model/Child.cs
+src/Org.OpenAPITools/Model/ChildAllOf.cs
+src/Org.OpenAPITools/Model/Person.cs
+src/Org.OpenAPITools/Org.OpenAPITools.csproj
+src/Org.OpenAPITools/README.md
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator/VERSION
new file mode 100644
index 000000000000..d6b4ec4aa783
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator/VERSION
@@ -0,0 +1 @@
+6.3.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/Org.OpenAPITools.sln b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/Org.OpenAPITools.sln
new file mode 100644
index 000000000000..5b15451c9dcf
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/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", "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Org.OpenAPITools.Test", "src\Org.OpenAPITools.Test\Org.OpenAPITools.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
\ No newline at end of file
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/README.md
new file mode 100644
index 000000000000..f9c1c7f74621
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/README.md
@@ -0,0 +1 @@
+# Created with Openapi Generator
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/appveyor.yml b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/appveyor.yml
new file mode 100644
index 000000000000..f76f63cee506
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/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/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/apis/DefaultApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/apis/DefaultApi.md
new file mode 100644
index 000000000000..165d829775f8
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/apis/DefaultApi.md
@@ -0,0 +1,95 @@
+# Org.OpenAPITools.Api.DefaultApi
+
+All URIs are relative to *http://api.example.xyz/v1*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**List**](DefaultApi.md#list) | **GET** /person/display/{personId} | |
+
+
+# **List**
+> Person List (string personId)
+
+
+
+### 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 ListExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://api.example.xyz/v1";
+ var apiInstance = new DefaultApi(config);
+ var personId = "personId_example"; // string | The id of the person to retrieve
+
+ try
+ {
+ Person result = apiInstance.List(personId);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling DefaultApi.List: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the ListWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ ApiResponse response = apiInstance.ListWithHttpInfo(personId);
+ 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 DefaultApi.ListWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **personId** | **string** | The id of the person to retrieve | |
+
+### Return type
+
+[**Person**](Person.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | OK | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/models/Adult.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/models/Adult.md
new file mode 100644
index 000000000000..5f24d78cdaf3
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/models/Adult.md
@@ -0,0 +1,13 @@
+# Org.OpenAPITools.Model.Adult
+A representation of an adult
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**FirstName** | **string** | | [optional]
+**LastName** | **string** | | [optional]
+**Type** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/models/AdultAllOf.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/models/AdultAllOf.md
new file mode 100644
index 000000000000..401f0b774387
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/models/AdultAllOf.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.AdultAllOf
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Children** | [**List<Child>**](Child.md) | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/models/Child.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/models/Child.md
new file mode 100644
index 000000000000..4c453728b243
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/models/Child.md
@@ -0,0 +1,14 @@
+# Org.OpenAPITools.Model.Child
+A representation of a child
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**FirstName** | **string** | | [optional]
+**LastName** | **string** | | [optional]
+**Type** | **string** | | [optional]
+**BoosterSeat** | **bool** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/models/ChildAllOf.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/models/ChildAllOf.md
new file mode 100644
index 000000000000..14d559e334bc
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/models/ChildAllOf.md
@@ -0,0 +1,10 @@
+# Org.OpenAPITools.Model.ChildAllOf
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Age** | **int** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/models/Person.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/models/Person.md
new file mode 100644
index 000000000000..42c19689f9a1
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/models/Person.md
@@ -0,0 +1,12 @@
+# Org.OpenAPITools.Model.Person
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**FirstName** | **string** | | [optional]
+**LastName** | **string** | | [optional]
+**Type** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/scripts/git_push.ps1 b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/scripts/git_push.ps1
new file mode 100644
index 000000000000..73ed35c2bb10
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/scripts/git_push.ps1
@@ -0,0 +1,75 @@
+param(
+ [Parameter()][Alias("g")][String]$GitHost = "github.com",
+ [Parameter()][Alias("u")][String]$GitUserId = "GIT_USER_ID",
+ [Parameter()][Alias("r")][String]$GitRepoId = "GIT_REPO_ID",
+ [Parameter()][Alias("m")][string]$Message = "Minor update",
+ [Parameter()][Alias("h")][switch]$Help
+)
+
+function Publish-ToGitHost{
+ if ([string]::IsNullOrWhiteSpace($Message) -or $Message -eq "Minor update"){
+ # it seems unlikely that we would want our git commit message to be the default, so lets prompt the user
+ $Message = Read-Host -Prompt "Please provide a commit message or press enter"
+ $Message = if([string]::IsNullOrWhiteSpace($Message)) { "no message provided" } else { $Message }
+ }
+
+ git init
+ git add .
+ git commit -am "${Message}"
+ $branchName=$(git rev-parse --abbrev-ref HEAD)
+ $gitRemote=$(git remote)
+
+ if([string]::IsNullOrWhiteSpace($gitRemote)){
+ git remote add origin https://${GitHost}/${GitUserId}/${GitRepoId}.git
+ }
+
+ Write-Output "Pulling from https://${GitHost}/${GitUserId}/${GitRepoId}.git"
+ git pull origin $branchName --ff-only
+
+ if ($LastExitCode -ne 0){
+ if (${GitHost} -eq "github.com"){
+ Write-Output "The ${GitRepoId} repository may not exist yet. Creating it now with the GitHub CLI."
+ gh auth login --hostname github.com --web
+ gh repo create $GitRepoId --private
+ # sleep 2 seconds to ensure git finishes creation of the repo
+ Start-Sleep -Seconds 2
+ }
+ else{
+ throw "There was an issue pulling the origin branch. The remote repository may not exist yet."
+ }
+ }
+
+ Write-Output "Pushing to https://${GitHost}/${GitUserId}/${GitRepoId}.git"
+ git push origin $branchName
+}
+
+$ErrorActionPreference = "Stop"
+Set-StrictMode -Version 3.0
+
+if ($Help){
+ Write-Output "
+ This script will initialize a git repository, then add and commit all files.
+ The local repository will then be pushed to your preferred git provider.
+ If the remote repository does not exist yet and you are using GitHub,
+ the repository will be created for you provided you have the GitHub CLI installed.
+
+ Parameters:
+ -g | -GitHost -> ex: github.com
+ -m | -Message -> the git commit message
+ -r | -GitRepoId -> the name of the repository
+ -u | -GitUserId -> your user id
+ "
+
+ return
+}
+
+$rootPath=Resolve-Path -Path $PSScriptRoot/../..
+
+Push-Location $rootPath
+
+try {
+ Publish-ToGitHost $GitHost $GitUserId $GitRepoId $Message
+}
+finally{
+ Pop-Location
+}
\ No newline at end of file
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/scripts/git_push.sh b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/scripts/git_push.sh
new file mode 100644
index 000000000000..882104922184
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/docs/scripts/git_push.sh
@@ -0,0 +1,49 @@
+#!/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_USER_ID}
+git_repo_id=${2:-GIT_REPO_ID}
+release_note=${3:-Minor update}
+git_host=${4:-github.com}
+
+starting_directory=$(pwd)
+script_root="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
+cd $script_root
+cd ../..
+
+if [ "$release_note" = "" ] || [ "$release_note" = "Minor update" ]; then
+ # it seems unlikely that we would want our git commit message to be the default, so lets prompt the user
+ echo "Please provide a commit message or press enter"
+ read user_input
+ release_note=$user_input
+ if [ "$release_note" = "" ]; then
+ release_note="no message provided"
+ fi
+fi
+
+git init
+git add .
+git commit -am "$release_note"
+branch_name=$(git rev-parse --abbrev-ref HEAD)
+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
+
+echo "[INFO] Pulling from https://${git_host}/${git_user_id}/${git_repo_id}.git"
+git pull origin $branch_name --ff-only
+
+echo "[INFO] Pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
+git push origin $branch_name
+
+cd $starting_directory
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Api/ApiTestsBase.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Api/ApiTestsBase.cs
new file mode 100644
index 000000000000..7cc496a25fc9
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Api/ApiTestsBase.cs
@@ -0,0 +1,58 @@
+/*
+ * Example
+ *
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using Microsoft.Extensions.Hosting;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Extensions;
+
+
+/* *********************************************************************************
+* Follow these manual steps to construct tests.
+* This file will not be overwritten.
+* *********************************************************************************
+* 1. Navigate to ApiTests.Base.cs and ensure any tokens are being created correctly.
+* Take care not to commit credentials to any repository.
+*
+* 2. Mocking is coordinated by ApiTestsBase#AddApiHttpClients.
+* To mock the client, use the generic AddApiHttpClients.
+* To mock the server, change the client's BaseAddress.
+*
+* 3. Locate the test you want below
+* - remove the skip property from the Fact attribute
+* - set the value of any variables if necessary
+*
+* 4. Run the tests and ensure they work.
+*
+*/
+
+
+namespace Org.OpenAPITools.Test.Api
+{
+ ///
+ /// Base class for API tests
+ ///
+ public class ApiTestsBase
+ {
+ protected readonly IHost _host;
+
+ public ApiTestsBase(string[] args)
+ {
+ _host = CreateHostBuilder(args).Build();
+ }
+
+ public static IHostBuilder CreateHostBuilder(string[] args) => Host.CreateDefaultBuilder(args)
+ .ConfigureApi((context, services, options) =>
+ {
+
+ });
+ }
+}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs
new file mode 100644
index 000000000000..a0d68acdbb0a
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Api/DefaultApiTests.cs
@@ -0,0 +1,65 @@
+/*
+ * Example
+ *
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Xunit;
+using Microsoft.Extensions.DependencyInjection;
+using Org.OpenAPITools.IApi;
+using Org.OpenAPITools.Model;
+
+
+/* *********************************************************************************
+* Follow these manual steps to construct tests.
+* This file will not be overwritten.
+* *********************************************************************************
+* 1. Navigate to ApiTests.Base.cs and ensure any tokens are being created correctly.
+* Take care not to commit credentials to any repository.
+*
+* 2. Mocking is coordinated by ApiTestsBase#AddApiHttpClients.
+* To mock the client, use the generic AddApiHttpClients.
+* To mock the server, change the client's BaseAddress.
+*
+* 3. Locate the test you want below
+* - remove the skip property from the Fact attribute
+* - set the value of any variables if necessary
+*
+* 4. Run the tests and ensure they work.
+*
+*/
+
+
+namespace Org.OpenAPITools.Test.Api
+{
+ ///
+ /// Class for testing DefaultApi
+ ///
+ public sealed class DefaultApiTests : ApiTestsBase
+ {
+ private readonly IApi.IDefaultApi _instance;
+
+ public DefaultApiTests(): base(Array.Empty())
+ {
+ _instance = _host.Services.GetRequiredService();
+ }
+
+
+ ///
+ /// Test List
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task ListAsyncTest()
+ {
+ string personId = default;
+ var response = await _instance.ListAsync(personId);
+ Assert.IsType(response);
+ }
+ }
+}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs
new file mode 100644
index 000000000000..7200578a9cae
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Api/DependencyInjectionTests.cs
@@ -0,0 +1,103 @@
+/*
+ * Example
+ *
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using Microsoft.Extensions.Hosting;
+using Microsoft.Extensions.DependencyInjection;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.IApi;
+using Org.OpenAPITools.Extensions;
+using Xunit;
+
+namespace Org.OpenAPITools.Test.Api
+{
+ ///
+ /// Tests the dependency injection.
+ ///
+ public class DependencyInjectionTest
+ {
+ private readonly IHost _hostUsingConfigureWithoutAClient =
+ Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, services, options) =>
+ {
+
+ })
+ .Build();
+
+ private readonly IHost _hostUsingConfigureWithAClient =
+ Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, services, options) =>
+ {
+
+ options.AddApiHttpClients(client => client.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS));
+ })
+ .Build();
+
+ private readonly IHost _hostUsingAddWithoutAClient =
+ Host.CreateDefaultBuilder(Array.Empty()).ConfigureServices((host, services) =>
+ {
+ services.AddApi(options =>
+ {
+
+ });
+ })
+ .Build();
+
+ private readonly IHost _hostUsingAddWithAClient =
+ Host.CreateDefaultBuilder(Array.Empty()).ConfigureServices((host, services) =>
+ {
+ services.AddApi(options =>
+ {
+
+ options.AddApiHttpClients(client => client.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS));
+ });
+ })
+ .Build();
+
+ ///
+ /// Test dependency injection when using the configure method
+ ///
+ [Fact]
+ public void ConfigureApiWithAClientTest()
+ {
+ var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService();
+ Assert.True(defaultApi.HttpClient.BaseAddress != null);
+ }
+
+ ///
+ /// Test dependency injection when using the configure method
+ ///
+ [Fact]
+ public void ConfigureApiWithoutAClientTest()
+ {
+ var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService();
+ Assert.True(defaultApi.HttpClient.BaseAddress != null);
+ }
+
+ ///
+ /// Test dependency injection when using the add method
+ ///
+ [Fact]
+ public void AddApiWithAClientTest()
+ {
+ var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService();
+ Assert.True(defaultApi.HttpClient.BaseAddress != null);
+ }
+
+ ///
+ /// Test dependency injection when using the add method
+ ///
+ [Fact]
+ public void AddApiWithoutAClientTest()
+ {
+ var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService();
+ Assert.True(defaultApi.HttpClient.BaseAddress != null);
+ }
+ }
+}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Model/AdultAllOfTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Model/AdultAllOfTests.cs
new file mode 100644
index 000000000000..d534024a85d2
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Model/AdultAllOfTests.cs
@@ -0,0 +1,69 @@
+/*
+ * Example
+ *
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// Class for testing AdultAllOf
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class AdultAllOfTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for AdultAllOf
+ //private AdultAllOf instance;
+
+ public AdultAllOfTests()
+ {
+ // TODO uncomment below to create an instance of AdultAllOf
+ //instance = new AdultAllOf();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of AdultAllOf
+ ///
+ [Fact]
+ public void AdultAllOfInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" AdultAllOf
+ //Assert.IsType(instance);
+ }
+
+
+ ///
+ /// Test the property 'Children'
+ ///
+ [Fact]
+ public void ChildrenTest()
+ {
+ // TODO unit test for the property 'Children'
+ }
+
+ }
+
+}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Model/AdultTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Model/AdultTests.cs
new file mode 100644
index 000000000000..026277c98bbf
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Model/AdultTests.cs
@@ -0,0 +1,61 @@
+/*
+ * Example
+ *
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// Class for testing Adult
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class AdultTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for Adult
+ //private Adult instance;
+
+ public AdultTests()
+ {
+ // TODO uncomment below to create an instance of Adult
+ //instance = new Adult();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of Adult
+ ///
+ [Fact]
+ public void AdultInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" Adult
+ //Assert.IsType(instance);
+ }
+
+
+
+ }
+
+}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Model/ChildAllOfTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Model/ChildAllOfTests.cs
new file mode 100644
index 000000000000..54deefe89545
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Model/ChildAllOfTests.cs
@@ -0,0 +1,69 @@
+/*
+ * Example
+ *
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// Class for testing ChildAllOf
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class ChildAllOfTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for ChildAllOf
+ //private ChildAllOf instance;
+
+ public ChildAllOfTests()
+ {
+ // TODO uncomment below to create an instance of ChildAllOf
+ //instance = new ChildAllOf();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of ChildAllOf
+ ///
+ [Fact]
+ public void ChildAllOfInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" ChildAllOf
+ //Assert.IsType(instance);
+ }
+
+
+ ///
+ /// Test the property 'Age'
+ ///
+ [Fact]
+ public void AgeTest()
+ {
+ // TODO unit test for the property 'Age'
+ }
+
+ }
+
+}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Model/ChildTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Model/ChildTests.cs
new file mode 100644
index 000000000000..cb5362022489
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Model/ChildTests.cs
@@ -0,0 +1,69 @@
+/*
+ * Example
+ *
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// Class for testing Child
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class ChildTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for Child
+ //private Child instance;
+
+ public ChildTests()
+ {
+ // TODO uncomment below to create an instance of Child
+ //instance = new Child();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of Child
+ ///
+ [Fact]
+ public void ChildInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" Child
+ //Assert.IsType(instance);
+ }
+
+
+ ///
+ /// Test the property 'BoosterSeat'
+ ///
+ [Fact]
+ public void BoosterSeatTest()
+ {
+ // TODO unit test for the property 'BoosterSeat'
+ }
+
+ }
+
+}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Model/PersonTests.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Model/PersonTests.cs
new file mode 100644
index 000000000000..cd3e2caf4293
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Model/PersonTests.cs
@@ -0,0 +1,103 @@
+/*
+ * Example
+ *
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+
+using Xunit;
+
+using System;
+using System.Linq;
+using System.IO;
+using System.Collections.Generic;
+using Org.OpenAPITools.Api;
+using Org.OpenAPITools.Model;
+using Org.OpenAPITools.Client;
+using System.Reflection;
+
+namespace Org.OpenAPITools.Test.Model
+{
+ ///
+ /// Class for testing Person
+ ///
+ ///
+ /// This file is automatically generated by OpenAPI Generator (https://openapi-generator.tech).
+ /// Please update the test case below to test the model.
+ ///
+ public class PersonTests : IDisposable
+ {
+ // TODO uncomment below to declare an instance variable for Person
+ //private Person instance;
+
+ public PersonTests()
+ {
+ // TODO uncomment below to create an instance of Person
+ //instance = new Person();
+ }
+
+ public void Dispose()
+ {
+ // Cleanup when everything is done.
+ }
+
+ ///
+ /// Test an instance of Person
+ ///
+ [Fact]
+ public void PersonInstanceTest()
+ {
+ // TODO uncomment below to test "IsType" Person
+ //Assert.IsType(instance);
+ }
+
+ ///
+ /// Test deserialize a Adult from type Person
+ ///
+ [Fact]
+ public void AdultDeserializeFromPersonTest()
+ {
+ // TODO uncomment below to test deserialize a Adult from type Person
+ //Assert.IsType(JsonConvert.DeserializeObject(new Adult().ToJson()));
+ }
+ ///
+ /// Test deserialize a Child from type Person
+ ///
+ [Fact]
+ public void ChildDeserializeFromPersonTest()
+ {
+ // TODO uncomment below to test deserialize a Child from type Person
+ //Assert.IsType(JsonConvert.DeserializeObject(new Child().ToJson()));
+ }
+
+ ///
+ /// Test the property 'FirstName'
+ ///
+ [Fact]
+ public void FirstNameTest()
+ {
+ // TODO unit test for the property 'FirstName'
+ }
+ ///
+ /// Test the property 'LastName'
+ ///
+ [Fact]
+ public void LastNameTest()
+ {
+ // TODO unit test for the property 'LastName'
+ }
+ ///
+ /// Test the property 'Type'
+ ///
+ [Fact]
+ public void TypeTest()
+ {
+ // TODO unit test for the property 'Type'
+ }
+
+ }
+
+}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
new file mode 100644
index 000000000000..96b9fd0c60e9
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/Org.OpenAPITools.Test.csproj
@@ -0,0 +1,20 @@
+
+
+
+ Org.OpenAPITools.Test
+ Org.OpenAPITools.Test
+ net7.0
+ false
+ enable
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/README.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools.Test/README.md
new file mode 100644
index 000000000000..e69de29bb2d1
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Api/DefaultApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Api/DefaultApi.cs
new file mode 100644
index 000000000000..c4de14ce7d9e
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Api/DefaultApi.cs
@@ -0,0 +1,252 @@
+//
+/*
+ * Example
+ *
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+#nullable enable
+
+using System;
+using System.Collections.Generic;
+using System.Net;
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+using System.Net.Http;
+using System.Net.Http.Headers;
+using System.Text.Json;
+using Org.OpenAPITools.Client;
+using Org.OpenAPITools.Model;
+
+namespace Org.OpenAPITools.IApi
+{
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ /// This class is registered as transient.
+ ///
+ public interface IDefaultApi : IApi
+ {
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The id of the person to retrieve
+ /// Cancellation Token to cancel the request.
+ /// Task<ApiResponse<Person?>>
+ Task> ListWithHttpInfoAsync(string personId, System.Threading.CancellationToken? cancellationToken = null);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The id of the person to retrieve
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse<Person>
+ Task ListAsync(string personId, System.Threading.CancellationToken? cancellationToken = null);
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// The id of the person to retrieve
+ /// Cancellation Token to cancel the request.
+ /// Task of ApiResponse<Person?>
+ Task ListOrDefaultAsync(string personId, System.Threading.CancellationToken? cancellationToken = null);
+ }
+}
+
+namespace Org.OpenAPITools.Api
+{
+ ///
+ /// Represents a collection of functions to interact with the API endpoints
+ ///
+ public partial class DefaultApi : IApi.IDefaultApi
+ {
+ private JsonSerializerOptions _jsonSerializerOptions;
+
+ ///
+ /// The logger
+ ///
+ public ILogger Logger { get; }
+
+ ///
+ /// The HttpClient
+ ///
+ public HttpClient HttpClient { get; }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public DefaultApi(ILogger logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider)
+ {
+ _jsonSerializerOptions = jsonSerializerOptionsProvider.Options;
+ Logger = logger;
+ HttpClient = httpClient;
+ }
+
+ ///
+ /// Logs the api response
+ ///
+ ///
+ protected virtual void OnApiResponded(ApiResponseEventArgs args)
+ {
+ Logger.LogInformation("{0,-9} | {1} | {3}", (args.ReceivedAt - args.RequestedAt).TotalSeconds, args.HttpStatus, args.Path);
+ }
+
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The id of the person to retrieve
+ /// Cancellation Token to cancel the request.
+ /// <>
+ public async Task ListAsync(string personId, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ ApiResponse result = await ListWithHttpInfoAsync(personId, cancellationToken).ConfigureAwait(false);
+
+ if (result.Content == null)
+ throw new ApiException(result.ReasonPhrase, result.StatusCode, result.RawContent);
+
+ return result.Content;
+ }
+
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The id of the person to retrieve
+ /// Cancellation Token to cancel the request.
+ /// <>
+ public async Task ListOrDefaultAsync(string personId, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ ApiResponse? result = null;
+ try
+ {
+ result = await ListWithHttpInfoAsync(personId, cancellationToken).ConfigureAwait(false);
+ }
+ catch (Exception)
+ {
+ }
+
+ return result != null && result.IsSuccessStatusCode
+ ? result.Content
+ : null;
+ }
+
+ ///
+ /// Validates the request parameters
+ ///
+ ///
+ ///
+ protected virtual string OnList(string personId)
+ {
+ #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
+ #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
+
+ if (personId == null)
+ throw new ArgumentNullException(nameof(personId));
+
+ #pragma warning disable CS0472 // The result of the expression is always the same since a value of this type is never equal to 'null'
+ #pragma warning disable CS8073 // The result of the expression is always the same since a value of this type is never equal to 'null'
+
+ return personId;
+ }
+
+ ///
+ /// Processes the server response
+ ///
+ ///
+ ///
+ protected virtual void AfterList(ApiResponse apiResponse, string personId)
+ {
+ }
+
+ ///
+ /// Processes the server response
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected virtual void OnErrorList(Exception exception, string pathFormat, string path, string personId)
+ {
+ Logger.LogError(exception, "An error occurred while sending the request to the server.");
+ }
+
+ ///
+ ///
+ ///
+ /// Thrown when fails to make API call
+ /// The id of the person to retrieve
+ /// Cancellation Token to cancel the request.
+ /// <> where T :
+ public async Task> ListWithHttpInfoAsync(string personId, System.Threading.CancellationToken? cancellationToken = null)
+ {
+ UriBuilder uriBuilder = new UriBuilder();
+
+ try
+ {
+ personId = OnList(personId);
+
+ using (HttpRequestMessage request = new HttpRequestMessage())
+ {
+ uriBuilder.Host = HttpClient.BaseAddress!.Host;
+ uriBuilder.Port = HttpClient.BaseAddress!.Port;
+ uriBuilder.Scheme = ClientUtils.SCHEME;
+ uriBuilder.Path = ClientUtils.CONTEXT_PATH + "/person/display/{personId}";
+
+ uriBuilder.Path = uriBuilder.Path.Replace("%7BpersonId%7D", Uri.EscapeDataString(personId.ToString()));
+
+ request.RequestUri = uriBuilder.Uri;
+
+ string[] accepts = new string[] {
+ "application/json"
+ };
+
+ string? accept = ClientUtils.SelectHeaderAccept(accepts);
+
+ if (accept != null)
+ request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue(accept));
+
+ request.Method = HttpMethod.Get;
+
+ DateTime requestedAt = DateTime.UtcNow;
+
+ using (HttpResponseMessage responseMessage = await HttpClient.SendAsync(request, cancellationToken.GetValueOrDefault()).ConfigureAwait(false))
+ {
+ OnApiResponded(new ApiResponseEventArgs(requestedAt, DateTime.UtcNow, responseMessage.StatusCode, "/person/display/{personId}", uriBuilder.Path));
+
+ string responseContent = await responseMessage.Content.ReadAsStringAsync(cancellationToken.GetValueOrDefault()).ConfigureAwait(false);
+
+ ApiResponse apiResponse = new ApiResponse(responseMessage, responseContent);
+
+ if (apiResponse.IsSuccessStatusCode)
+ {
+ apiResponse.Content = JsonSerializer.Deserialize(apiResponse.RawContent, _jsonSerializerOptions);
+ AfterList(apiResponse, personId);
+ }
+
+ return apiResponse;
+ }
+ }
+ }
+ catch(Exception e)
+ {
+ OnErrorList(e, "/person/display/{personId}", uriBuilder.Path, personId);
+ throw;
+ }
+ }
+ }
+}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Api/IApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Api/IApi.cs
new file mode 100644
index 000000000000..038f19bcfa1a
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Api/IApi.cs
@@ -0,0 +1,15 @@
+using System.Net.Http;
+
+namespace Org.OpenAPITools.IApi
+{
+ ///
+ /// Any Api client
+ ///
+ public interface IApi
+ {
+ ///
+ /// The HttpClient
+ ///
+ HttpClient HttpClient { get; }
+ }
+}
\ No newline at end of file
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ApiException.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ApiException.cs
new file mode 100644
index 000000000000..eaf62115550f
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ApiException.cs
@@ -0,0 +1,52 @@
+//
+/*
+ * Example
+ *
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+#nullable enable
+
+using System;
+
+namespace Org.OpenAPITools.Client
+{
+ ///
+ /// API Exception
+ ///
+ public class ApiException : Exception
+ {
+ ///
+ /// The reason the api request failed
+ ///
+ public string? ReasonPhrase { get; }
+
+ ///
+ /// The HttpStatusCode
+ ///
+ public System.Net.HttpStatusCode StatusCode { get; }
+
+ ///
+ /// The raw data returned by the api
+ ///
+ public string RawContent { get; }
+
+ ///
+ /// Construct the ApiException from parts of the response
+ ///
+ ///
+ ///
+ ///
+ public ApiException(string? reasonPhrase, System.Net.HttpStatusCode statusCode, string rawContent) : base(reasonPhrase ?? rawContent)
+ {
+ ReasonPhrase = reasonPhrase;
+
+ StatusCode = statusCode;
+
+ RawContent = rawContent;
+ }
+ }
+}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ApiFactory.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ApiFactory.cs
new file mode 100644
index 000000000000..7757b89c191c
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ApiFactory.cs
@@ -0,0 +1,49 @@
+using System;
+using Microsoft.Extensions.DependencyInjection;
+
+
+namespace Org.OpenAPITools.Client
+{
+ ///
+ /// An IApiFactory interface
+ ///
+ public interface IApiFactory
+ {
+ ///
+ /// A method to create an IApi of type IResult
+ ///
+ ///
+ ///
+ IResult Create() where IResult : IApi.IApi;
+ }
+
+ ///
+ /// An ApiFactory
+ ///
+ public class ApiFactory : IApiFactory
+ {
+ ///
+ /// The service provider
+ ///
+ public IServiceProvider Services { get; }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ ///
+ public ApiFactory(IServiceProvider services)
+ {
+ Services = services;
+ }
+
+ ///
+ /// A method to create an IApi of type IResult
+ ///
+ ///
+ ///
+ public IResult Create() where IResult : IApi.IApi
+ {
+ return Services.GetRequiredService();
+ }
+ }
+}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs
new file mode 100644
index 000000000000..f87e53e8b048
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ApiResponseEventArgs.cs
@@ -0,0 +1,58 @@
+using System;
+using System.Net;
+
+namespace Org.OpenAPITools.Client
+{
+ ///
+ /// Useful for tracking server health.
+ ///
+ public class ApiResponseEventArgs : EventArgs
+ {
+ ///
+ /// The time the request was sent.
+ ///
+ public DateTime RequestedAt { get; }
+
+ ///
+ /// The time the response was received.
+ ///
+ public DateTime ReceivedAt { get; }
+
+ ///
+ /// The HttpStatusCode received.
+ ///
+ public HttpStatusCode HttpStatus { get; }
+
+ ///
+ /// The path requested.
+ ///
+ public string PathFormat { get; }
+
+ ///
+ /// The elapsed time from request to response.
+ ///
+ public TimeSpan ToTimeSpan => this.ReceivedAt - this.RequestedAt;
+
+ ///
+ /// The path
+ ///
+ public string Path { get; }
+
+ ///
+ /// The event args used to track server health.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ApiResponseEventArgs(DateTime requestedAt, DateTime receivedAt, HttpStatusCode httpStatus, string pathFormat, string path)
+ {
+ RequestedAt = requestedAt;
+ ReceivedAt = receivedAt;
+ HttpStatus = httpStatus;
+ PathFormat = pathFormat;
+ Path = path;
+ }
+ }
+}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ApiResponse`1.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ApiResponse`1.cs
new file mode 100644
index 000000000000..878fae8c821c
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ApiResponse`1.cs
@@ -0,0 +1,109 @@
+//
+/*
+ * Example
+ *
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+#nullable enable
+
+using System;
+using System.Collections.Generic;
+using System.Net;
+
+namespace Org.OpenAPITools.Client
+{
+ ///
+ /// Provides a non-generic contract for the ApiResponse wrapper.
+ ///
+ public interface IApiResponse
+ {
+ ///
+ /// The data type of
+ ///
+ Type ResponseType { get; }
+
+ ///
+ /// Gets or sets the status code (HTTP status code)
+ ///
+ /// The status code.
+ HttpStatusCode StatusCode { get; }
+
+ ///
+ /// The raw content of this response
+ ///
+ string RawContent { get; }
+
+ ///
+ /// The DateTime when the request was retrieved.
+ ///
+ DateTime DownloadedAt { get; }
+ }
+
+ ///
+ /// API Response
+ ///
+ public partial class ApiResponse : IApiResponse
+ {
+ ///
+ /// The deserialized content
+ ///
+ public T? Content { get; internal set; }
+
+ ///
+ /// Gets or sets the status code (HTTP status code)
+ ///
+ /// The status code.
+ public HttpStatusCode StatusCode { get; }
+
+ ///
+ /// The content of this response
+ ///
+ public Type ResponseType
+ {
+ get { return typeof(T); }
+ }
+
+ ///
+ /// The raw data
+ ///
+ public string RawContent { get; }
+
+ ///
+ /// The IsSuccessStatusCode from the api response
+ ///
+ public bool IsSuccessStatusCode { get; }
+
+ ///
+ /// The reason phrase contained in the api response
+ ///
+ public string? ReasonPhrase { get; }
+
+ ///
+ /// The headers contained in the api response
+ ///
+ public System.Net.Http.Headers.HttpResponseHeaders Headers { get; }
+
+ ///
+ /// The DateTime when the request was retrieved.
+ ///
+ public DateTime DownloadedAt { get; } = DateTime.UtcNow;
+
+ ///
+ /// Construct the response using an HttpResponseMessage
+ ///
+ ///
+ ///
+ public ApiResponse(System.Net.Http.HttpResponseMessage response, string rawContent)
+ {
+ StatusCode = response.StatusCode;
+ Headers = response.Headers;
+ IsSuccessStatusCode = response.IsSuccessStatusCode;
+ ReasonPhrase = response.ReasonPhrase;
+ RawContent = rawContent;
+ }
+ }
+}
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ClientUtils.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ClientUtils.cs
new file mode 100644
index 000000000000..b8b2d1069625
--- /dev/null
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/src/Org.OpenAPITools/Client/ClientUtils.cs
@@ -0,0 +1,279 @@
+/*
+ * Example
+ *
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+#nullable enable
+
+using System;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Text.Json;
+using System.Text.RegularExpressions;
+using KellermanSoftware.CompareNetObjects;
+
+namespace Org.OpenAPITools.Client
+{
+ ///
+ /// Utility functions providing some benefit to API client consumers.
+ ///
+ public static class ClientUtils
+ {
+ ///
+ /// An instance of CompareLogic.
+ ///
+ public static CompareLogic compareLogic;
+
+ ///
+ /// Static constructor to initialise compareLogic.
+ ///
+ static ClientUtils()
+ {
+ compareLogic = new CompareLogic();
+ }
+
+ ///
+ /// A delegate for events.
+ ///
+ ///
+ ///
+ ///
+ ///
+ public delegate void EventHandler(object sender, T e) where T : EventArgs;
+
+ ///
+ /// Returns true when deserialization succeeds.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static bool TryDeserialize(string json, JsonSerializerOptions options, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T? result)
+ {
+ try
+ {
+ result = JsonSerializer.Deserialize(json, options);
+ return result != null;
+ }
+ catch (Exception)
+ {
+ result = default;
+ return false;
+ }
+ }
+
+ ///
+ /// Returns true when deserialization succeeds.
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public static bool TryDeserialize(ref Utf8JsonReader reader, JsonSerializerOptions options, [System.Diagnostics.CodeAnalysis.NotNullWhen(true)] out T? result)
+ {
+ try
+ {
+ result = JsonSerializer.Deserialize(ref reader, options);
+ return result != null;
+ }
+ catch (Exception)
+ {
+ result = default;
+ return false;
+ }
+ }
+
+ ///
+ /// Sanitize filename by removing the path
+ ///
+ /// Filename
+ /// Filename
+ public static string SanitizeFilename(string filename)
+ {
+ Match match = Regex.Match(filename, @".*[/\\](.*)$");
+ return match.Success ? match.Groups[1].Value : filename;
+ }
+
+ ///
+ /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime.
+ /// If parameter is a list, join the list with ",".
+ /// Otherwise just return the string.
+ ///
+ /// The parameter (header, path, query, form).
+ /// The DateTime serialization format.
+ /// Formatted string.
+ public static string? ParameterToString(object obj, string? format = ISO8601_DATETIME_FORMAT)
+ {
+ if (obj is DateTime dateTime)
+ // Return a formatted date string - Can be customized with Configuration.DateTimeFormat
+ // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o")
+ // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8
+ // For example: 2009-06-15T13:45:30.0000000
+ return dateTime.ToString(format);
+ if (obj is DateTimeOffset dateTimeOffset)
+ // Return a formatted date string - Can be customized with Configuration.DateTimeFormat
+ // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o")
+ // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8
+ // For example: 2009-06-15T13:45:30.0000000
+ return dateTimeOffset.ToString(format);
+ if (obj is bool boolean)
+ return boolean ? "true" : "false";
+ if (obj is System.Collections.ICollection collection)
+ return string.Join(",", collection.Cast