From d62a4274204775a06549846e38254219fcb6d858 Mon Sep 17 00:00:00 2001 From: Roman Blanco Date: Sat, 16 Dec 2023 18:38:49 +0000 Subject: [PATCH] fix: rebranding Swagger to OpenAPI --- README.md | 2 +- .../lib/generators/rswag/api/install/templates/rswag_api.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index af100709..bb7f4833 100644 --- a/README.md +++ b/README.md @@ -1144,7 +1144,7 @@ bundle exec rake rswag:ui:copy_assets[public/api-docs] __NOTE:__: The provided subfolder MUST correspond to the UI mount prefix - "api-docs" by default. -Notes to test swagger output locally with swagger editor +Notes to test OpenAPI output locally with Swagger editor ``` docker pull swaggerapi/swagger-editor ``` diff --git a/rswag-api/lib/generators/rswag/api/install/templates/rswag_api.rb b/rswag-api/lib/generators/rswag/api/install/templates/rswag_api.rb index 3591a4aa..f0271af2 100644 --- a/rswag-api/lib/generators/rswag/api/install/templates/rswag_api.rb +++ b/rswag-api/lib/generators/rswag/api/install/templates/rswag_api.rb @@ -6,9 +6,9 @@ # that it's configured to generate files in the same folder c.openapi_root = Rails.root.to_s + '/openapi' - # Inject a lambda function to alter the returned Swagger prior to serialization + # Inject a lambda function to alter the returned OpenAPI prior to serialization # The function will have access to the rack env for the current request # For example, you could leverage this to dynamically assign the "host" property # - #c.swagger_filter = lambda { |swagger, env| swagger['host'] = env['HTTP_HOST'] } + #c.openapi_filter = lambda { |swagger, env| swagger['host'] = env['HTTP_HOST'] } end