mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 07:16:40 +00:00
Simplify build of discovery_paths in swagger_ui_controller
This commit is contained in:
@@ -14,7 +14,7 @@ module SwaggerRails
|
||||
@discovery_paths = Hash[
|
||||
swagger_filenames.map do |filename|
|
||||
[
|
||||
"#{root_path.chomp('/')}#{filename.sub(swagger_root, '')}",
|
||||
filename.sub(swagger_root, root_path),
|
||||
load_json(filename)["info"]["title"]
|
||||
]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user