class Swalidate::Schema
Attributes
definitions[R]
paths[R]
Public Class Methods
new(file_path)
click to toggle source
# File lib/swalidate/schema.rb, line 5 def initialize(file_path) swagger = Swagger.load(file_path) # TODO: error handling for files @paths = swagger.paths @definitions = swagger.definitions end
Public Instance Methods
endpoint(method, path)
click to toggle source
# File lib/swalidate/schema.rb, line 13 def endpoint(method, path) Swalidate::Endpoint.new(paths[path] && paths[path][method.downcase]) end