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.
701 702 703 |
# File 'lib/rage/configuration.rb', line 701 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.
691 692 693 694 695 696 697 |
# File 'lib/rage/configuration.rb', line 691 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 |