Method: Intrinsic::ViolatedPolicyObject.validate_raw
- Defined in:
- lib/intrinsic/types/violated_policy_object.rb
.validate_raw(obj:) ⇒ Void
Leveraged for Union-type generation, validate_raw attempts to parse the given hash and check each fields type against the current object’s property definitions.
58 59 60 61 62 63 64 |
# File 'lib/intrinsic/types/violated_policy_object.rb', line 58 def self.validate_raw(obj:) obj.object.is_a?(String) != false || raise("Passed value for field obj.object is not the expected type, validation failed.") obj.id.is_a?(String) != false || raise("Passed value for field obj.id is not the expected type, validation failed.") obj.version_id&.is_a?(String) != false || raise("Passed value for field obj.version_id is not the expected type, validation failed.") obj.name.is_a?(String) != false || raise("Passed value for field obj.name is not the expected type, validation failed.") obj.explanation.is_a?(String) != false || raise("Passed value for field obj.explanation is not the expected type, validation failed.") end |