Class: Jsapi::Meta::OpenAPI::License

Inherits:
Base
  • Object
show all
Defined in:
lib/jsapi/meta/openapi/license.rb

Overview

Represents a license object.

Instance Method Summary collapse

Methods inherited from Base

#initialize, #inspect, #reference?, #resolve

Methods included from Attributes::ClassMethods

#attribute, #attribute_names

Constructor Details

This class inherits a constructor from Jsapi::Meta::Base

Instance Method Details

#nameObject

:attr: name The name of the license.



11
# File 'lib/jsapi/meta/openapi/license.rb', line 11

attribute :name, String

#to_openapiObject

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

#urlObject

:attr: url The optional URL of the license.



16
# File 'lib/jsapi/meta/openapi/license.rb', line 16

attribute :url, String