Class: RailsAutodoc::OperationAnnotation
- Inherits:
-
Object
- Object
- RailsAutodoc::OperationAnnotation
- Defined in:
- lib/rails_autodoc/registry.rb
Instance Attribute Summary collapse
-
#action ⇒ Object
Returns the value of attribute action.
-
#body_params ⇒ Object
Returns the value of attribute body_params.
-
#controller ⇒ Object
Returns the value of attribute controller.
-
#deprecated ⇒ Object
Returns the value of attribute deprecated.
-
#description ⇒ Object
Returns the value of attribute description.
-
#exclude ⇒ Object
Returns the value of attribute exclude.
-
#query_params ⇒ Object
Returns the value of attribute query_params.
-
#request_body_schema ⇒ Object
Returns the value of attribute request_body_schema.
-
#responses ⇒ Object
Returns the value of attribute responses.
-
#security ⇒ Object
Returns the value of attribute security.
-
#summary ⇒ Object
Returns the value of attribute summary.
-
#tags ⇒ Object
Returns the value of attribute tags.
Instance Method Summary collapse
-
#initialize(controller:, action:) ⇒ OperationAnnotation
constructor
A new instance of OperationAnnotation.
- #operation_id ⇒ Object
Constructor Details
#initialize(controller:, action:) ⇒ OperationAnnotation
Returns a new instance of OperationAnnotation.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/rails_autodoc/registry.rb', line 18 def initialize(controller:, action:) @controller = controller @action = action @summary = nil @description = nil @tags = [] @deprecated = false @body_params = [] @query_params = [] @responses = {} @security = nil @request_body_schema = nil @exclude = false end |
Instance Attribute Details
#action ⇒ Object
Returns the value of attribute action.
5 6 7 |
# File 'lib/rails_autodoc/registry.rb', line 5 def action @action end |
#body_params ⇒ Object
Returns the value of attribute body_params.
5 6 7 |
# File 'lib/rails_autodoc/registry.rb', line 5 def body_params @body_params end |
#controller ⇒ Object
Returns the value of attribute controller.
5 6 7 |
# File 'lib/rails_autodoc/registry.rb', line 5 def controller @controller end |
#deprecated ⇒ Object
Returns the value of attribute deprecated.
5 6 7 |
# File 'lib/rails_autodoc/registry.rb', line 5 def deprecated @deprecated end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/rails_autodoc/registry.rb', line 5 def description @description end |
#exclude ⇒ Object
Returns the value of attribute exclude.
5 6 7 |
# File 'lib/rails_autodoc/registry.rb', line 5 def exclude @exclude end |
#query_params ⇒ Object
Returns the value of attribute query_params.
5 6 7 |
# File 'lib/rails_autodoc/registry.rb', line 5 def query_params @query_params end |
#request_body_schema ⇒ Object
Returns the value of attribute request_body_schema.
5 6 7 |
# File 'lib/rails_autodoc/registry.rb', line 5 def request_body_schema @request_body_schema end |
#responses ⇒ Object
Returns the value of attribute responses.
5 6 7 |
# File 'lib/rails_autodoc/registry.rb', line 5 def responses @responses end |
#security ⇒ Object
Returns the value of attribute security.
5 6 7 |
# File 'lib/rails_autodoc/registry.rb', line 5 def security @security end |
#summary ⇒ Object
Returns the value of attribute summary.
5 6 7 |
# File 'lib/rails_autodoc/registry.rb', line 5 def summary @summary end |
#tags ⇒ Object
Returns the value of attribute tags.
5 6 7 |
# File 'lib/rails_autodoc/registry.rb', line 5 def @tags end |
Instance Method Details
#operation_id ⇒ Object
33 34 35 |
# File 'lib/rails_autodoc/registry.rb', line 33 def operation_id "#{controller.name.underscore.tr('/', '_')}_#{action}" end |