diff --git a/bin/configs/csharp-generichost-latest-nrt-useSourceGeneration.yaml b/bin/configs/csharp-generichost-latest-nrt-useSourceGeneration.yaml
new file mode 100644
index 00000000000..392e76b045f
--- /dev/null
+++ b/bin/configs/csharp-generichost-latest-nrt-useSourceGeneration.yaml
@@ -0,0 +1,12 @@
+# for csharp generichost
+generatorName: csharp
+outputDir: samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration
+inputSpec: modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+library: generichost
+templateDir: modules/openapi-generator/src/main/resources/csharp
+additionalProperties:
+ packageGuid: '{321C8C3F-0156-40C1-AE42-D59761FB9B6C}'
+ useCompareNetObjects: true
+ disallowAdditionalPropertiesIfNotPresent: false
+ useSourceGeneration: true
+ packageName: UseSourceGeneration
diff --git a/docs/generators/csharp.md b/docs/generators/csharp.md
index 20ef1031f07..54ee3942c72 100644
--- a/docs/generators/csharp.md
+++ b/docs/generators/csharp.md
@@ -49,6 +49,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|useCollection|Deserialize array types to Collection<T> instead of List<T>.| |false|
|useDateTimeOffset|Use DateTimeOffset to model date-time properties| |false|
|useOneOfDiscriminatorLookup|Use the discriminator's mapping in oneOf to speed up the model lookup. IMPORTANT: Validation (e.g. one and only one match in oneOf's schemas) will be skipped.| |false|
+|useSourceGeneration|Use source generation where available (only `generichost` library supports this option).| |false|
|validatable|Generates self-validatable models.| |true|
|zeroBasedEnums|Enumerations with string values will start from 0 when true, 1 when false. If not set, enumerations with string values will start from 0 if the first value is 'unknown', case insensitive.| |null|
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
index 3bbae5244ce..60b9060890f 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractCSharpCodegen.java
@@ -59,6 +59,7 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
protected boolean returnICollection = false;
protected boolean netCoreProjectFileFlag = false;
protected boolean nullReferenceTypesFlag = false;
+ protected boolean useSourceGeneration = false;
protected String modelPropertyNaming = CodegenConstants.MODEL_PROPERTY_NAMING_TYPE.PascalCase.name();
@@ -416,12 +417,15 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
.put("required", new RequiredParameterLambda())
.put("optional", new OptionalParameterLambda().generator(this))
.put("joinWithComma", new JoinWithCommaLambda())
+ .put("joinLinesWithComma", new JoinWithCommaLambda(false, "\n", ",\n"))
.put("trimLineBreaks", new TrimLineBreaksLambda())
.put("trimTrailingWithNewLine", new TrimTrailingWhiteSpaceLambda(true))
+ .put("trimTrailing", new TrimTrailingWhiteSpaceLambda(false))
.put("first", new FirstLambda(" "))
.put("firstDot", new FirstLambda("\\."))
.put("indent3", new IndentedLambda(12, " ", false))
- .put("indent4", new IndentedLambda(16, " ", false));
+ .put("indent4", new IndentedLambda(16, " ", false))
+ .put("uniqueLinesWithNewLine", new UniqueLambda("\n", true));
}
@Override
@@ -1350,6 +1354,14 @@ public abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co
return this.nullReferenceTypesFlag;
}
+ public void setUseSourceGeneration(final Boolean useSourceGeneration) {
+ this.useSourceGeneration = useSourceGeneration;
+ }
+
+ public boolean getUseSourceGeneration() {
+ return this.useSourceGeneration;
+ }
+
public void setInterfacePrefix(final String interfacePrefix) {
this.interfacePrefix = interfacePrefix;
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java
index dcb3a9b3f05..1e2b5ed7dce 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpClientCodegen.java
@@ -322,6 +322,10 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
CodegenConstants.EQUATABLE_DESC,
this.equatable);
+ addSwitch("useSourceGeneration",
+ "Use source generation where available (only `generichost` library supports this option).",
+ this.getUseSourceGeneration());
+
supportedLibraries.put(GENERICHOST, "HttpClient with Generic Host dependency injection (https://docs.microsoft.com/en-us/dotnet/core/extensions/generic-host) "
+ "(Experimental. Subject to breaking changes without notice.)");
supportedLibraries.put(HTTPCLIENT, "HttpClient (https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient) "
@@ -788,6 +792,7 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
syncBooleanProperty(additionalProperties, CodegenConstants.NON_PUBLIC_API, this::setNonPublicApi, isNonPublicApi());
syncBooleanProperty(additionalProperties, CodegenConstants.USE_ONEOF_DISCRIMINATOR_LOOKUP, this::setUseOneOfDiscriminatorLookup, this.useOneOfDiscriminatorLookup);
syncBooleanProperty(additionalProperties, "supportsFileParameters", this::setSupportsFileParameters, this.supportsFileParameters);
+ syncBooleanProperty(additionalProperties, "useSourceGeneration", this::setUseSourceGeneration, this.useSourceGeneration);
final String testPackageName = testPackageName();
String packageFolder = sourceFolder + File.separator + packageName;
@@ -855,6 +860,14 @@ public class CSharpClientCodegen extends AbstractCSharpCodegen {
this.setTypeMapping();
}
+ @Override
+ public void setUseSourceGeneration(final Boolean useSourceGeneration) {
+ if (useSourceGeneration && !this.additionalProperties.containsKey(NET_60_OR_LATER)) {
+ throw new RuntimeException("Source generation is only compatible with .Net 6 or later.");
+ }
+ this.useSourceGeneration = useSourceGeneration;
+ }
+
public void setClientPackage(String clientPackage) {
this.clientPackage = clientPackage;
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/JoinWithCommaLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/JoinWithCommaLambda.java
index 16ade8ee8b3..b06fdecb90f 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/JoinWithCommaLambda.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/JoinWithCommaLambda.java
@@ -38,15 +38,29 @@ import java.io.Writer;
*/
public class JoinWithCommaLambda implements Mustache.Lambda {
- public JoinWithCommaLambda() {
+ private final String delimit;
+ private final String coalesce;
+ private final boolean trimInput;
+ public JoinWithCommaLambda() {
+ this.delimit = " ";
+ this.coalesce = ", ";
+ this.trimInput = true;
+ }
+
+ public JoinWithCommaLambda(boolean trimInput, String delimit, String coalesce) {
+ this.delimit = delimit;
+ this.coalesce = coalesce;
+ this.trimInput = trimInput;
}
@Override
public void execute(Template.Fragment fragment, Writer writer) throws IOException {
- String[] substr = fragment.execute().trim().split(" ");
+ String[] input = this.trimInput
+ ? fragment.execute().trim().split(delimit)
+ : fragment.execute().split(delimit);
- writer.write(String.join(", ", substr));
+ writer.write(String.join(coalesce, input));
}
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/UniqueLambda.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/UniqueLambda.java
new file mode 100644
index 00000000000..469c7075a22
--- /dev/null
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/templating/mustache/UniqueLambda.java
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openapitools.codegen.templating.mustache;
+
+import com.samskivert.mustache.Mustache;
+import com.samskivert.mustache.Template;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * Split text by the delimiter and then write only the unique entries
+ *
+ * Register:
+ *
+ * additionalProperties.put("unique", new UniqueLambda());
+ *
+ *
+ * Use:
+ *
+ * {{#unique}}{{name}}{{/unique}}
+ *
+ */
+public class UniqueLambda implements Mustache.Lambda {
+ private final String delimiter;
+ private final boolean withNewLine;
+
+ public UniqueLambda(String delimiter, boolean withNewLine)
+ {
+ this.delimiter = delimiter;
+ this.withNewLine = withNewLine;
+ }
+
+ @Override
+ public void execute(Template.Fragment fragment, Writer writer) throws IOException {
+
+ String[] parts = fragment.execute().split(this.delimiter);
+
+ List uniqueLines = Arrays.stream(parts).distinct().collect(Collectors.toList());
+
+ writer.write(String.join(delimiter, uniqueLines));
+
+ if (withNewLine) {
+ writer.write("\n");
+ }
+ }
+}
diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ApiResponse`1.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ApiResponse`1.mustache
index 3a182e9f694..292ea17cabd 100644
--- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ApiResponse`1.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/ApiResponse`1.mustache
@@ -110,8 +110,38 @@ namespace {{packageName}}.{{clientPackage}}
///
/// The JsonSerialzierOptions
///
- private System.Text.Json.JsonSerializerOptions _jsonSerializerOptions;
+ private System.Text.Json.JsonSerializerOptions{{#useSourceGeneration}}{{nrt?}}{{/useSourceGeneration}} _jsonSerializerOptions;
+ {{#useSourceGeneration}}
+ ///
+ /// The JsonTypeInfo
+ ///
+ private readonly System.Text.Json.Serialization.Metadata.JsonTypeInfo{{nrt?}} _typeInfo;
+
+ ///
+ /// Construct the response using an HttpResponseMessage
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ public ApiResponse(System.Net.Http.HttpRequestMessage httpRequestMessage, System.Net.Http.HttpResponseMessage httpResponseMessage, string rawContent, string path, DateTime requestedAt, System.Text.Json.Serialization.Metadata.JsonTypeInfo typeInfo)
+ {
+ StatusCode = httpResponseMessage.StatusCode;
+ Headers = httpResponseMessage.Headers;
+ IsSuccessStatusCode = httpResponseMessage.IsSuccessStatusCode;
+ ReasonPhrase = httpResponseMessage.ReasonPhrase;
+ RawContent = rawContent;
+ Path = path;
+ RequestUri = httpRequestMessage.RequestUri;
+ RequestedAt = requestedAt;
+ _typeInfo = typeInfo;
+ OnCreated(httpRequestMessage, httpResponseMessage);
+ }
+
+ {{/useSourceGeneration}}
///
/// Construct the response using an HttpResponseMessage
///
diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/AsModel.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/AsModel.mustache
index 74601310d63..4bffea0985d 100644
--- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/AsModel.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/AsModel.mustache
@@ -1,4 +1,14 @@
// This logic may be modified with the AsModel.mustache template
+ {{^useSourceGeneration}}
return IsSuccessStatusCode
? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions)
- : default(T);
\ No newline at end of file
+ : default(T);
+ {{/useSourceGeneration}}
+ {{#useSourceGeneration}}
+ if (!IsSuccessStatusCode)
+ return default(T);
+
+ return _typeInfo == null
+ ? System.Text.Json.JsonSerializer.Deserialize(RawContent, _jsonSerializerOptions)
+ : System.Text.Json.JsonSerializer.Deserialize(RawContent, _typeInfo);
+ {{/useSourceGeneration}}
diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/HostConfiguration.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/HostConfiguration.mustache
index 0d7d2a564f4..61c02557279 100644
--- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/HostConfiguration.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/HostConfiguration.mustache
@@ -48,6 +48,21 @@ namespace {{packageName}}.{{clientPackage}}
{{/models}}
JsonSerializerOptionsProvider jsonSerializerOptionsProvider = new{{^net60OrLater}} JsonSerializerOptionsProvider{{/net60OrLater}}(_jsonOptions);
_services.AddSingleton(jsonSerializerOptionsProvider);
+ {{#useSourceGeneration}}
+
+ {{#models}}
+ {{#model}}
+ _services.AddSingleton<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}SerializationContext>();
+ {{/model}}
+ {{/models}}
+
+ {{#models}}
+ {{#model}}
+ _services.AddSingleton<{{datatypeWithEnum}}{{^datatypeWithEnum}}{{classname}}{{/datatypeWithEnum}}DeserializationContext>();
+ {{/model}}
+ {{/models}}
+
+ {{/useSourceGeneration}}
_services.AddSingleton();{{#apiInfo}}{{#apis}}
_services.AddSingleton<{{classname}}Events>();
_services.AddTransient<{{interfacePrefix}}{{classname}}, {{classname}}>();{{/apis}}{{/apiInfo}}
diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/SourceGenerationContext.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/SourceGenerationContext.mustache
new file mode 100644
index 00000000000..9e4612cfd89
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/SourceGenerationContext.mustache
@@ -0,0 +1,34 @@
+{{#useSourceGeneration}}
+
+ ///
+ /// The {{classname}}SerializationContext
+ ///
+ [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Serialization)]
+ [JsonSerializable(typeof({{classname}}))]
+ {{>visibility}} partial class {{classname}}SerializationContext : JsonSerializerContext
+ {
+ ///
+ /// The {{classname}}SerializationContext
+ ///
+ ///
+ public {{classname}}SerializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options))
+ {
+ }
+ }
+
+ ///
+ /// {{classname}}DeserializationContext
+ ///
+ [JsonSourceGenerationOptions(WriteIndented = true, GenerationMode = JsonSourceGenerationMode.Metadata)]
+ [JsonSerializable(typeof({{classname}}))]
+ {{>visibility}} partial class {{classname}}DeserializationContext : JsonSerializerContext
+ {
+ ///
+ /// {{classname}}DeserializationContext
+ ///
+ ///
+ public {{classname}}DeserializationContext(JsonSerializerOptionsProvider optionsProvider): base(new(optionsProvider.Options))
+ {
+ }
+ }
+{{/useSourceGeneration}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/api.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/api.mustache
index 305f76b5f7a..03f273af3af 100644
--- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/api.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/api.mustache
@@ -103,6 +103,19 @@ namespace {{packageName}}.{{apiPackage}}
{{>visibility}} sealed partial class {{classname}} : {{interfacePrefix}}{{classname}}
{
private JsonSerializerOptions _jsonSerializerOptions;
+ {{#useSourceGeneration}}
+ {{#lambda.uniqueLinesWithNewLine}}
+ {{#operation}}
+ {{#returnProperty}}
+ {{#isModel}}
+ {{#returnType}}
+ private {{{.}}}DeserializationContext _{{#lambda.camelcase_param}}{{{.}}}DeserializationContext{{/lambda.camelcase_param}};
+ {{/returnType}}
+ {{/isModel}}
+ {{/returnProperty}}
+ {{/operation}}
+ {{/lambda.uniqueLinesWithNewLine}}
+ {{/useSourceGeneration}}
///
/// The logger
@@ -148,7 +161,24 @@ namespace {{packageName}}.{{apiPackage}}
/// Initializes a new instance of the class.
///
///
- public {{classname}}(ILogger<{{classname}}> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, {{classname}}Events {{#lambda.camelcase_param}}{{classname}}Events{{/lambda.camelcase_param}}{{#hasApiKeyMethods}},
+ public {{classname}}(ILogger<{{classname}}> logger, HttpClient httpClient, JsonSerializerOptionsProvider jsonSerializerOptionsProvider, {{classname}}Events {{#lambda.camelcase_param}}{{classname}}Events{{/lambda.camelcase_param}}{{#lambda.first}}{{#useSourceGeneration}}{{#operation}}{{#returnProperty}}{{#isModel}}, {{/isModel}}{{/returnProperty}}{{/operation}}{{/useSourceGeneration}}{{/lambda.first}}{{#lambda.trimTrailing}}{{#useSourceGeneration}}
+ {{#lambda.joinLinesWithComma}}
+ {{#lambda.uniqueLinesWithNewLine}}
+ {{#operation}}
+ {{#returnProperty}}
+ {{#isModel}}
+ {{#returnType}}
+ {{{.}}}DeserializationContext {{#lambda.camelcase_param}}{{{.}}}DeserializationContext{{/lambda.camelcase_param}}
+ {{/returnType}}
+ {{/isModel}}
+ {{/returnProperty}}
+ {{/operation}}
+ {{/lambda.uniqueLinesWithNewLine}}
+ {{/lambda.joinLinesWithComma}}
+ {{/useSourceGeneration}}
+ {{/lambda.trimTrailing}}
+ {{#hasApiKeyMethods}}
+,
TokenProvider apiKeyProvider{{/hasApiKeyMethods}}{{#hasHttpBearerMethods}},
TokenProvider bearerTokenProvider{{/hasHttpBearerMethods}}{{#hasHttpBasicMethods}},
TokenProvider basicTokenProvider{{/hasHttpBasicMethods}}{{#hasHttpSignatureMethods}},
@@ -156,6 +186,19 @@ namespace {{packageName}}.{{apiPackage}}
TokenProvider oauthTokenProvider{{/hasOAuthMethods}})
{
_jsonSerializerOptions = jsonSerializerOptionsProvider.Options;
+ {{#useSourceGeneration}}
+ {{#lambda.uniqueLinesWithNewLine}}
+ {{#operation}}
+ {{#returnProperty}}
+ {{#isModel}}
+ {{#returnType}}
+ _{{#lambda.camelcase_param}}{{{.}}}DeserializationContext{{/lambda.camelcase_param}} = {{#lambda.camelcase_param}}{{{.}}}DeserializationContext{{/lambda.camelcase_param}};
+ {{/returnType}}
+ {{/isModel}}
+ {{/returnProperty}}
+ {{/operation}}
+ {{/lambda.uniqueLinesWithNewLine}}
+ {{/useSourceGeneration}}
Logger = logger;
HttpClient = httpClient;
Events = {{#lambda.camelcase_param}}{{classname}}Events{{/lambda.camelcase_param}};{{#hasApiKeyMethods}}
@@ -539,7 +582,7 @@ namespace {{packageName}}.{{apiPackage}}
{
string responseContentLocalVar = await httpResponseMessageLocalVar.Content.ReadAsStringAsync({{#net60OrLater}}cancellationToken{{/net60OrLater}}).ConfigureAwait(false);
- ApiResponse<{{{returnType}}}{{^returnType}}object{{/returnType}}> apiResponseLocalVar = new ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "{{path}}", requestedAtLocalVar, _jsonSerializerOptions);
+ ApiResponse<{{{returnType}}}{{^returnType}}object{{/returnType}}> apiResponseLocalVar = new ApiResponse<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}object{{/returnType}}>(httpRequestMessageLocalVar, httpResponseMessageLocalVar, responseContentLocalVar, "{{path}}", requestedAtLocalVar, {{^useSourceGeneration}}_jsonSerializerOptions{{/useSourceGeneration}}{{#useSourceGeneration}}{{^returnProperty}}_jsonSerializerOptions{{/returnProperty}}{{#returnProperty}}{{^isModel}}_jsonSerializerOptions{{/isModel}}{{#isModel}}_{{#lambda.camelcase_param}}{{{returnType}}}DeserializationContext{{/lambda.camelcase_param}}.{{{returnType}}}{{/isModel}}{{/returnProperty}}{{/useSourceGeneration}});
After{{operationId}}DefaultImplementation({{#lambda.joinWithComma}}apiResponseLocalVar {{#allParams}}{{paramName}} {{/allParams}}{{/lambda.joinWithComma}});
diff --git a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/model.mustache b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/model.mustache
index d71ab08c93d..f11dd9ba2b0 100644
--- a/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/model.mustache
+++ b/modules/openapi-generator/src/main/resources/csharp/libraries/generichost/model.mustache
@@ -23,6 +23,12 @@ using System.ComponentModel.DataAnnotations;
{{#useCompareNetObjects}}
using OpenAPIClientUtils = {{packageName}}.Client.ClientUtils;
{{/useCompareNetObjects}}
+{{#useGenericHost}}
+{{#useSourceGeneration}}
+using System.Text.Json.Serialization.Metadata;
+using {{packageName}}.{{clientPackage}};
+{{/useSourceGeneration}}
+{{/useGenericHost}}
{{#models}}
{{#lambda.trimTrailingWithNewLine}}
{{#model}}
@@ -37,6 +43,7 @@ namespace {{packageName}}.{{modelPackage}}
{{>JsonConverter}}
{{/isEnum}}
+{{>SourceGenerationContext}}
{{/model}}
{{/lambda.trimTrailingWithNewLine}}
{{/models}}
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/ManualTests.Latest.UseSourceGeneration.csproj b/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/ManualTests.Latest.UseSourceGeneration.csproj
new file mode 100644
index 00000000000..b7165522a82
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/ManualTests.Latest.UseSourceGeneration.csproj
@@ -0,0 +1,23 @@
+
+
+
+ net7.0
+ enable
+ enable
+
+ false
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/UnitTest1.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/UnitTest1.cs
new file mode 100644
index 00000000000..daaec806fa3
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/UnitTest1.cs
@@ -0,0 +1,184 @@
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
+using System.Text.Json;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+using UseSourceGeneration.Extensions;
+
+namespace ManualTests.Latest.UseSourceGeneration;
+
+[TestClass]
+public class UnitTest1
+{
+ [TestClass]
+ public sealed class SerializationTests
+ {
+ private readonly IHost _host;
+
+ public SerializationTests()
+ {
+ IHostBuilder hostBuild = Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, services, options) =>
+ {
+ string apiKeyTokenValue = context.Configuration[""] ?? "Token not found.";
+ ApiKeyToken apiKeyToken = new(apiKeyTokenValue, timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(apiKeyToken);
+
+ string bearerTokenValue = context.Configuration[""] ?? "Token not found.";
+ BearerToken bearerToken = new(bearerTokenValue, timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(bearerToken);
+
+ string basicTokenUsername = context.Configuration[""] ?? "Username not found.";
+ string basicTokenPassword = context.Configuration[""] ?? "Password not found.";
+ BasicToken basicToken = new(basicTokenUsername, basicTokenPassword, timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(basicToken);
+
+ HttpSigningConfiguration config = new("", "", null, new List(), System.Security.Cryptography.HashAlgorithmName.SHA256, "", 0);
+ HttpSignatureToken httpSignatureToken = new(config, timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(httpSignatureToken);
+
+ string oauthTokenValue = context.Configuration[""] ?? "Token not found.";
+ OAuthToken oauthToken = new(oauthTokenValue, timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(oauthToken);
+ });
+
+ _host = hostBuild.Build();
+ }
+
+ [TestMethod]
+ public void Category()
+ {
+ CategorySerializationContext serializationContext = _host.Services.GetRequiredService();
+ CategoryDeserializationContext deserializationContext = _host.Services.GetRequiredService();
+
+ Category category = new(1, "test");
+ string categoryJson = JsonSerializer.Serialize(category, serializationContext.Category);
+ Category? category2 = JsonSerializer.Deserialize(categoryJson, deserializationContext.Category);
+ Assert.AreEqual(category.Id, category2?.Id);
+ Assert.AreEqual(category.Name, category2?.Name);
+ }
+
+ [TestMethod]
+ public void Apple()
+ {
+ AppleSerializationContext serializationContext = _host.Services.GetRequiredService();
+ AppleDeserializationContext deserializationContext = _host.Services.GetRequiredService();
+
+ Apple apple = new("#000000", "cultivar", "origin");
+ string appleJson = JsonSerializer.Serialize(apple, serializationContext.Apple);
+ Apple? apple2 = JsonSerializer.Deserialize(appleJson, deserializationContext.Apple);
+ Assert.IsTrue(apple2 != null && apple.Cultivar.Equals(apple2.Cultivar) && apple.Origin.Equals(apple2.Origin));
+ }
+
+ [TestMethod]
+ public void Pig()
+ {
+ PigSerializationContext serializationContext = _host.Services.GetRequiredService();
+ PigDeserializationContext deserializationContext = _host.Services.GetRequiredService();
+
+ BasquePig basquePig = new("BasquePig");
+ Pig pig = new(basquePig, "BasquePig");
+ string pigJson = JsonSerializer.Serialize(pig, serializationContext.Pig);
+ Pig? pig2 = JsonSerializer.Deserialize(pigJson, deserializationContext.Pig);
+ Assert.IsTrue(
+ pig.DanishPig == null &&
+ pig.BasquePig != null &&
+ pig2 != null &&
+ pig2.BasquePig != null &&
+ pig2.DanishPig == null &&
+ pig2.BasquePig.ClassName.Equals(pig.BasquePig.ClassName));
+ }
+
+ [TestMethod]
+ public void DanishPig()
+ {
+ DanishPigSerializationContext serializationContext = _host.Services.GetRequiredService();
+ DanishPigDeserializationContext deserializationContext = _host.Services.GetRequiredService();
+
+ DanishPig danishPig = new("danishPig");
+ string danishPigJson = JsonSerializer.Serialize(danishPig, serializationContext.DanishPig);
+ DanishPig? danishPig2 = JsonSerializer.Deserialize(danishPigJson, deserializationContext.DanishPig);
+ Assert.IsTrue(danishPig2 != null && danishPig.ClassName.Equals(danishPig2.ClassName));
+ }
+
+ [TestMethod]
+ public void GmFruit()
+ {
+ GmFruitSerializationContext serializationContext = _host.Services.GetRequiredService();
+ GmFruitDeserializationContext deserializationContext = _host.Services.GetRequiredService();
+
+ Apple apple = new("#000000", "cultivar", "origin");
+ Banana banana = new(10);
+ GmFruit gmFruit = new(apple, banana, "yellow");
+ string gmFruitJson = JsonSerializer.Serialize(gmFruit, serializationContext.GmFruit);
+ GmFruit? gmFruit2 = JsonSerializer.Deserialize(gmFruitJson, deserializationContext.GmFruit);
+ Assert.IsTrue(
+ gmFruit.Apple != null &&
+ gmFruit.Banana != null &&
+ gmFruit2 != null &&
+ gmFruit2.Apple != null &&
+ gmFruit2.Banana != null &&
+ gmFruit2.Apple.Cultivar.Equals(gmFruit.Apple.Cultivar) &&
+ gmFruit2.Apple.Origin.Equals(gmFruit.Apple.Origin) &&
+ gmFruit2.Banana.LengthCm.Equals(gmFruit.Banana.LengthCm));
+
+ Apple? apple2 = JsonSerializer.Deserialize(gmFruitJson);
+ Assert.IsTrue(apple2 != null && apple.Cultivar == apple2.Cultivar && apple.Origin == apple2.Origin);
+ // TODO: assert the the properties from Banana and GmFruit are in additionalProperties
+ }
+
+ [TestMethod]
+ public void EquilateralTriangle()
+ {
+ EquilateralTriangleSerializationContext serializationContext = _host.Services.GetRequiredService();
+ EquilateralTriangleDeserializationContext deserializationContext = _host.Services.GetRequiredService();
+
+ EquilateralTriangle equilateralTriangle = new("triangle", "equilateral");
+ string equilateralTriangleJson = JsonSerializer.Serialize(equilateralTriangle, serializationContext.EquilateralTriangle);
+ EquilateralTriangle? equilateralTriangle2 = JsonSerializer.Deserialize(equilateralTriangleJson, deserializationContext.EquilateralTriangle);
+ Assert.IsTrue(equilateralTriangle2 != null && equilateralTriangle.TriangleType.Equals(equilateralTriangle2.TriangleType) && equilateralTriangle.ShapeType.Equals(equilateralTriangle2.ShapeType));
+ }
+
+ [TestMethod]
+ public void Quadrilateral()
+ {
+ QuadrilateralSerializationContext serializationContext = _host.Services.GetRequiredService();
+ QuadrilateralDeserializationContext deserializationContext = _host.Services.GetRequiredService();
+
+ ComplexQuadrilateral complexQuadrilateral = new("ComplexQuadrilateral", "shapeType");
+ Quadrilateral quadrilateral = new(complexQuadrilateral, "ComplexQuadrilateral");
+ string quadrilateralJson = JsonSerializer.Serialize(quadrilateral, serializationContext.Quadrilateral);
+ Quadrilateral? quadrilateral2 = JsonSerializer.Deserialize(quadrilateralJson, deserializationContext.Quadrilateral);
+ Assert.IsTrue(
+ quadrilateral.ComplexQuadrilateral != null &&
+ quadrilateral2 != null &&
+ quadrilateral2.SimpleQuadrilateral == null &&
+ quadrilateral2.ComplexQuadrilateral != null &&
+ quadrilateral2.ComplexQuadrilateral.QuadrilateralType.Equals(quadrilateral.ComplexQuadrilateral.QuadrilateralType) &&
+ quadrilateral2.ComplexQuadrilateral.ShapeType.Equals(quadrilateral.ComplexQuadrilateral.ShapeType));
+ }
+
+ [TestMethod]
+ public void ChildCatTest()
+ {
+ ChildCatSerializationContext serializationContext = _host.Services.GetRequiredService();
+ ChildCatDeserializationContext deserializationContext = _host.Services.GetRequiredService();
+
+ ChildCat childCat = new("some name", ChildCat.PetTypeEnum.ChildCat);
+ string childCatJson = JsonSerializer.Serialize(childCat, serializationContext.ChildCat);
+ ChildCat? childCat2 = JsonSerializer.Deserialize(childCatJson, deserializationContext.ChildCat);
+ Assert.IsTrue(childCat2 != null && childCat.PetType.Equals(childCat2.PetType) && childCat.Name.Equals(childCat2.Name));
+ }
+
+ [TestMethod]
+ public void Cat()
+ {
+ CatSerializationContext serializationContext = _host.Services.GetRequiredService();
+ CatDeserializationContext deserializationContext = _host.Services.GetRequiredService();
+
+ Cat cat = new("cat", false, "black"); // TODO: where is the address property?
+ string catJson = JsonSerializer.Serialize(cat, serializationContext.Cat);
+ Cat? cat2 = JsonSerializer.Deserialize(catJson, deserializationContext.Cat);
+ Assert.IsTrue(cat2 != null && cat.Declawed.Equals(cat2.Declawed) && cat.ClassName.Equals(cat2.ClassName) && cat.Color.Equals(cat2.Color)); // TODO: add the address property
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/Usings.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/Usings.cs
new file mode 100644
index 00000000000..ab67c7ea9df
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/ManualTests.Latest.UseSourceGeneration/Usings.cs
@@ -0,0 +1 @@
+global using Microsoft.VisualStudio.TestTools.UnitTesting;
\ No newline at end of file
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/Org.OpenAPITools.sln b/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/Org.OpenAPITools.sln
index d10a1b4d2ee..dedb0f176ea 100644
--- a/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/Org.OpenAPITools.sln
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-manual-tests/Org.OpenAPITools.sln
@@ -3,10 +3,14 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.5.33502.453
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenAPIClient-generichost-manual-tests", "OpenAPIClient-generichost-manual-tests\OpenAPIClient-generichost-manual-tests.csproj", "{B120BBFD-C287-4235-A7CC-2C5B37601EB1}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenAPIClient-generichost-manual-tests", "OpenAPIClient-generichost-manual-tests\OpenAPIClient-generichost-manual-tests.csproj", "{B120BBFD-C287-4235-A7CC-2C5B37601EB1}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Org.OpenAPITools", "..\OpenAPIClient-generichost-net6.0-nrt\src\Org.OpenAPITools\Org.OpenAPITools.csproj", "{C48E5ACD-1ACD-4084-843E-B29DFEE1779C}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ManualTests.Latest.UseSourceGeneration", "ManualTests.Latest.UseSourceGeneration\ManualTests.Latest.UseSourceGeneration.csproj", "{0CDF58C6-300E-4282-99AF-69A92FD6EAA5}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UseSourceGeneration", "..\OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration\src\UseSourceGeneration\UseSourceGeneration.csproj", "{39D8167C-2DF8-42E9-92F5-5DA59E7F281B}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -21,6 +25,14 @@ Global
{C48E5ACD-1ACD-4084-843E-B29DFEE1779C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C48E5ACD-1ACD-4084-843E-B29DFEE1779C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C48E5ACD-1ACD-4084-843E-B29DFEE1779C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0CDF58C6-300E-4282-99AF-69A92FD6EAA5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0CDF58C6-300E-4282-99AF-69A92FD6EAA5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0CDF58C6-300E-4282-99AF-69A92FD6EAA5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0CDF58C6-300E-4282-99AF-69A92FD6EAA5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {39D8167C-2DF8-42E9-92F5-5DA59E7F281B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {39D8167C-2DF8-42E9-92F5-5DA59E7F281B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {39D8167C-2DF8-42E9-92F5-5DA59E7F281B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {39D8167C-2DF8-42E9-92F5-5DA59E7F281B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.gitignore b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.gitignore
new file mode 100644
index 00000000000..1ee53850b84
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.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/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.openapi-generator-ignore b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.openapi-generator-ignore
new file mode 100644
index 00000000000..7484ee590a3
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.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/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.openapi-generator/FILES b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.openapi-generator/FILES
new file mode 100644
index 00000000000..4e462324c9c
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.openapi-generator/FILES
@@ -0,0 +1,228 @@
+.gitignore
+README.md
+UseSourceGeneration.sln
+api/openapi.yaml
+appveyor.yml
+docs/apis/AnotherFakeApi.md
+docs/apis/DefaultApi.md
+docs/apis/FakeApi.md
+docs/apis/FakeClassnameTags123Api.md
+docs/apis/PetApi.md
+docs/apis/StoreApi.md
+docs/apis/UserApi.md
+docs/models/Activity.md
+docs/models/ActivityOutputElementRepresentation.md
+docs/models/AdditionalPropertiesClass.md
+docs/models/Animal.md
+docs/models/ApiResponse.md
+docs/models/Apple.md
+docs/models/AppleReq.md
+docs/models/ArrayOfArrayOfNumberOnly.md
+docs/models/ArrayOfNumberOnly.md
+docs/models/ArrayTest.md
+docs/models/Banana.md
+docs/models/BananaReq.md
+docs/models/BasquePig.md
+docs/models/Capitalization.md
+docs/models/Cat.md
+docs/models/Category.md
+docs/models/ChildCat.md
+docs/models/ClassModel.md
+docs/models/ComplexQuadrilateral.md
+docs/models/DanishPig.md
+docs/models/DateOnlyClass.md
+docs/models/DeprecatedObject.md
+docs/models/Dog.md
+docs/models/Drawing.md
+docs/models/EnumArrays.md
+docs/models/EnumClass.md
+docs/models/EnumTest.md
+docs/models/EquilateralTriangle.md
+docs/models/File.md
+docs/models/FileSchemaTestClass.md
+docs/models/Foo.md
+docs/models/FooGetDefaultResponse.md
+docs/models/FormatTest.md
+docs/models/Fruit.md
+docs/models/FruitReq.md
+docs/models/GmFruit.md
+docs/models/GrandparentAnimal.md
+docs/models/HasOnlyReadOnly.md
+docs/models/HealthCheckResult.md
+docs/models/IsoscelesTriangle.md
+docs/models/List.md
+docs/models/LiteralStringClass.md
+docs/models/Mammal.md
+docs/models/MapTest.md
+docs/models/MixedPropertiesAndAdditionalPropertiesClass.md
+docs/models/Model200Response.md
+docs/models/ModelClient.md
+docs/models/Name.md
+docs/models/NotificationtestGetElementsV1ResponseMPayload.md
+docs/models/NullableClass.md
+docs/models/NullableGuidClass.md
+docs/models/NullableShape.md
+docs/models/NumberOnly.md
+docs/models/ObjectWithDeprecatedFields.md
+docs/models/OneOfString.md
+docs/models/Order.md
+docs/models/OuterComposite.md
+docs/models/OuterEnum.md
+docs/models/OuterEnumDefaultValue.md
+docs/models/OuterEnumInteger.md
+docs/models/OuterEnumIntegerDefaultValue.md
+docs/models/OuterEnumTest.md
+docs/models/ParentPet.md
+docs/models/Pet.md
+docs/models/Pig.md
+docs/models/PolymorphicProperty.md
+docs/models/Quadrilateral.md
+docs/models/QuadrilateralInterface.md
+docs/models/ReadOnlyFirst.md
+docs/models/Return.md
+docs/models/RolesReportsHash.md
+docs/models/RolesReportsHashRole.md
+docs/models/ScaleneTriangle.md
+docs/models/Shape.md
+docs/models/ShapeInterface.md
+docs/models/ShapeOrNull.md
+docs/models/SimpleQuadrilateral.md
+docs/models/SpecialModelName.md
+docs/models/Tag.md
+docs/models/TestCollectionEndingWithWordList.md
+docs/models/TestCollectionEndingWithWordListObject.md
+docs/models/Triangle.md
+docs/models/TriangleInterface.md
+docs/models/User.md
+docs/models/Whale.md
+docs/models/Zebra.md
+docs/models/ZeroBasedEnum.md
+docs/models/ZeroBasedEnumClass.md
+docs/scripts/git_push.ps1
+docs/scripts/git_push.sh
+src/UseSourceGeneration.Test/Api/DependencyInjectionTests.cs
+src/UseSourceGeneration.Test/README.md
+src/UseSourceGeneration.Test/UseSourceGeneration.Test.csproj
+src/UseSourceGeneration/Api/AnotherFakeApi.cs
+src/UseSourceGeneration/Api/DefaultApi.cs
+src/UseSourceGeneration/Api/FakeApi.cs
+src/UseSourceGeneration/Api/FakeClassnameTags123Api.cs
+src/UseSourceGeneration/Api/IApi.cs
+src/UseSourceGeneration/Api/PetApi.cs
+src/UseSourceGeneration/Api/StoreApi.cs
+src/UseSourceGeneration/Api/UserApi.cs
+src/UseSourceGeneration/Client/ApiException.cs
+src/UseSourceGeneration/Client/ApiFactory.cs
+src/UseSourceGeneration/Client/ApiKeyToken.cs
+src/UseSourceGeneration/Client/ApiResponseEventArgs.cs
+src/UseSourceGeneration/Client/ApiResponse`1.cs
+src/UseSourceGeneration/Client/BasicToken.cs
+src/UseSourceGeneration/Client/BearerToken.cs
+src/UseSourceGeneration/Client/ClientUtils.cs
+src/UseSourceGeneration/Client/CookieContainer.cs
+src/UseSourceGeneration/Client/DateTimeJsonConverter.cs
+src/UseSourceGeneration/Client/DateTimeNullableJsonConverter.cs
+src/UseSourceGeneration/Client/ExceptionEventArgs.cs
+src/UseSourceGeneration/Client/HostConfiguration.cs
+src/UseSourceGeneration/Client/HttpSigningConfiguration.cs
+src/UseSourceGeneration/Client/HttpSigningToken.cs
+src/UseSourceGeneration/Client/JsonSerializerOptionsProvider.cs
+src/UseSourceGeneration/Client/OAuthToken.cs
+src/UseSourceGeneration/Client/Option.cs
+src/UseSourceGeneration/Client/RateLimitProvider`1.cs
+src/UseSourceGeneration/Client/TokenBase.cs
+src/UseSourceGeneration/Client/TokenContainer`1.cs
+src/UseSourceGeneration/Client/TokenProvider`1.cs
+src/UseSourceGeneration/Extensions/IHostBuilderExtensions.cs
+src/UseSourceGeneration/Extensions/IHttpClientBuilderExtensions.cs
+src/UseSourceGeneration/Extensions/IServiceCollectionExtensions.cs
+src/UseSourceGeneration/Model/Activity.cs
+src/UseSourceGeneration/Model/ActivityOutputElementRepresentation.cs
+src/UseSourceGeneration/Model/AdditionalPropertiesClass.cs
+src/UseSourceGeneration/Model/Animal.cs
+src/UseSourceGeneration/Model/ApiResponse.cs
+src/UseSourceGeneration/Model/Apple.cs
+src/UseSourceGeneration/Model/AppleReq.cs
+src/UseSourceGeneration/Model/ArrayOfArrayOfNumberOnly.cs
+src/UseSourceGeneration/Model/ArrayOfNumberOnly.cs
+src/UseSourceGeneration/Model/ArrayTest.cs
+src/UseSourceGeneration/Model/Banana.cs
+src/UseSourceGeneration/Model/BananaReq.cs
+src/UseSourceGeneration/Model/BasquePig.cs
+src/UseSourceGeneration/Model/Capitalization.cs
+src/UseSourceGeneration/Model/Cat.cs
+src/UseSourceGeneration/Model/Category.cs
+src/UseSourceGeneration/Model/ChildCat.cs
+src/UseSourceGeneration/Model/ClassModel.cs
+src/UseSourceGeneration/Model/ComplexQuadrilateral.cs
+src/UseSourceGeneration/Model/DanishPig.cs
+src/UseSourceGeneration/Model/DateOnlyClass.cs
+src/UseSourceGeneration/Model/DeprecatedObject.cs
+src/UseSourceGeneration/Model/Dog.cs
+src/UseSourceGeneration/Model/Drawing.cs
+src/UseSourceGeneration/Model/EnumArrays.cs
+src/UseSourceGeneration/Model/EnumClass.cs
+src/UseSourceGeneration/Model/EnumTest.cs
+src/UseSourceGeneration/Model/EquilateralTriangle.cs
+src/UseSourceGeneration/Model/File.cs
+src/UseSourceGeneration/Model/FileSchemaTestClass.cs
+src/UseSourceGeneration/Model/Foo.cs
+src/UseSourceGeneration/Model/FooGetDefaultResponse.cs
+src/UseSourceGeneration/Model/FormatTest.cs
+src/UseSourceGeneration/Model/Fruit.cs
+src/UseSourceGeneration/Model/FruitReq.cs
+src/UseSourceGeneration/Model/GmFruit.cs
+src/UseSourceGeneration/Model/GrandparentAnimal.cs
+src/UseSourceGeneration/Model/HasOnlyReadOnly.cs
+src/UseSourceGeneration/Model/HealthCheckResult.cs
+src/UseSourceGeneration/Model/IsoscelesTriangle.cs
+src/UseSourceGeneration/Model/List.cs
+src/UseSourceGeneration/Model/LiteralStringClass.cs
+src/UseSourceGeneration/Model/Mammal.cs
+src/UseSourceGeneration/Model/MapTest.cs
+src/UseSourceGeneration/Model/MixedPropertiesAndAdditionalPropertiesClass.cs
+src/UseSourceGeneration/Model/Model200Response.cs
+src/UseSourceGeneration/Model/ModelClient.cs
+src/UseSourceGeneration/Model/Name.cs
+src/UseSourceGeneration/Model/NotificationtestGetElementsV1ResponseMPayload.cs
+src/UseSourceGeneration/Model/NullableClass.cs
+src/UseSourceGeneration/Model/NullableGuidClass.cs
+src/UseSourceGeneration/Model/NullableShape.cs
+src/UseSourceGeneration/Model/NumberOnly.cs
+src/UseSourceGeneration/Model/ObjectWithDeprecatedFields.cs
+src/UseSourceGeneration/Model/OneOfString.cs
+src/UseSourceGeneration/Model/Order.cs
+src/UseSourceGeneration/Model/OuterComposite.cs
+src/UseSourceGeneration/Model/OuterEnum.cs
+src/UseSourceGeneration/Model/OuterEnumDefaultValue.cs
+src/UseSourceGeneration/Model/OuterEnumInteger.cs
+src/UseSourceGeneration/Model/OuterEnumIntegerDefaultValue.cs
+src/UseSourceGeneration/Model/OuterEnumTest.cs
+src/UseSourceGeneration/Model/ParentPet.cs
+src/UseSourceGeneration/Model/Pet.cs
+src/UseSourceGeneration/Model/Pig.cs
+src/UseSourceGeneration/Model/PolymorphicProperty.cs
+src/UseSourceGeneration/Model/Quadrilateral.cs
+src/UseSourceGeneration/Model/QuadrilateralInterface.cs
+src/UseSourceGeneration/Model/ReadOnlyFirst.cs
+src/UseSourceGeneration/Model/Return.cs
+src/UseSourceGeneration/Model/RolesReportsHash.cs
+src/UseSourceGeneration/Model/RolesReportsHashRole.cs
+src/UseSourceGeneration/Model/ScaleneTriangle.cs
+src/UseSourceGeneration/Model/Shape.cs
+src/UseSourceGeneration/Model/ShapeInterface.cs
+src/UseSourceGeneration/Model/ShapeOrNull.cs
+src/UseSourceGeneration/Model/SimpleQuadrilateral.cs
+src/UseSourceGeneration/Model/SpecialModelName.cs
+src/UseSourceGeneration/Model/Tag.cs
+src/UseSourceGeneration/Model/TestCollectionEndingWithWordList.cs
+src/UseSourceGeneration/Model/TestCollectionEndingWithWordListObject.cs
+src/UseSourceGeneration/Model/Triangle.cs
+src/UseSourceGeneration/Model/TriangleInterface.cs
+src/UseSourceGeneration/Model/User.cs
+src/UseSourceGeneration/Model/Whale.cs
+src/UseSourceGeneration/Model/Zebra.cs
+src/UseSourceGeneration/Model/ZeroBasedEnum.cs
+src/UseSourceGeneration/Model/ZeroBasedEnumClass.cs
+src/UseSourceGeneration/README.md
+src/UseSourceGeneration/UseSourceGeneration.csproj
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.openapi-generator/VERSION
new file mode 100644
index 00000000000..44bad91b171
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.0.1-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/README.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/README.md
new file mode 100644
index 00000000000..f9c1c7f7462
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/README.md
@@ -0,0 +1 @@
+# Created with Openapi Generator
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/UseSourceGeneration.sln b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/UseSourceGeneration.sln
new file mode 100644
index 00000000000..6f2442d00e5
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/UseSourceGeneration.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}") = "UseSourceGeneration", "src\UseSourceGeneration\UseSourceGeneration.csproj", "{321C8C3F-0156-40C1-AE42-D59761FB9B6C}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UseSourceGeneration.Test", "src\UseSourceGeneration.Test\UseSourceGeneration.Test.csproj", "{19F1DEBC-DE5E-4517-8062-F000CD499087}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {321C8C3F-0156-40C1-AE42-D59761FB9B6C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {19F1DEBC-DE5E-4517-8062-F000CD499087}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {19F1DEBC-DE5E-4517-8062-F000CD499087}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
\ No newline at end of file
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/api/openapi.yaml b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/api/openapi.yaml
new file mode 100644
index 00000000000..45616d427fb
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/api/openapi.yaml
@@ -0,0 +1,2543 @@
+openapi: 3.0.0
+info:
+ description: "This spec is mainly for testing Petstore server and contains fake\
+ \ endpoints, models. Please do not use this for any other purpose. Special characters:\
+ \ \" \\"
+ license:
+ name: Apache-2.0
+ url: https://www.apache.org/licenses/LICENSE-2.0.html
+ title: OpenAPI Petstore
+ version: 1.0.0
+servers:
+- description: petstore server
+ url: "http://{server}.swagger.io:{port}/v2"
+ variables:
+ server:
+ default: petstore
+ enum:
+ - petstore
+ - qa-petstore
+ - dev-petstore
+ port:
+ default: "80"
+ enum:
+ - "80"
+ - "8080"
+- description: The local server
+ url: "https://localhost:8080/{version}"
+ variables:
+ version:
+ default: v2
+ enum:
+ - v1
+ - v2
+- description: The local server without variables
+ url: https://127.0.0.1/no_variable
+tags:
+- description: Everything about your Pets
+ name: pet
+- description: Access to Petstore orders
+ name: store
+- description: Operations about user
+ name: user
+paths:
+ /roles/report:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/RolesReport'
+ type: array
+ description: returns report
+ /hello:
+ get:
+ description: Hello
+ operationId: Hello
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ items:
+ format: uuid
+ type: string
+ type: array
+ description: UUIDs
+ summary: Hello
+ /foo:
+ get:
+ responses:
+ default:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/_foo_get_default_response'
+ description: response
+ /pet:
+ post:
+ description: ""
+ operationId: addPet
+ requestBody:
+ $ref: '#/components/requestBodies/Pet'
+ responses:
+ "405":
+ description: Invalid input
+ security:
+ - http_signature_test: []
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Add a new pet to the store
+ tags:
+ - pet
+ put:
+ description: ""
+ operationId: updatePet
+ requestBody:
+ $ref: '#/components/requestBodies/Pet'
+ responses:
+ "400":
+ description: Invalid ID supplied
+ "404":
+ description: Pet not found
+ "405":
+ description: Validation exception
+ security:
+ - http_signature_test: []
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Update an existing pet
+ tags:
+ - pet
+ servers:
+ - url: http://petstore.swagger.io/v2
+ - url: http://path-server-test.petstore.local/v2
+ /pet/findByStatus:
+ get:
+ description: Multiple status values can be provided with comma separated strings
+ operationId: findPetsByStatus
+ parameters:
+ - deprecated: true
+ description: Status values that need to be considered for filter
+ explode: false
+ in: query
+ name: status
+ required: true
+ schema:
+ items:
+ default: available
+ enum:
+ - available
+ - pending
+ - sold
+ type: string
+ type: array
+ style: form
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ items:
+ $ref: '#/components/schemas/Pet'
+ type: array
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/Pet'
+ type: array
+ description: successful operation
+ "400":
+ description: Invalid status value
+ security:
+ - http_signature_test: []
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Finds Pets by status
+ tags:
+ - pet
+ /pet/findByTags:
+ get:
+ deprecated: true
+ description: "Multiple tags can be provided with comma separated strings. Use\
+ \ tag1, tag2, tag3 for testing."
+ operationId: findPetsByTags
+ parameters:
+ - description: Tags to filter by
+ explode: false
+ in: query
+ name: tags
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: form
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ items:
+ $ref: '#/components/schemas/Pet'
+ type: array
+ application/json:
+ schema:
+ items:
+ $ref: '#/components/schemas/Pet'
+ type: array
+ description: successful operation
+ "400":
+ description: Invalid tag value
+ security:
+ - http_signature_test: []
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Finds Pets by tags
+ tags:
+ - pet
+ /pet/{petId}:
+ delete:
+ description: ""
+ operationId: deletePet
+ parameters:
+ - explode: false
+ in: header
+ name: api_key
+ required: false
+ schema:
+ type: string
+ style: simple
+ - description: Pet id to delete
+ explode: false
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ responses:
+ "400":
+ description: Invalid pet value
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Deletes a pet
+ tags:
+ - pet
+ get:
+ description: Returns a single pet
+ operationId: getPetById
+ parameters:
+ - description: ID of pet to return
+ explode: false
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ description: successful operation
+ "400":
+ description: Invalid ID supplied
+ "404":
+ description: Pet not found
+ security:
+ - api_key: []
+ summary: Find pet by ID
+ tags:
+ - pet
+ post:
+ description: ""
+ operationId: updatePetWithForm
+ parameters:
+ - description: ID of pet that needs to be updated
+ explode: false
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: '#/components/schemas/updatePetWithForm_request'
+ responses:
+ "405":
+ description: Invalid input
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: Updates a pet in the store with form data
+ tags:
+ - pet
+ /pet/{petId}/uploadImage:
+ post:
+ description: ""
+ operationId: uploadFile
+ parameters:
+ - description: ID of pet to update
+ explode: false
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/uploadFile_request'
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiResponse'
+ description: successful operation
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: uploads an image
+ tags:
+ - pet
+ /store/inventory:
+ get:
+ description: Returns a map of status codes to quantities
+ operationId: getInventory
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ additionalProperties:
+ format: int32
+ type: integer
+ type: object
+ description: successful operation
+ security:
+ - api_key: []
+ summary: Returns pet inventories by status
+ tags:
+ - store
+ /store/order:
+ post:
+ description: ""
+ operationId: placeOrder
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Order'
+ description: order placed for purchasing the pet
+ required: true
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/Order'
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Order'
+ description: successful operation
+ "400":
+ description: Invalid Order
+ summary: Place an order for a pet
+ tags:
+ - store
+ /store/order/{order_id}:
+ delete:
+ description: For valid response try integer IDs with value < 1000. Anything
+ above 1000 or nonintegers will generate API errors
+ operationId: deleteOrder
+ parameters:
+ - description: ID of the order that needs to be deleted
+ explode: false
+ in: path
+ name: order_id
+ required: true
+ schema:
+ type: string
+ style: simple
+ responses:
+ "400":
+ description: Invalid ID supplied
+ "404":
+ description: Order not found
+ summary: Delete purchase order by ID
+ tags:
+ - store
+ get:
+ description: For valid response try integer IDs with value <= 5 or > 10. Other
+ values will generate exceptions
+ operationId: getOrderById
+ parameters:
+ - description: ID of pet that needs to be fetched
+ explode: false
+ in: path
+ name: order_id
+ required: true
+ schema:
+ format: int64
+ maximum: 5
+ minimum: 1
+ type: integer
+ style: simple
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/Order'
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Order'
+ description: successful operation
+ "400":
+ description: Invalid ID supplied
+ "404":
+ description: Order not found
+ summary: Find purchase order by ID
+ tags:
+ - store
+ /user:
+ post:
+ description: This can only be done by the logged in user.
+ operationId: createUser
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/User'
+ description: Created user object
+ required: true
+ responses:
+ default:
+ description: successful operation
+ summary: Create user
+ tags:
+ - user
+ /user/createWithArray:
+ post:
+ description: ""
+ operationId: createUsersWithArrayInput
+ requestBody:
+ $ref: '#/components/requestBodies/UserArray'
+ responses:
+ default:
+ description: successful operation
+ summary: Creates list of users with given input array
+ tags:
+ - user
+ /user/createWithList:
+ post:
+ description: ""
+ operationId: createUsersWithListInput
+ requestBody:
+ $ref: '#/components/requestBodies/UserArray'
+ responses:
+ default:
+ description: successful operation
+ summary: Creates list of users with given input array
+ tags:
+ - user
+ /user/login:
+ get:
+ description: ""
+ operationId: loginUser
+ parameters:
+ - description: The user name for login
+ explode: true
+ in: query
+ name: username
+ required: true
+ schema:
+ type: string
+ style: form
+ - description: The password for login in clear text
+ explode: true
+ in: query
+ name: password
+ required: true
+ schema:
+ type: string
+ style: form
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ type: string
+ application/json:
+ schema:
+ type: string
+ description: successful operation
+ headers:
+ X-Rate-Limit:
+ description: calls per hour allowed by the user
+ explode: false
+ schema:
+ format: int32
+ type: integer
+ style: simple
+ X-Expires-After:
+ description: date in UTC when token expires
+ explode: false
+ schema:
+ format: date-time
+ type: string
+ style: simple
+ "400":
+ description: Invalid username/password supplied
+ summary: Logs user into the system
+ tags:
+ - user
+ /user/logout:
+ get:
+ description: ""
+ operationId: logoutUser
+ responses:
+ default:
+ description: successful operation
+ summary: Logs out current logged in user session
+ tags:
+ - user
+ /user/{username}:
+ delete:
+ description: This can only be done by the logged in user.
+ operationId: deleteUser
+ parameters:
+ - description: The name that needs to be deleted
+ explode: false
+ in: path
+ name: username
+ required: true
+ schema:
+ type: string
+ style: simple
+ responses:
+ "400":
+ description: Invalid username supplied
+ "404":
+ description: User not found
+ summary: Delete user
+ tags:
+ - user
+ get:
+ description: ""
+ operationId: getUserByName
+ parameters:
+ - description: The name that needs to be fetched. Use user1 for testing.
+ explode: false
+ in: path
+ name: username
+ required: true
+ schema:
+ type: string
+ style: simple
+ responses:
+ "200":
+ content:
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/User'
+ application/json:
+ schema:
+ $ref: '#/components/schemas/User'
+ description: successful operation
+ "400":
+ description: Invalid username supplied
+ "404":
+ description: User not found
+ summary: Get user by user name
+ tags:
+ - user
+ put:
+ description: This can only be done by the logged in user.
+ operationId: updateUser
+ parameters:
+ - description: name that need to be deleted
+ explode: false
+ in: path
+ name: username
+ required: true
+ schema:
+ type: string
+ style: simple
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/User'
+ description: Updated user object
+ required: true
+ responses:
+ "400":
+ description: Invalid user supplied
+ "404":
+ description: User not found
+ summary: Updated user
+ tags:
+ - user
+ /fake_classname_test:
+ patch:
+ description: To test class name in snake case
+ operationId: testClassname
+ requestBody:
+ $ref: '#/components/requestBodies/Client'
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Client'
+ description: successful operation
+ security:
+ - api_key_query: []
+ summary: To test class name in snake case
+ tags:
+ - fake_classname_tags 123#$%^
+ /fake:
+ delete:
+ description: Fake endpoint to test group parameters (optional)
+ operationId: testGroupParameters
+ parameters:
+ - description: Required String in group parameters
+ explode: true
+ in: query
+ name: required_string_group
+ required: true
+ schema:
+ type: integer
+ style: form
+ - description: Required Boolean in group parameters
+ explode: false
+ in: header
+ name: required_boolean_group
+ required: true
+ schema:
+ type: boolean
+ style: simple
+ - description: Required Integer in group parameters
+ explode: true
+ in: query
+ name: required_int64_group
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: form
+ - description: String in group parameters
+ explode: true
+ in: query
+ name: string_group
+ required: false
+ schema:
+ type: integer
+ style: form
+ - description: Boolean in group parameters
+ explode: false
+ in: header
+ name: boolean_group
+ required: false
+ schema:
+ type: boolean
+ style: simple
+ - description: Integer in group parameters
+ explode: true
+ in: query
+ name: int64_group
+ required: false
+ schema:
+ format: int64
+ type: integer
+ style: form
+ responses:
+ "400":
+ description: Something wrong
+ security:
+ - bearer_test: []
+ summary: Fake endpoint to test group parameters (optional)
+ tags:
+ - fake
+ x-group-parameters: true
+ get:
+ description: To test enum parameters
+ operationId: testEnumParameters
+ parameters:
+ - description: Header parameter enum test (string array)
+ explode: false
+ in: header
+ name: enum_header_string_array
+ required: false
+ schema:
+ items:
+ default: $
+ enum:
+ - '>'
+ - $
+ type: string
+ type: array
+ style: simple
+ - description: Header parameter enum test (string)
+ explode: false
+ in: header
+ name: enum_header_string
+ required: false
+ schema:
+ default: -efg
+ enum:
+ - _abc
+ - -efg
+ - (xyz)
+ type: string
+ style: simple
+ - description: Query parameter enum test (string array)
+ explode: true
+ in: query
+ name: enum_query_string_array
+ required: false
+ schema:
+ items:
+ default: $
+ enum:
+ - '>'
+ - $
+ type: string
+ type: array
+ style: form
+ - description: Query parameter enum test (string)
+ explode: true
+ in: query
+ name: enum_query_string
+ required: false
+ schema:
+ default: -efg
+ enum:
+ - _abc
+ - -efg
+ - (xyz)
+ type: string
+ style: form
+ - description: Query parameter enum test (double)
+ explode: true
+ in: query
+ name: enum_query_integer
+ required: false
+ schema:
+ enum:
+ - 1
+ - -2
+ format: int32
+ type: integer
+ style: form
+ - description: Query parameter enum test (double)
+ explode: true
+ in: query
+ name: enum_query_double
+ required: false
+ schema:
+ enum:
+ - 1.1
+ - -1.2
+ format: double
+ type: number
+ style: form
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: '#/components/schemas/testEnumParameters_request'
+ responses:
+ "400":
+ description: Invalid request
+ "404":
+ description: Not found
+ summary: To test enum parameters
+ tags:
+ - fake
+ patch:
+ description: To test "client" model
+ operationId: testClientModel
+ requestBody:
+ $ref: '#/components/requestBodies/Client'
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Client'
+ description: successful operation
+ summary: To test "client" model
+ tags:
+ - fake
+ post:
+ description: |
+ Fake endpoint for testing various parameters
+ 假端點
+ 偽のエンドポイント
+ 가짜 엔드 포인트
+ operationId: testEndpointParameters
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: '#/components/schemas/testEndpointParameters_request'
+ responses:
+ "400":
+ description: Invalid username supplied
+ "404":
+ description: User not found
+ security:
+ - http_basic_test: []
+ summary: |
+ Fake endpoint for testing various parameters
+ 假端點
+ 偽のエンドポイント
+ 가짜 엔드 포인트
+ tags:
+ - fake
+ /fake/outer/number:
+ post:
+ description: Test serialization of outer number types
+ operationId: fakeOuterNumberSerialize
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OuterNumber'
+ description: Input number as post body
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterNumber'
+ description: Output number
+ tags:
+ - fake
+ /fake/outer/string:
+ post:
+ description: Test serialization of outer string types
+ operationId: fakeOuterStringSerialize
+ parameters:
+ - description: Required UUID String
+ explode: true
+ in: query
+ name: required_string_uuid
+ required: true
+ schema:
+ format: uuid
+ type: string
+ style: form
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OuterString'
+ description: Input string as post body
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterString'
+ description: Output string
+ tags:
+ - fake
+ /fake/outer/boolean:
+ post:
+ description: Test serialization of outer boolean types
+ operationId: fakeOuterBooleanSerialize
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OuterBoolean'
+ description: Input boolean as post body
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterBoolean'
+ description: Output boolean
+ tags:
+ - fake
+ /fake/outer/composite:
+ post:
+ description: Test serialization of object with outer number type
+ operationId: fakeOuterCompositeSerialize
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/OuterComposite'
+ description: Input composite as post body
+ responses:
+ "200":
+ content:
+ '*/*':
+ schema:
+ $ref: '#/components/schemas/OuterComposite'
+ description: Output composite
+ tags:
+ - fake
+ /fake/jsonFormData:
+ get:
+ description: ""
+ operationId: testJsonFormData
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: '#/components/schemas/testJsonFormData_request'
+ responses:
+ "200":
+ description: successful operation
+ summary: test json serialization of form data
+ tags:
+ - fake
+ /fake/inline-additionalProperties:
+ post:
+ description: ""
+ operationId: testInlineAdditionalProperties
+ requestBody:
+ content:
+ application/json:
+ schema:
+ additionalProperties:
+ type: string
+ type: object
+ description: request body
+ required: true
+ responses:
+ "200":
+ description: successful operation
+ summary: test inline additionalProperties
+ tags:
+ - fake
+ /fake/body-with-query-params:
+ put:
+ operationId: testBodyWithQueryParams
+ parameters:
+ - explode: true
+ in: query
+ name: query
+ required: true
+ schema:
+ type: string
+ style: form
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/User'
+ required: true
+ responses:
+ "200":
+ description: Success
+ tags:
+ - fake
+ /another-fake/dummy:
+ patch:
+ description: To test special tags and operation ID starting with number
+ operationId: 123_test_@#$%_special_tags
+ requestBody:
+ $ref: '#/components/requestBodies/Client'
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Client'
+ description: successful operation
+ summary: To test special tags
+ tags:
+ - $another-fake?
+ /fake/body-with-file-schema:
+ put:
+ description: "For this test, the body for this request much reference a schema\
+ \ named `File`."
+ operationId: testBodyWithFileSchema
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/FileSchemaTestClass'
+ required: true
+ responses:
+ "200":
+ description: Success
+ tags:
+ - fake
+ /fake/test-query-parameters:
+ put:
+ description: To test the collection format in query parameters
+ operationId: testQueryParameterCollectionFormat
+ parameters:
+ - explode: true
+ in: query
+ name: pipe
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: form
+ - explode: false
+ in: query
+ name: ioutil
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: form
+ - explode: false
+ in: query
+ name: http
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: spaceDelimited
+ - explode: false
+ in: query
+ name: url
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: form
+ - explode: true
+ in: query
+ name: context
+ required: true
+ schema:
+ items:
+ type: string
+ type: array
+ style: form
+ - explode: true
+ in: query
+ name: requiredNotNullable
+ required: true
+ schema:
+ nullable: false
+ type: string
+ style: form
+ - explode: true
+ in: query
+ name: requiredNullable
+ required: true
+ schema:
+ nullable: true
+ type: string
+ style: form
+ - explode: true
+ in: query
+ name: notRequiredNotNullable
+ required: false
+ schema:
+ nullable: false
+ type: string
+ style: form
+ - explode: true
+ in: query
+ name: notRequiredNullable
+ required: false
+ schema:
+ nullable: true
+ type: string
+ style: form
+ responses:
+ "200":
+ description: Success
+ tags:
+ - fake
+ /fake/{petId}/uploadImageWithRequiredFile:
+ post:
+ description: ""
+ operationId: uploadFileWithRequiredFile
+ parameters:
+ - description: ID of pet to update
+ explode: false
+ in: path
+ name: petId
+ required: true
+ schema:
+ format: int64
+ type: integer
+ style: simple
+ requestBody:
+ content:
+ multipart/form-data:
+ schema:
+ $ref: '#/components/schemas/uploadFileWithRequiredFile_request'
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ApiResponse'
+ application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
+ schema:
+ $ref: '#/components/schemas/ApiResponse'
+ description: successful operation
+ security:
+ - petstore_auth:
+ - write:pets
+ - read:pets
+ summary: uploads an image (required)
+ tags:
+ - pet
+ /fake/health:
+ get:
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/HealthCheckResult'
+ description: The instance started successfully
+ summary: Health check endpoint
+ tags:
+ - fake
+ /fake/array-of-enums:
+ get:
+ operationId: getArrayOfEnums
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ArrayOfEnums'
+ description: Got named array of enums
+ summary: Array of Enums
+ tags:
+ - fake
+ /country:
+ post:
+ operationId: getCountry
+ requestBody:
+ content:
+ application/x-www-form-urlencoded:
+ schema:
+ $ref: '#/components/schemas/getCountry_request'
+ responses:
+ "200":
+ description: OK
+ /test:
+ get:
+ operationId: Test
+ responses:
+ "200":
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/notificationtest-getElements-v1-Response-mPayload'
+ description: Successful response
+ summary: Retrieve an existing Notificationtest's Elements
+components:
+ requestBodies:
+ UserArray:
+ content:
+ application/json:
+ examples:
+ simple-list:
+ description: Should not get into code examples
+ summary: Simple list example
+ value:
+ - username: foo
+ - username: bar
+ schema:
+ items:
+ $ref: '#/components/schemas/User'
+ type: array
+ description: List of user object
+ required: true
+ Client:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Client'
+ description: client model
+ required: true
+ Pet:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ application/xml:
+ schema:
+ $ref: '#/components/schemas/Pet'
+ description: Pet object that needs to be added to the store
+ required: true
+ schemas:
+ RolesReport:
+ description: Roles report
+ items:
+ $ref: '#/components/schemas/RolesReportsHash'
+ type: array
+ RolesReportsHash:
+ description: Role report Hash
+ properties:
+ role_uuid:
+ format: uuid
+ type: string
+ role:
+ $ref: '#/components/schemas/RolesReportsHash_role'
+ type: object
+ Foo:
+ example:
+ bar: bar
+ properties:
+ bar:
+ default: bar
+ type: string
+ type: object
+ Bar:
+ default: bar
+ type: string
+ Order:
+ example:
+ petId: 6
+ quantity: 1
+ id: 0
+ shipDate: 2020-02-02T20:20:20.000222Z
+ complete: false
+ status: placed
+ properties:
+ id:
+ format: int64
+ type: integer
+ petId:
+ format: int64
+ type: integer
+ quantity:
+ format: int32
+ type: integer
+ shipDate:
+ example: 2020-02-02T20:20:20.000222Z
+ format: date-time
+ type: string
+ status:
+ description: Order Status
+ enum:
+ - placed
+ - approved
+ - delivered
+ type: string
+ complete:
+ default: false
+ type: boolean
+ type: object
+ xml:
+ name: Order
+ Category:
+ example:
+ name: default-name
+ id: 6
+ properties:
+ id:
+ format: int64
+ type: integer
+ name:
+ default: default-name
+ type: string
+ required:
+ - name
+ type: object
+ xml:
+ name: Category
+ User:
+ example:
+ firstName: firstName
+ lastName: lastName
+ password: password
+ userStatus: 6
+ objectWithNoDeclaredPropsNullable: "{}"
+ phone: phone
+ objectWithNoDeclaredProps: "{}"
+ id: 0
+ anyTypePropNullable: ""
+ email: email
+ anyTypeProp: ""
+ username: username
+ properties:
+ id:
+ format: int64
+ type: integer
+ x-is-unique: true
+ username:
+ type: string
+ firstName:
+ type: string
+ lastName:
+ type: string
+ email:
+ type: string
+ password:
+ type: string
+ phone:
+ type: string
+ userStatus:
+ description: User Status
+ format: int32
+ type: integer
+ objectWithNoDeclaredProps:
+ description: test code generation for objects Value must be a map of strings
+ to values. It cannot be the 'null' value.
+ type: object
+ objectWithNoDeclaredPropsNullable:
+ description: test code generation for nullable objects. Value must be a
+ map of strings to values or the 'null' value.
+ nullable: true
+ type: object
+ anyTypeProp:
+ description: "test code generation for any type Here the 'type' attribute\
+ \ is not specified, which means the value can be anything, including the\
+ \ null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389"
+ anyTypePropNullable:
+ description: "test code generation for any type Here the 'type' attribute\
+ \ is not specified, which means the value can be anything, including the\
+ \ null value, string, number, boolean, array or object. The 'nullable'\
+ \ attribute does not change the allowed values."
+ nullable: true
+ type: object
+ xml:
+ name: User
+ Tag:
+ example:
+ name: name
+ id: 1
+ properties:
+ id:
+ format: int64
+ type: integer
+ name:
+ type: string
+ type: object
+ xml:
+ name: Tag
+ Pet:
+ example:
+ photoUrls:
+ - photoUrls
+ - photoUrls
+ name: doggie
+ id: 0
+ category:
+ name: default-name
+ id: 6
+ tags:
+ - name: name
+ id: 1
+ - name: name
+ id: 1
+ status: available
+ properties:
+ id:
+ format: int64
+ type: integer
+ x-is-unique: true
+ category:
+ $ref: '#/components/schemas/Category'
+ name:
+ example: doggie
+ type: string
+ photoUrls:
+ items:
+ type: string
+ type: array
+ xml:
+ name: photoUrl
+ wrapped: true
+ tags:
+ items:
+ $ref: '#/components/schemas/Tag'
+ type: array
+ xml:
+ name: tag
+ wrapped: true
+ status:
+ description: pet status in the store
+ enum:
+ - available
+ - pending
+ - sold
+ type: string
+ required:
+ - name
+ - photoUrls
+ type: object
+ xml:
+ name: Pet
+ ApiResponse:
+ example:
+ code: 0
+ type: type
+ message: message
+ properties:
+ code:
+ format: int32
+ type: integer
+ type:
+ type: string
+ message:
+ type: string
+ type: object
+ Return:
+ description: Model for testing reserved words
+ properties:
+ return:
+ format: int32
+ type: integer
+ xml:
+ name: Return
+ Name:
+ description: Model for testing model name same as property name
+ properties:
+ name:
+ format: int32
+ type: integer
+ snake_case:
+ format: int32
+ readOnly: true
+ type: integer
+ property:
+ type: string
+ "123Number":
+ readOnly: true
+ type: integer
+ required:
+ - name
+ xml:
+ name: Name
+ "200_response":
+ description: Model for testing model name starting with number
+ properties:
+ name:
+ format: int32
+ type: integer
+ class:
+ type: string
+ xml:
+ name: Name
+ ClassModel:
+ description: Model for testing model with "_class" property
+ properties:
+ _class:
+ type: string
+ Dog:
+ allOf:
+ - $ref: '#/components/schemas/Animal'
+ - properties:
+ breed:
+ type: string
+ type: object
+ Cat:
+ allOf:
+ - $ref: '#/components/schemas/Animal'
+ - $ref: '#/components/schemas/Address'
+ - properties:
+ declawed:
+ type: boolean
+ type: object
+ Address:
+ additionalProperties:
+ type: integer
+ type: object
+ Animal:
+ discriminator:
+ propertyName: className
+ properties:
+ className:
+ type: string
+ color:
+ default: red
+ type: string
+ required:
+ - className
+ type: object
+ AnimalFarm:
+ items:
+ $ref: '#/components/schemas/Animal'
+ type: array
+ format_test:
+ properties:
+ integer:
+ maximum: 100
+ minimum: 10
+ multipleOf: 2
+ type: integer
+ int32:
+ format: int32
+ maximum: 200
+ minimum: 20
+ type: integer
+ unsigned_integer:
+ format: int32
+ maximum: 200
+ minimum: 20
+ type: integer
+ x-unsigned: true
+ int64:
+ format: int64
+ type: integer
+ unsigned_long:
+ format: int64
+ type: integer
+ x-unsigned: true
+ number:
+ maximum: 543.2
+ minimum: 32.1
+ multipleOf: 32.5
+ type: number
+ float:
+ format: float
+ maximum: 987.6
+ minimum: 54.3
+ type: number
+ double:
+ format: double
+ maximum: 123.4
+ minimum: 67.8
+ type: number
+ decimal:
+ format: number
+ type: string
+ string:
+ pattern: "/[a-z]/i"
+ type: string
+ byte:
+ format: byte
+ type: string
+ binary:
+ format: binary
+ type: string
+ date:
+ example: 2020-02-02
+ format: date
+ type: string
+ dateTime:
+ example: 2007-12-03T10:15:30+01:00
+ format: date-time
+ type: string
+ uuid:
+ example: 72f98069-206d-4f12-9f12-3d1e525a8e84
+ format: uuid
+ type: string
+ password:
+ format: password
+ maxLength: 64
+ minLength: 10
+ type: string
+ pattern_with_digits:
+ description: A string that is a 10 digit number. Can have leading zeros.
+ pattern: "^\\d{10}$"
+ type: string
+ pattern_with_digits_and_delimiter:
+ description: A string starting with 'image_' (case insensitive) and one
+ to three digits following i.e. Image_01.
+ pattern: "/^image_\\d{1,3}$/i"
+ type: string
+ pattern_with_backslash:
+ description: None
+ pattern: "^(([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\\\
+ /([0-9]|[1-2][0-9]|3[0-2]))$"
+ type: string
+ required:
+ - byte
+ - date
+ - number
+ - password
+ type: object
+ EnumClass:
+ default: -efg
+ enum:
+ - _abc
+ - -efg
+ - (xyz)
+ type: string
+ Outer_Enum_Test:
+ enum:
+ - UPPER
+ - lower
+ - ""
+ - "Value\twith tab"
+ - Value with " quote
+ - Value with escaped \" quote
+ - |-
+ Duplicate
+ value
+ - "Duplicate\r\nvalue"
+ type: string
+ Enum_Test:
+ properties:
+ enum_string:
+ enum:
+ - UPPER
+ - lower
+ - ""
+ - "Value\twith tab"
+ - Value with " quote
+ - Value with escaped \" quote
+ - |-
+ Duplicate
+ value
+ - "Duplicate\r\nvalue"
+ type: string
+ enum_string_required:
+ enum:
+ - UPPER
+ - lower
+ - ""
+ - "Value\twith tab"
+ - Value with " quote
+ - Value with escaped \" quote
+ - |-
+ Duplicate
+ value
+ - "Duplicate\r\nvalue"
+ type: string
+ enum_integer:
+ enum:
+ - 1
+ - -1
+ format: int32
+ type: integer
+ enum_integer_only:
+ enum:
+ - 2
+ - -2
+ type: integer
+ enum_number:
+ enum:
+ - 1.1
+ - -1.2
+ format: double
+ type: number
+ outerEnum:
+ $ref: '#/components/schemas/OuterEnum'
+ outerEnumInteger:
+ $ref: '#/components/schemas/OuterEnumInteger'
+ outerEnumDefaultValue:
+ $ref: '#/components/schemas/OuterEnumDefaultValue'
+ outerEnumIntegerDefaultValue:
+ $ref: '#/components/schemas/OuterEnumIntegerDefaultValue'
+ required:
+ - enum_string_required
+ type: object
+ AdditionalPropertiesClass:
+ properties:
+ map_property:
+ additionalProperties:
+ type: string
+ type: object
+ map_of_map_property:
+ additionalProperties:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ anytype_1: {}
+ map_with_undeclared_properties_anytype_1:
+ type: object
+ map_with_undeclared_properties_anytype_2:
+ properties: {}
+ type: object
+ map_with_undeclared_properties_anytype_3:
+ additionalProperties: true
+ type: object
+ empty_map:
+ additionalProperties: false
+ description: "an object with no declared properties and no undeclared properties,\
+ \ hence it's an empty map."
+ type: object
+ map_with_undeclared_properties_string:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ MixedPropertiesAndAdditionalPropertiesClass:
+ properties:
+ uuid_with_pattern:
+ format: uuid
+ pattern: "[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}"
+ type: string
+ uuid:
+ format: uuid
+ type: string
+ dateTime:
+ format: date-time
+ type: string
+ map:
+ additionalProperties:
+ $ref: '#/components/schemas/Animal'
+ type: object
+ type: object
+ List:
+ properties:
+ "123-list":
+ type: string
+ type: object
+ Client:
+ example:
+ client: client
+ properties:
+ client:
+ type: string
+ type: object
+ ReadOnlyFirst:
+ properties:
+ bar:
+ readOnly: true
+ type: string
+ baz:
+ type: string
+ type: object
+ hasOnlyReadOnly:
+ properties:
+ bar:
+ readOnly: true
+ type: string
+ foo:
+ readOnly: true
+ type: string
+ type: object
+ Capitalization:
+ properties:
+ smallCamel:
+ type: string
+ CapitalCamel:
+ type: string
+ small_Snake:
+ type: string
+ Capital_Snake:
+ type: string
+ SCA_ETH_Flow_Points:
+ type: string
+ ATT_NAME:
+ description: |
+ Name of the pet
+ type: string
+ type: object
+ MapTest:
+ properties:
+ map_map_of_string:
+ additionalProperties:
+ additionalProperties:
+ type: string
+ type: object
+ type: object
+ map_of_enum_string:
+ additionalProperties:
+ enum:
+ - UPPER
+ - lower
+ type: string
+ type: object
+ direct_map:
+ additionalProperties:
+ type: boolean
+ type: object
+ indirect_map:
+ additionalProperties:
+ type: boolean
+ type: object
+ type: object
+ ArrayTest:
+ properties:
+ array_of_string:
+ items:
+ type: string
+ type: array
+ array_array_of_integer:
+ items:
+ items:
+ format: int64
+ type: integer
+ type: array
+ type: array
+ array_array_of_model:
+ items:
+ items:
+ $ref: '#/components/schemas/ReadOnlyFirst'
+ type: array
+ type: array
+ type: object
+ NumberOnly:
+ properties:
+ JustNumber:
+ type: number
+ type: object
+ x-cls-compliant: true
+ x-com-visible: true
+ ArrayOfNumberOnly:
+ properties:
+ ArrayNumber:
+ items:
+ type: number
+ type: array
+ type: object
+ ArrayOfArrayOfNumberOnly:
+ properties:
+ ArrayArrayNumber:
+ items:
+ items:
+ type: number
+ type: array
+ type: array
+ type: object
+ EnumArrays:
+ properties:
+ just_symbol:
+ enum:
+ - '>='
+ - $
+ type: string
+ array_enum:
+ items:
+ enum:
+ - fish
+ - crab
+ type: string
+ type: array
+ type: object
+ OuterEnum:
+ enum:
+ - placed
+ - approved
+ - delivered
+ nullable: true
+ type: string
+ OuterEnumInteger:
+ enum:
+ - 0
+ - 1
+ - 2
+ type: integer
+ OuterEnumDefaultValue:
+ default: placed
+ enum:
+ - placed
+ - approved
+ - delivered
+ type: string
+ OuterEnumIntegerDefaultValue:
+ default: 0
+ enum:
+ - 0
+ - 1
+ - 2
+ type: integer
+ OuterComposite:
+ example:
+ my_string: my_string
+ my_number: 0.8008281904610115
+ my_boolean: true
+ properties:
+ my_number:
+ type: number
+ my_string:
+ type: string
+ my_boolean:
+ type: boolean
+ x-codegen-body-parameter-name: boolean_post_body
+ type: object
+ OuterNumber:
+ type: number
+ OuterString:
+ type: string
+ OuterBoolean:
+ type: boolean
+ x-codegen-body-parameter-name: boolean_post_body
+ StringBooleanMap:
+ additionalProperties:
+ type: boolean
+ type: object
+ FileSchemaTestClass:
+ example:
+ file:
+ sourceURI: sourceURI
+ files:
+ - sourceURI: sourceURI
+ - sourceURI: sourceURI
+ properties:
+ file:
+ $ref: '#/components/schemas/File'
+ files:
+ items:
+ $ref: '#/components/schemas/File'
+ type: array
+ type: object
+ File:
+ description: Must be named `File` for test.
+ example:
+ sourceURI: sourceURI
+ properties:
+ sourceURI:
+ description: Test capitalization
+ type: string
+ type: object
+ _special_model.name_:
+ properties:
+ $special[property.name]:
+ format: int64
+ type: integer
+ _special_model.name_:
+ type: string
+ xml:
+ name: "$special[model.name]"
+ HealthCheckResult:
+ description: Just a string to inform instance is up and running. Make it nullable
+ in hope to get it as pointer in generated model.
+ example:
+ NullableMessage: NullableMessage
+ properties:
+ NullableMessage:
+ nullable: true
+ type: string
+ type: object
+ NullableClass:
+ additionalProperties:
+ nullable: true
+ type: object
+ properties:
+ integer_prop:
+ nullable: true
+ type: integer
+ number_prop:
+ nullable: true
+ type: number
+ boolean_prop:
+ nullable: true
+ type: boolean
+ string_prop:
+ nullable: true
+ type: string
+ date_prop:
+ format: date
+ nullable: true
+ type: string
+ datetime_prop:
+ format: date-time
+ nullable: true
+ type: string
+ array_nullable_prop:
+ items:
+ type: object
+ nullable: true
+ type: array
+ array_and_items_nullable_prop:
+ items:
+ nullable: true
+ type: object
+ nullable: true
+ type: array
+ array_items_nullable:
+ items:
+ nullable: true
+ type: object
+ type: array
+ object_nullable_prop:
+ additionalProperties:
+ type: object
+ nullable: true
+ type: object
+ object_and_items_nullable_prop:
+ additionalProperties:
+ nullable: true
+ type: object
+ nullable: true
+ type: object
+ object_items_nullable:
+ additionalProperties:
+ nullable: true
+ type: object
+ type: object
+ type: object
+ fruit:
+ additionalProperties: false
+ oneOf:
+ - $ref: '#/components/schemas/apple'
+ - $ref: '#/components/schemas/banana'
+ properties:
+ color:
+ type: string
+ apple:
+ nullable: true
+ properties:
+ cultivar:
+ pattern: "^[a-zA-Z\\s]*$"
+ type: string
+ origin:
+ pattern: "/^[A-Z\\s]*$/i"
+ type: string
+ color_code:
+ pattern: "^#(([0-9a-fA-F]{2}){3}|([0-9a-fA-F]){3})$"
+ type: string
+ type: object
+ banana:
+ properties:
+ lengthCm:
+ type: number
+ type: object
+ mammal:
+ discriminator:
+ propertyName: className
+ oneOf:
+ - $ref: '#/components/schemas/whale'
+ - $ref: '#/components/schemas/zebra'
+ - $ref: '#/components/schemas/Pig'
+ whale:
+ properties:
+ hasBaleen:
+ type: boolean
+ hasTeeth:
+ type: boolean
+ className:
+ type: string
+ required:
+ - className
+ type: object
+ zebra:
+ additionalProperties: true
+ properties:
+ type:
+ enum:
+ - plains
+ - mountain
+ - grevys
+ type: string
+ className:
+ type: string
+ required:
+ - className
+ type: object
+ Pig:
+ discriminator:
+ propertyName: className
+ oneOf:
+ - $ref: '#/components/schemas/BasquePig'
+ - $ref: '#/components/schemas/DanishPig'
+ BasquePig:
+ properties:
+ className:
+ type: string
+ required:
+ - className
+ type: object
+ DanishPig:
+ properties:
+ className:
+ type: string
+ required:
+ - className
+ type: object
+ gmFruit:
+ additionalProperties: false
+ anyOf:
+ - $ref: '#/components/schemas/apple'
+ - $ref: '#/components/schemas/banana'
+ properties:
+ color:
+ type: string
+ fruitReq:
+ additionalProperties: false
+ nullable: true
+ oneOf:
+ - $ref: '#/components/schemas/appleReq'
+ - $ref: '#/components/schemas/bananaReq'
+ appleReq:
+ additionalProperties: false
+ properties:
+ cultivar:
+ type: string
+ mealy:
+ type: boolean
+ required:
+ - cultivar
+ type: object
+ bananaReq:
+ additionalProperties: false
+ properties:
+ lengthCm:
+ type: number
+ sweet:
+ type: boolean
+ required:
+ - lengthCm
+ type: object
+ Drawing:
+ additionalProperties:
+ $ref: '#/components/schemas/fruit'
+ properties:
+ mainShape:
+ $ref: '#/components/schemas/Shape'
+ shapeOrNull:
+ $ref: '#/components/schemas/ShapeOrNull'
+ nullableShape:
+ $ref: '#/components/schemas/NullableShape'
+ shapes:
+ items:
+ $ref: '#/components/schemas/Shape'
+ type: array
+ type: object
+ Shape:
+ discriminator:
+ propertyName: shapeType
+ oneOf:
+ - $ref: '#/components/schemas/Triangle'
+ - $ref: '#/components/schemas/Quadrilateral'
+ ShapeOrNull:
+ description: The value may be a shape or the 'null' value. This is introduced
+ in OAS schema >= 3.1.
+ discriminator:
+ propertyName: shapeType
+ nullable: true
+ oneOf:
+ - $ref: '#/components/schemas/Triangle'
+ - $ref: '#/components/schemas/Quadrilateral'
+ NullableShape:
+ description: The value may be a shape or the 'null' value. The 'nullable' attribute
+ was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema
+ >= 3.1.
+ discriminator:
+ propertyName: shapeType
+ nullable: true
+ oneOf:
+ - $ref: '#/components/schemas/Triangle'
+ - $ref: '#/components/schemas/Quadrilateral'
+ ShapeInterface:
+ properties:
+ shapeType:
+ type: string
+ required:
+ - shapeType
+ TriangleInterface:
+ properties:
+ triangleType:
+ type: string
+ required:
+ - triangleType
+ Triangle:
+ discriminator:
+ propertyName: triangleType
+ oneOf:
+ - $ref: '#/components/schemas/EquilateralTriangle'
+ - $ref: '#/components/schemas/IsoscelesTriangle'
+ - $ref: '#/components/schemas/ScaleneTriangle'
+ EquilateralTriangle:
+ allOf:
+ - $ref: '#/components/schemas/ShapeInterface'
+ - $ref: '#/components/schemas/TriangleInterface'
+ IsoscelesTriangle:
+ additionalProperties: false
+ allOf:
+ - $ref: '#/components/schemas/ShapeInterface'
+ - $ref: '#/components/schemas/TriangleInterface'
+ ScaleneTriangle:
+ allOf:
+ - $ref: '#/components/schemas/ShapeInterface'
+ - $ref: '#/components/schemas/TriangleInterface'
+ QuadrilateralInterface:
+ properties:
+ quadrilateralType:
+ type: string
+ required:
+ - quadrilateralType
+ Quadrilateral:
+ discriminator:
+ propertyName: quadrilateralType
+ oneOf:
+ - $ref: '#/components/schemas/SimpleQuadrilateral'
+ - $ref: '#/components/schemas/ComplexQuadrilateral'
+ SimpleQuadrilateral:
+ allOf:
+ - $ref: '#/components/schemas/ShapeInterface'
+ - $ref: '#/components/schemas/QuadrilateralInterface'
+ ComplexQuadrilateral:
+ allOf:
+ - $ref: '#/components/schemas/ShapeInterface'
+ - $ref: '#/components/schemas/QuadrilateralInterface'
+ GrandparentAnimal:
+ discriminator:
+ propertyName: pet_type
+ properties:
+ pet_type:
+ type: string
+ required:
+ - pet_type
+ type: object
+ ParentPet:
+ allOf:
+ - $ref: '#/components/schemas/GrandparentAnimal'
+ type: object
+ ChildCat:
+ allOf:
+ - $ref: '#/components/schemas/ParentPet'
+ - properties:
+ name:
+ type: string
+ pet_type:
+ default: ChildCat
+ enum:
+ - ChildCat
+ type: string
+ x-enum-as-string: true
+ type: object
+ ArrayOfEnums:
+ items:
+ $ref: '#/components/schemas/OuterEnum'
+ type: array
+ DateTimeTest:
+ default: 2010-01-01T10:10:10.000111+01:00
+ example: 2010-01-01T10:10:10.000111+01:00
+ format: date-time
+ type: string
+ DeprecatedObject:
+ deprecated: true
+ properties:
+ name:
+ type: string
+ type: object
+ ObjectWithDeprecatedFields:
+ properties:
+ uuid:
+ type: string
+ id:
+ deprecated: true
+ type: number
+ deprecatedRef:
+ $ref: '#/components/schemas/DeprecatedObject'
+ bars:
+ deprecated: true
+ items:
+ $ref: '#/components/schemas/Bar'
+ type: array
+ type: object
+ PolymorphicProperty:
+ oneOf:
+ - type: boolean
+ - type: string
+ - type: object
+ - items:
+ $ref: '#/components/schemas/StringArrayItem'
+ type: array
+ StringArrayItem:
+ format: string
+ type: string
+ Activity:
+ description: test map of maps
+ properties:
+ activity_outputs:
+ additionalProperties:
+ $ref: '#/components/schemas/ActivityOutputRepresentation'
+ type: object
+ type: object
+ ActivityOutputRepresentation:
+ items:
+ $ref: '#/components/schemas/ActivityOutputElementRepresentation'
+ type: array
+ ActivityOutputElementRepresentation:
+ properties:
+ prop1:
+ type: string
+ prop2:
+ type: object
+ type: object
+ NullableGuidClass:
+ properties:
+ uuid:
+ example: 72f98069-206d-4f12-9f12-3d1e525a8e84
+ format: uuid
+ nullable: true
+ type: string
+ type: object
+ DateOnlyClass:
+ properties:
+ dateOnlyProperty:
+ example: 2017-07-21
+ format: date
+ type: string
+ type: object
+ TestCollectionEndingWithWordListObject:
+ properties:
+ TestCollectionEndingWithWordList:
+ items:
+ $ref: '#/components/schemas/TestCollectionEndingWithWordList'
+ type: array
+ type: object
+ TestCollectionEndingWithWordList:
+ properties:
+ value:
+ type: string
+ type: object
+ LiteralStringClass:
+ properties:
+ escapedLiteralString:
+ default: C:\\Users\\username
+ type: string
+ unescapedLiteralString:
+ default: C:\Users\username
+ type: string
+ type: object
+ OneOfString:
+ oneOf:
+ - pattern: ^a
+ type: string
+ - pattern: ^b
+ type: string
+ ZeroBasedEnum:
+ enum:
+ - unknown
+ - notUnknown
+ type: string
+ ZeroBasedEnumClass:
+ properties:
+ ZeroBasedEnum:
+ enum:
+ - unknown
+ - notUnknown
+ type: string
+ type: object
+ Custom-Variableobject-Response:
+ additionalProperties: true
+ description: A Variable object without predefined property names
+ type: object
+ Field-pkiNotificationtestID:
+ type: integer
+ notificationtest-getElements-v1-Response-mPayload:
+ example:
+ a_objVariableobject:
+ - null
+ - null
+ pkiNotificationtestID: 0
+ properties:
+ pkiNotificationtestID:
+ type: integer
+ a_objVariableobject:
+ items:
+ $ref: '#/components/schemas/Custom-Variableobject-Response'
+ type: array
+ required:
+ - a_objVariableobject
+ - pkiNotificationtestID
+ type: object
+ _foo_get_default_response:
+ example:
+ string:
+ bar: bar
+ properties:
+ string:
+ $ref: '#/components/schemas/Foo'
+ type: object
+ updatePetWithForm_request:
+ properties:
+ name:
+ description: Updated name of the pet
+ type: string
+ status:
+ description: Updated status of the pet
+ type: string
+ type: object
+ uploadFile_request:
+ properties:
+ additionalMetadata:
+ description: Additional data to pass to server
+ type: string
+ file:
+ description: file to upload
+ format: binary
+ type: string
+ type: object
+ testEnumParameters_request:
+ properties:
+ enum_form_string_array:
+ description: Form parameter enum test (string array)
+ items:
+ default: $
+ enum:
+ - '>'
+ - $
+ type: string
+ type: array
+ enum_form_string:
+ default: -efg
+ description: Form parameter enum test (string)
+ enum:
+ - _abc
+ - -efg
+ - (xyz)
+ type: string
+ type: object
+ testEndpointParameters_request:
+ properties:
+ integer:
+ description: None
+ maximum: 100
+ minimum: 10
+ type: integer
+ int32:
+ description: None
+ format: int32
+ maximum: 200
+ minimum: 20
+ type: integer
+ int64:
+ description: None
+ format: int64
+ type: integer
+ number:
+ description: None
+ maximum: 543.2
+ minimum: 32.1
+ type: number
+ float:
+ description: None
+ format: float
+ maximum: 987.6
+ type: number
+ double:
+ description: None
+ format: double
+ maximum: 123.4
+ minimum: 67.8
+ type: number
+ string:
+ description: None
+ pattern: "/[a-z]/i"
+ type: string
+ pattern_without_delimiter:
+ description: None
+ pattern: "^[A-Z].*"
+ type: string
+ byte:
+ description: None
+ format: byte
+ type: string
+ binary:
+ description: None
+ format: binary
+ type: string
+ date:
+ description: None
+ format: date
+ type: string
+ dateTime:
+ default: 2010-02-01T10:20:10.11111+01:00
+ description: None
+ example: 2020-02-02T20:20:20.22222Z
+ format: date-time
+ type: string
+ password:
+ description: None
+ format: password
+ maxLength: 64
+ minLength: 10
+ type: string
+ callback:
+ description: None
+ type: string
+ required:
+ - byte
+ - double
+ - number
+ - pattern_without_delimiter
+ type: object
+ testJsonFormData_request:
+ properties:
+ param:
+ description: field1
+ type: string
+ param2:
+ description: field2
+ type: string
+ required:
+ - param
+ - param2
+ type: object
+ uploadFileWithRequiredFile_request:
+ properties:
+ additionalMetadata:
+ description: Additional data to pass to server
+ type: string
+ requiredFile:
+ description: file to upload
+ format: binary
+ type: string
+ required:
+ - requiredFile
+ type: object
+ getCountry_request:
+ allOf:
+ - properties:
+ country:
+ type: string
+ required:
+ - country
+ type: object
+ RolesReportsHash_role:
+ properties:
+ name:
+ type: string
+ type: object
+ securitySchemes:
+ petstore_auth:
+ flows:
+ implicit:
+ authorizationUrl: http://petstore.swagger.io/api/oauth/dialog
+ scopes:
+ write:pets: modify pets in your account
+ read:pets: read your pets
+ type: oauth2
+ api_key:
+ in: header
+ name: api_key
+ type: apiKey
+ api_key_query:
+ in: query
+ name: api_key_query
+ type: apiKey
+ http_basic_test:
+ scheme: basic
+ type: http
+ bearer_test:
+ bearerFormat: JWT
+ scheme: bearer
+ type: http
+ http_signature_test:
+ scheme: signature
+ type: http
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/appveyor.yml b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/appveyor.yml
new file mode 100644
index 00000000000..82e02a91a31
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/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\UseSourceGeneration\UseSourceGeneration.csproj -o ../../output -c Release --no-build
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/AnotherFakeApi.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/AnotherFakeApi.md
new file mode 100644
index 00000000000..a86037320d1
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/AnotherFakeApi.md
@@ -0,0 +1,99 @@
+# UseSourceGeneration.Api.AnotherFakeApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**Call123TestSpecialTags**](AnotherFakeApi.md#call123testspecialtags) | **PATCH** /another-fake/dummy | To test special tags |
+
+
+# **Call123TestSpecialTags**
+> ModelClient Call123TestSpecialTags (ModelClient modelClient)
+
+To test special tags
+
+To test special tags and operation ID starting with number
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class Call123TestSpecialTagsExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new AnotherFakeApi(config);
+ var modelClient = new ModelClient(); // ModelClient | client model
+
+ try
+ {
+ // To test special tags
+ ModelClient result = apiInstance.Call123TestSpecialTags(modelClient);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling AnotherFakeApi.Call123TestSpecialTags: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the Call123TestSpecialTagsWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // To test special tags
+ ApiResponse response = apiInstance.Call123TestSpecialTagsWithHttpInfo(modelClient);
+ 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 AnotherFakeApi.Call123TestSpecialTagsWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **modelClient** | [**ModelClient**](ModelClient.md) | client model | |
+
+### Return type
+
+[**ModelClient**](ModelClient.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/DefaultApi.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/DefaultApi.md
new file mode 100644
index 00000000000..060a9a33d26
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/DefaultApi.md
@@ -0,0 +1,429 @@
+# UseSourceGeneration.Api.DefaultApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**FooGet**](DefaultApi.md#fooget) | **GET** /foo | |
+| [**GetCountry**](DefaultApi.md#getcountry) | **POST** /country | |
+| [**Hello**](DefaultApi.md#hello) | **GET** /hello | Hello |
+| [**RolesReportGet**](DefaultApi.md#rolesreportget) | **GET** /roles/report | |
+| [**Test**](DefaultApi.md#test) | **GET** /test | Retrieve an existing Notificationtest's Elements |
+
+
+# **FooGet**
+> FooGetDefaultResponse FooGet ()
+
+
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class FooGetExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new DefaultApi(config);
+
+ try
+ {
+ FooGetDefaultResponse result = apiInstance.FooGet();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling DefaultApi.FooGet: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FooGetWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ ApiResponse response = apiInstance.FooGetWithHttpInfo();
+ 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.FooGetWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+[**FooGetDefaultResponse**](FooGetDefaultResponse.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | response | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **GetCountry**
+> void GetCountry (string country)
+
+
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class GetCountryExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new DefaultApi(config);
+ var country = "country_example"; // string |
+
+ try
+ {
+ apiInstance.GetCountry(country);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling DefaultApi.GetCountry: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the GetCountryWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ apiInstance.GetCountryWithHttpInfo(country);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling DefaultApi.GetCountryWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **country** | **string** | | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | 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)
+
+
+# **Hello**
+> List<Guid> Hello ()
+
+Hello
+
+Hello
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class HelloExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new DefaultApi(config);
+
+ try
+ {
+ // Hello
+ List result = apiInstance.Hello();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling DefaultApi.Hello: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the HelloWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Hello
+ ApiResponse> response = apiInstance.HelloWithHttpInfo();
+ 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.HelloWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+**List**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | UUIDs | - |
+
+[[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)
+
+
+# **RolesReportGet**
+> List<List<RolesReportsHash>> RolesReportGet ()
+
+
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class RolesReportGetExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new DefaultApi(config);
+
+ try
+ {
+ List> result = apiInstance.RolesReportGet();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling DefaultApi.RolesReportGet: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the RolesReportGetWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ ApiResponse>> response = apiInstance.RolesReportGetWithHttpInfo();
+ 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.RolesReportGetWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+**List>**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | returns report | - |
+
+[[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)
+
+
+# **Test**
+> NotificationtestGetElementsV1ResponseMPayload Test ()
+
+Retrieve an existing Notificationtest's Elements
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class TestExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new DefaultApi(config);
+
+ try
+ {
+ // Retrieve an existing Notificationtest's Elements
+ NotificationtestGetElementsV1ResponseMPayload result = apiInstance.Test();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling DefaultApi.Test: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Retrieve an existing Notificationtest's Elements
+ ApiResponse response = apiInstance.TestWithHttpInfo();
+ 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.TestWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+[**NotificationtestGetElementsV1ResponseMPayload**](NotificationtestGetElementsV1ResponseMPayload.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Successful response | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/FakeApi.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/FakeApi.md
new file mode 100644
index 00000000000..848b3c5a375
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/FakeApi.md
@@ -0,0 +1,1402 @@
+# UseSourceGeneration.Api.FakeApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**FakeHealthGet**](FakeApi.md#fakehealthget) | **GET** /fake/health | Health check endpoint |
+| [**FakeOuterBooleanSerialize**](FakeApi.md#fakeouterbooleanserialize) | **POST** /fake/outer/boolean | |
+| [**FakeOuterCompositeSerialize**](FakeApi.md#fakeoutercompositeserialize) | **POST** /fake/outer/composite | |
+| [**FakeOuterNumberSerialize**](FakeApi.md#fakeouternumberserialize) | **POST** /fake/outer/number | |
+| [**FakeOuterStringSerialize**](FakeApi.md#fakeouterstringserialize) | **POST** /fake/outer/string | |
+| [**GetArrayOfEnums**](FakeApi.md#getarrayofenums) | **GET** /fake/array-of-enums | Array of Enums |
+| [**TestBodyWithFileSchema**](FakeApi.md#testbodywithfileschema) | **PUT** /fake/body-with-file-schema | |
+| [**TestBodyWithQueryParams**](FakeApi.md#testbodywithqueryparams) | **PUT** /fake/body-with-query-params | |
+| [**TestClientModel**](FakeApi.md#testclientmodel) | **PATCH** /fake | To test \"client\" model |
+| [**TestEndpointParameters**](FakeApi.md#testendpointparameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 |
+| [**TestEnumParameters**](FakeApi.md#testenumparameters) | **GET** /fake | To test enum parameters |
+| [**TestGroupParameters**](FakeApi.md#testgroupparameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional) |
+| [**TestInlineAdditionalProperties**](FakeApi.md#testinlineadditionalproperties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties |
+| [**TestJsonFormData**](FakeApi.md#testjsonformdata) | **GET** /fake/jsonFormData | test json serialization of form data |
+| [**TestQueryParameterCollectionFormat**](FakeApi.md#testqueryparametercollectionformat) | **PUT** /fake/test-query-parameters | |
+
+
+# **FakeHealthGet**
+> HealthCheckResult FakeHealthGet ()
+
+Health check endpoint
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class FakeHealthGetExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(config);
+
+ try
+ {
+ // Health check endpoint
+ HealthCheckResult result = apiInstance.FakeHealthGet();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.FakeHealthGet: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FakeHealthGetWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Health check endpoint
+ ApiResponse response = apiInstance.FakeHealthGetWithHttpInfo();
+ 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 FakeApi.FakeHealthGetWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+[**HealthCheckResult**](HealthCheckResult.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | The instance started successfully | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **FakeOuterBooleanSerialize**
+> bool FakeOuterBooleanSerialize (bool body = null)
+
+
+
+Test serialization of outer boolean types
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class FakeOuterBooleanSerializeExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(config);
+ var body = true; // bool | Input boolean as post body (optional)
+
+ try
+ {
+ bool result = apiInstance.FakeOuterBooleanSerialize(body);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.FakeOuterBooleanSerialize: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FakeOuterBooleanSerializeWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ ApiResponse response = apiInstance.FakeOuterBooleanSerializeWithHttpInfo(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 FakeApi.FakeOuterBooleanSerializeWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **body** | **bool** | Input boolean as post body | [optional] |
+
+### Return type
+
+**bool**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output boolean | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **FakeOuterCompositeSerialize**
+> OuterComposite FakeOuterCompositeSerialize (OuterComposite outerComposite = null)
+
+
+
+Test serialization of object with outer number type
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class FakeOuterCompositeSerializeExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(config);
+ var outerComposite = new OuterComposite(); // OuterComposite | Input composite as post body (optional)
+
+ try
+ {
+ OuterComposite result = apiInstance.FakeOuterCompositeSerialize(outerComposite);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.FakeOuterCompositeSerialize: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FakeOuterCompositeSerializeWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ ApiResponse response = apiInstance.FakeOuterCompositeSerializeWithHttpInfo(outerComposite);
+ 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 FakeApi.FakeOuterCompositeSerializeWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **outerComposite** | [**OuterComposite**](OuterComposite.md) | Input composite as post body | [optional] |
+
+### Return type
+
+[**OuterComposite**](OuterComposite.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output composite | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **FakeOuterNumberSerialize**
+> decimal FakeOuterNumberSerialize (decimal body = null)
+
+
+
+Test serialization of outer number types
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class FakeOuterNumberSerializeExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(config);
+ var body = 8.14D; // decimal | Input number as post body (optional)
+
+ try
+ {
+ decimal result = apiInstance.FakeOuterNumberSerialize(body);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.FakeOuterNumberSerialize: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FakeOuterNumberSerializeWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ ApiResponse response = apiInstance.FakeOuterNumberSerializeWithHttpInfo(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 FakeApi.FakeOuterNumberSerializeWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **body** | **decimal** | Input number as post body | [optional] |
+
+### Return type
+
+**decimal**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output number | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **FakeOuterStringSerialize**
+> string FakeOuterStringSerialize (Guid requiredStringUuid, string body = null)
+
+
+
+Test serialization of outer string types
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class FakeOuterStringSerializeExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(config);
+ var requiredStringUuid = "requiredStringUuid_example"; // Guid | Required UUID String
+ var body = "body_example"; // string | Input string as post body (optional)
+
+ try
+ {
+ string result = apiInstance.FakeOuterStringSerialize(requiredStringUuid, body);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.FakeOuterStringSerialize: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FakeOuterStringSerializeWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ ApiResponse response = apiInstance.FakeOuterStringSerializeWithHttpInfo(requiredStringUuid, 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 FakeApi.FakeOuterStringSerializeWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **requiredStringUuid** | **Guid** | Required UUID String | |
+| **body** | **string** | Input string as post body | [optional] |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Output string | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **GetArrayOfEnums**
+> List<OuterEnum> GetArrayOfEnums ()
+
+Array of Enums
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class GetArrayOfEnumsExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(config);
+
+ try
+ {
+ // Array of Enums
+ List result = apiInstance.GetArrayOfEnums();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.GetArrayOfEnums: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the GetArrayOfEnumsWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Array of Enums
+ ApiResponse> response = apiInstance.GetArrayOfEnumsWithHttpInfo();
+ 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 FakeApi.GetArrayOfEnumsWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+[**List<OuterEnum>**](OuterEnum.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Got named array of enums | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **TestBodyWithFileSchema**
+> void TestBodyWithFileSchema (FileSchemaTestClass fileSchemaTestClass)
+
+
+
+For this test, the body for this request much reference a schema named `File`.
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class TestBodyWithFileSchemaExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(config);
+ var fileSchemaTestClass = new FileSchemaTestClass(); // FileSchemaTestClass |
+
+ try
+ {
+ apiInstance.TestBodyWithFileSchema(fileSchemaTestClass);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchema: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestBodyWithFileSchemaWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ apiInstance.TestBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestBodyWithFileSchemaWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **fileSchemaTestClass** | [**FileSchemaTestClass**](FileSchemaTestClass.md) | | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **TestBodyWithQueryParams**
+> void TestBodyWithQueryParams (User user, string query)
+
+
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class TestBodyWithQueryParamsExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(config);
+ var user = new User(); // User |
+ var query = "query_example"; // string |
+
+ try
+ {
+ apiInstance.TestBodyWithQueryParams(user, query);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParams: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestBodyWithQueryParamsWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ apiInstance.TestBodyWithQueryParamsWithHttpInfo(user, query);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestBodyWithQueryParamsWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **user** | [**User**](User.md) | | |
+| **query** | **string** | | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **TestClientModel**
+> ModelClient TestClientModel (ModelClient modelClient)
+
+To test \"client\" model
+
+To test \"client\" model
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class TestClientModelExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(config);
+ var modelClient = new ModelClient(); // ModelClient | client model
+
+ try
+ {
+ // To test \"client\" model
+ ModelClient result = apiInstance.TestClientModel(modelClient);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestClientModel: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestClientModelWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // To test \"client\" model
+ ApiResponse response = apiInstance.TestClientModelWithHttpInfo(modelClient);
+ 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 FakeApi.TestClientModelWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **modelClient** | [**ModelClient**](ModelClient.md) | client model | |
+
+### Return type
+
+[**ModelClient**](ModelClient.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **TestEndpointParameters**
+> void TestEndpointParameters (byte[] varByte, decimal number, double varDouble, string patternWithoutDelimiter, DateTime date = null, System.IO.Stream binary = null, float varFloat = null, int integer = null, int int32 = null, long int64 = null, string varString = null, string password = null, string callback = null, DateTime dateTime = null)
+
+Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+
+Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class TestEndpointParametersExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure HTTP basic authorization: http_basic_test
+ config.Username = "YOUR_USERNAME";
+ config.Password = "YOUR_PASSWORD";
+
+ var apiInstance = new FakeApi(config);
+ var varByte = System.Text.Encoding.ASCII.GetBytes("BYTE_ARRAY_DATA_HERE"); // byte[] | None
+ var number = 8.14D; // decimal | None
+ var varDouble = 1.2D; // double | None
+ var patternWithoutDelimiter = "patternWithoutDelimiter_example"; // string | None
+ var date = DateTime.Parse("2013-10-20"); // DateTime | None (optional)
+ var binary = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | None (optional)
+ var varFloat = 3.4F; // float | None (optional)
+ var integer = 56; // int | None (optional)
+ var int32 = 56; // int | None (optional)
+ var int64 = 789L; // long | None (optional)
+ var varString = "varString_example"; // string | None (optional)
+ var password = "password_example"; // string | None (optional)
+ var callback = "callback_example"; // string | None (optional)
+ var dateTime = DateTime.Parse(""2010-02-01T10:20:10.111110+01:00""); // DateTime | None (optional) (default to "2010-02-01T10:20:10.111110+01:00")
+
+ try
+ {
+ // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ apiInstance.TestEndpointParameters(varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestEndpointParameters: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestEndpointParametersWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ apiInstance.TestEndpointParametersWithHttpInfo(varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestEndpointParametersWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **varByte** | **byte[]** | None | |
+| **number** | **decimal** | None | |
+| **varDouble** | **double** | None | |
+| **patternWithoutDelimiter** | **string** | None | |
+| **date** | **DateTime** | None | [optional] |
+| **binary** | **System.IO.Stream****System.IO.Stream** | None | [optional] |
+| **varFloat** | **float** | None | [optional] |
+| **integer** | **int** | None | [optional] |
+| **int32** | **int** | None | [optional] |
+| **int64** | **long** | None | [optional] |
+| **varString** | **string** | None | [optional] |
+| **password** | **string** | None | [optional] |
+| **callback** | **string** | None | [optional] |
+| **dateTime** | **DateTime** | None | [optional] [default to "2010-02-01T10:20:10.111110+01:00"] |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[http_basic_test](../README.md#http_basic_test)
+
+### HTTP request headers
+
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **TestEnumParameters**
+> void TestEnumParameters (List enumHeaderStringArray = null, List enumQueryStringArray = null, double enumQueryDouble = null, int enumQueryInteger = null, List enumFormStringArray = null, string enumHeaderString = null, string enumQueryString = null, string enumFormString = null)
+
+To test enum parameters
+
+To test enum parameters
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class TestEnumParametersExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(config);
+ var enumHeaderStringArray = new List(); // List | Header parameter enum test (string array) (optional)
+ var enumQueryStringArray = new List(); // List | Query parameter enum test (string array) (optional)
+ var enumQueryDouble = 1.1D; // double | Query parameter enum test (double) (optional)
+ var enumQueryInteger = 1; // int | Query parameter enum test (double) (optional)
+ var enumFormStringArray = new List(); // List | Form parameter enum test (string array) (optional) (default to $)
+ var enumHeaderString = "_abc"; // string | Header parameter enum test (string) (optional) (default to -efg)
+ var enumQueryString = "_abc"; // string | Query parameter enum test (string) (optional) (default to -efg)
+ var enumFormString = "_abc"; // string | Form parameter enum test (string) (optional) (default to -efg)
+
+ try
+ {
+ // To test enum parameters
+ apiInstance.TestEnumParameters(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestEnumParameters: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestEnumParametersWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // To test enum parameters
+ apiInstance.TestEnumParametersWithHttpInfo(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestEnumParametersWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **enumHeaderStringArray** | [**List<string>**](string.md) | Header parameter enum test (string array) | [optional] |
+| **enumQueryStringArray** | [**List<string>**](string.md) | Query parameter enum test (string array) | [optional] |
+| **enumQueryDouble** | **double** | Query parameter enum test (double) | [optional] |
+| **enumQueryInteger** | **int** | Query parameter enum test (double) | [optional] |
+| **enumFormStringArray** | [**List<string>**](string.md) | Form parameter enum test (string array) | [optional] [default to $] |
+| **enumHeaderString** | **string** | Header parameter enum test (string) | [optional] [default to -efg] |
+| **enumQueryString** | **string** | Query parameter enum test (string) | [optional] [default to -efg] |
+| **enumFormString** | **string** | Form parameter enum test (string) | [optional] [default to -efg] |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid request | - |
+| **404** | Not found | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **TestGroupParameters**
+> void TestGroupParameters (bool requiredBooleanGroup, int requiredStringGroup, long requiredInt64Group, bool booleanGroup = null, int stringGroup = null, long int64Group = null)
+
+Fake endpoint to test group parameters (optional)
+
+Fake endpoint to test group parameters (optional)
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class TestGroupParametersExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure Bearer token for authorization: bearer_test
+ config.AccessToken = "YOUR_BEARER_TOKEN";
+
+ var apiInstance = new FakeApi(config);
+ var requiredBooleanGroup = true; // bool | Required Boolean in group parameters
+ var requiredStringGroup = 56; // int | Required String in group parameters
+ var requiredInt64Group = 789L; // long | Required Integer in group parameters
+ var booleanGroup = true; // bool | Boolean in group parameters (optional)
+ var stringGroup = 56; // int | String in group parameters (optional)
+ var int64Group = 789L; // long | Integer in group parameters (optional)
+
+ try
+ {
+ // Fake endpoint to test group parameters (optional)
+ apiInstance.TestGroupParameters(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestGroupParameters: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestGroupParametersWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Fake endpoint to test group parameters (optional)
+ apiInstance.TestGroupParametersWithHttpInfo(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestGroupParametersWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **requiredBooleanGroup** | **bool** | Required Boolean in group parameters | |
+| **requiredStringGroup** | **int** | Required String in group parameters | |
+| **requiredInt64Group** | **long** | Required Integer in group parameters | |
+| **booleanGroup** | **bool** | Boolean in group parameters | [optional] |
+| **stringGroup** | **int** | String in group parameters | [optional] |
+| **int64Group** | **long** | Integer in group parameters | [optional] |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[bearer_test](../README.md#bearer_test)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Something wrong | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **TestInlineAdditionalProperties**
+> void TestInlineAdditionalProperties (Dictionary requestBody)
+
+test inline additionalProperties
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class TestInlineAdditionalPropertiesExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(config);
+ var requestBody = new Dictionary(); // Dictionary | request body
+
+ try
+ {
+ // test inline additionalProperties
+ apiInstance.TestInlineAdditionalProperties(requestBody);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestInlineAdditionalProperties: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestInlineAdditionalPropertiesWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // test inline additionalProperties
+ apiInstance.TestInlineAdditionalPropertiesWithHttpInfo(requestBody);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestInlineAdditionalPropertiesWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **requestBody** | [**Dictionary<string, string>**](string.md) | request body | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **TestJsonFormData**
+> void TestJsonFormData (string param, string param2)
+
+test json serialization of form data
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class TestJsonFormDataExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(config);
+ var param = "param_example"; // string | field1
+ var param2 = "param2_example"; // string | field2
+
+ try
+ {
+ // test json serialization of form data
+ apiInstance.TestJsonFormData(param, param2);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestJsonFormData: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestJsonFormDataWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // test json serialization of form data
+ apiInstance.TestJsonFormDataWithHttpInfo(param, param2);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestJsonFormDataWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **param** | **string** | field1 | |
+| **param2** | **string** | field2 | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **TestQueryParameterCollectionFormat**
+> void TestQueryParameterCollectionFormat (List pipe, List ioutil, List http, List url, List context, string requiredNotNullable, string requiredNullable, string notRequiredNotNullable = null, string notRequiredNullable = null)
+
+
+
+To test the collection format in query parameters
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class TestQueryParameterCollectionFormatExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new FakeApi(config);
+ var pipe = new List(); // List |
+ var ioutil = new List(); // List |
+ var http = new List(); // List |
+ var url = new List(); // List |
+ var context = new List(); // List |
+ var requiredNotNullable = "requiredNotNullable_example"; // string |
+ var requiredNullable = "requiredNullable_example"; // string |
+ var notRequiredNotNullable = "notRequiredNotNullable_example"; // string | (optional)
+ var notRequiredNullable = "notRequiredNullable_example"; // string | (optional)
+
+ try
+ {
+ apiInstance.TestQueryParameterCollectionFormat(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormat: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestQueryParameterCollectionFormatWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ apiInstance.TestQueryParameterCollectionFormatWithHttpInfo(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling FakeApi.TestQueryParameterCollectionFormatWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **pipe** | [**List<string>**](string.md) | | |
+| **ioutil** | [**List<string>**](string.md) | | |
+| **http** | [**List<string>**](string.md) | | |
+| **url** | [**List<string>**](string.md) | | |
+| **context** | [**List<string>**](string.md) | | |
+| **requiredNotNullable** | **string** | | |
+| **requiredNullable** | **string** | | |
+| **notRequiredNotNullable** | **string** | | [optional] |
+| **notRequiredNullable** | **string** | | [optional] |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | Success | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/FakeClassnameTags123Api.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/FakeClassnameTags123Api.md
new file mode 100644
index 00000000000..66f6bcb35ff
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/FakeClassnameTags123Api.md
@@ -0,0 +1,104 @@
+# UseSourceGeneration.Api.FakeClassnameTags123Api
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**TestClassname**](FakeClassnameTags123Api.md#testclassname) | **PATCH** /fake_classname_test | To test class name in snake case |
+
+
+# **TestClassname**
+> ModelClient TestClassname (ModelClient modelClient)
+
+To test class name in snake case
+
+To test class name in snake case
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class TestClassnameExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure API key authorization: api_key_query
+ config.AddApiKey("api_key_query", "YOUR_API_KEY");
+ // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+ // config.AddApiKeyPrefix("api_key_query", "Bearer");
+
+ var apiInstance = new FakeClassnameTags123Api(config);
+ var modelClient = new ModelClient(); // ModelClient | client model
+
+ try
+ {
+ // To test class name in snake case
+ ModelClient result = apiInstance.TestClassname(modelClient);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling FakeClassnameTags123Api.TestClassname: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the TestClassnameWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // To test class name in snake case
+ ApiResponse response = apiInstance.TestClassnameWithHttpInfo(modelClient);
+ 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 FakeClassnameTags123Api.TestClassnameWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **modelClient** | [**ModelClient**](ModelClient.md) | client model | |
+
+### Return type
+
+[**ModelClient**](ModelClient.md)
+
+### Authorization
+
+[api_key_query](../README.md#api_key_query)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/PetApi.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/PetApi.md
new file mode 100644
index 00000000000..760ad613c36
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/PetApi.md
@@ -0,0 +1,856 @@
+# UseSourceGeneration.Api.PetApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**AddPet**](PetApi.md#addpet) | **POST** /pet | Add a new pet to the store |
+| [**DeletePet**](PetApi.md#deletepet) | **DELETE** /pet/{petId} | Deletes a pet |
+| [**FindPetsByStatus**](PetApi.md#findpetsbystatus) | **GET** /pet/findByStatus | Finds Pets by status |
+| [**FindPetsByTags**](PetApi.md#findpetsbytags) | **GET** /pet/findByTags | Finds Pets by tags |
+| [**GetPetById**](PetApi.md#getpetbyid) | **GET** /pet/{petId} | Find pet by ID |
+| [**UpdatePet**](PetApi.md#updatepet) | **PUT** /pet | Update an existing pet |
+| [**UpdatePetWithForm**](PetApi.md#updatepetwithform) | **POST** /pet/{petId} | Updates a pet in the store with form data |
+| [**UploadFile**](PetApi.md#uploadfile) | **POST** /pet/{petId}/uploadImage | uploads an image |
+| [**UploadFileWithRequiredFile**](PetApi.md#uploadfilewithrequiredfile) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required) |
+
+
+# **AddPet**
+> void AddPet (Pet pet)
+
+Add a new pet to the store
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class AddPetExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PetApi(config);
+ var pet = new Pet(); // Pet | Pet object that needs to be added to the store
+
+ try
+ {
+ // Add a new pet to the store
+ apiInstance.AddPet(pet);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.AddPet: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the AddPetWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Add a new pet to the store
+ apiInstance.AddPetWithHttpInfo(pet);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling PetApi.AddPetWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json, application/xml
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **405** | Invalid input | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **DeletePet**
+> void DeletePet (long petId, string apiKey = null)
+
+Deletes a pet
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class DeletePetExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PetApi(config);
+ var petId = 789L; // long | Pet id to delete
+ var apiKey = "apiKey_example"; // string | (optional)
+
+ try
+ {
+ // Deletes a pet
+ apiInstance.DeletePet(petId, apiKey);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.DeletePet: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the DeletePetWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Deletes a pet
+ apiInstance.DeletePetWithHttpInfo(petId, apiKey);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling PetApi.DeletePetWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **petId** | **long** | Pet id to delete | |
+| **apiKey** | **string** | | [optional] |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid pet value | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **FindPetsByStatus**
+> List<Pet> FindPetsByStatus (List status)
+
+Finds Pets by status
+
+Multiple status values can be provided with comma separated strings
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class FindPetsByStatusExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PetApi(config);
+ var status = new List(); // List | Status values that need to be considered for filter
+
+ try
+ {
+ // Finds Pets by status
+ List result = apiInstance.FindPetsByStatus(status);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.FindPetsByStatus: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FindPetsByStatusWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Finds Pets by status
+ ApiResponse> response = apiInstance.FindPetsByStatusWithHttpInfo(status);
+ 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 PetApi.FindPetsByStatusWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **status** | [**List<string>**](string.md) | Status values that need to be considered for filter | |
+
+### Return type
+
+[**List<Pet>**](Pet.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid status value | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **FindPetsByTags**
+> List<Pet> FindPetsByTags (List tags)
+
+Finds Pets by tags
+
+Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class FindPetsByTagsExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PetApi(config);
+ var tags = new List(); // List | Tags to filter by
+
+ try
+ {
+ // Finds Pets by tags
+ List result = apiInstance.FindPetsByTags(tags);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.FindPetsByTags: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the FindPetsByTagsWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Finds Pets by tags
+ ApiResponse> response = apiInstance.FindPetsByTagsWithHttpInfo(tags);
+ 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 PetApi.FindPetsByTagsWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **tags** | [**List<string>**](string.md) | Tags to filter by | |
+
+### Return type
+
+[**List<Pet>**](Pet.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid tag value | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **GetPetById**
+> Pet GetPetById (long petId)
+
+Find pet by ID
+
+Returns a single pet
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class GetPetByIdExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure API key authorization: api_key
+ config.AddApiKey("api_key", "YOUR_API_KEY");
+ // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+ // config.AddApiKeyPrefix("api_key", "Bearer");
+
+ var apiInstance = new PetApi(config);
+ var petId = 789L; // long | ID of pet to return
+
+ try
+ {
+ // Find pet by ID
+ Pet result = apiInstance.GetPetById(petId);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.GetPetById: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the GetPetByIdWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Find pet by ID
+ ApiResponse response = apiInstance.GetPetByIdWithHttpInfo(petId);
+ 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 PetApi.GetPetByIdWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **petId** | **long** | ID of pet to return | |
+
+### Return type
+
+[**Pet**](Pet.md)
+
+### Authorization
+
+[api_key](../README.md#api_key)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid ID supplied | - |
+| **404** | Pet not found | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **UpdatePet**
+> void UpdatePet (Pet pet)
+
+Update an existing pet
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class UpdatePetExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PetApi(config);
+ var pet = new Pet(); // Pet | Pet object that needs to be added to the store
+
+ try
+ {
+ // Update an existing pet
+ apiInstance.UpdatePet(pet);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.UpdatePet: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the UpdatePetWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Update an existing pet
+ apiInstance.UpdatePetWithHttpInfo(pet);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling PetApi.UpdatePetWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **pet** | [**Pet**](Pet.md) | Pet object that needs to be added to the store | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth), [http_signature_test](../README.md#http_signature_test)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json, application/xml
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid ID supplied | - |
+| **404** | Pet not found | - |
+| **405** | Validation exception | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **UpdatePetWithForm**
+> void UpdatePetWithForm (long petId, string name = null, string status = null)
+
+Updates a pet in the store with form data
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class UpdatePetWithFormExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PetApi(config);
+ var petId = 789L; // long | ID of pet that needs to be updated
+ var name = "name_example"; // string | Updated name of the pet (optional)
+ var status = "status_example"; // string | Updated status of the pet (optional)
+
+ try
+ {
+ // Updates a pet in the store with form data
+ apiInstance.UpdatePetWithForm(petId, name, status);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.UpdatePetWithForm: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the UpdatePetWithFormWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Updates a pet in the store with form data
+ apiInstance.UpdatePetWithFormWithHttpInfo(petId, name, status);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling PetApi.UpdatePetWithFormWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **petId** | **long** | ID of pet that needs to be updated | |
+| **name** | **string** | Updated name of the pet | [optional] |
+| **status** | **string** | Updated status of the pet | [optional] |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **405** | Invalid input | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **UploadFile**
+> ApiResponse UploadFile (long petId, System.IO.Stream file = null, string additionalMetadata = null)
+
+uploads an image
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class UploadFileExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PetApi(config);
+ var petId = 789L; // long | ID of pet to update
+ var file = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload (optional)
+ var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional)
+
+ try
+ {
+ // uploads an image
+ ApiResponse result = apiInstance.UploadFile(petId, file, additionalMetadata);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.UploadFile: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the UploadFileWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // uploads an image
+ ApiResponse response = apiInstance.UploadFileWithHttpInfo(petId, file, additionalMetadata);
+ 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 PetApi.UploadFileWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **petId** | **long** | ID of pet to update | |
+| **file** | **System.IO.Stream****System.IO.Stream** | file to upload | [optional] |
+| **additionalMetadata** | **string** | Additional data to pass to server | [optional] |
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **UploadFileWithRequiredFile**
+> ApiResponse UploadFileWithRequiredFile (System.IO.Stream requiredFile, long petId, string additionalMetadata = null)
+
+uploads an image (required)
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class UploadFileWithRequiredFileExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure OAuth2 access token for authorization: petstore_auth
+ config.AccessToken = "YOUR_ACCESS_TOKEN";
+
+ var apiInstance = new PetApi(config);
+ var requiredFile = new System.IO.MemoryStream(System.IO.File.ReadAllBytes("/path/to/file.txt")); // System.IO.Stream | file to upload
+ var petId = 789L; // long | ID of pet to update
+ var additionalMetadata = "additionalMetadata_example"; // string | Additional data to pass to server (optional)
+
+ try
+ {
+ // uploads an image (required)
+ ApiResponse result = apiInstance.UploadFileWithRequiredFile(requiredFile, petId, additionalMetadata);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling PetApi.UploadFileWithRequiredFile: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the UploadFileWithRequiredFileWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // uploads an image (required)
+ ApiResponse response = apiInstance.UploadFileWithRequiredFileWithHttpInfo(requiredFile, petId, additionalMetadata);
+ 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 PetApi.UploadFileWithRequiredFileWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **requiredFile** | **System.IO.Stream****System.IO.Stream** | file to upload | |
+| **petId** | **long** | ID of pet to update | |
+| **additionalMetadata** | **string** | Additional data to pass to server | [optional] |
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/StoreApi.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/StoreApi.md
new file mode 100644
index 00000000000..a86439757ab
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/StoreApi.md
@@ -0,0 +1,373 @@
+# UseSourceGeneration.Api.StoreApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**DeleteOrder**](StoreApi.md#deleteorder) | **DELETE** /store/order/{order_id} | Delete purchase order by ID |
+| [**GetInventory**](StoreApi.md#getinventory) | **GET** /store/inventory | Returns pet inventories by status |
+| [**GetOrderById**](StoreApi.md#getorderbyid) | **GET** /store/order/{order_id} | Find purchase order by ID |
+| [**PlaceOrder**](StoreApi.md#placeorder) | **POST** /store/order | Place an order for a pet |
+
+
+# **DeleteOrder**
+> void DeleteOrder (string orderId)
+
+Delete purchase order by ID
+
+For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class DeleteOrderExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new StoreApi(config);
+ var orderId = "orderId_example"; // string | ID of the order that needs to be deleted
+
+ try
+ {
+ // Delete purchase order by ID
+ apiInstance.DeleteOrder(orderId);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling StoreApi.DeleteOrder: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the DeleteOrderWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Delete purchase order by ID
+ apiInstance.DeleteOrderWithHttpInfo(orderId);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling StoreApi.DeleteOrderWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **orderId** | **string** | ID of the order that needs to be deleted | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid ID supplied | - |
+| **404** | Order not found | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **GetInventory**
+> Dictionary<string, int> GetInventory ()
+
+Returns pet inventories by status
+
+Returns a map of status codes to quantities
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class GetInventoryExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ // Configure API key authorization: api_key
+ config.AddApiKey("api_key", "YOUR_API_KEY");
+ // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+ // config.AddApiKeyPrefix("api_key", "Bearer");
+
+ var apiInstance = new StoreApi(config);
+
+ try
+ {
+ // Returns pet inventories by status
+ Dictionary result = apiInstance.GetInventory();
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling StoreApi.GetInventory: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the GetInventoryWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Returns pet inventories by status
+ ApiResponse> response = apiInstance.GetInventoryWithHttpInfo();
+ 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 StoreApi.GetInventoryWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+**Dictionary**
+
+### Authorization
+
+[api_key](../README.md#api_key)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **GetOrderById**
+> Order GetOrderById (long orderId)
+
+Find purchase order by ID
+
+For valid response try integer IDs with value <= 5 or > 10. Other values will generate exceptions
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class GetOrderByIdExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new StoreApi(config);
+ var orderId = 789L; // long | ID of pet that needs to be fetched
+
+ try
+ {
+ // Find purchase order by ID
+ Order result = apiInstance.GetOrderById(orderId);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling StoreApi.GetOrderById: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the GetOrderByIdWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Find purchase order by ID
+ ApiResponse response = apiInstance.GetOrderByIdWithHttpInfo(orderId);
+ 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 StoreApi.GetOrderByIdWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **orderId** | **long** | ID of pet that needs to be fetched | |
+
+### Return type
+
+[**Order**](Order.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid ID supplied | - |
+| **404** | Order not found | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **PlaceOrder**
+> Order PlaceOrder (Order order)
+
+Place an order for a pet
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class PlaceOrderExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new StoreApi(config);
+ var order = new Order(); // Order | order placed for purchasing the pet
+
+ try
+ {
+ // Place an order for a pet
+ Order result = apiInstance.PlaceOrder(order);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling StoreApi.PlaceOrder: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the PlaceOrderWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Place an order for a pet
+ ApiResponse response = apiInstance.PlaceOrderWithHttpInfo(order);
+ 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 StoreApi.PlaceOrderWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **order** | [**Order**](Order.md) | order placed for purchasing the pet | |
+
+### Return type
+
+[**Order**](Order.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid Order | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/UserApi.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/UserApi.md
new file mode 100644
index 00000000000..b9a2ee71fe6
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/apis/UserApi.md
@@ -0,0 +1,713 @@
+# UseSourceGeneration.Api.UserApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+| Method | HTTP request | Description |
+|--------|--------------|-------------|
+| [**CreateUser**](UserApi.md#createuser) | **POST** /user | Create user |
+| [**CreateUsersWithArrayInput**](UserApi.md#createuserswitharrayinput) | **POST** /user/createWithArray | Creates list of users with given input array |
+| [**CreateUsersWithListInput**](UserApi.md#createuserswithlistinput) | **POST** /user/createWithList | Creates list of users with given input array |
+| [**DeleteUser**](UserApi.md#deleteuser) | **DELETE** /user/{username} | Delete user |
+| [**GetUserByName**](UserApi.md#getuserbyname) | **GET** /user/{username} | Get user by user name |
+| [**LoginUser**](UserApi.md#loginuser) | **GET** /user/login | Logs user into the system |
+| [**LogoutUser**](UserApi.md#logoutuser) | **GET** /user/logout | Logs out current logged in user session |
+| [**UpdateUser**](UserApi.md#updateuser) | **PUT** /user/{username} | Updated user |
+
+
+# **CreateUser**
+> void CreateUser (User user)
+
+Create user
+
+This can only be done by the logged in user.
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class CreateUserExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(config);
+ var user = new User(); // User | Created user object
+
+ try
+ {
+ // Create user
+ apiInstance.CreateUser(user);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.CreateUser: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the CreateUserWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Create user
+ apiInstance.CreateUserWithHttpInfo(user);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling UserApi.CreateUserWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **user** | [**User**](User.md) | Created user object | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **CreateUsersWithArrayInput**
+> void CreateUsersWithArrayInput (List user)
+
+Creates list of users with given input array
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class CreateUsersWithArrayInputExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(config);
+ var user = new List(); // List | List of user object
+
+ try
+ {
+ // Creates list of users with given input array
+ apiInstance.CreateUsersWithArrayInput(user);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInput: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the CreateUsersWithArrayInputWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Creates list of users with given input array
+ apiInstance.CreateUsersWithArrayInputWithHttpInfo(user);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling UserApi.CreateUsersWithArrayInputWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **user** | [**List<User>**](User.md) | List of user object | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **CreateUsersWithListInput**
+> void CreateUsersWithListInput (List user)
+
+Creates list of users with given input array
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class CreateUsersWithListInputExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(config);
+ var user = new List(); // List | List of user object
+
+ try
+ {
+ // Creates list of users with given input array
+ apiInstance.CreateUsersWithListInput(user);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.CreateUsersWithListInput: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the CreateUsersWithListInputWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Creates list of users with given input array
+ apiInstance.CreateUsersWithListInputWithHttpInfo(user);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling UserApi.CreateUsersWithListInputWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **user** | [**List<User>**](User.md) | List of user object | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **DeleteUser**
+> void DeleteUser (string username)
+
+Delete user
+
+This can only be done by the logged in user.
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class DeleteUserExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(config);
+ var username = "username_example"; // string | The name that needs to be deleted
+
+ try
+ {
+ // Delete user
+ apiInstance.DeleteUser(username);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.DeleteUser: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the DeleteUserWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Delete user
+ apiInstance.DeleteUserWithHttpInfo(username);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling UserApi.DeleteUserWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **username** | **string** | The name that needs to be deleted | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **GetUserByName**
+> User GetUserByName (string username)
+
+Get user by user name
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class GetUserByNameExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(config);
+ var username = "username_example"; // string | The name that needs to be fetched. Use user1 for testing.
+
+ try
+ {
+ // Get user by user name
+ User result = apiInstance.GetUserByName(username);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.GetUserByName: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the GetUserByNameWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Get user by user name
+ ApiResponse response = apiInstance.GetUserByNameWithHttpInfo(username);
+ 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 UserApi.GetUserByNameWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **username** | **string** | The name that needs to be fetched. Use user1 for testing. | |
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | - |
+| **400** | Invalid username supplied | - |
+| **404** | User not found | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **LoginUser**
+> string LoginUser (string username, string password)
+
+Logs user into the system
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class LoginUserExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(config);
+ var username = "username_example"; // string | The user name for login
+ var password = "password_example"; // string | The password for login in clear text
+
+ try
+ {
+ // Logs user into the system
+ string result = apiInstance.LoginUser(username, password);
+ Debug.WriteLine(result);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.LoginUser: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the LoginUserWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Logs user into the system
+ ApiResponse response = apiInstance.LoginUserWithHttpInfo(username, password);
+ 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 UserApi.LoginUserWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **username** | **string** | The user name for login | |
+| **password** | **string** | The password for login in clear text | |
+
+### Return type
+
+**string**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
|
+| **400** | Invalid username/password supplied | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **LogoutUser**
+> void LogoutUser ()
+
+Logs out current logged in user session
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class LogoutUserExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(config);
+
+ try
+ {
+ // Logs out current logged in user session
+ apiInstance.LogoutUser();
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.LogoutUser: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the LogoutUserWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Logs out current logged in user session
+ apiInstance.LogoutUserWithHttpInfo();
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling UserApi.LogoutUserWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+This endpoint does not need any parameter.
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **0** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
+
+# **UpdateUser**
+> void UpdateUser (User user, string username)
+
+Updated user
+
+This can only be done by the logged in user.
+
+### Example
+```csharp
+using System.Collections.Generic;
+using System.Diagnostics;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.Model;
+
+namespace Example
+{
+ public class UpdateUserExample
+ {
+ public static void Main()
+ {
+ Configuration config = new Configuration();
+ config.BasePath = "http://petstore.swagger.io:80/v2";
+ var apiInstance = new UserApi(config);
+ var user = new User(); // User | Updated user object
+ var username = "username_example"; // string | name that need to be deleted
+
+ try
+ {
+ // Updated user
+ apiInstance.UpdateUser(user, username);
+ }
+ catch (ApiException e)
+ {
+ Debug.Print("Exception when calling UserApi.UpdateUser: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+ }
+ }
+ }
+}
+```
+
+#### Using the UpdateUserWithHttpInfo variant
+This returns an ApiResponse object which contains the response data, status code and headers.
+
+```csharp
+try
+{
+ // Updated user
+ apiInstance.UpdateUserWithHttpInfo(user, username);
+}
+catch (ApiException e)
+{
+ Debug.Print("Exception when calling UserApi.UpdateUserWithHttpInfo: " + e.Message);
+ Debug.Print("Status Code: " + e.ErrorCode);
+ Debug.Print(e.StackTrace);
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------|------|-------------|-------|
+| **user** | [**User**](User.md) | Updated user object | |
+| **username** | **string** | name that need to be deleted | |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **400** | Invalid user supplied | - |
+| **404** | User not found | - |
+
+[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Activity.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Activity.md
new file mode 100644
index 00000000000..02200c197f0
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Activity.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.Activity
+test map of maps
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ActivityOutputs** | **Dictionary<string, List<ActivityOutputElementRepresentation>>** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ActivityOutputElementRepresentation.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ActivityOutputElementRepresentation.md
new file mode 100644
index 00000000000..6020aee5a8f
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ActivityOutputElementRepresentation.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.ActivityOutputElementRepresentation
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Prop1** | **string** | | [optional]
+**Prop2** | **Object** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/AdditionalPropertiesClass.md
new file mode 100644
index 00000000000..0cd0716de5f
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/AdditionalPropertiesClass.md
@@ -0,0 +1,17 @@
+# UseSourceGeneration.Model.AdditionalPropertiesClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**EmptyMap** | **Object** | an object with no declared properties and no undeclared properties, hence it's an empty map. | [optional]
+**MapOfMapProperty** | **Dictionary<string, Dictionary<string, string>>** | | [optional]
+**MapProperty** | **Dictionary<string, string>** | | [optional]
+**MapWithUndeclaredPropertiesAnytype1** | **Object** | | [optional]
+**MapWithUndeclaredPropertiesAnytype2** | **Object** | | [optional]
+**MapWithUndeclaredPropertiesAnytype3** | **Dictionary<string, Object>** | | [optional]
+**MapWithUndeclaredPropertiesString** | **Dictionary<string, string>** | | [optional]
+**Anytype1** | **Object** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Animal.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Animal.md
new file mode 100644
index 00000000000..85b216c6844
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Animal.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.Animal
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ClassName** | **string** | |
+**Color** | **string** | | [optional] [default to "red"]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ApiResponse.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ApiResponse.md
new file mode 100644
index 00000000000..4a89232fe00
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ApiResponse.md
@@ -0,0 +1,12 @@
+# UseSourceGeneration.Model.ApiResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Code** | **int** | | [optional]
+**Message** | **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/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Apple.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Apple.md
new file mode 100644
index 00000000000..65a079b9972
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Apple.md
@@ -0,0 +1,12 @@
+# UseSourceGeneration.Model.Apple
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ColorCode** | **string** | | [optional]
+**Cultivar** | **string** | | [optional]
+**Origin** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/AppleReq.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/AppleReq.md
new file mode 100644
index 00000000000..9908286785b
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/AppleReq.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.AppleReq
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Cultivar** | **string** | |
+**Mealy** | **bool** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ArrayOfArrayOfNumberOnly.md
new file mode 100644
index 00000000000..b17ec104d7c
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ArrayOfArrayOfNumberOnly.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.ArrayOfArrayOfNumberOnly
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ArrayArrayNumber** | **List<List<decimal>>** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ArrayOfNumberOnly.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ArrayOfNumberOnly.md
new file mode 100644
index 00000000000..ab7bf35d6b2
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ArrayOfNumberOnly.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.ArrayOfNumberOnly
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ArrayNumber** | **List<decimal>** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ArrayTest.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ArrayTest.md
new file mode 100644
index 00000000000..599c44576a9
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ArrayTest.md
@@ -0,0 +1,12 @@
+# UseSourceGeneration.Model.ArrayTest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ArrayArrayOfInteger** | **List<List<long>>** | | [optional]
+**ArrayArrayOfModel** | **List<List<ReadOnlyFirst>>** | | [optional]
+**ArrayOfString** | **List<string>** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Banana.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Banana.md
new file mode 100644
index 00000000000..3793247c1bf
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Banana.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.Banana
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**LengthCm** | **decimal** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/BananaReq.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/BananaReq.md
new file mode 100644
index 00000000000..9284ab55762
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/BananaReq.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.BananaReq
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**LengthCm** | **decimal** | |
+**Sweet** | **bool** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/BasquePig.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/BasquePig.md
new file mode 100644
index 00000000000..48c2dc90cbb
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/BasquePig.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.BasquePig
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ClassName** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Capitalization.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Capitalization.md
new file mode 100644
index 00000000000..31ea60189c5
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Capitalization.md
@@ -0,0 +1,15 @@
+# UseSourceGeneration.Model.Capitalization
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ATT_NAME** | **string** | Name of the pet | [optional]
+**CapitalCamel** | **string** | | [optional]
+**CapitalSnake** | **string** | | [optional]
+**SCAETHFlowPoints** | **string** | | [optional]
+**SmallCamel** | **string** | | [optional]
+**SmallSnake** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Cat.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Cat.md
new file mode 100644
index 00000000000..22eb79a9ca0
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Cat.md
@@ -0,0 +1,12 @@
+# UseSourceGeneration.Model.Cat
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ClassName** | **string** | |
+**Color** | **string** | | [optional] [default to "red"]
+**Declawed** | **bool** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Category.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Category.md
new file mode 100644
index 00000000000..cebefe7ff37
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Category.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.Category
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **long** | | [optional]
+**Name** | **string** | | [default to "default-name"]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ChildCat.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ChildCat.md
new file mode 100644
index 00000000000..670272cc202
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ChildCat.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.ChildCat
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Name** | **string** | | [optional]
+**PetType** | **string** | | [optional] [default to PetTypeEnum.ChildCat]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ClassModel.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ClassModel.md
new file mode 100644
index 00000000000..8f3f093f582
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ClassModel.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.ClassModel
+Model for testing model with \"_class\" property
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**VarClass** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ComplexQuadrilateral.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ComplexQuadrilateral.md
new file mode 100644
index 00000000000..f58f4217924
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ComplexQuadrilateral.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.ComplexQuadrilateral
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**QuadrilateralType** | **string** | |
+**ShapeType** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/DanishPig.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/DanishPig.md
new file mode 100644
index 00000000000..4daedaeb2e1
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/DanishPig.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.DanishPig
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ClassName** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/DateOnlyClass.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/DateOnlyClass.md
new file mode 100644
index 00000000000..6a98ffe33b9
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/DateOnlyClass.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.DateOnlyClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**DateOnlyProperty** | **DateTime** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/DeprecatedObject.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/DeprecatedObject.md
new file mode 100644
index 00000000000..7bb31c469d7
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/DeprecatedObject.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.DeprecatedObject
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Name** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Dog.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Dog.md
new file mode 100644
index 00000000000..b41e769c469
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Dog.md
@@ -0,0 +1,12 @@
+# UseSourceGeneration.Model.Dog
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ClassName** | **string** | |
+**Color** | **string** | | [optional] [default to "red"]
+**Breed** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Drawing.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Drawing.md
new file mode 100644
index 00000000000..a9a319fd6bb
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Drawing.md
@@ -0,0 +1,13 @@
+# UseSourceGeneration.Model.Drawing
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**MainShape** | [**Shape**](Shape.md) | | [optional]
+**Shapes** | [**List<Shape>**](Shape.md) | | [optional]
+**NullableShape** | [**NullableShape**](NullableShape.md) | | [optional]
+**ShapeOrNull** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/EnumArrays.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/EnumArrays.md
new file mode 100644
index 00000000000..eec4953ca86
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/EnumArrays.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.EnumArrays
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ArrayEnum** | **List<EnumArrays.ArrayEnumEnum>** | | [optional]
+**JustSymbol** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/EnumClass.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/EnumClass.md
new file mode 100644
index 00000000000..339c2a3524d
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/EnumClass.md
@@ -0,0 +1,9 @@
+# UseSourceGeneration.Model.EnumClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/EnumTest.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/EnumTest.md
new file mode 100644
index 00000000000..49836874e08
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/EnumTest.md
@@ -0,0 +1,18 @@
+# UseSourceGeneration.Model.EnumTest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**EnumInteger** | **int** | | [optional]
+**EnumIntegerOnly** | **int** | | [optional]
+**EnumNumber** | **double** | | [optional]
+**EnumString** | **string** | | [optional]
+**EnumStringRequired** | **string** | |
+**OuterEnumDefaultValue** | **OuterEnumDefaultValue** | | [optional]
+**OuterEnumInteger** | **OuterEnumInteger** | | [optional]
+**OuterEnumIntegerDefaultValue** | **OuterEnumIntegerDefaultValue** | | [optional]
+**OuterEnum** | **OuterEnum** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/EquilateralTriangle.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/EquilateralTriangle.md
new file mode 100644
index 00000000000..13021288912
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/EquilateralTriangle.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.EquilateralTriangle
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+**TriangleType** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/File.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/File.md
new file mode 100644
index 00000000000..8a86812c936
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/File.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.File
+Must be named `File` for test.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**SourceURI** | **string** | Test capitalization | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/FileSchemaTestClass.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/FileSchemaTestClass.md
new file mode 100644
index 00000000000..353a581754c
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/FileSchemaTestClass.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.FileSchemaTestClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**File** | [**File**](File.md) | | [optional]
+**Files** | [**List<File>**](File.md) | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Foo.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Foo.md
new file mode 100644
index 00000000000..31583a098f6
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Foo.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.Foo
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Bar** | **string** | | [optional] [default to "bar"]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/FooGetDefaultResponse.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/FooGetDefaultResponse.md
new file mode 100644
index 00000000000..9beed4cd842
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/FooGetDefaultResponse.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.FooGetDefaultResponse
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**VarString** | [**Foo**](Foo.md) | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/FormatTest.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/FormatTest.md
new file mode 100644
index 00000000000..33be89a5331
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/FormatTest.md
@@ -0,0 +1,28 @@
+# UseSourceGeneration.Model.FormatTest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Binary** | **System.IO.Stream** | | [optional]
+**VarByte** | **byte[]** | |
+**Date** | **DateTime** | |
+**DateTime** | **DateTime** | | [optional]
+**VarDecimal** | **decimal** | | [optional]
+**VarDouble** | **double** | | [optional]
+**VarFloat** | **float** | | [optional]
+**Int32** | **int** | | [optional]
+**Int64** | **long** | | [optional]
+**Integer** | **int** | | [optional]
+**Number** | **decimal** | |
+**Password** | **string** | |
+**PatternWithBackslash** | **string** | None | [optional]
+**PatternWithDigits** | **string** | A string that is a 10 digit number. Can have leading zeros. | [optional]
+**PatternWithDigitsAndDelimiter** | **string** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [optional]
+**VarString** | **string** | | [optional]
+**UnsignedInteger** | **uint** | | [optional]
+**UnsignedLong** | **ulong** | | [optional]
+**Uuid** | **Guid** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Fruit.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Fruit.md
new file mode 100644
index 00000000000..a87aa8d7164
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Fruit.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.Fruit
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**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/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/FruitReq.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/FruitReq.md
new file mode 100644
index 00000000000..41a68aef65b
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/FruitReq.md
@@ -0,0 +1,9 @@
+# UseSourceGeneration.Model.FruitReq
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/GmFruit.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/GmFruit.md
new file mode 100644
index 00000000000..b265cc9df35
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/GmFruit.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.GmFruit
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**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/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/GrandparentAnimal.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/GrandparentAnimal.md
new file mode 100644
index 00000000000..26dd7ca81ef
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/GrandparentAnimal.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.GrandparentAnimal
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**PetType** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/HasOnlyReadOnly.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/HasOnlyReadOnly.md
new file mode 100644
index 00000000000..7177783ea0f
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/HasOnlyReadOnly.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.HasOnlyReadOnly
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Bar** | **string** | | [optional] [readonly]
+**Foo** | **string** | | [optional] [readonly]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/HealthCheckResult.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/HealthCheckResult.md
new file mode 100644
index 00000000000..c7babb863c1
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/HealthCheckResult.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.HealthCheckResult
+Just a string to inform instance is up and running. Make it nullable in hope to get it as pointer in generated model.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**NullableMessage** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/IsoscelesTriangle.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/IsoscelesTriangle.md
new file mode 100644
index 00000000000..f835edb4c44
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/IsoscelesTriangle.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.IsoscelesTriangle
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+**TriangleType** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/List.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/List.md
new file mode 100644
index 00000000000..e38fdf2aa25
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/List.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.List
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Var123List** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/LiteralStringClass.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/LiteralStringClass.md
new file mode 100644
index 00000000000..44fb22cb434
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/LiteralStringClass.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.LiteralStringClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**EscapedLiteralString** | **string** | | [optional] [default to "C:\\Users\\username"]
+**UnescapedLiteralString** | **string** | | [optional] [default to "C:\Users\username"]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Mammal.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Mammal.md
new file mode 100644
index 00000000000..fe8b9d8ecf4
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Mammal.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.Mammal
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ClassName** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/MapTest.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/MapTest.md
new file mode 100644
index 00000000000..9de4c0a242e
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/MapTest.md
@@ -0,0 +1,13 @@
+# UseSourceGeneration.Model.MapTest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**DirectMap** | **Dictionary<string, bool>** | | [optional]
+**IndirectMap** | **Dictionary<string, bool>** | | [optional]
+**MapMapOfString** | **Dictionary<string, Dictionary<string, string>>** | | [optional]
+**MapOfEnumString** | **Dictionary<string, MapTest.InnerEnum>** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md
new file mode 100644
index 00000000000..aab1d5a4187
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -0,0 +1,13 @@
+# UseSourceGeneration.Model.MixedPropertiesAndAdditionalPropertiesClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**DateTime** | **DateTime** | | [optional]
+**Map** | [**Dictionary<string, Animal>**](Animal.md) | | [optional]
+**Uuid** | **Guid** | | [optional]
+**UuidWithPattern** | **Guid** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Model200Response.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Model200Response.md
new file mode 100644
index 00000000000..28ea5e591da
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Model200Response.md
@@ -0,0 +1,12 @@
+# UseSourceGeneration.Model.Model200Response
+Model for testing model name starting with number
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**VarClass** | **string** | | [optional]
+**Name** | **int** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ModelClient.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ModelClient.md
new file mode 100644
index 00000000000..2bb04a1d9aa
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ModelClient.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.ModelClient
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**VarClient** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Name.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Name.md
new file mode 100644
index 00000000000..93f6ca3c536
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Name.md
@@ -0,0 +1,14 @@
+# UseSourceGeneration.Model.Name
+Model for testing model name same as property name
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**VarName** | **int** | |
+**Property** | **string** | | [optional]
+**SnakeCase** | **int** | | [optional] [readonly]
+**Var123Number** | **int** | | [optional] [readonly]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/NotificationtestGetElementsV1ResponseMPayload.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/NotificationtestGetElementsV1ResponseMPayload.md
new file mode 100644
index 00000000000..9ee46b48027
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/NotificationtestGetElementsV1ResponseMPayload.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.NotificationtestGetElementsV1ResponseMPayload
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**AObjVariableobject** | **List<Dictionary<string, Object>>** | |
+**PkiNotificationtestID** | **int** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/NullableClass.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/NullableClass.md
new file mode 100644
index 00000000000..3bc480afe03
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/NullableClass.md
@@ -0,0 +1,21 @@
+# UseSourceGeneration.Model.NullableClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ArrayItemsNullable** | **List<Object>** | | [optional]
+**ObjectItemsNullable** | **Dictionary<string, Object>** | | [optional]
+**ArrayAndItemsNullableProp** | **List<Object>** | | [optional]
+**ArrayNullableProp** | **List<Object>** | | [optional]
+**BooleanProp** | **bool** | | [optional]
+**DateProp** | **DateTime** | | [optional]
+**DatetimeProp** | **DateTime** | | [optional]
+**IntegerProp** | **int** | | [optional]
+**NumberProp** | **decimal** | | [optional]
+**ObjectAndItemsNullableProp** | **Dictionary<string, Object>** | | [optional]
+**ObjectNullableProp** | **Dictionary<string, Object>** | | [optional]
+**StringProp** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/NullableGuidClass.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/NullableGuidClass.md
new file mode 100644
index 00000000000..889632214d7
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/NullableGuidClass.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.NullableGuidClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Uuid** | **Guid** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/NullableShape.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/NullableShape.md
new file mode 100644
index 00000000000..b8418df82ec
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/NullableShape.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.NullableShape
+The value may be a shape or the 'null' value. The 'nullable' attribute was introduced in OAS schema >= 3.0 and has been deprecated in OAS schema >= 3.1.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/NumberOnly.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/NumberOnly.md
new file mode 100644
index 00000000000..7442b102d58
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/NumberOnly.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.NumberOnly
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**JustNumber** | **decimal** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ObjectWithDeprecatedFields.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ObjectWithDeprecatedFields.md
new file mode 100644
index 00000000000..206dc48f5be
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ObjectWithDeprecatedFields.md
@@ -0,0 +1,13 @@
+# UseSourceGeneration.Model.ObjectWithDeprecatedFields
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Bars** | **List<string>** | | [optional]
+**DeprecatedRef** | [**DeprecatedObject**](DeprecatedObject.md) | | [optional]
+**Id** | **decimal** | | [optional]
+**Uuid** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OneOfString.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OneOfString.md
new file mode 100644
index 00000000000..dc200b1efa3
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OneOfString.md
@@ -0,0 +1,9 @@
+# UseSourceGeneration.Model.OneOfString
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Order.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Order.md
new file mode 100644
index 00000000000..3ec4ab0e9ad
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Order.md
@@ -0,0 +1,15 @@
+# UseSourceGeneration.Model.Order
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **long** | | [optional]
+**PetId** | **long** | | [optional]
+**Quantity** | **int** | | [optional]
+**ShipDate** | **DateTime** | | [optional]
+**Status** | **string** | Order Status | [optional]
+**Complete** | **bool** | | [optional] [default to false]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterComposite.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterComposite.md
new file mode 100644
index 00000000000..434ecc88146
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterComposite.md
@@ -0,0 +1,12 @@
+# UseSourceGeneration.Model.OuterComposite
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**MyBoolean** | **bool** | | [optional]
+**MyNumber** | **decimal** | | [optional]
+**MyString** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterEnum.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterEnum.md
new file mode 100644
index 00000000000..5a514c455da
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterEnum.md
@@ -0,0 +1,9 @@
+# UseSourceGeneration.Model.OuterEnum
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterEnumDefaultValue.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterEnumDefaultValue.md
new file mode 100644
index 00000000000..36b205ebf8b
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterEnumDefaultValue.md
@@ -0,0 +1,9 @@
+# UseSourceGeneration.Model.OuterEnumDefaultValue
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterEnumInteger.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterEnumInteger.md
new file mode 100644
index 00000000000..3b60a8d59f1
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterEnumInteger.md
@@ -0,0 +1,9 @@
+# UseSourceGeneration.Model.OuterEnumInteger
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterEnumIntegerDefaultValue.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterEnumIntegerDefaultValue.md
new file mode 100644
index 00000000000..9238fbf95b5
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterEnumIntegerDefaultValue.md
@@ -0,0 +1,9 @@
+# UseSourceGeneration.Model.OuterEnumIntegerDefaultValue
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterEnumTest.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterEnumTest.md
new file mode 100644
index 00000000000..2491148e71f
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/OuterEnumTest.md
@@ -0,0 +1,9 @@
+# UseSourceGeneration.Model.OuterEnumTest
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ParentPet.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ParentPet.md
new file mode 100644
index 00000000000..f489f4813e0
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ParentPet.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.ParentPet
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**PetType** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Pet.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Pet.md
new file mode 100644
index 00000000000..0c5ac31d799
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Pet.md
@@ -0,0 +1,15 @@
+# UseSourceGeneration.Model.Pet
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Category** | [**Category**](Category.md) | | [optional]
+**Id** | **long** | | [optional]
+**Name** | **string** | |
+**PhotoUrls** | **List<string>** | |
+**Status** | **string** | pet status in the store | [optional]
+**Tags** | [**List<Tag>**](Tag.md) | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Pig.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Pig.md
new file mode 100644
index 00000000000..5298dc5d40c
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Pig.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.Pig
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ClassName** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/PolymorphicProperty.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/PolymorphicProperty.md
new file mode 100644
index 00000000000..77ed953f091
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/PolymorphicProperty.md
@@ -0,0 +1,9 @@
+# UseSourceGeneration.Model.PolymorphicProperty
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Quadrilateral.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Quadrilateral.md
new file mode 100644
index 00000000000..10c198b0639
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Quadrilateral.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.Quadrilateral
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**QuadrilateralType** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/QuadrilateralInterface.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/QuadrilateralInterface.md
new file mode 100644
index 00000000000..8c6a5c28b55
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/QuadrilateralInterface.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.QuadrilateralInterface
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**QuadrilateralType** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ReadOnlyFirst.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ReadOnlyFirst.md
new file mode 100644
index 00000000000..6d9a41c5621
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ReadOnlyFirst.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.ReadOnlyFirst
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Bar** | **string** | | [optional] [readonly]
+**Baz** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Return.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Return.md
new file mode 100644
index 00000000000..b96de8ee371
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Return.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.Return
+Model for testing reserved words
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**VarReturn** | **int** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/RolesReportsHash.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/RolesReportsHash.md
new file mode 100644
index 00000000000..b2f913bf0bb
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/RolesReportsHash.md
@@ -0,0 +1,12 @@
+# UseSourceGeneration.Model.RolesReportsHash
+Role report Hash
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Role** | [**RolesReportsHashRole**](RolesReportsHashRole.md) | | [optional]
+**RoleUuid** | **Guid** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/RolesReportsHashRole.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/RolesReportsHashRole.md
new file mode 100644
index 00000000000..f5df8d46020
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/RolesReportsHashRole.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.RolesReportsHashRole
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Name** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ScaleneTriangle.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ScaleneTriangle.md
new file mode 100644
index 00000000000..d3880b980fb
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ScaleneTriangle.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.ScaleneTriangle
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+**TriangleType** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Shape.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Shape.md
new file mode 100644
index 00000000000..0cf36743869
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Shape.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.Shape
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ShapeInterface.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ShapeInterface.md
new file mode 100644
index 00000000000..712d308bbf9
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ShapeInterface.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.ShapeInterface
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ShapeOrNull.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ShapeOrNull.md
new file mode 100644
index 00000000000..6ace4a9d0eb
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ShapeOrNull.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.ShapeOrNull
+The value may be a shape or the 'null' value. This is introduced in OAS schema >= 3.1.
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ShapeType** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/SimpleQuadrilateral.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/SimpleQuadrilateral.md
new file mode 100644
index 00000000000..5ea94fcdf60
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/SimpleQuadrilateral.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.SimpleQuadrilateral
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**QuadrilateralType** | **string** | |
+**ShapeType** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/SpecialModelName.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/SpecialModelName.md
new file mode 100644
index 00000000000..72a95327d70
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/SpecialModelName.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.SpecialModelName
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**VarSpecialModelName** | **string** | | [optional]
+**SpecialPropertyName** | **long** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Tag.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Tag.md
new file mode 100644
index 00000000000..d6608121a13
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Tag.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.Tag
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Id** | **long** | | [optional]
+**Name** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/TestCollectionEndingWithWordList.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/TestCollectionEndingWithWordList.md
new file mode 100644
index 00000000000..42a98f51ee3
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/TestCollectionEndingWithWordList.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.TestCollectionEndingWithWordList
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Value** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/TestCollectionEndingWithWordListObject.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/TestCollectionEndingWithWordListObject.md
new file mode 100644
index 00000000000..0db8b5be146
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/TestCollectionEndingWithWordListObject.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.TestCollectionEndingWithWordListObject
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**TestCollectionEndingWithWordList** | [**List<TestCollectionEndingWithWordList>**](TestCollectionEndingWithWordList.md) | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Triangle.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Triangle.md
new file mode 100644
index 00000000000..073cb49ab08
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Triangle.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.Triangle
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**TriangleType** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/TriangleInterface.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/TriangleInterface.md
new file mode 100644
index 00000000000..cc2f40f8960
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/TriangleInterface.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.TriangleInterface
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**TriangleType** | **string** | |
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/User.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/User.md
new file mode 100644
index 00000000000..9c3095927a6
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/User.md
@@ -0,0 +1,21 @@
+# UseSourceGeneration.Model.User
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**Email** | **string** | | [optional]
+**FirstName** | **string** | | [optional]
+**Id** | **long** | | [optional]
+**LastName** | **string** | | [optional]
+**ObjectWithNoDeclaredProps** | **Object** | test code generation for objects Value must be a map of strings to values. It cannot be the 'null' value. | [optional]
+**Password** | **string** | | [optional]
+**Phone** | **string** | | [optional]
+**UserStatus** | **int** | User Status | [optional]
+**Username** | **string** | | [optional]
+**AnyTypeProp** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. See https://github.com/OAI/OpenAPI-Specification/issues/1389 | [optional]
+**AnyTypePropNullable** | **Object** | test code generation for any type Here the 'type' attribute is not specified, which means the value can be anything, including the null value, string, number, boolean, array or object. The 'nullable' attribute does not change the allowed values. | [optional]
+**ObjectWithNoDeclaredPropsNullable** | **Object** | test code generation for nullable objects. Value must be a map of strings to values or the 'null' value. | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Whale.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Whale.md
new file mode 100644
index 00000000000..5f4c4f2d263
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Whale.md
@@ -0,0 +1,12 @@
+# UseSourceGeneration.Model.Whale
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ClassName** | **string** | |
+**HasBaleen** | **bool** | | [optional]
+**HasTeeth** | **bool** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Zebra.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Zebra.md
new file mode 100644
index 00000000000..4b7be0ee5ad
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/Zebra.md
@@ -0,0 +1,11 @@
+# UseSourceGeneration.Model.Zebra
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ClassName** | **string** | |
+**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/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ZeroBasedEnum.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ZeroBasedEnum.md
new file mode 100644
index 00000000000..96b044aa90e
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ZeroBasedEnum.md
@@ -0,0 +1,9 @@
+# UseSourceGeneration.Model.ZeroBasedEnum
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ZeroBasedEnumClass.md b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ZeroBasedEnumClass.md
new file mode 100644
index 00000000000..28a38298e73
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/models/ZeroBasedEnumClass.md
@@ -0,0 +1,10 @@
+# UseSourceGeneration.Model.ZeroBasedEnumClass
+
+## Properties
+
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**ZeroBasedEnum** | **string** | | [optional]
+
+[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)
+
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/scripts/git_push.ps1 b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/scripts/git_push.ps1
new file mode 100644
index 00000000000..73ed35c2bb1
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/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/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/scripts/git_push.sh b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/docs/scripts/git_push.sh
new file mode 100644
index 00000000000..88210492218
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/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/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/AnotherFakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/AnotherFakeApiTests.cs
new file mode 100644
index 00000000000..8ef83b919dc
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/AnotherFakeApiTests.cs
@@ -0,0 +1,65 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Xunit;
+using Microsoft.Extensions.DependencyInjection;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.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 UseSourceGeneration.Test.Api
+{
+ ///
+ /// Class for testing AnotherFakeApi
+ ///
+ public sealed class AnotherFakeApiTests : ApiTestsBase
+ {
+ private readonly IAnotherFakeApi _instance;
+
+ public AnotherFakeApiTests(): base(Array.Empty())
+ {
+ _instance = _host.Services.GetRequiredService();
+ }
+
+ ///
+ /// Test Call123TestSpecialTags
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task Call123TestSpecialTagsAsyncTest()
+ {
+ ModelClient modelClient = default!;
+ var response = await _instance.Call123TestSpecialTagsAsync(modelClient);
+ var model = response.AsModel();
+ Assert.IsType(model);
+ }
+ }
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/ApiTestsBase.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/ApiTestsBase.cs
new file mode 100644
index 00000000000..db85f0288e9
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/ApiTestsBase.cs
@@ -0,0 +1,77 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Security.Cryptography;
+using Microsoft.Extensions.Hosting;
+using UseSourceGeneration.Client;
+using UseSourceGeneration.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 UseSourceGeneration.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) =>
+ {
+ string apiKeyTokenValue = context.Configuration[""] ?? throw new Exception("Token not found.");
+ ApiKeyToken apiKeyToken = new(apiKeyTokenValue, timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(apiKeyToken);
+
+ string bearerTokenValue = context.Configuration[""] ?? throw new Exception("Token not found.");
+ BearerToken bearerToken = new(bearerTokenValue, timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(bearerToken);
+
+ string basicTokenUsername = context.Configuration[""] ?? throw new Exception("Username not found.");
+ string basicTokenPassword = context.Configuration[""] ?? throw new Exception("Password not found.");
+ BasicToken basicToken = new(basicTokenUsername, basicTokenPassword, timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(basicToken);
+
+ HttpSigningConfiguration config = new("", "", null, new List(), HashAlgorithmName.SHA256, "", 0);
+ HttpSignatureToken httpSignatureToken = new(config, timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(httpSignatureToken);
+
+ string oauthTokenValue = context.Configuration[""] ?? throw new Exception("Token not found.");
+ OAuthToken oauthToken = new(oauthTokenValue, timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(oauthToken);
+ });
+ }
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/DefaultApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/DefaultApiTests.cs
new file mode 100644
index 00000000000..c9b96924e70
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/DefaultApiTests.cs
@@ -0,0 +1,85 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Xunit;
+using Microsoft.Extensions.DependencyInjection;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.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 UseSourceGeneration.Test.Api
+{
+ ///
+ /// Class for testing DefaultApi
+ ///
+ public sealed class DefaultApiTests : ApiTestsBase
+ {
+ private readonly IDefaultApi _instance;
+
+ public DefaultApiTests(): base(Array.Empty())
+ {
+ _instance = _host.Services.GetRequiredService();
+ }
+
+ ///
+ /// Test FooGet
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task FooGetAsyncTest()
+ {
+ var response = await _instance.FooGetAsync();
+ var model = response.AsModel();
+ Assert.IsType(model);
+ }
+
+ ///
+ /// Test GetCountry
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task GetCountryAsyncTest()
+ {
+ string country = default!;
+ await _instance.GetCountryAsync(country);
+ }
+
+ ///
+ /// Test Hello
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task HelloAsyncTest()
+ {
+ var response = await _instance.HelloAsync();
+ var model = response.AsModel();
+ Assert.IsType>(model);
+ }
+ }
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/DependencyInjectionTests.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/DependencyInjectionTests.cs
new file mode 100644
index 00000000000..6ddf22ddedd
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/DependencyInjectionTests.cs
@@ -0,0 +1,231 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * 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 UseSourceGeneration.Client;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.Extensions;
+using Xunit;
+
+namespace UseSourceGeneration.Test.Api
+{
+ ///
+ /// Tests the dependency injection.
+ ///
+ public class DependencyInjectionTest
+ {
+ private readonly IHost _hostUsingConfigureWithoutAClient =
+ Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, services, options) =>
+ {
+ ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(apiKeyToken);
+
+ BearerToken bearerToken = new BearerToken($"", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(bearerToken);
+
+ BasicToken basicToken = new BasicToken("", "", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(basicToken);
+
+ HttpSigningConfiguration config = new HttpSigningConfiguration("", "", null, new List(), HashAlgorithmName.SHA256, "", 0);
+ HttpSignatureToken httpSignatureToken = new HttpSignatureToken(config, timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(httpSignatureToken);
+
+ OAuthToken oauthToken = new OAuthToken("token", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(oauthToken);
+ })
+ .Build();
+
+ private readonly IHost _hostUsingConfigureWithAClient =
+ Host.CreateDefaultBuilder(Array.Empty()).ConfigureApi((context, services, options) =>
+ {
+ ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(apiKeyToken);
+
+ BearerToken bearerToken = new BearerToken($"", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(bearerToken);
+
+ BasicToken basicToken = new BasicToken("", "", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(basicToken);
+
+ HttpSigningConfiguration config = new HttpSigningConfiguration("", "", null, new List(), HashAlgorithmName.SHA256, "", 0);
+ HttpSignatureToken httpSignatureToken = new HttpSignatureToken(config, timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(httpSignatureToken);
+
+ OAuthToken oauthToken = new OAuthToken("token", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(oauthToken);
+ 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 =>
+ {
+ ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(apiKeyToken);
+
+ BearerToken bearerToken = new BearerToken($"", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(bearerToken);
+
+ BasicToken basicToken = new BasicToken("", "", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(basicToken);
+
+ HttpSigningConfiguration config = new HttpSigningConfiguration("", "", null, new List(), HashAlgorithmName.SHA256, "", 0);
+ HttpSignatureToken httpSignatureToken = new HttpSignatureToken(config, timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(httpSignatureToken);
+
+ OAuthToken oauthToken = new OAuthToken("token", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(oauthToken);
+ });
+ })
+ .Build();
+
+ private readonly IHost _hostUsingAddWithAClient =
+ Host.CreateDefaultBuilder(Array.Empty()).ConfigureServices((host, services) =>
+ {
+ services.AddApi(options =>
+ {
+ ApiKeyToken apiKeyToken = new ApiKeyToken($"", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(apiKeyToken);
+
+ BearerToken bearerToken = new BearerToken($"", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(bearerToken);
+
+ BasicToken basicToken = new BasicToken("", "", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(basicToken);
+
+ HttpSigningConfiguration config = new HttpSigningConfiguration("", "", null, new List(), HashAlgorithmName.SHA256, "", 0);
+ HttpSignatureToken httpSignatureToken = new HttpSignatureToken(config, timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(httpSignatureToken);
+
+ OAuthToken oauthToken = new OAuthToken("token", timeout: TimeSpan.FromSeconds(1));
+ options.AddTokens(oauthToken);
+ options.AddApiHttpClients(client => client.BaseAddress = new Uri(ClientUtils.BASE_ADDRESS));
+ });
+ })
+ .Build();
+
+ ///
+ /// Test dependency injection when using the configure method
+ ///
+ [Fact]
+ public void ConfigureApiWithAClientTest()
+ {
+ var anotherFakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService();
+ Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
+
+ var defaultApi = _hostUsingConfigureWithAClient.Services.GetRequiredService();
+ Assert.True(defaultApi.HttpClient.BaseAddress != null);
+
+ var fakeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService();
+ Assert.True(fakeApi.HttpClient.BaseAddress != null);
+
+ var fakeClassnameTags123Api = _hostUsingConfigureWithAClient.Services.GetRequiredService();
+ Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
+
+ var petApi = _hostUsingConfigureWithAClient.Services.GetRequiredService();
+ Assert.True(petApi.HttpClient.BaseAddress != null);
+
+ var storeApi = _hostUsingConfigureWithAClient.Services.GetRequiredService();
+ Assert.True(storeApi.HttpClient.BaseAddress != null);
+
+ var userApi = _hostUsingConfigureWithAClient.Services.GetRequiredService();
+ Assert.True(userApi.HttpClient.BaseAddress != null);
+ }
+
+ ///
+ /// Test dependency injection when using the configure method
+ ///
+ [Fact]
+ public void ConfigureApiWithoutAClientTest()
+ {
+ var anotherFakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService();
+ Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
+
+ var defaultApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService();
+ Assert.True(defaultApi.HttpClient.BaseAddress != null);
+
+ var fakeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService();
+ Assert.True(fakeApi.HttpClient.BaseAddress != null);
+
+ var fakeClassnameTags123Api = _hostUsingConfigureWithoutAClient.Services.GetRequiredService();
+ Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
+
+ var petApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService();
+ Assert.True(petApi.HttpClient.BaseAddress != null);
+
+ var storeApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService();
+ Assert.True(storeApi.HttpClient.BaseAddress != null);
+
+ var userApi = _hostUsingConfigureWithoutAClient.Services.GetRequiredService();
+ Assert.True(userApi.HttpClient.BaseAddress != null);
+ }
+
+ ///
+ /// Test dependency injection when using the add method
+ ///
+ [Fact]
+ public void AddApiWithAClientTest()
+ {
+ var anotherFakeApi = _hostUsingAddWithAClient.Services.GetRequiredService();
+ Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
+
+ var defaultApi = _hostUsingAddWithAClient.Services.GetRequiredService();
+ Assert.True(defaultApi.HttpClient.BaseAddress != null);
+
+ var fakeApi = _hostUsingAddWithAClient.Services.GetRequiredService();
+ Assert.True(fakeApi.HttpClient.BaseAddress != null);
+
+ var fakeClassnameTags123Api = _hostUsingAddWithAClient.Services.GetRequiredService();
+ Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
+
+ var petApi = _hostUsingAddWithAClient.Services.GetRequiredService();
+ Assert.True(petApi.HttpClient.BaseAddress != null);
+
+ var storeApi = _hostUsingAddWithAClient.Services.GetRequiredService();
+ Assert.True(storeApi.HttpClient.BaseAddress != null);
+
+ var userApi = _hostUsingAddWithAClient.Services.GetRequiredService();
+ Assert.True(userApi.HttpClient.BaseAddress != null);
+ }
+
+ ///
+ /// Test dependency injection when using the add method
+ ///
+ [Fact]
+ public void AddApiWithoutAClientTest()
+ {
+ var anotherFakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService();
+ Assert.True(anotherFakeApi.HttpClient.BaseAddress != null);
+
+ var defaultApi = _hostUsingAddWithoutAClient.Services.GetRequiredService();
+ Assert.True(defaultApi.HttpClient.BaseAddress != null);
+
+ var fakeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService();
+ Assert.True(fakeApi.HttpClient.BaseAddress != null);
+
+ var fakeClassnameTags123Api = _hostUsingAddWithoutAClient.Services.GetRequiredService();
+ Assert.True(fakeClassnameTags123Api.HttpClient.BaseAddress != null);
+
+ var petApi = _hostUsingAddWithoutAClient.Services.GetRequiredService();
+ Assert.True(petApi.HttpClient.BaseAddress != null);
+
+ var storeApi = _hostUsingAddWithoutAClient.Services.GetRequiredService();
+ Assert.True(storeApi.HttpClient.BaseAddress != null);
+
+ var userApi = _hostUsingAddWithoutAClient.Services.GetRequiredService();
+ Assert.True(userApi.HttpClient.BaseAddress != null);
+ }
+ }
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/FakeApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/FakeApiTests.cs
new file mode 100644
index 00000000000..82b0ab64736
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/FakeApiTests.cs
@@ -0,0 +1,251 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Xunit;
+using Microsoft.Extensions.DependencyInjection;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.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 UseSourceGeneration.Test.Api
+{
+ ///
+ /// Class for testing FakeApi
+ ///
+ public sealed class FakeApiTests : ApiTestsBase
+ {
+ private readonly IFakeApi _instance;
+
+ public FakeApiTests(): base(Array.Empty())
+ {
+ _instance = _host.Services.GetRequiredService();
+ }
+
+ ///
+ /// Test FakeHealthGet
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task FakeHealthGetAsyncTest()
+ {
+ var response = await _instance.FakeHealthGetAsync();
+ var model = response.AsModel();
+ Assert.IsType(model);
+ }
+
+ ///
+ /// Test FakeOuterBooleanSerialize
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task FakeOuterBooleanSerializeAsyncTest()
+ {
+ Client.Option body = default!;
+ var response = await _instance.FakeOuterBooleanSerializeAsync(body);
+ var model = response.AsModel();
+ Assert.IsType(model);
+ }
+
+ ///
+ /// Test FakeOuterCompositeSerialize
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task FakeOuterCompositeSerializeAsyncTest()
+ {
+ Client.Option outerComposite = default!;
+ var response = await _instance.FakeOuterCompositeSerializeAsync(outerComposite);
+ var model = response.AsModel();
+ Assert.IsType(model);
+ }
+
+ ///
+ /// Test FakeOuterNumberSerialize
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task FakeOuterNumberSerializeAsyncTest()
+ {
+ Client.Option body = default!;
+ var response = await _instance.FakeOuterNumberSerializeAsync(body);
+ var model = response.AsModel();
+ Assert.IsType(model);
+ }
+
+ ///
+ /// Test FakeOuterStringSerialize
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task FakeOuterStringSerializeAsyncTest()
+ {
+ Guid requiredStringUuid = default!;
+ Client.Option body = default!;
+ var response = await _instance.FakeOuterStringSerializeAsync(requiredStringUuid, body);
+ var model = response.AsModel();
+ Assert.IsType(model);
+ }
+
+ ///
+ /// Test GetArrayOfEnums
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task GetArrayOfEnumsAsyncTest()
+ {
+ var response = await _instance.GetArrayOfEnumsAsync();
+ var model = response.AsModel();
+ Assert.IsType>(model);
+ }
+
+ ///
+ /// Test TestBodyWithFileSchema
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task TestBodyWithFileSchemaAsyncTest()
+ {
+ FileSchemaTestClass fileSchemaTestClass = default!;
+ await _instance.TestBodyWithFileSchemaAsync(fileSchemaTestClass);
+ }
+
+ ///
+ /// Test TestBodyWithQueryParams
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task TestBodyWithQueryParamsAsyncTest()
+ {
+ User user = default!;
+ string query = default!;
+ await _instance.TestBodyWithQueryParamsAsync(user, query);
+ }
+
+ ///
+ /// Test TestClientModel
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task TestClientModelAsyncTest()
+ {
+ ModelClient modelClient = default!;
+ var response = await _instance.TestClientModelAsync(modelClient);
+ var model = response.AsModel();
+ Assert.IsType(model);
+ }
+
+ ///
+ /// Test TestEndpointParameters
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task TestEndpointParametersAsyncTest()
+ {
+ byte[] varByte = default!;
+ decimal number = default!;
+ double varDouble = default!;
+ string patternWithoutDelimiter = default!;
+ Client.Option date = default!;
+ Client.Option binary = default!;
+ Client.Option varFloat = default!;
+ Client.Option integer = default!;
+ Client.Option int32 = default!;
+ Client.Option int64 = default!;
+ Client.Option varString = default!;
+ Client.Option password = default!;
+ Client.Option callback = default!;
+ Client.Option dateTime = default!;
+ await _instance.TestEndpointParametersAsync(varByte, number, varDouble, patternWithoutDelimiter, date, binary, varFloat, integer, int32, int64, varString, password, callback, dateTime);
+ }
+
+ ///
+ /// Test TestEnumParameters
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task TestEnumParametersAsyncTest()
+ {
+ Client.Option> enumHeaderStringArray = default!;
+ Client.Option> enumQueryStringArray = default!;
+ Client.Option enumQueryDouble = default!;
+ Client.Option enumQueryInteger = default!;
+ Client.Option> enumFormStringArray = default!;
+ Client.Option enumHeaderString = default!;
+ Client.Option enumQueryString = default!;
+ Client.Option enumFormString = default!;
+ await _instance.TestEnumParametersAsync(enumHeaderStringArray, enumQueryStringArray, enumQueryDouble, enumQueryInteger, enumFormStringArray, enumHeaderString, enumQueryString, enumFormString);
+ }
+
+ ///
+ /// Test TestGroupParameters
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task TestGroupParametersAsyncTest()
+ {
+ bool requiredBooleanGroup = default!;
+ int requiredStringGroup = default!;
+ long requiredInt64Group = default!;
+ Client.Option booleanGroup = default!;
+ Client.Option stringGroup = default!;
+ Client.Option int64Group = default!;
+ await _instance.TestGroupParametersAsync(requiredBooleanGroup, requiredStringGroup, requiredInt64Group, booleanGroup, stringGroup, int64Group);
+ }
+
+ ///
+ /// Test TestInlineAdditionalProperties
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task TestInlineAdditionalPropertiesAsyncTest()
+ {
+ Dictionary requestBody = default!;
+ await _instance.TestInlineAdditionalPropertiesAsync(requestBody);
+ }
+
+ ///
+ /// Test TestJsonFormData
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task TestJsonFormDataAsyncTest()
+ {
+ string param = default!;
+ string param2 = default!;
+ await _instance.TestJsonFormDataAsync(param, param2);
+ }
+
+ ///
+ /// Test TestQueryParameterCollectionFormat
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task TestQueryParameterCollectionFormatAsyncTest()
+ {
+ List pipe = default!;
+ List ioutil = default!;
+ List http = default!;
+ List url = default!;
+ List context = default!;
+ string requiredNotNullable = default!;
+ string? requiredNullable = default!;
+ Client.Option notRequiredNotNullable = default!;
+ Client.Option notRequiredNullable = default!;
+ await _instance.TestQueryParameterCollectionFormatAsync(pipe, ioutil, http, url, context, requiredNotNullable, requiredNullable, notRequiredNotNullable, notRequiredNullable);
+ }
+ }
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/FakeClassnameTags123ApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/FakeClassnameTags123ApiTests.cs
new file mode 100644
index 00000000000..5945828914d
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/FakeClassnameTags123ApiTests.cs
@@ -0,0 +1,65 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Xunit;
+using Microsoft.Extensions.DependencyInjection;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.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 UseSourceGeneration.Test.Api
+{
+ ///
+ /// Class for testing FakeClassnameTags123Api
+ ///
+ public sealed class FakeClassnameTags123ApiTests : ApiTestsBase
+ {
+ private readonly IFakeClassnameTags123Api _instance;
+
+ public FakeClassnameTags123ApiTests(): base(Array.Empty())
+ {
+ _instance = _host.Services.GetRequiredService();
+ }
+
+ ///
+ /// Test TestClassname
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task TestClassnameAsyncTest()
+ {
+ ModelClient modelClient = default!;
+ var response = await _instance.TestClassnameAsync(modelClient);
+ var model = response.AsModel();
+ Assert.IsType(model);
+ }
+ }
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/PetApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/PetApiTests.cs
new file mode 100644
index 00000000000..6075d6e5e73
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/PetApiTests.cs
@@ -0,0 +1,160 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Xunit;
+using Microsoft.Extensions.DependencyInjection;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.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 UseSourceGeneration.Test.Api
+{
+ ///
+ /// Class for testing PetApi
+ ///
+ public sealed class PetApiTests : ApiTestsBase
+ {
+ private readonly IPetApi _instance;
+
+ public PetApiTests(): base(Array.Empty())
+ {
+ _instance = _host.Services.GetRequiredService();
+ }
+
+ ///
+ /// Test AddPet
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task AddPetAsyncTest()
+ {
+ Pet pet = default!;
+ await _instance.AddPetAsync(pet);
+ }
+
+ ///
+ /// Test DeletePet
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task DeletePetAsyncTest()
+ {
+ long petId = default!;
+ Client.Option apiKey = default!;
+ await _instance.DeletePetAsync(petId, apiKey);
+ }
+
+ ///
+ /// Test FindPetsByStatus
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task FindPetsByStatusAsyncTest()
+ {
+ List status = default!;
+ var response = await _instance.FindPetsByStatusAsync(status);
+ var model = response.AsModel();
+ Assert.IsType>(model);
+ }
+
+ ///
+ /// Test FindPetsByTags
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task FindPetsByTagsAsyncTest()
+ {
+ List tags = default!;
+ var response = await _instance.FindPetsByTagsAsync(tags);
+ var model = response.AsModel();
+ Assert.IsType>(model);
+ }
+
+ ///
+ /// Test GetPetById
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task GetPetByIdAsyncTest()
+ {
+ long petId = default!;
+ var response = await _instance.GetPetByIdAsync(petId);
+ var model = response.AsModel();
+ Assert.IsType(model);
+ }
+
+ ///
+ /// Test UpdatePet
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task UpdatePetAsyncTest()
+ {
+ Pet pet = default!;
+ await _instance.UpdatePetAsync(pet);
+ }
+
+ ///
+ /// Test UpdatePetWithForm
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task UpdatePetWithFormAsyncTest()
+ {
+ long petId = default!;
+ Client.Option name = default!;
+ Client.Option status = default!;
+ await _instance.UpdatePetWithFormAsync(petId, name, status);
+ }
+
+ ///
+ /// Test UploadFile
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task UploadFileAsyncTest()
+ {
+ long petId = default!;
+ Client.Option file = default!;
+ Client.Option additionalMetadata = default!;
+ var response = await _instance.UploadFileAsync(petId, file, additionalMetadata);
+ var model = response.AsModel();
+ Assert.IsType(model);
+ }
+
+ ///
+ /// Test UploadFileWithRequiredFile
+ ///
+ [Fact (Skip = "not implemented")]
+ public async Task UploadFileWithRequiredFileAsyncTest()
+ {
+ System.IO.Stream requiredFile = default!;
+ long petId = default!;
+ Client.Option additionalMetadata = default!;
+ var response = await _instance.UploadFileWithRequiredFileAsync(requiredFile, petId, additionalMetadata);
+ var model = response.AsModel();
+ Assert.IsType(model);
+ }
+ }
+}
diff --git a/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/StoreApiTests.cs b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/StoreApiTests.cs
new file mode 100644
index 00000000000..3320fae2c17
--- /dev/null
+++ b/samples/client/petstore/csharp/OpenAPIClient-generichost-net6.0-nrt-useSourceGeneration/src/UseSourceGeneration.Test/Api/StoreApiTests.cs
@@ -0,0 +1,98 @@
+/*
+ * OpenAPI Petstore
+ *
+ * This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+ *
+ * The version of the OpenAPI document: 1.0.0
+ * Generated by: https://github.com/openapitools/openapi-generator.git
+ */
+
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using Xunit;
+using Microsoft.Extensions.DependencyInjection;
+using UseSourceGeneration.Api;
+using UseSourceGeneration.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 UseSourceGeneration.Test.Api
+{
+ ///