Skip to content

Commit

Permalink
Merge pull request #133 from DDDHuang/root_field
Browse files Browse the repository at this point in the history
fix: swagger & openapi root field
  • Loading branch information
elbrujohalcon committed Jul 1, 2021
2 parents 74cefe7 + cde966c commit 6e84650
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/cowboy_swagger.erl
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,8 @@ normalize_list_values(List) ->
lists:foldr(F, [], List).

%% @private
create_swagger_spec(#{swagger := _Version} = GlobalSpec, SanitizeTrails) ->
GlobalSpec#{paths => swagger_paths(SanitizeTrails)};
create_swagger_spec(#{openapi := _Version} = GlobalSpec, SanitizeTrails) ->
GlobalSpec#{paths => swagger_paths(SanitizeTrails)};
create_swagger_spec(GlobalSpec, SanitizeTrails) ->
Expand Down

0 comments on commit 6e84650

Please sign in to comment.