Class: Jsapi::Meta::SecurityScheme::APIKey
- Inherits:
-
Base
- Object
- Base::Model
- Base
- Jsapi::Meta::SecurityScheme::APIKey
- Includes:
- OpenAPI::Extensions
- Defined in:
- lib/jsapi/meta/security_scheme/api_key.rb
Overview
Specifies a security scheme based on an API key.
Constant Summary
Constants included from Base::Attributes
Base::Attributes::DEFAULT_ARRAY, Base::Attributes::DEFAULT_HASH
Instance Method Summary collapse
-
#in ⇒ Object
:attr: in The location of the API key.
-
#name ⇒ Object
:attr: name The name of the header, query parameter or cookie the API key is sent by.
-
#to_openapi ⇒ Object
Returns a hash representing the OpenAPI security scheme object.
Methods included from OpenAPI::Extensions
#add_openapi_extension, #openapi_extensions, #openapi_extensions=
Methods inherited from Base
Methods inherited from Base::Model
#initialize, #inspect, #merge!, #reference?, #resolve
Methods included from Base::Attributes
Constructor Details
This class inherits a constructor from Jsapi::Meta::Base::Model
Instance Method Details
#in ⇒ Object
:attr: in The location of the API key. Possible values are:
-
"cookie"
-
"header"
-
"query"
18 |
# File 'lib/jsapi/meta/security_scheme/api_key.rb', line 18 attribute :in, String, values: %w[cookie header query] |
#name ⇒ Object
:attr: name The name of the header, query parameter or cookie the API key is sent by.
24 |
# File 'lib/jsapi/meta/security_scheme/api_key.rb', line 24 attribute :name, String |
#to_openapi ⇒ Object
Returns a hash representing the OpenAPI security scheme object.
27 28 29 30 31 32 33 34 |
# File 'lib/jsapi/meta/security_scheme/api_key.rb', line 27 def to_openapi(*) with_openapi_extensions( type: 'apiKey', name: name, in: self.in, description: description ) end |