Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-21610

Fix missing schema json constraints for list items

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 8.10
    • Fix Version/s: 8.10-HF01, 9.1
    • Component/s: Core IO
    • Upgrade notes:
      Hide

      When field is a list, the item constraints are now serialized as follow:
      `{
      "@prefix": "dc",
      "entity-type": "schema",
      "fields": {
      "contributors": {
      "constraints": [],
      "itemConstraints": [
      {
      "entity-type": "validation_constraint",
      "name": "userManagerResolver",
      "parameters":

      { "includeGroups": "false", "includeUsers": "true" }

      },
      {
      "entity-type": "validation_constraint",
      "name": "string",
      "parameters": {}
      }
      ],
      "type": "string[]"
      },
      ...
      }
      }`

      Show
      When field is a list, the item constraints are now serialized as follow: `{ "@prefix": "dc", "entity-type": "schema", "fields": { "contributors": { "constraints": [], "itemConstraints": [ { "entity-type": "validation_constraint", "name": "userManagerResolver", "parameters": { "includeGroups": "false", "includeUsers": "true" } }, { "entity-type": "validation_constraint", "name": "string", "parameters": {} } ], "type": "string[]" }, ... } }`
    • Sprint:
      nxGang Sprint 9.1.5

      Description

      Related to dev done in NXP-16262, when querying

      https://nightly.nuxeo.com/nuxeo/api/v1/config/schemas/dublincore?fetch.schema=fields
      

      we get the following response for subjects:

              "subjects": {
                  "constraints": [], 
                  "type": "string[]"
              },
      

      despite https://github.com/nuxeo/nuxeo/blob/master/nuxeo-core/nuxeo-core/src/main/resources/schema/dublincore.xsd#L6.

      It seems that constraints for list type are just skipped.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: