Class: Jsapi::DSL::OpenAPI::Callback
- Defined in:
- lib/jsapi/dsl/openapi/callback.rb
Overview
Used to specify details of a callback.
Instance Method Summary collapse
-
#operation(expression, **keywords, &block) ⇒ Object
Defines a callback operation.
Methods inherited from Node
#initialize, #method_missing, #respond_to_missing?
Constructor Details
This class inherits a constructor from Jsapi::DSL::Node
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Jsapi::DSL::Node
Instance Method Details
#operation(expression, **keywords, &block) ⇒ Object
Defines a callback operation.
operation '{$request.query.foo}' do
parameter 'bar', type: 'string'
end
14 15 16 17 18 19 |
# File 'lib/jsapi/dsl/openapi/callback.rb', line 14 def operation(expression, **keywords, &block) _define('operation', expression.inspect) do operation_model = .add_operation(expression, keywords) Operation.new(operation_model, &block) if block end end |