vlingo / xoom-schemata

The VLINGO XOOM Schema Registry.
https://vlingo.io
Mozilla Public License 2.0
17 stars 9 forks source link

Check status before patch #121

Closed wwerner closed 4 years ago

wwerner commented 4 years ago

Currently, the validation of patch updates allows adding fields. This is incorrect, a patch update may only update metadata, not the specification.

Florian-Schoenherr commented 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?

VaughnVernon commented 4 years ago

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?

Florian-Schoenherr commented 4 years ago

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: button under hierarchy 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).

VaughnVernon commented 4 years ago

@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.

Florian-Schoenherr commented 4 years ago

Which means the issue is actually that version can only be draft when you patch and can change whatever you want to change.

VaughnVernon commented 4 years ago

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.

Florian-Schoenherr commented 4 years ago

image We have these options, which should be possible? Or we can tell on UI "hey, if you change this it effects downstream"..

VaughnVernon commented 4 years ago

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.

Florian-Schoenherr commented 4 years ago

Only specification can change in Draft 👍 I'll implement the status check for patching now.

Florian-Schoenherr commented 4 years ago

Closed by https://github.com/vlingo/vlingo-schemata/commit/358fd5880b5b82c1e84174d3e7400e642fcd4d7c