Skip to content
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

Merged
merged 6 commits into from Sep 8, 2020

Conversation

@benjamingeer
Copy link
Collaborator

@benjamingeer benjamingeer commented Sep 4, 2020

https://dasch.myjetbrains.com/youtrack/issue/DSP-543

  • Accept a custom new value IRI when updating a value.
  • Require custom value IRIs to have the correct format.
  • Require custom resource IRIs to have the correct format.
  • Add tests and clarify some existing tests.
  • Add docs.
@benjamingeer benjamingeer self-assigned this Sep 4, 2020
@benjamingeer benjamingeer marked this pull request as draft Sep 4, 2020
benjamingeer added 2 commits Sep 7, 2020
- Make validation more strict.
- Clarify tests.
@benjamingeer benjamingeer marked this pull request as ready for review Sep 7, 2020
Copy link
Contributor

@SepidehAlassi SepidehAlassi left a comment

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 = {

This comment has been minimized.

@SepidehAlassi

SepidehAlassi Sep 8, 2020
Contributor

thanks for adding the validation of custom resource and value IRIs

This comment has been minimized.

@benjamingeer

benjamingeer Sep 8, 2020
Author Collaborator

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 {

This comment has been minimized.

@SepidehAlassi

SepidehAlassi Sep 8, 2020
Contributor

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.

This comment has been minimized.

@benjamingeer

benjamingeer Sep 8, 2020
Author Collaborator

Good idea.

@benjamingeer
Copy link
Collaborator Author

@benjamingeer benjamingeer commented Sep 8, 2020

Thanks for the review!

@benjamingeer benjamingeer merged commit 4d8f867 into develop Sep 8, 2020
7 checks passed
7 checks passed
Build Everything
Details
API Unit Tests
Details
API E2E Tests
Details
API Integration Tests
Details
Upgrade Integration Tests
Details
Docs Build Test
Details
Publish (on release only)
Details
@benjamingeer benjamingeer deleted the wip/DSP-543-update-value branch Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants