Class: Apipie::Params::Descriptor::Undef

Inherits:
JsonSchema show all
Defined in:
lib/apipie/params/descriptor.rb

Overview

special type of descriptor: we say that it’s not specified

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from JsonSchema

inherited, #validate!

Methods inherited from Base

#description, find, inherited, #initialize, #invalid_param_error, #to_json

Constructor Details

This class inherits a constructor from Apipie::Params::Descriptor::Base

Class Method Details

.build(argument, options, block) ⇒ Object



295
296
297
298
299
# File 'lib/apipie/params/descriptor.rb', line 295

def self.build(argument, options, block)
  if argument == :undef
    self.new(options)
  end
end

Instance Method Details

#json_schemaObject



301
302
303
# File 'lib/apipie/params/descriptor.rb', line 301

def json_schema
  super.merge('type' => 'any')
end