Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rest api validate/generate operations. added tests.
- Loading branch information
Showing
33 changed files
with
913 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
198 changes: 157 additions & 41 deletions
198
model/model-impl/src/main/java/com/evolveum/midpoint/model/impl/ModelRestService.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
testing/rest/src/test/resources/repo/json/policy-generate-bad-path.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"@ns": "http://midpoint.evolveum.com/xml/ns/public/common/api-types-3", | ||
"policyItemsDefinition": { | ||
"policyItemDefinition": [{ | ||
"target": { | ||
"path": "parentOrgRef" | ||
}, | ||
"valuePolicyRef": { | ||
"@ns": "http://midpoint.evolveum.com/xml/ns/public/common/common-3", | ||
"type": "http://midpoint.evolveum.com/xml/ns/public/common/common-3#ValuePolicyType", | ||
"oid": "00000000-0000-0000-1111-000000000003" | ||
} | ||
}] | ||
} | ||
} |
28 changes: 28 additions & 0 deletions
28
testing/rest/src/test/resources/repo/json/policy-generate-execute.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
{ | ||
"@ns": "http://midpoint.evolveum.com/xml/ns/public/common/api-types-3", | ||
"policyItemsDefinition": { | ||
"policyItemDefinition": [{ | ||
"target": { | ||
"path": "phoneNumber" | ||
}, | ||
"valuePolicyRef": { | ||
"@ns": "http://midpoint.evolveum.com/xml/ns/public/common/common-3", | ||
"type": "http://midpoint.evolveum.com/xml/ns/public/common/common-3#ValuePolicyType", | ||
"oid": "00000000-0000-0000-1111-000000000003" | ||
}},{ | ||
"target": { | ||
"path": "employeeNumber" | ||
}, | ||
"valuePolicyRef": { | ||
"@ns": "http://midpoint.evolveum.com/xml/ns/public/common/common-3", | ||
"type": "http://midpoint.evolveum.com/xml/ns/public/common/common-3#ValuePolicyType", | ||
"oid": "00000000-0000-0000-1111-000000000003" | ||
}, | ||
"execute" : "true" | ||
}, { | ||
"target": { | ||
"path": "costCenter" | ||
} | ||
}] | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
testing/rest/src/test/resources/repo/json/policy-generate.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"@ns": "http://midpoint.evolveum.com/xml/ns/public/common/api-types-3", | ||
"policyItemsDefinition": { | ||
"policyItemDefinition": [{ | ||
"target": { | ||
"path": "phoneNumber" | ||
}, | ||
"valuePolicyRef": { | ||
"@ns": "http://midpoint.evolveum.com/xml/ns/public/common/common-3", | ||
"type": "http://midpoint.evolveum.com/xml/ns/public/common/common-3#ValuePolicyType", | ||
"oid": "00000000-0000-0000-1111-000000000003" | ||
} | ||
}, | ||
{ | ||
"target": { | ||
"path": "costCenter" | ||
} | ||
}] | ||
} | ||
} |
Oops, something went wrong.