Fix validation problems#103
Merged
martin-fleck-at merged 7 commits intoeclipse-emfcloud:masterfrom May 14, 2021
Merged
Conversation
martin-fleck-at
requested changes
Apr 26, 2021
Contributor
martin-fleck-at
left a comment
There was a problem hiding this comment.
Code looks good to me but could you please add a test case for this?
2355122 to
e16c74c
Compare
Before, if a model would contain a value that is not cohering to the defined pattern facet, the ObjectMapper could not encode the diagnostic properly because it ignored private fields. This is now fixed. Signed-off-by: Simon Graband <sgraband@eclipsesource.com>
The Deserializer did not set the severity not properly. This fixes that. Signed-off-by: Simon Graband <sgraband@eclipsesource.com>
Now the validation/constraints endpoint returns all of the constraints for each type, as well as the parent types. Also features with empty constraints are not send to the client anymore. Signed-off-by: Simon Graband <sgraband@eclipsesource.com>
Signed-off-by: Simon Graband <sgraband@eclipsesource.com>
martin-fleck-at
requested changes
May 12, 2021
Contributor
martin-fleck-at
left a comment
There was a problem hiding this comment.
Hi Simon, could you please also add some test cases for the retrieval of the validation constraints? I think:
- Without constraints
- With constraints
- With constraints + parent constraints
- With constraints + overwritten parent constraints (I believe the lowest in the hierarchy should probably be used).
Otherwise the change looks great, thank you!
|
|
||
| } | ||
|
|
||
| public boolean hasConstraints() { |
Contributor
There was a problem hiding this comment.
This method produces two checkstyle warnings and leads to errors in the build: https://ci.eclipse.org/emfcloud/job/eclipse-emfcloud/job/emfcloud-modelserver/job/PR-103/11/checkstyle/new/
Signed-off-by: Simon Graband <sgraband@eclipsesource.com> Co-authored-by: Martin Fleck <mfleck@eclipsesource.com>
martin-fleck-at
approved these changes
May 14, 2021
Contributor
martin-fleck-at
left a comment
There was a problem hiding this comment.
Changes look good to me, thank you very much Simon!
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Before, if a model would contain a value that is not cohering to the
defined pattern facet, the ObjectMapper could not encode the diagnostic
properly because it ignored private fields. This is now fixed.
The validation/constraints endpoint now also returns constraints from extended features and does not send features without any constraints.
To test the pattern fix, the usecase described in #102. Was added to the validation test to assure this is working.
Fixes #102
Signed-off-by: Simon Graband sgraband@eclipsesource.com