Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-51626

links generate/force lowercase names (remove camelCase syntax)

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Minor Minor
    • blueocean-plugin
    • None
    • Blue Ocean - 1.6 - beta 4

      Use case a new method without @Exported annotation to avoid heavy calculation per default.

          @Navigable
          public abstract Container<BlueTestSummary> getTestSummaryContainer();
      

      The generated link is

          "testsummarycontainer" : {
            "_class" : "io.jenkins.blueocean.rest.hal.Link",
            "href" : "/blue/rest/organizations/jenkins/pipelines/jetty.project/branches/PR-2512/runs/4/testsummarycontainer/"
          }
      

      But in order to work the rest call need to be:

      /blue/rest/organizations/jenkins/pipelines/jetty.project/branches/PR-2512/runs/4/testSummaryContainer
      

      Otherwise method not found.
      Solutions:

      1. change Links#getPathFromMethodName to remove the toLowercase for the whole name and force lower case only first character for camel case purpose
      2. add attribute name in @Navigable so we use something similar to @Exported

      I'm voting 2 to keep backward compat as 1 may change few method names

            olamy Olivier Lamy
            olamy Olivier Lamy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: