Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-102720

Schema using another with validation does not validate

    Details

    • Fix Priority:
      3

      Description

      Steps to reproduce:

      1. Create a content page
      2. Add a button and publish
      3. Create an AB Test
      4. Create a variant
      5. Run AB Test
      6. Execute curl:
      curl -X POST \curl -X POST \  http://localhost:8080/o/segments-asah/v1.0/experiments/{experimentKey}/run \  -H 'Content-Type: application/json' \  --user test@liferay.com:test \  -d '{ "confidenceLevel": 67, "experimentVariants": [ { "id": "39702", "trafficSplit": 0 } ]}' 

      Expected result:

      TrafficSplit has a @DecimalMin and @DecimalMax validation but this validation is never triggered.

      Actual Result:

      TrafficSplit validates with @DecimalMin and @DecimalMax validation.

      Possible Solution:

      If one schema uses another with validation, the field in the first schema should have @Valid. For example, ExperimentRun uses ExperimentVariant that has a validation:

      @Schema
      @Valid
      public ExperimentVariant[] getExperimentVariants() {
         return experimentVariants;
      } 

        Attachments

          Activity

            People

            • Assignee:
              javier.gamarra Javier Gamarra
              Reporter:
              sarai.diaz Sarai Diaz
              Participants of an Issue:
              Recent user:
              Clarissa Velazquez
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                33 weeks, 2 days ago

                Packages

                Version Package
                7.2.10 DXP FP3
                Master