feat(api-v2): Specify custom IRIs when creating resources/values #1646
Conversation
…s + test + test data
…RI and assign it to value + test
@benjamingeer looking at the code I see that: when a resource with multiple values is being created, the In my opinion, custom |
Yes, good analysis! |
…m IRI, value IRIs, and value UUIDs.
The following refactoring step
will happen in DSP-355 |
@benjamingeer eventually the tests passed! |
After thinking about this some more, I think we actually need to accept a custom value creation date for each value even when creating a new resource. Imagine this scenario:
The ARK URL should still work, which means that the updated value needs to have its own value creation date, not the value creation date of the resource. Sorry I didn't think this through well enough before. |
...g/knora/webapi/messages/v2/responder/valuemessages/ValueMessagesV2.scala
Show resolved
Hide resolved
...pi/src/main/scala/org/knora/webapi/responders/v2/ValuesResponderV2.scala
Show resolved
Hide resolved
…ing added to docs
In that case, if no custom creation date is provided for the value of a new resource, the creation date of the resource should be assigned to the value, right? |
@benjamingeer last commit contains the implementation of "create resources with values that have custom creation dates". Can you please tell me your opinion? |
Looks good to me. I'm just talking to Ivan about some questions I have... I think we may need more than custom IRIs to make this whole thing work... |
...pi/src/main/scala/org/knora/webapi/responders/v2/ValuesResponderV2.scala
Show resolved
Hide resolved
Yes. I just talked to Ivan about some additional complexity in copying a repository. The result is that there's a new user story for additional functionality (https://dasch.myjetbrains.com/youtrack/issue/DSP-398). This would also require being able to specify:
Do you want to do those in this PR? |
No, I prefer to do it in a separate PR. |
OK then I think this one is good to merge! You can approve it yourself. :) |
Thanks for reviewing it! |
User story: https://dasch.myjetbrains.com/youtrack/issue/DSP-159
CreateResourceRequestV2.fromJsonLD
accept:CreateValueRequestV2.fromJsonLD
accept:ResourcesResponderV2
andValuesResponderV2
use this information.