Sha256: ca99a1ff1db0f5c93ac431e616a7f0134f4f0bb428067d35ac257e95116802d6
Contents?: true
Size: 572 Bytes
Versions: 4
Compression:
Stored size: 572 Bytes
Contents
module OasRails module Builders class PathItemBuilder def initialize(specification) @specification = specification @path_item = Spec::PathItem.new(specification) end def from_path(path, route_extractor: Extractors::RouteExtractor) route_extractor.host_routes_by_path(path).each do |oas_route| @path_item.add_operation(oas_route.verb.downcase, OperationBuilder.new(@specification).from_oas_route(oas_route).build) end self end def build @path_item end end end end
Version data entries
4 entries across 4 versions & 1 rubygems