Skip to content

Conversation

@ljank
Copy link
Contributor

@ljank ljank commented May 12, 2025

Goal of this PR

Confluent Schema Registry supports tags, metadata, and rules, which together support the concept of a Data Contract.

This change adds support only for metadata properties that may include arbitrary information about the schema, such as who created it:

{
  "schema": "...",
  "metadata": {
    "properties": {
      "owner": "Bob Jones",
      "email": "[email protected]"
    }
  }
}

Properties may also include major schema version to highlight incompatible changes throughout the schema history:

{
  "schema": "...",
  "metadata": {
    "properties": {
      "application.major.version": "2"
    }
  }
}

How did I test it?

Added new test case.

Confluent Schema Registry supports tags, metadata, and rules, which together support the concept of a [Data Contract](https://docs.confluent.io/platform/7.9/schema-registry/fundamentals/data-contracts.html).

This change adds support only for [metadata properties](https://docs.confluent.io/platform/7.9/schema-registry/fundamentals/data-contracts.html#metadata-properties) that may include arbitrary information about the schema, such as who created it:

```json
{
  "schema": "...",
  "metadata": {
    "properties": {
      "owner": "Bob Jones",
      "email": "[email protected]"
    }
  }
}
```

Properties may also include [major schema version](https://docs.confluent.io/platform/7.9/schema-registry/fundamentals/data-contracts.html#application-major-versioning) to highlight incompatible changes throughout the schema history:

```json
{
  "schema": "...",
  "metadata": {
    "properties": {
      "application.major.version": "2"
    }
  }
}
```
@nrwiersma nrwiersma merged commit fd0c79e into hamba:main May 12, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants