higherkindness / compendium

HTTP service for schema storage and client generation
Apache License 2.0
28 stars 1 forks source link

Schema compatibility validation #10

Closed rafaparadela closed 5 years ago

rafaparadela commented 5 years ago

When updating a schema, compendium should be able to check compatibility.

This process would roughly be:

  1. Calculate the diff between both
  2. Check if the changes are retrocompatible
  3. In case of non-retrocompatible changes, don't allow PATCH nor MINOR updates, only MAJOR.

To be able to execute this task, we will need to introduce tree-diffing in Droste. We can get inspiration from Matryoshka's diff https://github.com/slamdata/matryoshka/blob/master/core/shared/src/main/scala/matryoshka/patterns/Diff.scala

diesalbla commented 5 years ago

The comparison/diff algorithm involving 1. and 2. was implemented in the Skeumorph project, in https://github.com/higherkindness/skeuomorph/pull/82.