Class: DryOpenApi::SecuritySchema

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer
Includes:
EquatableAsContent
Defined in:
lib/dry_open_api/security_schema.rb

Overview

Class Method Summary collapse

Methods included from EquatableAsContent

#==

Class Method Details

.load(hash) ⇒ Object

rubocop:disable Metrics/MethodLength



19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/dry_open_api/security_schema.rb', line 19

def self.load(hash)
  return unless hash

  new(
    type: hash['type'],
    description: hash['description'],
    name: hash['name'],
    in: hash['in'],
    scheme: hash['scheme'],
    bearer_format: hash['bearerFormat'],
    flows: OAuthFlows.load(hash['flows']),
    open_id_connect_url: hash['openIdConnectUrl']
  )
end