41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
# File 'lib/rspec/rails/swagger/helpers.rb', line 41
def path template, attributes = {}, &block
attributes.symbolize_keys!
raise ArgumentError, "Path must start with a /" unless template.starts_with?('/')
meta = {
swagger_object: :path_item,
swagger_doc: attributes[:swagger_doc] || default_document,
swagger_path_item: {path: template},
}
if attributes[:tags]
meta[:tags] = (metadata.try(:[], :tags) || []) + attributes[:tags]
end
describe(template, meta, &block)
end
|