Class: Jsapi::Meta::Link::Model
- Inherits:
-
Base::Model
- Object
- Base::Model
- Jsapi::Meta::Link::Model
- Includes:
- OpenAPI::Extensions
- Defined in:
- lib/jsapi/meta/link/model.rb
Overview
Specifies a link object.
Constant Summary
Constants included from Base::Attributes
Base::Attributes::DEFAULT_ARRAY, Base::Attributes::DEFAULT_HASH
Instance Method Summary collapse
-
#description ⇒ Object
:attr: description The description of the link.
-
#operation_id ⇒ Object
:attr: operation_id The operation ID.
-
#parameters ⇒ Object
:attr: parameters The parameters to be passed.
-
#request_body ⇒ Object
:attr: request_body The request body to be passed.
-
#server ⇒ Object
:attr: server The Server object.
-
#to_openapi ⇒ Object
Returns a hash representing the OpenAPI link object.
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
#description ⇒ Object
:attr: description The description of the link.
13 |
# File 'lib/jsapi/meta/link/model.rb', line 13 attribute :description, String |
#operation_id ⇒ Object
:attr: operation_id The operation ID.
18 |
# File 'lib/jsapi/meta/link/model.rb', line 18 attribute :operation_id, String |
#parameters ⇒ Object
:attr: parameters The parameters to be passed.
23 |
# File 'lib/jsapi/meta/link/model.rb', line 23 attribute :parameters, { String => Object } |
#request_body ⇒ Object
:attr: request_body The request body to be passed.
28 |
# File 'lib/jsapi/meta/link/model.rb', line 28 attribute :request_body |
#server ⇒ Object
:attr: server The Server object.
33 |
# File 'lib/jsapi/meta/link/model.rb', line 33 attribute :server, Server |
#to_openapi ⇒ Object
Returns a hash representing the OpenAPI link object.
36 37 38 39 40 41 42 43 44 |
# File 'lib/jsapi/meta/link/model.rb', line 36 def to_openapi(*) with_openapi_extensions( operationId: operation_id, parameters: parameters.presence, requestBody: request_body, description: description, server: server&.to_openapi ) end |