diff --git a/docs/GettingStarted.md b/docs/GettingStarted.md
index 60636246e..f91f65488 100644
--- a/docs/GettingStarted.md
+++ b/docs/GettingStarted.md
@@ -40,7 +40,7 @@ We'll start by generating data for a trivial schema. Using your favourite text e
```json
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"fields": [{ "name": "firstName", "type": "string" }],
"rules": []
}
@@ -111,7 +111,7 @@ Update the JSON profile as follows:
```json
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"fields": [{ "name": "firstName", "type": "string" }],
"rules": [
{
@@ -181,7 +181,7 @@ We'll expand the example profile to add a new `age` field, a not-null integer in
```json
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"fields": [
{ "name": "firstName", "type": "string" },
{ "name": "age", "type": "integer" }
@@ -228,7 +228,7 @@ Finally, we'll add a field for National Insurance number. In this case, the cons
```json
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"fields": [
{ "name": "firstName", "type": "string" },
{ "name": "age", "type": "integer" },
diff --git a/docs/UserGuide.md b/docs/UserGuide.md
index 0a758d569..f066bbdfd 100644
--- a/docs/UserGuide.md
+++ b/docs/UserGuide.md
@@ -56,6 +56,7 @@
7. [Custom Generators](#custom-generator)
1. [adding](#adding-custom-generator)
2. [using](#using-custom-generator)
+ 3. [using as constraint](#using-custom-generator-as-constraint)
8. [Running a Profile](#Running-a-Profile)
1. [Command Line Arguments](#Command-Line-Arguments)
@@ -87,9 +88,9 @@ This section will walk you through creating basic profiles with which you can ge
Profiles are JSON documents consisting of three sections, the schema version, the list of fields and the rules.
- **Schema Version** - Dictates the method of serialisation of the profile in order for the generator to
-interpret the profile fields and rules. The latest version is 0.7.
+interpret the profile fields and rules. The latest version is
```
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
```
- **List of Fields** - An array of column headings is defined with unique "name" keys.
```
@@ -140,7 +141,7 @@ These three sections are combined to form the [complete profile](#Example-Profil
## Example Profile
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "Column 1",
@@ -668,7 +669,6 @@ While it's not prohibited, wrapping conditional constraints in any other kind of
-
# Custom Generators
@@ -704,6 +704,22 @@ This will use the "lorem ipsum" example custom generator.
To use your own, put the name of your generator instead of "lorem ipsum"
+## using Custom Generators as Constraint
+
+
+You can also use custom generators as constraints
+
+
+```javascript
+{ "field": "field1", "generator": "lorem ipsum" }
+```
+
+Custom generators can be used in "anyOf" grammatical constraints, as well as in the "then" and "else" parts of conditional constraints
+
+To combine generators with sets and equalTo, you will need to create a 'matchingFunction' when building the custom generator. Which should be a function that returns true if a value is one the custom generator could produce.
+
+To be able negate the custom generator, or use in the 'if' section of an if then statement, you must define the 'negated Generator' when building the custom generator. Which should return values that the custom generator should not produce.
+
# Running a Profile
diff --git a/docs/user/Schema.md b/docs/user/Schema.md
index 508241753..28dad662c 100644
--- a/docs/user/Schema.md
+++ b/docs/user/Schema.md
@@ -3,7 +3,7 @@
## Sample file
```javascript
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"description": "A dataset about financial products",
"fields":
[
diff --git a/examples/a-valid-isin/profile.json b/examples/a-valid-isin/profile.json
index 630561deb..656e99b99 100644
--- a/examples/a-valid-isin/profile.json
+++ b/examples/a-valid-isin/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "isin",
diff --git a/examples/actor-names/profile.json b/examples/actor-names/profile.json
index 0f62dc469..8faad2720 100644
--- a/examples/actor-names/profile.json
+++ b/examples/actor-names/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "forename",
diff --git a/examples/anyOf/profile.json b/examples/anyOf/profile.json
index b24feea53..0dec5cc8f 100644
--- a/examples/anyOf/profile.json
+++ b/examples/anyOf/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/examples/date-after/profile.json b/examples/date-after/profile.json
index e75163333..611d53e88 100644
--- a/examples/date-after/profile.json
+++ b/examples/date-after/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "date",
diff --git a/examples/datetime-after-dynamic/profile.json b/examples/datetime-after-dynamic/profile.json
index 1ab56923a..99bd46687 100644
--- a/examples/datetime-after-dynamic/profile.json
+++ b/examples/datetime-after-dynamic/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "field1",
diff --git a/examples/datetime-after/profile.json b/examples/datetime-after/profile.json
index d36777c44..162c8f902 100644
--- a/examples/datetime-after/profile.json
+++ b/examples/datetime-after/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "date",
diff --git a/examples/datetime-equal-to-dynamic-offset/profile.json b/examples/datetime-equal-to-dynamic-offset/profile.json
index d0b723c8b..53492aa06 100644
--- a/examples/datetime-equal-to-dynamic-offset/profile.json
+++ b/examples/datetime-equal-to-dynamic-offset/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "first",
diff --git a/examples/datetime-equal-to-dynamic/profile.json b/examples/datetime-equal-to-dynamic/profile.json
index 240f2fd32..bdcf2b614 100644
--- a/examples/datetime-equal-to-dynamic/profile.json
+++ b/examples/datetime-equal-to-dynamic/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "first",
diff --git a/examples/datetime-equal-to/profile.json b/examples/datetime-equal-to/profile.json
index 9d9009c7e..0ce24f24c 100644
--- a/examples/datetime-equal-to/profile.json
+++ b/examples/datetime-equal-to/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "date",
diff --git a/examples/datetime-offset-working-days/profile.json b/examples/datetime-offset-working-days/profile.json
index e2753824e..f69d4ac27 100644
--- a/examples/datetime-offset-working-days/profile.json
+++ b/examples/datetime-offset-working-days/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "foo",
diff --git a/examples/demo-trades-smaller/profile.json b/examples/demo-trades-smaller/profile.json
index a6b0655dc..0c95477f8 100644
--- a/examples/demo-trades-smaller/profile.json
+++ b/examples/demo-trades-smaller/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "tradeId",
diff --git a/examples/demo-trades/profile.json b/examples/demo-trades/profile.json
index 6c9c937b3..c0d0e500a 100644
--- a/examples/demo-trades/profile.json
+++ b/examples/demo-trades/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "tradeId",
diff --git a/examples/duplicates/profile.json b/examples/duplicates/profile.json
index d965544b2..098a6256d 100644
--- a/examples/duplicates/profile.json
+++ b/examples/duplicates/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "a",
diff --git a/examples/formatting/profile.json b/examples/formatting/profile.json
index e1b7589b5..242a2efd9 100644
--- a/examples/formatting/profile.json
+++ b/examples/formatting/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "decimal",
diff --git a/examples/from-file-weighted/profile.json b/examples/from-file-weighted/profile.json
index 187f1b67e..badbe6331 100644
--- a/examples/from-file-weighted/profile.json
+++ b/examples/from-file-weighted/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "name",
diff --git a/examples/from-file/profile.json b/examples/from-file/profile.json
index 187f1b67e..badbe6331 100644
--- a/examples/from-file/profile.json
+++ b/examples/from-file/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "name",
diff --git a/examples/hard-contradiction-null-validation/profile.json b/examples/hard-contradiction-null-validation/profile.json
index c956d3cc7..57fa50e9b 100644
--- a/examples/hard-contradiction-null-validation/profile.json
+++ b/examples/hard-contradiction-null-validation/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "Column 1",
diff --git a/examples/hard-contradiction-range-and-granular/profile.json b/examples/hard-contradiction-range-and-granular/profile.json
index 5fafe7801..ac94f791d 100644
--- a/examples/hard-contradiction-range-and-granular/profile.json
+++ b/examples/hard-contradiction-range-and-granular/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "Column 1",
diff --git a/examples/integer-range-with-blacklist/profile.json b/examples/integer-range-with-blacklist/profile.json
index 3263c5358..ca3c70a70 100644
--- a/examples/integer-range-with-blacklist/profile.json
+++ b/examples/integer-range-with-blacklist/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "an_integer",
diff --git a/examples/integer-range/profile.json b/examples/integer-range/profile.json
index 01d416ba8..afd3a2e96 100644
--- a/examples/integer-range/profile.json
+++ b/examples/integer-range/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "an_integer",
diff --git a/examples/multiple-fields/profile.json b/examples/multiple-fields/profile.json
index 220179436..8ea898acd 100644
--- a/examples/multiple-fields/profile.json
+++ b/examples/multiple-fields/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "field1",
diff --git a/examples/names/profile.json b/examples/names/profile.json
index d84067435..fa52ebd89 100644
--- a/examples/names/profile.json
+++ b/examples/names/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "forename",
diff --git a/examples/partial-contradictions/profile.json b/examples/partial-contradictions/profile.json
index bd5b8260b..c11e07d98 100644
--- a/examples/partial-contradictions/profile.json
+++ b/examples/partial-contradictions/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "Column 1",
diff --git a/examples/partitioning/profile.json b/examples/partitioning/profile.json
index 1c37d7e74..9ee3bf3b6 100644
--- a/examples/partitioning/profile.json
+++ b/examples/partitioning/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "p1f1",
diff --git a/examples/real-number-range/profile.json b/examples/real-number-range/profile.json
index c2a62a4b9..949160316 100644
--- a/examples/real-number-range/profile.json
+++ b/examples/real-number-range/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "a_number",
diff --git a/examples/regex-contains/profile.json b/examples/regex-contains/profile.json
index 6013a0794..a22143288 100644
--- a/examples/regex-contains/profile.json
+++ b/examples/regex-contains/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "first_name",
diff --git a/examples/regex-intersect-with-blacklist/profile.json b/examples/regex-intersect-with-blacklist/profile.json
index 4cf46bde1..3f33ce5f0 100644
--- a/examples/regex-intersect-with-blacklist/profile.json
+++ b/examples/regex-intersect-with-blacklist/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "first_name",
diff --git a/examples/regex-intersect/profile.json b/examples/regex-intersect/profile.json
index d0863ee02..2bf149758 100644
--- a/examples/regex-intersect/profile.json
+++ b/examples/regex-intersect/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "first_name",
diff --git a/examples/regex/profile.json b/examples/regex/profile.json
index 011cb0182..5ff8a6560 100644
--- a/examples/regex/profile.json
+++ b/examples/regex/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "first_name",
diff --git a/examples/setwise-combination/profile.json b/examples/setwise-combination/profile.json
index 17d08e5b4..69bb6afcb 100644
--- a/examples/setwise-combination/profile.json
+++ b/examples/setwise-combination/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "a",
diff --git a/examples/shorter-than/profile.json b/examples/shorter-than/profile.json
index 627e7f5e7..37846bbb0 100644
--- a/examples/shorter-than/profile.json
+++ b/examples/shorter-than/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "first_name",
diff --git a/examples/string/profile.json b/examples/string/profile.json
index 1901e15d5..37de01d10 100644
--- a/examples/string/profile.json
+++ b/examples/string/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"rules": [],
"fields": [
{
diff --git a/examples/unique/profile.json b/examples/unique/profile.json
index 00b09ebfe..b4c9a1198 100644
--- a/examples/unique/profile.json
+++ b/examples/unique/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "id",
diff --git a/examples/user-account/profile.json b/examples/user-account/profile.json
index c4ed1a5d3..e9e6c5058 100644
--- a/examples/user-account/profile.json
+++ b/examples/user-account/profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "user_id",
diff --git a/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/cucumber/features/CustomGenerator.feature b/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/cucumber/features/CustomGenerator.feature
new file mode 100644
index 000000000..bebdcb972
--- /dev/null
+++ b/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/cucumber/features/CustomGenerator.feature
@@ -0,0 +1,8 @@
+Feature: Generator use custom generators.
+
+ Scenario: custom lorem ipsum generator can output rows
+ Given the generation strategy is Random
+ And the generator can generate at most 1 rows
+ And there is a non nullable field foo
+ And foo uses custom generator "lorem ipsum"
+ Then the generator can generate at most 1 rows
diff --git a/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/cucumber/testframework/steps/StringValueStep.java b/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/cucumber/testframework/steps/StringValueStep.java
index 050cb2cf7..42a59313b 100644
--- a/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/cucumber/testframework/steps/StringValueStep.java
+++ b/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/cucumber/testframework/steps/StringValueStep.java
@@ -123,6 +123,11 @@ public void producedDataShouldContainStringValuesOutOfRangeForField(String field
value -> !isLengthBetweenInclusively(min, max).apply(value));
}
+ @When("^([A-z0-9]+) uses custom generator \"(.*)\"$")
+ public void customGenerator(String fieldName, String value) {
+ state.addConstraint(fieldName, ConstraintType.EQUAL_TO, value);
+ }
+
private Function isLengthBetweenInclusively(int minInclusive, int maxInclusive) {
return value -> isLongerThanOrEqual(value, minInclusive) && isShorterThanOrEqual(value, maxInclusive);
}
diff --git a/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/cucumber/testframework/utils/CucumberTestState.java b/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/cucumber/testframework/utils/CucumberTestState.java
index c26efc5d5..b35d15c22 100644
--- a/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/cucumber/testframework/utils/CucumberTestState.java
+++ b/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/cucumber/testframework/utils/CucumberTestState.java
@@ -225,6 +225,12 @@ private ConstraintDTO createConstraint(String fieldName, ConstraintType type, Ob
field = fieldName;
value = (String) _value;
}};
+ case GENERATOR:
+ return new GeneratorConstraintDTO()
+ {{
+ field = fieldName;
+ generator = (String) _value;
+ }};
default:
return null;
}
diff --git a/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/endtoend/loadfiletest.profile.json b/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/endtoend/loadfiletest.profile.json
index 5f208dd8b..f7fc11442 100644
--- a/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/endtoend/loadfiletest.profile.json
+++ b/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/endtoend/loadfiletest.profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "foo",
diff --git a/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/endtoend/testprofile.profile.json b/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/endtoend/testprofile.profile.json
index fcf59c6af..c1c5c3a6d 100644
--- a/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/endtoend/testprofile.profile.json
+++ b/orchestrator/src/test/java/com/scottlogic/deg/orchestrator/endtoend/testprofile.profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.15",
+ "schemaVersion": "0.16",
"description": "Testing Profile",
"fields": [
{
diff --git a/profile/src/main/java/com/scottlogic/deg/profile/dtos/constraints/ConstraintType.java b/profile/src/main/java/com/scottlogic/deg/profile/dtos/constraints/ConstraintType.java
index 084db658b..b24b3feea 100644
--- a/profile/src/main/java/com/scottlogic/deg/profile/dtos/constraints/ConstraintType.java
+++ b/profile/src/main/java/com/scottlogic/deg/profile/dtos/constraints/ConstraintType.java
@@ -74,8 +74,8 @@ public enum ConstraintType {
ANY_OF(AnyOfConstraintDTO.NAME, AnyOfConstraintDTO.class),
ALL_OF(AllOfConstraintDTO.NAME, AllOfConstraintDTO.class),
IF(ConditionalConstraintDTO.NAME, ConditionalConstraintDTO.class),
- INVALID(InvalidConstraintDTO.NAME, InvalidConstraintDTO.class);
-
+ INVALID(InvalidConstraintDTO.NAME, InvalidConstraintDTO.class),
+ GENERATOR(GeneratorConstraintDTO.NAME, GeneratorConstraintDTO.class);
public final String propertyName;
public final Class extends ConstraintDTO> clazz;
diff --git a/profile/src/main/java/com/scottlogic/deg/profile/dtos/constraints/GeneratorConstraintDTO.java b/profile/src/main/java/com/scottlogic/deg/profile/dtos/constraints/GeneratorConstraintDTO.java
new file mode 100644
index 000000000..d0797105e
--- /dev/null
+++ b/profile/src/main/java/com/scottlogic/deg/profile/dtos/constraints/GeneratorConstraintDTO.java
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2019 Scott Logic Ltd
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.scottlogic.deg.profile.dtos.constraints;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
+import com.scottlogic.deg.profile.dtos.constraints.atomic.AtomicConstraintDTO;
+
+@JsonDeserialize(as = GeneratorConstraintDTO.class)
+public class GeneratorConstraintDTO extends AtomicConstraintDTO {
+ public static final String NAME = "generator";
+
+ @JsonProperty(NAME)
+ public String generator;
+}
diff --git a/profile/src/main/resources/profileschema/datahelix.schema.json b/profile/src/main/resources/profileschema/datahelix.schema.json
index 888186b37..182b1d80d 100644
--- a/profile/src/main/resources/profileschema/datahelix.schema.json
+++ b/profile/src/main/resources/profileschema/datahelix.schema.json
@@ -56,7 +56,7 @@
"definitions": {
"schemaVersion": {
"title": "The version of the DataHelix profile schema",
- "const": "0.15"
+ "const": "0.16"
},
"dataType": {
"oneOf": [
@@ -195,6 +195,9 @@
},
"constraint": {
"oneOf": [
+ {
+ "$ref": "#/definitions/generatorConstraint"
+ },
{
"$ref": "#/definitions/equalToConstraint"
},
@@ -290,6 +293,22 @@
}
]
},
+ "generatorConstraint": {
+ "type": "object",
+ "additionalProperties": false,
+ "required": [
+ "field",
+ "generator"
+ ],
+ "properties": {
+ "field": {
+ "type": "string"
+ },
+ "generator": {
+ "$ref": "#/definitions/string"
+ }
+ }
+ },
"equalToConstraint": {
"type": "object",
"additionalProperties": false,
diff --git a/profile/src/test/java/com/scottlogic/deg/profile/ProfileSchemaImmutabilityTests.java b/profile/src/test/java/com/scottlogic/deg/profile/ProfileSchemaImmutabilityTests.java
index 883ca85aa..63d4f3689 100644
--- a/profile/src/test/java/com/scottlogic/deg/profile/ProfileSchemaImmutabilityTests.java
+++ b/profile/src/test/java/com/scottlogic/deg/profile/ProfileSchemaImmutabilityTests.java
@@ -119,7 +119,10 @@ private static Set versionToHash() {
"757551740cdb5d6c368ba33fed4989e494064399cd0af8d852f776e038b4b229"));
versionToHash.add(new VersionHash(
"0.15",
- "5f2ecc76e7db9055be42e959005f169e03c4baa86d98ac8d3df363d867e7bbac"));
+ "10dce72a089be2a68f1577adadabff74831d1c063b2e12028b16cbb371493062"));
+ versionToHash.add(new VersionHash(
+ "0.16",
+ "8a3863c467ba1b6b6e47618bb1f7c70e74acdf9825f10200a86e9fed599d60e5"));
return versionToHash;
}
diff --git a/profile/src/test/java/com/scottlogic/deg/profile/reader/JsonProfileReaderTests.java b/profile/src/test/java/com/scottlogic/deg/profile/reader/JsonProfileReaderTests.java
index 610109ea6..a8be62c05 100644
--- a/profile/src/test/java/com/scottlogic/deg/profile/reader/JsonProfileReaderTests.java
+++ b/profile/src/test/java/com/scottlogic/deg/profile/reader/JsonProfileReaderTests.java
@@ -55,8 +55,7 @@
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.instanceOf;
import static org.hamcrest.core.IsNull.nullValue;
-
-
+import static org.mockito.Mockito.mock;
public class JsonProfileReaderTests {
diff --git a/profile/src/test/resources/test-profiles/invalid/allof-misspelled.json b/profile/src/test/resources/test-profiles/invalid/allof-misspelled.json
index 87f6f94b8..e8567310c 100644
--- a/profile/src/test/resources/test-profiles/invalid/allof-misspelled.json
+++ b/profile/src/test/resources/test-profiles/invalid/allof-misspelled.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"constraints": [
diff --git a/profile/src/test/resources/test-profiles/invalid/allof-not-enough-items.json b/profile/src/test/resources/test-profiles/invalid/allof-not-enough-items.json
index c76069701..9d307c912 100644
--- a/profile/src/test/resources/test-profiles/invalid/allof-not-enough-items.json
+++ b/profile/src/test/resources/test-profiles/invalid/allof-not-enough-items.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"constraints": [
diff --git a/profile/src/test/resources/test-profiles/invalid/anyof-misspelled.json b/profile/src/test/resources/test-profiles/invalid/anyof-misspelled.json
index c915a7998..af01f8126 100644
--- a/profile/src/test/resources/test-profiles/invalid/anyof-misspelled.json
+++ b/profile/src/test/resources/test-profiles/invalid/anyof-misspelled.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"constraints": [
diff --git a/profile/src/test/resources/test-profiles/invalid/anyof-not-enough-items.json b/profile/src/test/resources/test-profiles/invalid/anyof-not-enough-items.json
index 055a115ad..452b8b358 100644
--- a/profile/src/test/resources/test-profiles/invalid/anyof-not-enough-items.json
+++ b/profile/src/test/resources/test-profiles/invalid/anyof-not-enough-items.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"constraints": [
diff --git a/profile/src/test/resources/test-profiles/invalid/constraint-empty.json b/profile/src/test/resources/test-profiles/invalid/constraint-empty.json
index 6e30a1f73..45a0f9211 100644
--- a/profile/src/test/resources/test-profiles/invalid/constraint-empty.json
+++ b/profile/src/test/resources/test-profiles/invalid/constraint-empty.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/constraint-field-invalid-is.json b/profile/src/test/resources/test-profiles/invalid/constraint-field-invalid-is.json
index 930a03001..3c96981c7 100644
--- a/profile/src/test/resources/test-profiles/invalid/constraint-field-invalid-is.json
+++ b/profile/src/test/resources/test-profiles/invalid/constraint-field-invalid-is.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/constraint-field-is-null-with-value-numeric.json b/profile/src/test/resources/test-profiles/invalid/constraint-field-is-null-with-value-numeric.json
index ada306f62..f6d0da3ad 100644
--- a/profile/src/test/resources/test-profiles/invalid/constraint-field-is-null-with-value-numeric.json
+++ b/profile/src/test/resources/test-profiles/invalid/constraint-field-is-null-with-value-numeric.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/constraint-field-is-null-with-value-string.json b/profile/src/test/resources/test-profiles/invalid/constraint-field-is-null-with-value-string.json
index 5ac7f7164..b8e2d7fc8 100644
--- a/profile/src/test/resources/test-profiles/invalid/constraint-field-is-null-with-value-string.json
+++ b/profile/src/test/resources/test-profiles/invalid/constraint-field-is-null-with-value-string.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/constraint-field-misspelled-is.json b/profile/src/test/resources/test-profiles/invalid/constraint-field-misspelled-is.json
index 4001708c9..1f7a945c9 100644
--- a/profile/src/test/resources/test-profiles/invalid/constraint-field-misspelled-is.json
+++ b/profile/src/test/resources/test-profiles/invalid/constraint-field-misspelled-is.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/constraint-invalid-key.json b/profile/src/test/resources/test-profiles/invalid/constraint-invalid-key.json
index 07565ffeb..fc3fe6c7e 100644
--- a/profile/src/test/resources/test-profiles/invalid/constraint-invalid-key.json
+++ b/profile/src/test/resources/test-profiles/invalid/constraint-invalid-key.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/constraints-field-misspelled.json b/profile/src/test/resources/test-profiles/invalid/constraints-field-misspelled.json
index c5e40bb56..264640b0e 100644
--- a/profile/src/test/resources/test-profiles/invalid/constraints-field-misspelled.json
+++ b/profile/src/test/resources/test-profiles/invalid/constraints-field-misspelled.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/containingRegex-value-numeric.json b/profile/src/test/resources/test-profiles/invalid/containingRegex-value-numeric.json
index 74da7ea4f..9bd068259 100644
--- a/profile/src/test/resources/test-profiles/invalid/containingRegex-value-numeric.json
+++ b/profile/src/test/resources/test-profiles/invalid/containingRegex-value-numeric.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "field1"
diff --git a/profile/src/test/resources/test-profiles/invalid/containingRegex-value-object.json b/profile/src/test/resources/test-profiles/invalid/containingRegex-value-object.json
index aa01f231b..906a4f420 100644
--- a/profile/src/test/resources/test-profiles/invalid/containingRegex-value-object.json
+++ b/profile/src/test/resources/test-profiles/invalid/containingRegex-value-object.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "field1"
diff --git a/profile/src/test/resources/test-profiles/invalid/date-after-dynamic-with-incorrect-relation.json b/profile/src/test/resources/test-profiles/invalid/date-after-dynamic-with-incorrect-relation.json
index a6a8547e3..b01911096 100644
--- a/profile/src/test/resources/test-profiles/invalid/date-after-dynamic-with-incorrect-relation.json
+++ b/profile/src/test/resources/test-profiles/invalid/date-after-dynamic-with-incorrect-relation.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "field1"
diff --git a/profile/src/test/resources/test-profiles/invalid/datetime-after-misspelled.json b/profile/src/test/resources/test-profiles/invalid/datetime-after-misspelled.json
index 442caacd7..d9e2500cc 100644
--- a/profile/src/test/resources/test-profiles/invalid/datetime-after-misspelled.json
+++ b/profile/src/test/resources/test-profiles/invalid/datetime-after-misspelled.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/datetime-afterorat-misspelled.json b/profile/src/test/resources/test-profiles/invalid/datetime-afterorat-misspelled.json
index 37dfc375d..349ffbf93 100644
--- a/profile/src/test/resources/test-profiles/invalid/datetime-afterorat-misspelled.json
+++ b/profile/src/test/resources/test-profiles/invalid/datetime-afterorat-misspelled.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/datetime-afterorat-value-invalid.json b/profile/src/test/resources/test-profiles/invalid/datetime-afterorat-value-invalid.json
index 0962e6e9f..37307ae9a 100644
--- a/profile/src/test/resources/test-profiles/invalid/datetime-afterorat-value-invalid.json
+++ b/profile/src/test/resources/test-profiles/invalid/datetime-afterorat-value-invalid.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/datetime-before-misspelled.json b/profile/src/test/resources/test-profiles/invalid/datetime-before-misspelled.json
index 1f70cf512..51688c78e 100644
--- a/profile/src/test/resources/test-profiles/invalid/datetime-before-misspelled.json
+++ b/profile/src/test/resources/test-profiles/invalid/datetime-before-misspelled.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/datetime-before-value-invalid.json b/profile/src/test/resources/test-profiles/invalid/datetime-before-value-invalid.json
index b20d0c28c..3320dcc28 100644
--- a/profile/src/test/resources/test-profiles/invalid/datetime-before-value-invalid.json
+++ b/profile/src/test/resources/test-profiles/invalid/datetime-before-value-invalid.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/datetime-beforeorat-misspelled.json b/profile/src/test/resources/test-profiles/invalid/datetime-beforeorat-misspelled.json
index cb7ce9262..472851de5 100644
--- a/profile/src/test/resources/test-profiles/invalid/datetime-beforeorat-misspelled.json
+++ b/profile/src/test/resources/test-profiles/invalid/datetime-beforeorat-misspelled.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/datetime-beforeorat-value-invalid.json b/profile/src/test/resources/test-profiles/invalid/datetime-beforeorat-value-invalid.json
index 9abd4b1ad..62cd9ca36 100644
--- a/profile/src/test/resources/test-profiles/invalid/datetime-beforeorat-value-invalid.json
+++ b/profile/src/test/resources/test-profiles/invalid/datetime-beforeorat-value-invalid.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/datetime-equalto-datetime-misspelled.json b/profile/src/test/resources/test-profiles/invalid/datetime-equalto-datetime-misspelled.json
index a3ecd6651..debd3d2ee 100644
--- a/profile/src/test/resources/test-profiles/invalid/datetime-equalto-datetime-misspelled.json
+++ b/profile/src/test/resources/test-profiles/invalid/datetime-equalto-datetime-misspelled.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/datetime-equalto-decimal-misspelled.json b/profile/src/test/resources/test-profiles/invalid/datetime-equalto-decimal-misspelled.json
index 4b984710e..131346644 100644
--- a/profile/src/test/resources/test-profiles/invalid/datetime-equalto-decimal-misspelled.json
+++ b/profile/src/test/resources/test-profiles/invalid/datetime-equalto-decimal-misspelled.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/datetime-equalto-integer-misspelled.json b/profile/src/test/resources/test-profiles/invalid/datetime-equalto-integer-misspelled.json
index ee10302fe..ab65afc46 100644
--- a/profile/src/test/resources/test-profiles/invalid/datetime-equalto-integer-misspelled.json
+++ b/profile/src/test/resources/test-profiles/invalid/datetime-equalto-integer-misspelled.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/datetime-equalto-string-misspelled.json b/profile/src/test/resources/test-profiles/invalid/datetime-equalto-string-misspelled.json
index a3ecd6651..debd3d2ee 100644
--- a/profile/src/test/resources/test-profiles/invalid/datetime-equalto-string-misspelled.json
+++ b/profile/src/test/resources/test-profiles/invalid/datetime-equalto-string-misspelled.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/empty-constraint.json b/profile/src/test/resources/test-profiles/invalid/empty-constraint.json
index 6e30a1f73..45a0f9211 100644
--- a/profile/src/test/resources/test-profiles/invalid/empty-constraint.json
+++ b/profile/src/test/resources/test-profiles/invalid/empty-constraint.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/field-is-with-extra-key.json b/profile/src/test/resources/test-profiles/invalid/field-is-with-extra-key.json
index 4c7dbb57a..9c16db564 100644
--- a/profile/src/test/resources/test-profiles/invalid/field-is-with-extra-key.json
+++ b/profile/src/test/resources/test-profiles/invalid/field-is-with-extra-key.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/field-missing-is.json b/profile/src/test/resources/test-profiles/invalid/field-missing-is.json
index 930a03001..3c96981c7 100644
--- a/profile/src/test/resources/test-profiles/invalid/field-missing-is.json
+++ b/profile/src/test/resources/test-profiles/invalid/field-missing-is.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/fields-array-empty.json b/profile/src/test/resources/test-profiles/invalid/fields-array-empty.json
index d6b374354..94f089dd4 100644
--- a/profile/src/test/resources/test-profiles/invalid/fields-array-empty.json
+++ b/profile/src/test/resources/test-profiles/invalid/fields-array-empty.json
@@ -1,5 +1,5 @@
{
"fields": [],
"rules": [],
- "schemaVersion": "0.7"
+ "schemaVersion": "0.16"
}
\ No newline at end of file
diff --git a/profile/src/test/resources/test-profiles/invalid/greaterThan-max.json b/profile/src/test/resources/test-profiles/invalid/greaterThan-max.json
index d197e39eb..cb93ef764 100644
--- a/profile/src/test/resources/test-profiles/invalid/greaterThan-max.json
+++ b/profile/src/test/resources/test-profiles/invalid/greaterThan-max.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/greaterThanOrEqualTo-max.json b/profile/src/test/resources/test-profiles/invalid/greaterThanOrEqualTo-max.json
index 2514bea1a..d25665100 100644
--- a/profile/src/test/resources/test-profiles/invalid/greaterThanOrEqualTo-max.json
+++ b/profile/src/test/resources/test-profiles/invalid/greaterThanOrEqualTo-max.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/if-else-invalid-type.json b/profile/src/test/resources/test-profiles/invalid/if-else-invalid-type.json
index f08591f29..8097b20f7 100644
--- a/profile/src/test/resources/test-profiles/invalid/if-else-invalid-type.json
+++ b/profile/src/test/resources/test-profiles/invalid/if-else-invalid-type.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/if-else-misspelled.json b/profile/src/test/resources/test-profiles/invalid/if-else-misspelled.json
index bac0e5f2d..3661e3446 100644
--- a/profile/src/test/resources/test-profiles/invalid/if-else-misspelled.json
+++ b/profile/src/test/resources/test-profiles/invalid/if-else-misspelled.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/if-else-without-then.json b/profile/src/test/resources/test-profiles/invalid/if-else-without-then.json
index 7cafec941..f0ad57640 100644
--- a/profile/src/test/resources/test-profiles/invalid/if-else-without-then.json
+++ b/profile/src/test/resources/test-profiles/invalid/if-else-without-then.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/if-extra-key.json b/profile/src/test/resources/test-profiles/invalid/if-extra-key.json
index 77d937d7d..eb34de5d1 100644
--- a/profile/src/test/resources/test-profiles/invalid/if-extra-key.json
+++ b/profile/src/test/resources/test-profiles/invalid/if-extra-key.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/if-invalid-type.json b/profile/src/test/resources/test-profiles/invalid/if-invalid-type.json
index 28bedfefb..674a22c2b 100644
--- a/profile/src/test/resources/test-profiles/invalid/if-invalid-type.json
+++ b/profile/src/test/resources/test-profiles/invalid/if-invalid-type.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/if-misspelled.json b/profile/src/test/resources/test-profiles/invalid/if-misspelled.json
index e2ac6abce..3593a7caa 100644
--- a/profile/src/test/resources/test-profiles/invalid/if-misspelled.json
+++ b/profile/src/test/resources/test-profiles/invalid/if-misspelled.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/if-then-invalid-type.json b/profile/src/test/resources/test-profiles/invalid/if-then-invalid-type.json
index aadca3b54..2a7932d66 100644
--- a/profile/src/test/resources/test-profiles/invalid/if-then-invalid-type.json
+++ b/profile/src/test/resources/test-profiles/invalid/if-then-invalid-type.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/if-then-misspelled.json b/profile/src/test/resources/test-profiles/invalid/if-then-misspelled.json
index bdedbb79c..9777a8d5a 100644
--- a/profile/src/test/resources/test-profiles/invalid/if-then-misspelled.json
+++ b/profile/src/test/resources/test-profiles/invalid/if-then-misspelled.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/lessThan-min.json b/profile/src/test/resources/test-profiles/invalid/lessThan-min.json
index cd75d70c1..887742507 100644
--- a/profile/src/test/resources/test-profiles/invalid/lessThan-min.json
+++ b/profile/src/test/resources/test-profiles/invalid/lessThan-min.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/lessThanOrEqualTo-min.json b/profile/src/test/resources/test-profiles/invalid/lessThanOrEqualTo-min.json
index ddb37fd1d..8bafb89d7 100644
--- a/profile/src/test/resources/test-profiles/invalid/lessThanOrEqualTo-min.json
+++ b/profile/src/test/resources/test-profiles/invalid/lessThanOrEqualTo-min.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/matchingRegex-value-numeric.json b/profile/src/test/resources/test-profiles/invalid/matchingRegex-value-numeric.json
index 3deb20fd3..7b2c88c5b 100644
--- a/profile/src/test/resources/test-profiles/invalid/matchingRegex-value-numeric.json
+++ b/profile/src/test/resources/test-profiles/invalid/matchingRegex-value-numeric.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "field1"
diff --git a/profile/src/test/resources/test-profiles/invalid/matchingRegex-value-object.json b/profile/src/test/resources/test-profiles/invalid/matchingRegex-value-object.json
index 90afa6b73..855234363 100644
--- a/profile/src/test/resources/test-profiles/invalid/matchingRegex-value-object.json
+++ b/profile/src/test/resources/test-profiles/invalid/matchingRegex-value-object.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "field1"
diff --git a/profile/src/test/resources/test-profiles/invalid/missing-constraint.json b/profile/src/test/resources/test-profiles/invalid/missing-constraint.json
index 7d4b275a1..9c69029c9 100644
--- a/profile/src/test/resources/test-profiles/invalid/missing-constraint.json
+++ b/profile/src/test/resources/test-profiles/invalid/missing-constraint.json
@@ -7,6 +7,6 @@
"name": "field2"
}
],
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [{"rule": "rule 1"}]
}
\ No newline at end of file
diff --git a/profile/src/test/resources/test-profiles/invalid/no-fields.json b/profile/src/test/resources/test-profiles/invalid/no-fields.json
index 8a3299abe..c06b7c098 100644
--- a/profile/src/test/resources/test-profiles/invalid/no-fields.json
+++ b/profile/src/test/resources/test-profiles/invalid/no-fields.json
@@ -15,5 +15,5 @@
]
}
],
- "schemaVersion": "0.7"
+ "schemaVersion": "0.16"
}
\ No newline at end of file
diff --git a/profile/src/test/resources/test-profiles/invalid/no-rules.json b/profile/src/test/resources/test-profiles/invalid/no-rules.json
index 44296c1f1..7bff85e2c 100644
--- a/profile/src/test/resources/test-profiles/invalid/no-rules.json
+++ b/profile/src/test/resources/test-profiles/invalid/no-rules.json
@@ -7,5 +7,5 @@
"name": "field2"
}
],
- "schemaVersion": "0.7"
+ "schemaVersion": "0.16"
}
\ No newline at end of file
diff --git a/profile/src/test/resources/test-profiles/invalid/simple-if.json b/profile/src/test/resources/test-profiles/invalid/simple-if.json
index 67e30c67c..99c220094 100644
--- a/profile/src/test/resources/test-profiles/invalid/simple-if.json
+++ b/profile/src/test/resources/test-profiles/invalid/simple-if.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"rules": [
{
"rule": "rule 1",
diff --git a/profile/src/test/resources/test-profiles/invalid/v0-2-features-in-v0-1-profile.json b/profile/src/test/resources/test-profiles/invalid/v0-2-features-in-v0-1-profile.json
index d9047adc3..93dfd5018 100644
--- a/profile/src/test/resources/test-profiles/invalid/v0-2-features-in-v0-1-profile.json
+++ b/profile/src/test/resources/test-profiles/invalid/v0-2-features-in-v0-1-profile.json
@@ -1,5 +1,5 @@
{
- "schemaVersion": "0.7",
+ "schemaVersion": "0.16",
"fields": [
{
"name": "first"