Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • O openapi-generator
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,476
    • Issues 3,476
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 402
    • Merge requests 402
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • OpenAPI Tools
  • openapi-generator
  • Merge requests
  • !5751

[Erlang-Server] security definition context changes don't propagate to handler

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/ehansen31/erlang-server_fix_context into master 5 years ago
  • Overview 0
  • Commits 3
  • Pipelines 0
  • Changes 5

Created by: ehansen31

erlang-server handler requires context and params to be merged before returned to user defined request_handler. Specifically if using a security definition and passing info into the context, it will not show up in the request handler succeeding the authorization method.

issue: https://github.com/OpenAPITools/openapi-generator/issues/5749

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language. @tsloughter (2017/11) @jfacorro (2018/10) @robertoaloi (2018/10)
Compare
  • master (base)

and
  • latest version
    61c07d82
    3 commits, 2 years ago

5 files
+ 4
- 5

    Preferences

    File browser
    Compare changes
modules/…/…/…/‎…/erlang-server‎
handler.‎mustache‎ +1 -1
samples/server/pet‎store/erlang-server‎
.openapi-‎generator‎
VER‎SION‎ +0 -1
s‎rc‎
openapi_pet‎_handler.erl‎ +1 -1
openapi_stor‎e_handler.erl‎ +1 -1
openapi_user‎_handler.erl‎ +1 -1
modules/openapi-generator/src/main/resources/erlang-server/handler.mustache
+ 1
- 1
  • View file @ 61c07d82

  • Edit in single-file editor

  • Open in Web IDE


@@ -225,7 +225,7 @@ handle_request_json(
LogicHandler,
OperationID,
Req1,
Populated
maps:merge(State#state.context, Populated)
),
_ = {{packageName}}_api:validate_response(
OperationID,
samples/server/petstore/erlang-server/.openapi-generator/VERSION deleted 100644 → 0
+ 0
- 1
  • View file @ 01f02f6c

4.3.0-SNAPSHOT
\ No newline at end of file
samples/server/petstore/erlang-server/src/openapi_pet_handler.erl
+ 1
- 1
  • View file @ 61c07d82

  • Edit in single-file editor

  • Open in Web IDE


@@ -456,7 +456,7 @@ handle_request_json(
LogicHandler,
OperationID,
Req1,
Populated
maps:merge(State#state.context, Populated)
),
_ = openapi_api:validate_response(
OperationID,
samples/server/petstore/erlang-server/src/openapi_store_handler.erl
+ 1
- 1
  • View file @ 61c07d82

  • Edit in single-file editor

  • Open in Web IDE


@@ -251,7 +251,7 @@ handle_request_json(
LogicHandler,
OperationID,
Req1,
Populated
maps:merge(State#state.context, Populated)
),
_ = openapi_api:validate_response(
OperationID,
samples/server/petstore/erlang-server/src/openapi_user_handler.erl
+ 1
- 1
  • View file @ 61c07d82

  • Edit in single-file editor

  • Open in Web IDE


@@ -304,7 +304,7 @@ handle_request_json(
LogicHandler,
OperationID,
Req1,
Populated
maps:merge(State#state.context, Populated)
),
_ = openapi_api:validate_response(
OperationID,
0 Assignees
None
Assign to
0 Reviewers
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
Lock merge request
Unlocked
participants
Reference:
Source branch: github/fork/ehansen31/erlang-server_fix_context

Menu

Explore Projects Groups Snippets