diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java index 6471d7f0f05..a1b973e7ea7 100644 --- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java +++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java @@ -171,7 +171,7 @@ public class ExampleGenerator { output.add(kv); } } else { - kv.put(EXAMPLE, "null"); + kv.put(EXAMPLE, "Custom MIME type example not yet supported: " + mediaType); output.add(kv); } } diff --git a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml index 4e4d668d055..b9e2888f551 100644 --- a/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml +++ b/modules/openapi-generator/src/test/resources/3_0/csharp/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml @@ -1069,6 +1069,10 @@ paths: application/json: schema: $ref: '#/components/schemas/ApiResponse' + application/vnd.openxmlformats-officedocument.spreadsheetml.sheet: + # Export data as Excel spreadsheet. + schema: + $ref: '#/components/schemas/ApiResponse' security: - petstore_auth: - 'write:pets' diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md index 589980bafe6..1c51cb3d775 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/docs/PetApi.md @@ -844,7 +844,7 @@ catch (ApiException e) ### HTTP request headers - **Content-Type**: multipart/form-data - - **Accept**: application/json + - **Accept**: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ### HTTP response details diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs index 562c0f4807f..125b0f5cb78 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-ConditionalSerialization/src/Org.OpenAPITools/Api/PetApi.cs @@ -2033,7 +2033,8 @@ namespace Org.OpenAPITools.Api // to determine the Accept header string[] _accepts = new string[] { - "application/json" + "application/json", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }; var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -2122,7 +2123,8 @@ namespace Org.OpenAPITools.Api // to determine the Accept header string[] _accepts = new string[] { - "application/json" + "application/json", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }; var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/PetApi.md index 18c0d4baf38..4187e44c57d 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/docs/apis/PetApi.md @@ -844,7 +844,7 @@ catch (ApiException e) ### HTTP request headers - **Content-Type**: multipart/form-data - - **Accept**: application/json + - **Accept**: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ### HTTP response details diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs index c667da14abd..64cad62fdcb 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0-nrt/src/Org.OpenAPITools/Api/PetApi.cs @@ -1654,7 +1654,8 @@ namespace Org.OpenAPITools.Api request.Content.Headers.Add("ContentType", contentType); string[] accepts = new string[] { - "application/json" + "application/json", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }; string? accept = ClientUtils.SelectHeaderAccept(accepts); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/PetApi.md index f651b3db0d4..8ece47af9ca 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/docs/apis/PetApi.md @@ -844,7 +844,7 @@ catch (ApiException e) ### HTTP request headers - **Content-Type**: multipart/form-data - - **Accept**: application/json + - **Accept**: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ### HTTP response details diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs index 0e266cbd15a..c245714fbf1 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-net6.0/src/Org.OpenAPITools/Api/PetApi.cs @@ -1513,7 +1513,8 @@ namespace Org.OpenAPITools.Api request.Content.Headers.Add("ContentType", contentType); string[] accepts = new string[] { - "application/json" + "application/json", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }; string accept = ClientUtils.SelectHeaderAccept(accepts); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/PetApi.md index f651b3db0d4..8ece47af9ca 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/docs/apis/PetApi.md @@ -844,7 +844,7 @@ catch (ApiException e) ### HTTP request headers - **Content-Type**: multipart/form-data - - **Accept**: application/json + - **Accept**: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ### HTTP response details diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs index 6239ae756bd..82a0d311cf3 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-generichost-netstandard2.0/src/Org.OpenAPITools/Api/PetApi.cs @@ -1513,7 +1513,8 @@ namespace Org.OpenAPITools.Api request.Content.Headers.Add("ContentType", contentType); string[] accepts = new string[] { - "application/json" + "application/json", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }; string accept = ClientUtils.SelectHeaderAccept(accepts); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md index 9f3f7aa9f22..9db1797db99 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/docs/PetApi.md @@ -880,7 +880,7 @@ catch (ApiException e) ### HTTP request headers - **Content-Type**: multipart/form-data - - **Accept**: application/json + - **Accept**: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ### HTTP response details diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/PetApi.cs index a4ab1260df9..6f8299aee6c 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/src/Org.OpenAPITools/Api/PetApi.cs @@ -1871,7 +1871,8 @@ namespace Org.OpenAPITools.Api // to determine the Accept header string[] _accepts = new string[] { - "application/json" + "application/json", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }; var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -1945,7 +1946,8 @@ namespace Org.OpenAPITools.Api // to determine the Accept header string[] _accepts = new string[] { - "application/json" + "application/json", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }; diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md index 589980bafe6..1c51cb3d775 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/docs/PetApi.md @@ -844,7 +844,7 @@ catch (ApiException e) ### HTTP request headers - **Content-Type**: multipart/form-data - - **Accept**: application/json + - **Accept**: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ### HTTP response details diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/PetApi.cs index 562c0f4807f..125b0f5cb78 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/src/Org.OpenAPITools/Api/PetApi.cs @@ -2033,7 +2033,8 @@ namespace Org.OpenAPITools.Api // to determine the Accept header string[] _accepts = new string[] { - "application/json" + "application/json", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }; var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -2122,7 +2123,8 @@ namespace Org.OpenAPITools.Api // to determine the Accept header string[] _accepts = new string[] { - "application/json" + "application/json", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }; var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md index 589980bafe6..1c51cb3d775 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/docs/PetApi.md @@ -844,7 +844,7 @@ catch (ApiException e) ### HTTP request headers - **Content-Type**: multipart/form-data - - **Accept**: application/json + - **Accept**: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ### HTTP response details diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs index 562c0f4807f..125b0f5cb78 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/src/Org.OpenAPITools/Api/PetApi.cs @@ -2033,7 +2033,8 @@ namespace Org.OpenAPITools.Api // to determine the Accept header string[] _accepts = new string[] { - "application/json" + "application/json", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }; var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -2122,7 +2123,8 @@ namespace Org.OpenAPITools.Api // to determine the Accept header string[] _accepts = new string[] { - "application/json" + "application/json", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }; var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md index 589980bafe6..1c51cb3d775 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/docs/PetApi.md @@ -844,7 +844,7 @@ catch (ApiException e) ### HTTP request headers - **Content-Type**: multipart/form-data - - **Accept**: application/json + - **Accept**: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ### HTTP response details diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs index 562c0f4807f..125b0f5cb78 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/src/Org.OpenAPITools/Api/PetApi.cs @@ -2033,7 +2033,8 @@ namespace Org.OpenAPITools.Api // to determine the Accept header string[] _accepts = new string[] { - "application/json" + "application/json", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }; var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -2122,7 +2123,8 @@ namespace Org.OpenAPITools.Api // to determine the Accept header string[] _accepts = new string[] { - "application/json" + "application/json", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }; var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md index 589980bafe6..1c51cb3d775 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/docs/PetApi.md @@ -844,7 +844,7 @@ catch (ApiException e) ### HTTP request headers - **Content-Type**: multipart/form-data - - **Accept**: application/json + - **Accept**: application/json, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet ### HTTP response details diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs index 562c0f4807f..125b0f5cb78 100644 --- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs +++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/src/Org.OpenAPITools/Api/PetApi.cs @@ -2033,7 +2033,8 @@ namespace Org.OpenAPITools.Api // to determine the Accept header string[] _accepts = new string[] { - "application/json" + "application/json", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }; var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes); @@ -2122,7 +2123,8 @@ namespace Org.OpenAPITools.Api // to determine the Accept header string[] _accepts = new string[] { - "application/json" + "application/json", + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" }; var localVarContentType = Org.OpenAPITools.Client.ClientUtils.SelectHeaderContentType(_contentTypes);