Method: OpenapiClient::Document#list_invalid_properties
- Defined in:
- lib/openapi_client/models/document.rb
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/openapi_client/models/document.rb', line 88 def list_invalid_properties invalid_properties = Array.new if @type.nil? invalid_properties.push('invalid value for "type", type cannot be nil.') end if @number.nil? invalid_properties.push('invalid value for "number", number cannot be nil.') end if @number.to_s.length > 30 invalid_properties.push('invalid value for "number", the character length must be smaller than or equal to 30.') end pattern = Regexp.new(/^(?!\s*$).+/) if @number !~ pattern invalid_properties.push("invalid value for \"number\", must conform to the pattern #{pattern}.") end invalid_properties end |