Skip to content

Commit

Permalink
[erlang] Do not export function if not defined. (OpenAPITools#5394)
Browse files Browse the repository at this point in the history
Logic added to logic_handler.mustache so that it does not export authorize_api_key/3 when the function is not defined, leading to compilation error.
  • Loading branch information
cagdass authored and MikailBag committed Mar 23, 2020
1 parent 8fc0978 commit 35a67fe
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
-module({{packageName}}_logic_handler).

-export([handle_request/4]).
{{#authMethods}}
{{#isApiKey}}
-export([authorize_api_key/3]).
{{/isApiKey}}
{{/authMethods}}
{{^authMethods}}
-export([authorize_api_key/3]).
{{/authMethods}}
-type context() :: #{binary() => any()}.
-type handler_response() ::{
Status :: cowboy:http_status(),
Expand Down

0 comments on commit 35a67fe

Please sign in to comment.