Class: Jsapi::Meta::Tag
- Inherits:
-
Jsapi::Model::Base
- Object
- Jsapi::Model::Base
- Jsapi::Meta::Tag
- Includes:
- OpenAPI::Extensions
- Defined in:
- lib/jsapi/meta/tag.rb
Overview
Specifies a tag.
Instance Method Summary collapse
-
#description ⇒ Object
:attr: description The description of the tag.
-
#external_docs ⇒ Object
:attr: external_docs The ExternalDocumentation object.
-
#kind ⇒ Object
:attr: kind The category of the tag.
-
#name ⇒ Object
:attr: name The name of the tag.
-
#parent ⇒ Object
:attr: parent The name of the parent tag.
-
#summary ⇒ Object
:attr: summary The short summary of the tag.
-
#to_openapi(version) ⇒ Object
Returns a hash representing the OpenAPI tag object.
Methods included from OpenAPI::Extensions
Methods inherited from Jsapi::Model::Base
#==, #errors, #initialize, #inspect, model_name, #respond_to_missing?
Constructor Details
This class inherits a constructor from Jsapi::Model::Base
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Jsapi::Model::Base
Instance Method Details
#description ⇒ Object
:attr: description The description of the tag.
12 |
# File 'lib/jsapi/meta/tag.rb', line 12 attribute :description, String |
#external_docs ⇒ Object
:attr: external_docs The ExternalDocumentation object.
17 |
# File 'lib/jsapi/meta/tag.rb', line 17 attribute :external_docs, ExternalDocumentation |
#kind ⇒ Object
:attr: kind The category of the tag. Applies to OpenAPI 3.2 and higher.
22 |
# File 'lib/jsapi/meta/tag.rb', line 22 attribute :kind, String |
#name ⇒ Object
:attr: name The name of the tag.
27 |
# File 'lib/jsapi/meta/tag.rb', line 27 attribute :name, String |
#parent ⇒ Object
:attr: parent The name of the parent tag. Applies to OpenAPI 3.2 and higher.
32 |
# File 'lib/jsapi/meta/tag.rb', line 32 attribute :parent, String |
#summary ⇒ Object
:attr: summary The short summary of the tag. Applies to OpenAPI 3.2 and higher.
37 |
# File 'lib/jsapi/meta/tag.rb', line 37 attribute :summary, String |
#to_openapi(version) ⇒ Object
Returns a hash representing the OpenAPI tag object.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/jsapi/meta/tag.rb', line 40 def to_openapi(version, *) version = OpenAPI::Version.from(version) with_openapi_extensions( if version >= OpenAPI::V3_2 { name: name, summary: summary, description: description, externalDocs: external_docs&.to_openapi, parent: parent, kind: kind } else { name: name, description: description, externalDocs: external_docs&.to_openapi } end ) end |