Skip to content

Commit 7e22b4b

Browse files
authored
[Erlang-Server] security definition context changes don't propagate to handler (#5751)
* Map Merge Context & Params handler requires context and params to be merged before returned to user defined request_handler. * post build & shell script * Delete VERSION
1 parent 603709e commit 7e22b4b

File tree

5 files changed

+4
-5
lines changed

5 files changed

+4
-5
lines changed

modules/openapi-generator/src/main/resources/erlang-server/handler.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ handle_request_json(
225225
LogicHandler,
226226
OperationID,
227227
Req1,
228-
Populated
228+
maps:merge(State#state.context, Populated)
229229
),
230230
_ = {{packageName}}_api:validate_response(
231231
OperationID,

samples/server/petstore/erlang-server/.openapi-generator/VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.

samples/server/petstore/erlang-server/src/openapi_pet_handler.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ handle_request_json(
456456
LogicHandler,
457457
OperationID,
458458
Req1,
459-
Populated
459+
maps:merge(State#state.context, Populated)
460460
),
461461
_ = openapi_api:validate_response(
462462
OperationID,

samples/server/petstore/erlang-server/src/openapi_store_handler.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ handle_request_json(
251251
LogicHandler,
252252
OperationID,
253253
Req1,
254-
Populated
254+
maps:merge(State#state.context, Populated)
255255
),
256256
_ = openapi_api:validate_response(
257257
OperationID,

samples/server/petstore/erlang-server/src/openapi_user_handler.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ handle_request_json(
304304
LogicHandler,
305305
OperationID,
306306
Req1,
307-
Populated
307+
maps:merge(State#state.context, Populated)
308308
),
309309
_ = openapi_api:validate_response(
310310
OperationID,

0 commit comments

Comments
 (0)