Skip to content

Commit

Permalink
[#25] Fix basePath
Browse files Browse the repository at this point in the history
  • Loading branch information
harenson committed Dec 2, 2015
1 parent 65c80dc commit baf0b34
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cowboy_swagger.erl
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ to_json(Trails) ->
GlobalSpec = normalize_map_values(
application:get_env(cowboy_swagger, global_spec, Default)),
SanitizeTrails = filter_cowboy_swagger_handler(Trails),
ApiRoot = list_to_binary(trails:api_root()),
SwaggerSpec = GlobalSpec#{paths => swagger_paths(SanitizeTrails),
basePath => trails:api_root()},
basePath => ApiRoot},
enc_json(SwaggerSpec).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down

0 comments on commit baf0b34

Please sign in to comment.