lib/sober_swag/compiler/path.rb in sober_swag-0.16.0 vs lib/sober_swag/compiler/path.rb in sober_swag-0.17.0
- old
+ new
@@ -19,10 +19,11 @@
base[:summary] = route.summary if route.summary
base[:description] = route.description if route.description
base[:parameters] = params if params.any?
base[:responses] = responses
base[:requestBody] = request_body if request_body
+ base[:tags] = tags if tags
base
end
def responses # rubocop:disable Metrics/MethodLength
route.response_serializers.map { |status, serializer|
@@ -69,9 +70,15 @@
'application/json': {
schema: compiler.body_for(route.request_body_class)
}
}
}
+ end
+
+ def tags
+ return nil unless route.tags.any?
+
+ route.tags
end
end
end
end