mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-22 22:06:43 +00:00
Simplify build of discovery_paths in swagger_ui_controller
This commit is contained in:
parent
7a01babe01
commit
1068e6c7a6
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user