Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-9051

Ability to set the maximum number of values on a WS parameter

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.4
    • Component/s: Web API
    • Labels:

      Description

      The performance of each web service should be under control. It should not consume too much memory (bounded limit) and SQL requests/bandwidth.

      Allowing web services to limit the number of parameter values can help defining a bounded limit on resource consumption.

      Example:

      action.createParam("metricKeys")
            .setRequired(true)
            .setExampleValue("ncloc,complexity,violations")
            // here is the new metadata
            . setMaxValuesAllowed(15)
      

      The call to Request#paramAsStrings(String) fails with a 400 bad-request error if the parameter has more than the maximum number of values. By default there's no limit.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                julien.lancelot Julien Lancelot
                Reporter:
                simon.brandhof Simon Brandhof
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: