Class: Committee::Drivers::Driver

Inherits:
Object
  • Object
show all
Defined in:
lib/committee/drivers.rb

Overview

Driver is a base class for driver implementations.

Direct Known Subclasses

HyperSchema, OpenAPI2, OpenAPI3

Instance Method Summary collapse

Instance Method Details

#default_allow_get_bodyObject

Use GET request body to request parameter (request body merge to parameter)



72
73
74
# File 'lib/committee/drivers.rb', line 72

def default_allow_get_body
  raise "needs implementation"
end

#default_coerce_form_paramsObject

Whether parameters that were form-encoded will be coerced by default.



67
68
69
# File 'lib/committee/drivers.rb', line 67

def default_coerce_form_params
  raise "needs implementation"
end

#default_path_paramsObject

Whether parameters in a request’s path will be considered and coerced by default.



78
79
80
# File 'lib/committee/drivers.rb', line 78

def default_path_params
  raise "needs implementation"
end

#default_query_paramsObject

Whether parameters in a request’s query string will be considered and coerced by default.



84
85
86
# File 'lib/committee/drivers.rb', line 84

def default_query_params
  raise "needs implementation"
end

#nameObject



88
89
90
# File 'lib/committee/drivers.rb', line 88

def name
  raise "needs implementation"
end

#parse(data) ⇒ Object

Parses an API schema and builds a set of route definitions for use with Committee.

The expected input format is a data hash with keys as strings (as opposed to symbols) like the kind produced by JSON.parse or YAML.load.



97
98
99
# File 'lib/committee/drivers.rb', line 97

def parse(data)
  raise "needs implementation"
end

#schema_classObject



101
102
103
# File 'lib/committee/drivers.rb', line 101

def schema_class
  raise "needs implementation"
end