Class: OpenApi::SecuritySchema
- Inherits:
-
Object
- Object
- OpenApi::SecuritySchema
- Includes:
- EquatableAsContent
- Defined in:
- lib/open_api/security_schema.rb
Overview
Instance Attribute Summary collapse
-
#bearer_format ⇒ Object
Returns the value of attribute bearer_format.
-
#description ⇒ Object
Returns the value of attribute description.
-
#flows ⇒ Object
Returns the value of attribute flows.
-
#in ⇒ Object
Returns the value of attribute in.
-
#name ⇒ Object
Returns the value of attribute name.
-
#open_id_connect_url ⇒ Object
Returns the value of attribute open_id_connect_url.
-
#scheme ⇒ Object
Returns the value of attribute scheme.
-
#type ⇒ Object
Returns the value of attribute type.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(type:, description: nil, name:, in:, scheme:, bearer_format: nil, flows:, open_id_connect_url:) ⇒ SecuritySchema
constructor
A new instance of SecuritySchema.
Methods included from EquatableAsContent
Constructor Details
#initialize(type:, description: nil, name:, in:, scheme:, bearer_format: nil, flows:, open_id_connect_url:) ⇒ SecuritySchema
Returns a new instance of SecuritySchema.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/open_api/security_schema.rb', line 8 def initialize(type:, description: nil, name:, in:, scheme:, bearer_format: nil, flows:, open_id_connect_url:) self.type = type self.description = description self.name = name self.in = binding.local_variable_get(:in) self.scheme = scheme self.bearer_format = bearer_format self.flows = flows self.open_id_connect_url = open_id_connect_url end |
Instance Attribute Details
#bearer_format ⇒ Object
Returns the value of attribute bearer_format.
6 7 8 |
# File 'lib/open_api/security_schema.rb', line 6 def bearer_format @bearer_format end |
#description ⇒ Object
Returns the value of attribute description.
6 7 8 |
# File 'lib/open_api/security_schema.rb', line 6 def description @description end |
#flows ⇒ Object
Returns the value of attribute flows.
6 7 8 |
# File 'lib/open_api/security_schema.rb', line 6 def flows @flows end |
#in ⇒ Object
Returns the value of attribute in.
6 7 8 |
# File 'lib/open_api/security_schema.rb', line 6 def in @in end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/open_api/security_schema.rb', line 6 def name @name end |
#open_id_connect_url ⇒ Object
Returns the value of attribute open_id_connect_url.
6 7 8 |
# File 'lib/open_api/security_schema.rb', line 6 def open_id_connect_url @open_id_connect_url end |
#scheme ⇒ Object
Returns the value of attribute scheme.
6 7 8 |
# File 'lib/open_api/security_schema.rb', line 6 def scheme @scheme end |
#type ⇒ Object
Returns the value of attribute type.
6 7 8 |
# File 'lib/open_api/security_schema.rb', line 6 def type @type end |
Class Method Details
.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 |