Skip to content

Commit

Permalink
fix: swagger & openapi root field
Browse files Browse the repository at this point in the history
  • Loading branch information
DDDHuang committed Jul 1, 2021
1 parent 74cefe7 commit cde966c
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 cde966c

Please sign in to comment.