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

Manage repeatable fields in structured content

    Details

      Description

      In the structuredContent, embed in the values fields:

      -"dataType"

         -string: for current radio, select, text, textArea

         -number

         -integer

         -double

         -document

         -url

         -image

         -date

        -geolocation

       

        • Rename "mediaObject" property to "document"

       

       

      For radio and select, show only selected values with the label, not all options.

       

      -"repeatable"

       

       

      remove fields from structuredContent of type "separator" as they are not shown in the structure and it does not add too much value

       

      API Capabilities
      The consumer of this API will be able to:

      • Retrieve the needed information of a structuredContent in order to be able to understand the information in it 

      Security requirements

      The list should contain only the elements the user has permission to view. If a structured content is requested and the current user doesn't have permission to view it, a 404 error should be returned.

      General requirements
      The API should support at least Plain JSON, JSON-LD and HAL as output formats.

      The consumer developer should be able to control which linked resources are embedded so that they can be retrieved along with a structured content in a single request.

      The consumer developer can specify which fields are desired, to reduce the data transfer when the API is used from a consumer sensitive to it.

       

      Acceptance Criteria

       

      Given a structure like structure.json

      and a structuredContent with that structure is created

      when I retrieve through the API that content

      Then the response is a Json like JSONExample.json

       

      Given a structure like StructureWithHiddenLabel.json (check with WEM the use cases for show label, to see if for the API we could return it always)

      and a structuredContent with that structure is created

      When I retrieve through the API that content

      Then the response is a Json like JsonExample2.json

        

      Given a structure with a field of type "separator"

      and a structuredContent with that structure is created

      When I retrieve through the API that content

      Then the response does not include that field and the element count is correct

        Attachments

        1. JSONExample.json
          10 kB
        2. JsonExample2.json
          2 kB
        3. structure.json
          15 kB
        4. StructureWithHiddenLabel.json
          2 kB

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Packages

                  Version Package
                  Headless-A2