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

Support JSON 'view' consumer schemas #450

Open
big-andy-coates opened this issue Jan 9, 2024 · 0 comments
Open

Support JSON 'view' consumer schemas #450

big-andy-coates opened this issue Jan 9, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@big-andy-coates
Copy link
Member

JSON Schema compatibility checks in Creek differentiate between producer and consumer schemas. Producers use closed, vs consumer using open content models.

When registering a new producer schema, compatibility is confirmed by ensuring all existing consumer schemas are backward compatible with the new producer. These 'existing consumer schemas' as the open content model equivalents of the closed producer schemas registered in the schema registry.

When checking if a consuming schema is compatible, we currently just check the closed content model equivalent_ of the open consumer schema is registered in the schema registry, i.e. that a matching producer schema is registered.

A reduced-view consumer schema is one holding a subset of properties defined in an, already compatible, known consumer schema. The reduced-view schema is fully compatible if it is backwards compatible with at least one known compatible consumer schema.

Using a reduced view consumer schema and matching pojos would reduce deserialisation and validation costs.

To avoid unnecessarily having to pull down potentially all registered producer schemas and synthesis consumers from them to find one the reduced-view schema is backwards compatible with... the implementation should accept as inputs a known producer schema and the view schema, where the view schema is known to be backwards compatible with the consumer schema synthesised from the known producer schema. The code can then confirm view schema is backwards compatible with synthesised consumer schema, before checked the producer schema is registered.

@big-andy-coates big-andy-coates added the enhancement New feature or request label Jan 9, 2024
@big-andy-coates big-andy-coates self-assigned this Jan 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant