diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java index c877c63a0ca..a93477ed25d 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CSharpNetCoreClientCodegen.java @@ -860,6 +860,10 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { supportingFiles.add(new SupportingFile("auth/OAuthFlow.mustache", authPackageDir, "OAuthFlow.cs")); } } + + // include the spec in the output + supportingFiles.add(new SupportingFile("openapi.mustache", "api", "openapi.yaml")); + } public void setClientPackage(String clientPackage) { diff --git a/modules/openapi-generator/src/main/resources/csharp-netcore/openapi.mustache b/modules/openapi-generator/src/main/resources/csharp-netcore/openapi.mustache new file mode 100644 index 00000000000..34fbb53f331 --- /dev/null +++ b/modules/openapi-generator/src/main/resources/csharp-netcore/openapi.mustache @@ -0,0 +1 @@ +{{{openapi-yaml}}} diff --git a/samples/client/others/csharp-netcore-complex-files/.openapi-generator/FILES b/samples/client/others/csharp-netcore-complex-files/.openapi-generator/FILES index 4afed17cb82..fb5f0b603c3 100644 --- a/samples/client/others/csharp-netcore-complex-files/.openapi-generator/FILES +++ b/samples/client/others/csharp-netcore-complex-files/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore Org.OpenAPITools.sln README.md +api/openapi.yaml appveyor.yml docs/MultipartApi.md docs/MultipartArrayRequest.md diff --git a/samples/client/others/csharp-netcore-complex-files/api/openapi.yaml b/samples/client/others/csharp-netcore-complex-files/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/others/csharp-netcore-complex-files/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/FILES index 733114e3828..4520a7cbbe1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore Org.OpenAPITools.sln README.md +api/openapi.yaml appveyor.yml docs/Activity.md docs/ActivityOutputElementRepresentation.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/api/openapi.yaml b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/FILES index ff892217def..9fe94806020 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore Org.OpenAPITools.sln README.md +api/openapi.yaml appveyor.yml docs/apis/AnotherFakeApi.md docs/apis/DefaultApi.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/api/openapi.yaml b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/.openapi-generator/FILES index ff892217def..9fe94806020 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore Org.OpenAPITools.sln README.md +api/openapi.yaml appveyor.yml docs/apis/AnotherFakeApi.md docs/apis/DefaultApi.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/api/openapi.yaml b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator/FILES index f71328b618e..16f489ff88b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore Org.OpenAPITools.sln README.md +api/openapi.yaml appveyor.yml docs/apis/DefaultApi.md docs/models/Adult.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/api/openapi.yaml b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-allOf/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf/.openapi-generator/FILES index af3bdedb0b6..a71e463b072 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore Org.OpenAPITools.sln README.md +api/openapi.yaml appveyor.yml docs/apis/DefaultApi.md docs/models/Apple.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf/api/openapi.yaml b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-anyOf/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf/.openapi-generator/FILES index af3bdedb0b6..a71e463b072 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore Org.OpenAPITools.sln README.md +api/openapi.yaml appveyor.yml docs/apis/DefaultApi.md docs/models/Apple.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf/api/openapi.yaml b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netcore-latest-oneOf/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/FILES index ff892217def..9fe94806020 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore Org.OpenAPITools.sln README.md +api/openapi.yaml appveyor.yml docs/apis/AnotherFakeApi.md docs/apis/DefaultApi.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/api/openapi.yaml b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/FILES index 05e40204769..605b852fd02 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore Org.OpenAPITools.sln README.md +api/openapi.yaml appveyor.yml docs/Activity.md docs/ActivityOutputElementRepresentation.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/api/openapi.yaml b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/FILES index 733114e3828..4520a7cbbe1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore Org.OpenAPITools.sln README.md +api/openapi.yaml appveyor.yml docs/Activity.md docs/ActivityOutputElementRepresentation.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/api/openapi.yaml b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/.openapi-generator/FILES index 733114e3828..4520a7cbbe1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore Org.OpenAPITools.sln README.md +api/openapi.yaml appveyor.yml docs/Activity.md docs/ActivityOutputElementRepresentation.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/api/openapi.yaml b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net48/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/FILES index 733114e3828..4520a7cbbe1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore Org.OpenAPITools.sln README.md +api/openapi.yaml appveyor.yml docs/Activity.md docs/ActivityOutputElementRepresentation.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/api/openapi.yaml b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-unityWebRequest/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient-unityWebRequest/.openapi-generator/FILES index 2668d8a45b1..1eca9a79f1b 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-unityWebRequest/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-unityWebRequest/.openapi-generator/FILES @@ -1,5 +1,6 @@ .gitignore README.md +api/openapi.yaml docs/Activity.md docs/ActivityOutputElementRepresentation.md docs/AdditionalPropertiesClass.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-unityWebRequest/api/openapi.yaml b/samples/client/petstore/csharp-netcore/OpenAPIClient-unityWebRequest/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-unityWebRequest/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/FILES index f465ea1d3ab..1002fd3c2f1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore Org.OpenAPITools.sln README.md +api/openapi.yaml appveyor.yml docs/Activity.md docs/ActivityOutputElementRepresentation.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/api/openapi.yaml b/samples/client/petstore/csharp-netcore/OpenAPIClient/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/FILES index f465ea1d3ab..1002fd3c2f1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore Org.OpenAPITools.sln README.md +api/openapi.yaml appveyor.yml docs/Activity.md docs/ActivityOutputElementRepresentation.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/api/openapi.yaml b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/api/openapi.yaml @@ -0,0 +1 @@ + diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/FILES b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/FILES index 9f81e159fbb..f05700009ef 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/FILES +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/FILES @@ -1,6 +1,7 @@ .gitignore Org.OpenAPITools.sln README.md +api/openapi.yaml appveyor.yml docs/ApiResponse.md docs/Category.md diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/api/openapi.yaml b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/api/openapi.yaml new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/api/openapi.yaml @@ -0,0 +1 @@ +