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