Class: Rswag::Api::Configuration
- Inherits:
-
Object
- Object
- Rswag::Api::Configuration
- Defined in:
- lib/rswag/api/configuration.rb
Instance Attribute Summary collapse
-
#openapi_root ⇒ Object
Returns the value of attribute openapi_root.
-
#swagger_filter ⇒ Object
Returns the value of attribute swagger_filter.
-
#swagger_headers ⇒ Object
Returns the value of attribute swagger_headers.
Instance Method Summary collapse
Instance Attribute Details
#openapi_root ⇒ Object
Returns the value of attribute openapi_root.
4 5 6 |
# File 'lib/rswag/api/configuration.rb', line 4 def openapi_root @openapi_root end |
#swagger_filter ⇒ Object
Returns the value of attribute swagger_filter.
4 5 6 |
# File 'lib/rswag/api/configuration.rb', line 4 def swagger_filter @swagger_filter end |
#swagger_headers ⇒ Object
Returns the value of attribute swagger_headers.
4 5 6 |
# File 'lib/rswag/api/configuration.rb', line 4 def swagger_headers @swagger_headers end |
Instance Method Details
#resolve_openapi_root(env) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/rswag/api/configuration.rb', line 6 def resolve_openapi_root(env) path_params = env['action_dispatch.request.path_parameters'] || {} if path_params.key?(:swagger_root) Rswag::Api.deprecator.warn( 'swagger_root is deprecated and will be removed from rswag-api 3.0 (use openapi_root instead)' ) return path_params[:swagger_root] end path_params[:openapi_root] || openapi_root end |