Class: Jsapi::Meta::SecurityScheme::HTTP::Basic
- Inherits:
-
Base
- Object
- Model::Base
- Base
- Jsapi::Meta::SecurityScheme::HTTP::Basic
- Includes:
- OpenAPI::Extensions
- Defined in:
- lib/jsapi/meta/security_scheme/http/basic.rb
Overview
Specifies a security scheme based on HTTP basic authentication.
Instance Method Summary collapse
-
#to_openapi(version) ⇒ Object
Returns a hash representing the OpenAPI security scheme object.
Methods included from OpenAPI::Extensions
Methods inherited from Base
Methods inherited from Model::Base
#initialize, #inspect, #merge!, #reference?, #resolve
Methods included from Model::Attributes
#attributes_frozen?, #freeze_attributes, included
Constructor Details
This class inherits a constructor from Jsapi::Meta::Model::Base
Instance Method Details
#to_openapi(version) ⇒ Object
Returns a hash representing the OpenAPI security scheme object.
12 13 14 15 16 17 18 19 20 |
# File 'lib/jsapi/meta/security_scheme/http/basic.rb', line 12 def to_openapi(version, *) version = OpenAPI::Version.from(version) if version < OpenAPI::V3_0 openapi_security_scheme_object('basic', version) else openapi_security_scheme_object('http', version, scheme: 'basic') end end |