class Openapi3Parser::Validators::ComponentKeys
This validates that the keys of an object match the format of those defined for a Components node. As defined: github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#components-object
Constants
- REGEX
Public Class Methods
call(input)
click to toggle source
# File lib/openapi3_parser/validators/component_keys.rb, line 11 def self.call(input) invalid = input.keys.reject { |key| REGEX.match(key) } "Contains invalid keys: #{invalid.join(', ')}" unless invalid.empty? end