Class: Rage::Configuration::OpenAPI
- Inherits:
-
Object
- Object
- Rage::Configuration::OpenAPI
- Defined in:
- lib/rage/configuration.rb
Instance Method Summary collapse
-
#tag_resolver ⇒ #call?
Returns the OpenAPI tag resolver used by Rage.
-
#tag_resolver=(tag_resolver) ⇒ Object
Specify the rules to customize how OpenAPI tags are generated for API operations.
Instance Method Details
#tag_resolver ⇒ #call?
Returns the OpenAPI tag resolver used by Rage.
598 599 600 |
# File 'lib/rage/configuration.rb', line 598 def tag_resolver @tag_resolver end |
#tag_resolver=(tag_resolver) ⇒ Object
Specify the rules to customize how OpenAPI tags are generated for API operations. The method accepts a callable object that receives the controller class, the action name (as a symbol), and the original tag generated by Rage. The callable should return a string or an array of strings representing the tags to use for the API operation. This enables grouping endpoints in the OpenAPI documentation according to your application’s needs.
588 589 590 591 592 593 594 |
# File 'lib/rage/configuration.rb', line 588 def tag_resolver=(tag_resolver) unless tag_resolver.respond_to?(:call) raise ArgumentError, "Custom tag resolver should respond to `#call`" end @tag_resolver = tag_resolver end |