New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(api-v2): Accept custom new value IRI when updating value #1698
Conversation
- Make validation more strict. - Clarify tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is great, thanks for this.
* @param resourceID the ID of the containing resource. | ||
* @return the validated IRI. | ||
*/ | ||
def validateCustomValueIri(customValueIri: SmartIri, projectCode: String, resourceID: String): SmartIri = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for adding the validation of custom resource and value IRIs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem!
intValueAsInt should ===(intValue) | ||
} | ||
|
||
"not update an integer value with a custom new value version IRI that is the same as the current IRI" in { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe in another PR, we can think about making these parameter validation tests unit tests in messages instead of e2e ones. We are trying to do so in admin API currently because e2e tests are expensive.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea.
Thanks for the review! |
https://dasch.myjetbrains.com/youtrack/issue/DSP-543