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

Add support for validation of configuration when creating or importing fragments

    Details

      Description

      Context

      When web developers are defining the configuration of a fragment using the required JSON format, it is easy for them to make accidental mistakes. The purpose of this story is to provide validation of the configuration definition providing accurate information about any errors.

      Note: The FieldSet label should be optional and the field names must be unique.

      Acceptance Criteria

      1. Configuration validation with Fragment Toolkit with a valid configuration

      • Given a fragment with a valid configuration,
      • when the fragment is imported with the fragment toolkit, 
      • then the import succeeds
      • and the configuration is imported along with the fragment code.

      2. Configuration validation with Fragment Toolkit with an invalid configuration

      • Given a fragment with an invalid configuration,
      • when the fragment is imported with the fragment toolkit,
      • then the import fails
      • and an error message is show informing the developer of the error.

      3. Configuration validation in Fragment Editor with an invalid configuration is previewed

      • Given a fragment with an invalid configuration,
      • when the fragment is previewed in the preview pane,
      • then the preview pane shows an error message is show informing the developer of the error.

      4. Configuration validation in Fragment Editor with an invalid configuration cannot be saved

      • Given a fragment with an invalid configuration,
      • when the fragment is saved with the fragment toolkit,
      • then the save fails informing the user that there is an error**

      Technical details

      • It's recommended to use JSON schema to perform the validation

       

        Attachments

          Issue Links

          There are no Sub-Tasks for this issue.

            Activity

              People

              Assignee:
              cody.hoag Cody Hoag
              Reporter:
              ruben.pulido Ruben Pulido
              Engineering Assignee:
              Ruben Pulido
              Recent user:
              Jason Pince
              Participants of an Issue:
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Packages

                  Version Package
                  7.2.X
                  Master