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



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

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

Instance Method Details

#callObject



29
30
31
32
# File 'lib/openapi_validator/path_validator.rb', line 29

def call
  validate_path_exists
  self
end

#empty_schema?Boolean

Returns:

  • (Boolean)


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

def empty_schema?
  @empty_schema || false
end

#fragment(media_type: nil) ⇒ Object



17
18
19
20
21
22
23
# File 'lib/openapi_validator/path_validator.rb', line 17

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

#pathObject



13
14
15
# File 'lib/openapi_validator/path_validator.rb', line 13

def path
  [path_key, method, @schema_code]
end