class RatPackSwagger::JsonBodyValidator

Attributes

schema[R]

Public Class Methods

new(schema) click to toggle source
# File lib/request_validators.rb, line 34
def initialize(schema)
  @schema = schema
end

Public Instance Methods

validate(body) click to toggle source
# File lib/request_validators.rb, line 37
def validate(body)
  ::JSON::Validator.validate!(@schema, body)
end