class OasRails::Builders::PathItemBuilder
def build
def build @path_item end
def from_path(path, route_extractor: Extractors::RouteExtractor)
def from_path(path, route_extractor: Extractors::RouteExtractor) route_extractor.host_routes_by_path(path).each do |oas_route| oas_route.verb.downcase.split("|").each do |v| @path_item.add_operation(v, OperationBuilder.new(@specification).from_oas_route(oas_route).build) end end self end
def initialize(specification)
def initialize(specification) @specification = specification @path_item = Spec::PathItem.new(specification) end