Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pukkaone/accession
Schema registry with schemas stored in Git
https://github.com/pukkaone/accession
avro schema-registry
Last synced: 4 days ago
JSON representation
Schema registry with schemas stored in Git
- Host: GitHub
- URL: https://github.com/pukkaone/accession
- Owner: pukkaone
- License: apache-2.0
- Created: 2022-05-13T08:39:03.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-06T17:58:46.000Z (11 days ago)
- Last Synced: 2024-11-06T18:34:11.709Z (10 days ago)
- Topics: avro, schema-registry
- Language: Java
- Homepage:
- Size: 124 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.adoc
- License: LICENSE.txt
Awesome Lists containing this project
README
= Accession Schema Registry
This schema registry stores schemas in a Git repository. It consists of these components:
* A Maven plugin puts schemas into the schema registry.
* A server provides schemas from the schema registry. It exposes an API compatible with the
https://docs.confluent.io/current/schema-registry/develop/api.html[Confluent schema registry].== Schema registry Maven plugin
This Maven plugin puts a schema into the schema registry. If a new schema is
incompatible with registered schemas, then the plugin fails the Maven build.[source,xml]
----com.github.pukkaone.accession
schema-registry-maven-plugin
${accession.version}
FORWARD
main
ssh://[email protected]/example/schema-registry.git
main
false
.*
ssh://[email protected]/example/schema-registry.git
develop
true
topic
1
com.example.Event
deploy
register
----
[cols="1,3"]
|===
|Parameter |Description|`compatibility` |How to compare new schema to registered schema for compatibility.
Allowed values are BACKWARD, FORWARD, FULL. Default is FORWARD.
|`registryRepositories` |Rules to select which Git repository and branch will
store the schemas. Only the first matching rule applies. A rule matches if
the `projectBranchPattern` regular expression matches the project's checked-out
Git branch.
|`projectBranchPattern` |Regular expression to match project checked-out Git branch.
|`registryUri` |Schema registry Git repository URI
|`registryBranch` |Schema registry Git branch
|`mutableVersions` |Whether to allow changing the schema of an existing version
|`registrations` |Requests to register a schema in a subject and version
|`subject` |Scope in which schemas can evolve. If the subject does not end with
`-key` or `-value`, then `-value` is implicitly appended to the subject.
|`version` |integer (0 to 999) uniquely identifying the version within the subject
|`reflectClass` |Java class to introspect to generate Avro schema
|===The above example shows the intent to forbid changing schemas registered in
the `main` branch of the Git repository, by setting the `mutableVersions`
parameter to false. If the `version` parameter specifies a version already
existing in the schema registry, then the plugin verifies the schema to be
registered is identical to the schema in the existing version. An attempt to
register a different schema in an existing version causes the plugin to fail
the Maven build.To allow work in progress schema changes to a version, the `mutableVersions`
parameter is true for the `develop` branch of the Git repository. If the
`version` parameter specifies a version already existing in the schema
registry, then the plugin replaces the schema in that version.