Class: Jsapi::Meta::ServerVariable
- Inherits:
-
Base::Model
- Object
- Base::Model
- Jsapi::Meta::ServerVariable
- Includes:
- OpenAPI::Extensions
- Defined in:
- lib/jsapi/meta/server_variable.rb
Overview
Specifies a server variable object.
Constant Summary
Constants included from Base::Attributes
Base::Attributes::DEFAULT_ARRAY, Base::Attributes::DEFAULT_HASH
Instance Method Summary collapse
-
#default ⇒ Object
:attr: default The default value of the server variable.
-
#description ⇒ Object
:attr: description The description of the server variable.
-
#enum ⇒ Object
:attr: enum The values of the server variable.
-
#to_openapi ⇒ Object
Returns a hash representing the OpenAPI server variable object.
Methods included from OpenAPI::Extensions
#add_openapi_extension, #openapi_extensions, #openapi_extensions=
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
#default ⇒ Object
:attr: default The default value of the server variable.
12 |
# File 'lib/jsapi/meta/server_variable.rb', line 12 attribute :default, String |
#description ⇒ Object
:attr: description The description of the server variable.
17 |
# File 'lib/jsapi/meta/server_variable.rb', line 17 attribute :description, String |
#enum ⇒ Object
:attr: enum The values of the server variable.
22 |
# File 'lib/jsapi/meta/server_variable.rb', line 22 attribute :enum, [String] |
#to_openapi ⇒ Object
Returns a hash representing the OpenAPI server variable object.
25 26 27 28 29 30 31 |
# File 'lib/jsapi/meta/server_variable.rb', line 25 def to_openapi(*) with_openapi_extensions( default: default, enum: enum.presence, description: description ) end |