Method: OpenApi::SecuritySchema.load

Defined in:
lib/open_api/security_schema.rb

.load(hash) ⇒ Object



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

def self.load(hash)
  return unless hash

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