forked from loafle/openapi-generator-original
[erlang] Do not export function if not defined. (#5394)
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.
This commit is contained in:
parent
04cad77caa
commit
8f738a9b41
@ -1,7 +1,14 @@
|
|||||||
-module({{packageName}}_logic_handler).
|
-module({{packageName}}_logic_handler).
|
||||||
|
|
||||||
-export([handle_request/4]).
|
-export([handle_request/4]).
|
||||||
|
{{#authMethods}}
|
||||||
|
{{#isApiKey}}
|
||||||
-export([authorize_api_key/3]).
|
-export([authorize_api_key/3]).
|
||||||
|
{{/isApiKey}}
|
||||||
|
{{/authMethods}}
|
||||||
|
{{^authMethods}}
|
||||||
|
-export([authorize_api_key/3]).
|
||||||
|
{{/authMethods}}
|
||||||
-type context() :: #{binary() => any()}.
|
-type context() :: #{binary() => any()}.
|
||||||
-type handler_response() ::{
|
-type handler_response() ::{
|
||||||
Status :: cowboy:http_status(),
|
Status :: cowboy:http_status(),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user