170
171
172
173
174
175
176
177
178
179
180
181
|
# File 'lib/xclarity_client/schemas.rb', line 170
def self.validate_input(schema_name, data)
x = JSON::Validator.fully_validate(self::REQ_SCHEMA[schema_name], data)
unless x.empty?
errmsg = "input validation failed for data #{data}"
$lxca_log.error('XClarityClient::Schemas validate_input', errmsg.to_s)
g = ''
x.each do |k|
$lxca_log.error('XClarityClient::Schemas validate_input', k)
g << "#{k}, "
end; return { :result => 'Input validation failed', :message => g }
end; return { :result => 'success' }
end
|