Class: Jsapi::Meta::OpenAPI::ExternalDocumentation

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

Overview

Represents an external documentation 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

#descriptionObject

:attr: description The optional description of the external documentation.



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

attribute :description, String

#to_openapiObject

Returns a hash representing the external documentation object.



19
20
21
22
23
24
# File 'lib/jsapi/meta/openapi/external_documentation.rb', line 19

def to_openapi(*)
  {
    url: url,
    description: description
  }.compact
end

#urlObject

:attr: url The URL of the external documentation.



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

attribute :url, String