Skip to content
GitLab
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
  • !5321

[Java] Fixed defaultValue escaping in Vert.x server template

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/MarcelTon/master into master Feb 14, 2020
  • Overview 0
  • Commits 3
  • Pipelines 0
  • Changes 15

Created by: MarcelTon

Line 55 and 84 were missing the triple-HTLM escape brackets (line 71 had this correctly) leading to code generation such as:

        vertx.eventBus().<JsonObject> consumer(LISTACCOUNTS_SERVICE_ID).handler(message -> {
            try {
                // Workaround for #allParams section clearing the vendorExtensions map
                String serviceId = "listAccounts";
                String emailAddressParam = message.body().getString("emailAddress");
                String emailAddress = (emailAddressParam == null) ? null : emailAddressParam;
                JsonArray profileIdParam = message.body().getJsonArray("profileId");
                List<String> profileId = (profileIdParam == null) ? new ArrayList&lt;&gt;() : Json.mapper.readValue(profileIdParam.encode(),
                    Json.mapper.getTypeFactory().constructCollectionType(List.class, String.class));
                String schoolIdParam = message.body().getString("schoolId");
                String schoolId = (schoolIdParam == null) ? null : schoolIdParam;
                service.listAccounts(emailAddress, profileId, schoolId).subscribe(
                    result -> {
                        message.reply(new JsonArray(Json.encode(result)).encodePrettily());
                    },
                    error -> {
                        manageError(message, error, "listAccounts");
                    });
            } catch (Exception e) {
                logUnexpectedError("listAccounts", e);
                message.fail(MainApiException.INTERNAL_SERVER_ERROR.getStatusCode(), MainApiException.INTERNAL_SERVER_ERROR.getStatusMessage());
            }
        });

Note the ArrayList&lt;&gt;() notation.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/MarcelTon/master