Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: b8b83c01 by Tony Chemit at 2021-10-26T20:44:47+02:00 update pom - - - - - bafa1586 by Tony Chemit at 2021-10-26T21:03:03+02:00 update fixtures - - - - - d1c53add by Tony Chemit at 2021-10-26T21:04:18+02:00 update public API doc - - - - - 21 changed files: - pom.xml - server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/Create/validation-error.xml - server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/Create/validation.json - server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/Update/validation-error.xml - server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/Update/validation.json - server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/validation-create-error.xml - server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/validation-create.json - server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/validation-update-error.xml - server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/validation-update.json - server/runner/src/main/webResources/doc/api/public/data/ps/logbook/Sample/validation-create-error.xml - server/runner/src/main/webResources/doc/api/public/data/ps/logbook/Sample/validation-create.json - server/runner/src/main/webResources/doc/api/public/data/ps/logbook/Sample/validation-update-error.xml - server/runner/src/main/webResources/doc/api/public/data/ps/logbook/Sample/validation-update.json - server/runner/src/main/webResources/doc/api/public/data/ps/logbook/SampleActivity/validation-create-error.xml - server/runner/src/main/webResources/doc/api/public/data/ps/logbook/SampleActivity/validation-create-warning.xml - server/runner/src/main/webResources/doc/api/public/data/ps/logbook/SampleActivity/validation-create.json - server/runner/src/main/webResources/doc/api/public/data/ps/logbook/SampleActivity/validation-update-error.xml - server/runner/src/main/webResources/doc/api/public/data/ps/logbook/SampleActivity/validation-update-warning.xml - server/runner/src/main/webResources/doc/api/public/data/ps/logbook/SampleActivity/validation-update.json - tests/test/src/main/resources/fixtures/referential/ps/common/WeightCategory/content.json - tests/test/src/main/resources/fixtures/referential/ps/common/WeightCategory/create.json Changes: ===================================== pom.xml ===================================== @@ -161,7 +161,7 @@ <maven.build.timestamp.format>dd/MM/yyyy HH:mm z</maven.build.timestamp.format> <buildDate>${maven.build.timestamp}</buildDate> - <lib.version.toolkit>5.0.51-SNAPSHOT</lib.version.toolkit> + <lib.version.toolkit>5.0.51</lib.version.toolkit> <lib.version.ognl>3.1.29</lib.version.ognl> <!--can't use 1.4.197 (date has changed + blob also)--> @@ -174,7 +174,7 @@ <!-- <lib.version.java4all.http>1.0.30</lib.version.java4all.http>--> <!-- <lib.version.java4all.topia>1.52-SNAPSHOT</lib.version.java4all.topia>--> <!-- <lib.version.java4all.eugene>3.0-alpha-42-SNAPSHOT</lib.version.java4all.eugene>--> - <lib.version.java4all.jaxx>3.0.2-SNAPSHOT </lib.version.java4all.jaxx> +<!-- <lib.version.java4all.jaxx>3.0.2-SNAPSHOT </lib.version.java4all.jaxx>--> <!--<lib.version.java4all.application-context>1.0.3-SNAPSHOT</lib.version.java4all.application-context>--> <!--<lib.version.java4all.application-template>1.0.2-SNAPSHOT</lib.version.java4all.application-template>--> <!--<lib.version.java4all.i18n>4.0-beta-3-SNAPSHOT</lib.version.java4all.i18n>--> ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/Create/validation-error.xml ===================================== @@ -137,11 +137,11 @@ <message/> </field-validator> - <!-- 0.1 <= landingTotalWeight <= 3000.0 except if !targetWellsSamplingEnabled --> + <!-- 0.0 <= landingTotalWeight <= 2000.0 except if !targetWellsSamplingEnabled --> <field-validator type="boundNumber"> <param name="skip"><![CDATA[ !targetWellsSamplingEnabled ]]></param> - <param name="min">0.1</param> - <param name="max">3000.0</param> + <param name="min">0.0</param> + <param name="max">2000.0</param> <message/> </field-validator> </field> ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/Create/validation.json ===================================== @@ -78,7 +78,7 @@ "landingTotalWeight": { "errors": [ "landingTotalWeight is a positive number", - "0.1 <= landingTotalWeight <= 3000.0 except if !targetWellsSamplingEnabled" + "0.0 <= landingTotalWeight <= 2000.0 except if !targetWellsSamplingEnabled" ] }, "landingWellContentStatus": { ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/Update/validation-error.xml ===================================== @@ -146,11 +146,11 @@ <message/> </field-validator> - <!-- 0.1 <= landingTotalWeight <= 3000.0 except if !targetWellsSamplingEnabled --> + <!-- 0.0 <= landingTotalWeight <= 2000.0 except if !targetWellsSamplingEnabled --> <field-validator type="boundNumber"> <param name="skip"><![CDATA[ !targetWellsSamplingEnabled ]]></param> - <param name="min">0.1</param> - <param name="max">3000.0</param> + <param name="min">0.0</param> + <param name="max">2000.0</param> <message/> </field-validator> </field> ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/Update/validation.json ===================================== @@ -79,7 +79,7 @@ "landingTotalWeight": { "errors": [ "landingTotalWeight is a positive number", - "0.1 <= landingTotalWeight <= 3000.0 except if !targetWellsSamplingEnabled" + "0.0 <= landingTotalWeight <= 2000.0 except if !targetWellsSamplingEnabled" ] }, "landingWellContentStatus": { ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/validation-create-error.xml ===================================== @@ -137,11 +137,11 @@ <message/> </field-validator> - <!-- 0.1 <= landingTotalWeight <= 3000.0 except if !targetWellsSamplingEnabled --> + <!-- 0.0 <= landingTotalWeight <= 2000.0 except if !targetWellsSamplingEnabled --> <field-validator type="boundNumber"> <param name="skip"><![CDATA[ !targetWellsSamplingEnabled ]]></param> - <param name="min">0.1</param> - <param name="max">3000.0</param> + <param name="min">0.0</param> + <param name="max">2000.0</param> <message/> </field-validator> </field> ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/validation-create.json ===================================== @@ -78,7 +78,7 @@ "landingTotalWeight": { "errors": [ "landingTotalWeight is a positive number", - "0.1 <= landingTotalWeight <= 3000.0 except if !targetWellsSamplingEnabled" + "0.0 <= landingTotalWeight <= 2000.0 except if !targetWellsSamplingEnabled" ] }, "landingWellContentStatus": { ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/validation-update-error.xml ===================================== @@ -146,11 +146,11 @@ <message/> </field-validator> - <!-- 0.1 <= landingTotalWeight <= 3000.0 except if !targetWellsSamplingEnabled --> + <!-- 0.0 <= landingTotalWeight <= 2000.0 except if !targetWellsSamplingEnabled --> <field-validator type="boundNumber"> <param name="skip"><![CDATA[ !targetWellsSamplingEnabled ]]></param> - <param name="min">0.1</param> - <param name="max">3000.0</param> + <param name="min">0.0</param> + <param name="max">2000.0</param> <message/> </field-validator> </field> ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/common/Trip/validation-update.json ===================================== @@ -79,7 +79,7 @@ "landingTotalWeight": { "errors": [ "landingTotalWeight is a positive number", - "0.1 <= landingTotalWeight <= 3000.0 except if !targetWellsSamplingEnabled" + "0.0 <= landingTotalWeight <= 2000.0 except if !targetWellsSamplingEnabled" ] }, "landingWellContentStatus": { ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/logbook/Sample/validation-create-error.xml ===================================== @@ -25,9 +25,9 @@ <validators> <field name="bigsWeight"> - <!-- bigsWeight is mandatory except if totalWeight != null && totalWeight > 0 --> + <!-- bigsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) --> <field-validator type="mandatory" short-circuit="true"> - <param name="skip"><![CDATA[ totalWeight != null && totalWeight > 0 ]]></param> + <param name="skip"><![CDATA[ (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) ]]></param> <message>observe.data.ps.logbook.Sample.bigsWeight.validation.required</message> </field-validator> @@ -119,9 +119,9 @@ </field> <field name="smallsWeight"> - <!-- smallsWeight is mandatory except if totalWeight != null && totalWeight > 0 --> + <!-- smallsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) --> <field-validator type="mandatory" short-circuit="true"> - <param name="skip"><![CDATA[ totalWeight != null && totalWeight > 0 ]]></param> + <param name="skip"><![CDATA[ (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) ]]></param> <message>observe.data.ps.logbook.Sample.smallsWeight.validation.required</message> </field-validator> @@ -153,9 +153,9 @@ </field> <field name="totalWeight"> - <!-- totalWeight is mandatory except if bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0 --> + <!-- totalWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0) --> <field-validator type="mandatory" short-circuit="true"> - <param name="skip"><![CDATA[ bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0 ]]></param> + <param name="skip"><![CDATA[ (smallsWeight == null && bigsWeight == null && totalWeight == null) || (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0) ]]></param> <message>observe.data.ps.logbook.Sample.totalWeight.validation.required</message> </field-validator> ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/logbook/Sample/validation-create.json ===================================== @@ -1,7 +1,7 @@ { "bigsWeight": { "errors": [ - "bigsWeight is mandatory except if totalWeight != null && totalWeight > 0", + "bigsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0)", "bigsWeight is a positive number", "0.0 <= bigsWeight <= 150.0 except if !weightValid", "bigsWeight not allowed if totalWeight filled" @@ -52,7 +52,7 @@ }, "smallsWeight": { "errors": [ - "smallsWeight is mandatory except if totalWeight != null && totalWeight > 0", + "smallsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0)", "smallsWeight is a positive number", "0.0 <= smallsWeight <= 150.0 except if !weightValid", "smallsWeight not allowed if totalWeight filled" @@ -65,7 +65,7 @@ }, "totalWeight": { "errors": [ - "totalWeight is mandatory except if bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0", + "totalWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0)", "totalWeight is a positive number", "0.0 <= totalWeight <= 150.0 except if !weightValid", "totalWeight not allowed if bigsWeight and smallsWeight filled" ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/logbook/Sample/validation-update-error.xml ===================================== @@ -25,9 +25,9 @@ <validators> <field name="bigsWeight"> - <!-- bigsWeight is mandatory except if totalWeight != null && totalWeight > 0 --> + <!-- bigsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) --> <field-validator type="mandatory" short-circuit="true"> - <param name="skip"><![CDATA[ totalWeight != null && totalWeight > 0 ]]></param> + <param name="skip"><![CDATA[ (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) ]]></param> <message>observe.data.ps.logbook.Sample.bigsWeight.validation.required</message> </field-validator> @@ -119,9 +119,9 @@ </field> <field name="smallsWeight"> - <!-- smallsWeight is mandatory except if totalWeight != null && totalWeight > 0 --> + <!-- smallsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) --> <field-validator type="mandatory" short-circuit="true"> - <param name="skip"><![CDATA[ totalWeight != null && totalWeight > 0 ]]></param> + <param name="skip"><![CDATA[ (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0) ]]></param> <message>observe.data.ps.logbook.Sample.smallsWeight.validation.required</message> </field-validator> @@ -153,9 +153,9 @@ </field> <field name="totalWeight"> - <!-- totalWeight is mandatory except if bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0 --> + <!-- totalWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0) --> <field-validator type="mandatory" short-circuit="true"> - <param name="skip"><![CDATA[ bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0 ]]></param> + <param name="skip"><![CDATA[ (smallsWeight == null && bigsWeight == null && totalWeight == null) || (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0) ]]></param> <message>observe.data.ps.logbook.Sample.totalWeight.validation.required</message> </field-validator> ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/logbook/Sample/validation-update.json ===================================== @@ -1,7 +1,7 @@ { "bigsWeight": { "errors": [ - "bigsWeight is mandatory except if totalWeight != null && totalWeight > 0", + "bigsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0)", "bigsWeight is a positive number", "0.0 <= bigsWeight <= 150.0 except if !weightValid", "bigsWeight not allowed if totalWeight filled" @@ -52,7 +52,7 @@ }, "smallsWeight": { "errors": [ - "smallsWeight is mandatory except if totalWeight != null && totalWeight > 0", + "smallsWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (totalWeight != null && totalWeight > 0)", "smallsWeight is a positive number", "0.0 <= smallsWeight <= 150.0 except if !weightValid", "smallsWeight not allowed if totalWeight filled" @@ -65,7 +65,7 @@ }, "totalWeight": { "errors": [ - "totalWeight is mandatory except if bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0", + "totalWeight is mandatory except if (smallsWeight == null && bigsWeight == null && totalWeight == null) || (bigsWeight != null && bigsWeight >= 0 && smallsWeight != null && smallsWeight >= 0)", "totalWeight is a positive number", "0.0 <= totalWeight <= 150.0 except if !weightValid", "totalWeight not allowed if bigsWeight and smallsWeight filled" ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/logbook/SampleActivity/validation-create-error.xml ===================================== @@ -33,14 +33,9 @@ </field> <field name="weightedWeight"> - <!-- weightedWeight is mandatory except if dataEmpty --> - <field-validator type="mandatory" short-circuit="true"> - <param name="skip"><![CDATA[ dataEmpty ]]></param> - <message/> - </field-validator> - - <!-- weightedWeight is a positive number --> + <!-- weightedWeight is a strictly positive number --> <field-validator type="positiveNumber"> + <param name="strict">true</param> <message/> </field-validator> </field> ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/logbook/SampleActivity/validation-create-warning.xml ===================================== @@ -31,11 +31,4 @@ </field-validator> </field> - <field name="weightedWeight"> - <!-- the hole data is empty --> - <field-validator type="dataEmpty" short-circuit="true"> - <message/> - </field-validator> - </field> - </validators> ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/logbook/SampleActivity/validation-create.json ===================================== @@ -9,11 +9,7 @@ }, "weightedWeight": { "errors": [ - "weightedWeight is mandatory except if dataEmpty", - "weightedWeight is a positive number" - ], - "warnings": [ - "the hole data is empty" + "weightedWeight is a strictly positive number" ] } } \ No newline at end of file ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/logbook/SampleActivity/validation-update-error.xml ===================================== @@ -33,14 +33,9 @@ </field> <field name="weightedWeight"> - <!-- weightedWeight is mandatory except if dataEmpty --> - <field-validator type="mandatory" short-circuit="true"> - <param name="skip"><![CDATA[ dataEmpty ]]></param> - <message/> - </field-validator> - - <!-- weightedWeight is a positive number --> + <!-- weightedWeight is a strictly positive number --> <field-validator type="positiveNumber"> + <param name="strict">true</param> <message/> </field-validator> </field> ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/logbook/SampleActivity/validation-update-warning.xml ===================================== @@ -31,11 +31,4 @@ </field-validator> </field> - <field name="weightedWeight"> - <!-- the hole data is empty --> - <field-validator type="dataEmpty" short-circuit="true"> - <message/> - </field-validator> - </field> - </validators> ===================================== server/runner/src/main/webResources/doc/api/public/data/ps/logbook/SampleActivity/validation-update.json ===================================== @@ -9,11 +9,7 @@ }, "weightedWeight": { "errors": [ - "weightedWeight is mandatory except if dataEmpty", - "weightedWeight is a positive number" - ], - "warnings": [ - "the hole data is empty" + "weightedWeight is a strictly positive number" ] } } \ No newline at end of file ===================================== tests/test/src/main/resources/fixtures/referential/ps/common/WeightCategory/content.json ===================================== @@ -2,7 +2,7 @@ "topiaId": "fr.ird.referential.ps.common.WeightCategory#1464000000000#001", "topiaCreateDate": "2021-09-17T00:00:00.000Z", "lastUpdateDate": "2021-09-17T00:00:00.000Z", - "code": "L-1-1", + "code": "L-YFT-1", "needComment": false, "status": "enabled", "label1": "[SOVETCO: Albacore -10] - [STARKIST: Yellowfin R1 + R2+ R3]", ===================================== tests/test/src/main/resources/fixtures/referential/ps/common/WeightCategory/create.json ===================================== @@ -1,5 +1,5 @@ { - "code": "L-1-1", + "code": "L-YFT-1", "needComment": false, "status": "enabled", "label1": "[SOVETCO: Albacore -10] - [STARKIST: Yellowfin R1 + R2+ R3]", View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/ae83c34d806406b33e675b4e2... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/compare/ae83c34d806406b33e675b4e2... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT (@tchemit)