Class: Jsapi::Meta::OpenAPI::License
- Defined in:
- lib/jsapi/meta/openapi/license.rb
Overview
Represents a license object.
Instance Method Summary collapse
-
#name ⇒ Object
:attr: name The name of the license.
-
#to_openapi ⇒ Object
Returns a hash representing the license object.
-
#url ⇒ Object
:attr: url The optional URL of the license.
Methods inherited from Base
#initialize, #inspect, #reference?, #resolve
Methods included from Attributes::ClassMethods
Constructor Details
This class inherits a constructor from Jsapi::Meta::Base
Instance Method Details
#name ⇒ Object
:attr: name The name of the license.
11 |
# File 'lib/jsapi/meta/openapi/license.rb', line 11 attribute :name, String |
#to_openapi ⇒ Object
Returns a hash representing the license object.
19 20 21 22 23 24 |
# File 'lib/jsapi/meta/openapi/license.rb', line 19 def to_openapi(*) { name: name, url: url }.compact end |
#url ⇒ Object
:attr: url The optional URL of the license.
16 |
# File 'lib/jsapi/meta/openapi/license.rb', line 16 attribute :url, String |