rb: raise if an object is serialized without required fields [THRIFT-143]
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@712945 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/rb/spec/gen-rb/NonblockingService.rb b/lib/rb/spec/gen-rb/NonblockingService.rb
index ee5fae1..a886805 100644
--- a/lib/rb/spec/gen-rb/NonblockingService.rb
+++ b/lib/rb/spec/gen-rb/NonblockingService.rb
@@ -121,6 +121,9 @@
FIELDS = {
ENGLISH => {:type => Thrift::Types::BOOL, :name => 'english'}
}
+ def validate
+ end
+
end
class Greeting_result
@@ -131,6 +134,9 @@
FIELDS = {
SUCCESS => {:type => Thrift::Types::STRUCT, :name => 'success', :class => Hello}
}
+ def validate
+ end
+
end
class Block_args
@@ -139,6 +145,9 @@
FIELDS = {
}
+ def validate
+ end
+
end
class Block_result
@@ -149,6 +158,9 @@
FIELDS = {
SUCCESS => {:type => Thrift::Types::BOOL, :name => 'success'}
}
+ def validate
+ end
+
end
class Unblock_args
@@ -159,6 +171,9 @@
FIELDS = {
N => {:type => Thrift::Types::I32, :name => 'n'}
}
+ def validate
+ end
+
end
class Unblock_result
@@ -167,6 +182,9 @@
FIELDS = {
}
+ def validate
+ end
+
end
class Shutdown_args
@@ -175,6 +193,9 @@
FIELDS = {
}
+ def validate
+ end
+
end
class Shutdown_result
@@ -183,6 +204,9 @@
FIELDS = {
}
+ def validate
+ end
+
end
class Sleep_args
@@ -193,6 +217,9 @@
FIELDS = {
SECONDS => {:type => Thrift::Types::DOUBLE, :name => 'seconds'}
}
+ def validate
+ end
+
end
class Sleep_result
@@ -201,6 +228,9 @@
FIELDS = {
}
+ def validate
+ end
+
end
end