Uploaded image for project: 'Talend Component Kit'
  1. Talend Component Kit
  2. TCOMP-1960

JsonSchema validation regression with the RequiredValidation ext impl

Apply templateInsert Lucidchart Diagram
    XMLWordPrintable

Details

    • All
    • Small

    Description

      This commit comes with a regression in the JsonSchema validation https://github.com/Talend/component-runtime/commit/f2275141273e82a13ea122b3838c1bf17bc35cd1

       

      Before the change, and by using the RequiredValidation from johnzon, if a required parameter is missing, an error is raised thanks to that "isNull" line of code (https://github.com/apache/johnzon/blob/master/johnzon-jsonschema/src/main/java/org/apache/johnzon/jsonschema/spi/builtin/RequiredValidation.java#L61). With our own implementation, we filter out the 'null' element from the required list, by using this 'isPresent' method (https://github.com/Talend/component-runtime/blob/master/component-form/component-form-core/src/main/java/org/talend/sdk/component/form/internal/validation/spi/ext/RequiredValidation.java#L64).

       

      With the Johnzon implementation, a @Required element which were missing returns a ValidationError. With our own implementation, it's not longer the case.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              rdubois Rémy DUBOIS
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: