Closed wwerner closed 4 years ago
@VaughnVernon what kind of metadata do we have on specification?
I think specification can only change on a version update, so we never patch
.
Can I delete the patch-method and close this?
I have no clear understanding of what this is about and I will need more context to make a suggestion or decision. Is this regarding the use of HTTP PATCH
method? If so, what's the concern?
Ok so the path method he is referring to is never used (in svelte UI). You can only change a schema version's specification by creating a new schema version with another version number.
In the vue ui you had a button right here: to change the specification. PATCH was used there. But changing the spec shouldn't be possible without actually creating a new version (by using POST).
@Florian-Schoenherr If I understand correctly, you may update a current specification if it is in Draft status. If it is Published, then yes it is golden and must not be modified, in which case a new version is required.
Which means the issue is actually that version can only be draft when you patch and can change whatever you want to change.
Assuming that changes are conservative, yes. The purpose of Draft is to enable dependents to use the schemas early with the understanding that there may be changes. The less ripple the better. If wholesale changes must be made, possibly even removing the schema altogether, that is certainly possible. Yet the idea is to have the least impact on the downstream as possible.
We have these options, which should be possible? Or we can tell on UI "hey, if you change this it effects downstream"..
When in Draft status they are all possible and valid (hopefully the schema version can't be changed, which would not be good). Add is best, while change/remove/move are worst. It's more about what's necessary, but the point is that warning the developer-editor role about change/remove/move is appropriate. There is also the matter of communicating these changes to dependents when they occur. The events should make that very doable, even if there are summaries of all such changes across the context once per day (rather than 20x per day). We can even maintain a log of all edit changes over time in the query model.
Only specification can change in Draft 👍 I'll implement the status check for patching now.
Currently, the validation of
patch
updates allows adding fields. This is incorrect, apatch
update may only update metadata, not the specification.