From 90f96b28fdf874be11ed85af7bf217f8642e5db9 Mon Sep 17 00:00:00 2001 From: Yohei Kitamura Date: Thu, 15 Dec 2022 00:08:10 -0500 Subject: [PATCH] [ruby] Fix api_error.mustache to initialize message-only errors properly --- .../src/main/resources/ruby-client/api_error.mustache | 1 + samples/client/petstore/ruby-autoload/lib/petstore/api_error.rb | 1 + samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb | 1 + samples/client/petstore/ruby/lib/petstore/api_error.rb | 1 + .../x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb | 1 + .../dynamic-servers/ruby/lib/dynamic_servers/api_error.rb | 1 + .../ruby-client/lib/petstore/api_error.rb | 1 + 7 files changed, 7 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/ruby-client/api_error.mustache b/modules/openapi-generator/src/main/resources/ruby-client/api_error.mustache index 6d1967b7ba4b..304d55db4bfd 100644 --- a/modules/openapi-generator/src/main/resources/ruby-client/api_error.mustache +++ b/modules/openapi-generator/src/main/resources/ruby-client/api_error.mustache @@ -24,6 +24,7 @@ module {{moduleName}} end else super arg + @message = arg end end diff --git a/samples/client/petstore/ruby-autoload/lib/petstore/api_error.rb b/samples/client/petstore/ruby-autoload/lib/petstore/api_error.rb index 08048f68e367..9ea6651dff81 100644 --- a/samples/client/petstore/ruby-autoload/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby-autoload/lib/petstore/api_error.rb @@ -32,6 +32,7 @@ def initialize(arg = nil) end else super arg + @message = arg end end diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb index 08048f68e367..9ea6651dff81 100644 --- a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb @@ -32,6 +32,7 @@ def initialize(arg = nil) end else super arg + @message = arg end end diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb index 08048f68e367..9ea6651dff81 100644 --- a/samples/client/petstore/ruby/lib/petstore/api_error.rb +++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb @@ -32,6 +32,7 @@ def initialize(arg = nil) end else super arg + @message = arg end end diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb index 7bedb990d019..22ba8538d014 100644 --- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb +++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb @@ -32,6 +32,7 @@ def initialize(arg = nil) end else super arg + @message = arg end end diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb index 28dbdeeb09b6..d7e0d30b70b5 100644 --- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb +++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb @@ -32,6 +32,7 @@ def initialize(arg = nil) end else super arg + @message = arg end end diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb index 2d9b7b1229e6..7716ddd44eaa 100644 --- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb +++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb @@ -32,6 +32,7 @@ def initialize(arg = nil) end else super arg + @message = arg end end