Class: Jsapi::Meta::Info
- Inherits:
-
Base::Model
- Object
- Base::Model
- Jsapi::Meta::Info
- Includes:
- OpenAPI::Extensions
- Defined in:
- lib/jsapi/meta/info.rb
Overview
Specifies an info object.
Constant Summary
Constants included from Base::Attributes
Base::Attributes::DEFAULT_ARRAY, Base::Attributes::DEFAULT_HASH
Instance Method Summary collapse
-
#contact ⇒ Object
:attr: contact The Contact object.
-
#description ⇒ Object
:attr: description The description of the API.
-
#license ⇒ Object
:attr: license The License object.
-
#terms_of_service ⇒ Object
:attr: terms_of_service The URL pointing to the terms of service.
-
#title ⇒ Object
:attr: title The title of the API.
-
#to_openapi ⇒ Object
Returns a hash representing the OpenAPI info object.
-
#version ⇒ Object
:attr: version The version of the API.
Methods included from OpenAPI::Extensions
#add_openapi_extension, #openapi_extensions, #openapi_extensions=
Methods inherited from Base::Model
#initialize, #inspect, #merge!, #reference?, #resolve
Methods included from Base::Attributes
Constructor Details
This class inherits a constructor from Jsapi::Meta::Base::Model
Instance Method Details
#contact ⇒ Object
:attr: contact The Contact object.
12 |
# File 'lib/jsapi/meta/info.rb', line 12 attribute :contact, Contact |
#description ⇒ Object
:attr: description The description of the API.
17 |
# File 'lib/jsapi/meta/info.rb', line 17 attribute :description, String |
#license ⇒ Object
:attr: license The License object.
22 |
# File 'lib/jsapi/meta/info.rb', line 22 attribute :license, License |
#terms_of_service ⇒ Object
:attr: terms_of_service The URL pointing to the terms of service.
27 |
# File 'lib/jsapi/meta/info.rb', line 27 attribute :terms_of_service, String |
#title ⇒ Object
:attr: title The title of the API.
32 |
# File 'lib/jsapi/meta/info.rb', line 32 attribute :title, String |
#to_openapi ⇒ Object
Returns a hash representing the OpenAPI info object.
40 41 42 43 44 45 46 47 48 49 |
# File 'lib/jsapi/meta/info.rb', line 40 def to_openapi(*) with_openapi_extensions( title: title, version: version, description: description, termsOfService: terms_of_service, contact: contact&.to_openapi, license: license&.to_openapi ) end |
#version ⇒ Object
:attr: version The version of the API.
37 |
# File 'lib/jsapi/meta/info.rb', line 37 attribute :version, String |