Class: OpenApiAnnotator::NullableValidator

Inherits:
Object
  • Object
show all
Defined in:
lib/open_api_annotator/nullable_validator.rb

Instance Method Summary collapse

Instance Method Details

#validate!(nullable) ⇒ Object



3
4
5
6
7
# File 'lib/open_api_annotator/nullable_validator.rb', line 3

def validate!(nullable)
  if nullable.nil?
    raise ValidationError, "nullable should not be nil."
  end
end