Class: Jsapi::Meta::OpenAPI::Tag
- Defined in:
- lib/jsapi/meta/openapi/tag.rb
Overview
Represents a tag object.
Instance Method Summary collapse
-
#description ⇒ Object
:attr: description The description of the tag.
-
#external_docs ⇒ Object
:attr: external_docs The ExternalDocumentation object.
-
#name ⇒ Object
:attr: name The name of the tag.
-
#to_openapi ⇒ Object
Returns a hash representing the tag object.
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
#description ⇒ Object
:attr: description The description of the tag.
11 |
# File 'lib/jsapi/meta/openapi/tag.rb', line 11 attribute :description, String |
#external_docs ⇒ Object
:attr: external_docs The ExternalDocumentation object.
16 |
# File 'lib/jsapi/meta/openapi/tag.rb', line 16 attribute :external_docs, ExternalDocumentation |
#name ⇒ Object
:attr: name The name of the tag.
21 |
# File 'lib/jsapi/meta/openapi/tag.rb', line 21 attribute :name, String |
#to_openapi ⇒ Object
Returns a hash representing the tag object.
24 25 26 27 28 29 30 |
# File 'lib/jsapi/meta/openapi/tag.rb', line 24 def to_openapi(*) { name: name, description: description, externalDocs: external_docs&.to_openapi }.compact end |