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.
649 650 651 |
# File 'lib/rage/configuration.rb', line 649 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.
639 640 641 642 643 644 645 |
# File 'lib/rage/configuration.rb', line 639 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 |