Module: Committee::SchemaValidator

Defined in:
lib/committee/schema_validator.rb,
lib/committee/schema_validator/option.rb,
lib/committee/schema_validator/open_api_3.rb,
lib/committee/schema_validator/hyper_schema.rb,
lib/committee/schema_validator/open_api_3/router.rb,
lib/committee/schema_validator/hyper_schema/router.rb,
lib/committee/schema_validator/open_api_3/operation_wrapper.rb,
lib/committee/schema_validator/open_api_3/request_validator.rb,
lib/committee/schema_validator/open_api_3/response_validator.rb,
lib/committee/schema_validator/hyper_schema/parameter_coercer.rb,
lib/committee/schema_validator/hyper_schema/request_validator.rb,
lib/committee/schema_validator/hyper_schema/response_generator.rb,
lib/committee/schema_validator/hyper_schema/response_validator.rb,
lib/committee/schema_validator/hyper_schema/string_params_coercer.rb

Defined Under Namespace

Classes: HyperSchema, OpenAPI3, Option

Class Method Summary collapse

Class Method Details

.build_prefix_regexp(prefix) ⇒ Regexp

Parameters:

  • prefix (String)

Returns:

  • (Regexp)


12
13
14
15
16
# File 'lib/committee/schema_validator.rb', line 12

def build_prefix_regexp(prefix)
  return nil unless prefix

  /\A#{Regexp.escape(prefix)}/.freeze
end

.request_media_type(request) ⇒ Object



6
7
8
# File 'lib/committee/schema_validator.rb', line 6

def request_media_type(request)
  request.media_type.to_s
end