Sha256: 9d017cc340170a368ffa03f22b3b81d19ef16d9d8211d402b99b3fdc6863f77c
Contents?: true
Size: 623 Bytes
Versions: 11
Compression:
Stored size: 623 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| 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 build @path_item end end end end
Version data entries
11 entries across 11 versions & 1 rubygems