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.
606 607 608 |
# File 'lib/rage/configuration.rb', line 606 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.
596 597 598 599 600 601 602 |
# File 'lib/rage/configuration.rb', line 596 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 |