5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# File 'lib/grape-swagger/doc_methods/parse_params.rb', line 5
def call(param, settings, route)
path = route.path
method = route.request_method
additional_documentation = settings.fetch(:documentation, {})
settings.merge!(additional_documentation)
data_type = GrapeSwagger::DocMethods::DataType.call(settings)
value_type = settings.merge(data_type: data_type, path: path, param_name: param, method: method)
@parsed_param = {
in: param_type(value_type),
name: settings[:full_name] || param
}
document_description(settings)
document_type_and_format(data_type)
document_array_param(value_type)
document_default_value(settings)
document_range_values(settings)
document_required(settings)
@parsed_param
end
|