class OpenapiFirst::Definition
Attributes
filepath[R]
operations[R]
Public Class Methods
new(resolved, filepath)
click to toggle source
# File lib/openapi_first/definition.rb, line 9 def initialize(resolved, filepath) @filepath = filepath methods = %w[get head post put patch delete trace options] @operations = resolved['paths'].flat_map do |path, path_item| path_item.slice(*methods).map do |request_method, _operation_object| Operation.new(path, request_method, path_item) end end end