Uploaded image for project: 'Nuxeo Studio'
  1. Nuxeo Studio
  2. NXS-4595

Handle constraints in schema initialization


    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 73.6.2
    • Fix Version/s: 73.12
    • Component/s: Schemas
    • Tags:
    • Backlog priority:
    • Sprint:
      NOS 10.2.3
    • Story Points:


      1. in studio create 1 or 2 files of type directory
      2. click Edit and add a directory reference like continent or nature
      3. save the schema
      4. download the project
      5. check the xsd file of the schema inside the project archive, the directory reference is there but the type is String:
          <xs:element name="test1">
              <xs:restriction base="xs:string" ref:resolver="directoryResolver" ref:directory="continent"/>
          <xs:element name="test2">
              <xs:restriction base="xs:string" ref:resolver="directoryResolver" ref:directory="nature"/>
      6. Open the file in an editor
      7. modify the element names to test3 and test4 instead of test1 and test2.
      8. save the file with a different name
      9. in Studio, import the file with New / Initialize and select the file
      10. Observe the fields are now of type String and the directory references are lost

      This can actually be reproduced with any kind of constraint: Studio does not handle them during init at this stage.


      • Handle constraints in schema creation with initialize option


      • When importing a schema that contains valid constraints, these constraints are added to the schema and the field type matches the declaration (e.g. it becomes a directory if a directory is referenced)
      • When importing a schema that contains INVALID constraints (e.g. try to set a min / max amount on a string field)
        • These constraints are ignored (if possible, otherwise import can also show an empty schema like it is the case currently).
        • A message is shown to the user:

          Your schema could not be imported [entirely - if partial import can be done] due to errors in its content.
          [If possible show errors]

        • Values are not checked, but only constraints validity: for instance we should not check if a directory exists because it can be created/deployed outside of studio.


          Issue Links



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


                • Created:

                  Time Tracking

                  Original Estimate - Not Specified
                  Not Specified
                  Remaining Estimate - 0 minutes
                  Time Spent - 3 days, 2 hours
                  3d 2h


                    Error rendering 'com.pagerduty.jira-server-plugin:PagerDuty'. Please contact your Jira administrators.