Class: OpenapiValidator::PathValidator

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/openapi_validator/path_validator.rb

Defined Under Namespace

Classes: Error

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.call(**params) ⇒ Object



21
22
23
# File 'lib/openapi_validator/path_validator.rb', line 21

def self.call(**params)
  new(**params).call
end

Instance Method Details

#callObject



25
26
27
28
# File 'lib/openapi_validator/path_validator.rb', line 25

def call
  validate_path_exists
  self
end

#fragmentObject



13
14
15
16
17
18
19
# File 'lib/openapi_validator/path_validator.rb', line 13

def fragment
  build_fragment.tap do |array|
    array.define_singleton_method(:split) do |_|
      self
    end
  end
end

#pathObject



9
10
11
# File 'lib/openapi_validator/path_validator.rb', line 9

def path
  [path_key, method, @schema_code]
end