Skip to content

DOC-1790: Schema Registry Metadata Properties#1690

Open
Feediver1 wants to merge 8 commits intomainfrom
DOC-1790-schema-registry-metadata-properties
Open

DOC-1790: Schema Registry Metadata Properties#1690
Feediver1 wants to merge 8 commits intomainfrom
DOC-1790-schema-registry-metadata-properties

Conversation

@Feediver1
Copy link
Copy Markdown
Contributor

@Feediver1 Feediver1 commented May 1, 2026

Summary

  • Adds a new == Metadata properties section to schema-reg-overview.adoc, positioned after == JSON Schema and before == Next steps
  • Documents the API request format for registering schemas with metadata.properties
  • Documents the rpk --metadata-properties (key=value) and -p (JSON string) flags, plus --print-metadata for viewing
  • Covers inheritance behavior (auto-inherit from latest version; send null to clear) and versioning behavior (different metadata = new version)
  • Includes a NOTE admonition listing unsupported Confluent Data Contracts features

Preview

In Cloud: https://deploy-preview-1690--redpanda-docs-preview.netlify.app/redpanda-cloud/manage/schema-reg/schema-reg-overview/#metadata-properties
Self-Managed: https://deploy-preview-1690--redpanda-docs-preview.netlify.app/current/manage/schema-reg/schema-reg-overview/#metadata-properties

Test plan

  • Verify page preview renders correctly
  • Confirm {ui} attribute resolves in both cloud and self-hosted builds
  • Verify -p flag name is correct in rpk CLI reference

🤖 Generated with Claude Code

Adds a new section covering metadata properties support in Schema Registry,
including API usage, rpk flags, inheritance behavior, and Confluent Data
Contracts compatibility notes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Feediver1 Feediver1 requested a review from a team as a code owner May 1, 2026 23:13
@netlify
Copy link
Copy Markdown

netlify Bot commented May 1, 2026

Deploy Preview for redpanda-docs-preview ready!

Name Link
🔨 Latest commit a77d489
🔍 Latest deploy log https://app.netlify.com/projects/redpanda-docs-preview/deploys/69f8dec4afd55e00089edcb8
😎 Deploy Preview https://deploy-preview-1690--redpanda-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 1, 2026

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 0ab49eec-f8b4-43b4-b516-7b4d2cea2cc7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Added a new documentation section describing how Schema Registry supports arbitrary key-value metadata properties alongside schemas. The section covers request and response formats for registering and retrieving schemas with metadata, provides CLI examples using the rpk tool for passing metadata as key-value pairs or JSON strings, documents inheritance behavior when registering new schema versions, and specifies supported Confluent Data Contracts metadata features.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Suggested reviewers

  • trevpanda
  • mattschumpert
  • kbatuigas
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and concisely describes the main change: adding documentation for Schema Registry's metadata properties feature.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description provides clear summary, preview links for both Cloud and Self-Managed versions, and a detailed test plan with specific verification items.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch DOC-1790-schema-registry-metadata-properties

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (2)
modules/manage/pages/schema-reg/schema-reg-overview.adoc (2)

166-178: ⚡ Quick win

Separate endpoint text from the JSON payload example.

The current block is tagged as JSON but includes an HTTP request line, which hurts syntax accuracy and copy/paste usability.

Proposed edit
-[source,json]
-----
-POST /subjects/my-topic-value/versions
-{
+POST `/subjects/my-topic-value/versions`
+
+[source,json]
+----
+{
   "schema": "{\"type\":\"string\"}",
   "metadata": {
     "properties": {
       "owner": "platform-team",
       "application.version": "2.1.0"
     }
   }
 }
 ----
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/manage/pages/schema-reg/schema-reg-overview.adoc` around lines 166 -
178, The example mixes an HTTP request line with a JSON code block, so split
them: move the "POST /subjects/my-topic-value/versions" request line out of the
[source,json] block and place it in its own code block (e.g., [source,http] or a
plain example line) and leave only the JSON payload inside the [source,json]
block; update the surrounding text to reference the two blocks so the JSON
payload and the HTTP request line are separately selectable and properly
syntax-highlighted.

191-191: ⚡ Quick win

Link {ui} to the Schema Registry UI page.

Making this a cross-reference keeps navigation consistent and improves discoverability.

Proposed edit
-To view metadata on an existing schema, add `--print-metadata` to `rpk registry schema get`. You can also view metadata properties in {ui}.
+To view metadata on an existing schema, add `--print-metadata` to `rpk registry schema get`. You can also view metadata properties in xref:manage:schema-reg/schema-reg-ui.adoc[].

Based on learnings: AsciiDoc linking should prefer xref:...[] so target titles render automatically rather than hard-coded link text.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/manage/pages/schema-reg/schema-reg-overview.adoc` at line 191, The
AsciiDoc uses the placeholder {ui} in the sentence "You can also view metadata
properties in {ui}." — replace that placeholder with an AsciiDoc cross-reference
using the xref: syntax pointing to the Schema Registry UI page (e.g.,
xref:Schema-Registry-UI-Page[]), so the link renders the target title
automatically; update the text in schema-reg-overview.adoc where {ui} appears to
use xref:...[] instead of the raw variable.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@modules/manage/pages/schema-reg/schema-reg-overview.adoc`:
- Around line 180-189: The example shows use of unsupported rpk flags
(--metadata-properties and -p) when creating a schema; verify against the
current rpk implementation and either remove or replace them with supported
alternatives. Specifically, check the rpk CLI implementation or docs for the
commands used in the schema example and update the sample in
schema-reg-overview.adoc so it no longer references --metadata-properties or -p
(or annotate that metadata is unsupported), and ensure the surrounding text
about metadata on GET /subjects/{subject}/versions/{version} and GET
/schemas/ids/{id} remains accurate.

---

Nitpick comments:
In `@modules/manage/pages/schema-reg/schema-reg-overview.adoc`:
- Around line 166-178: The example mixes an HTTP request line with a JSON code
block, so split them: move the "POST /subjects/my-topic-value/versions" request
line out of the [source,json] block and place it in its own code block (e.g.,
[source,http] or a plain example line) and leave only the JSON payload inside
the [source,json] block; update the surrounding text to reference the two blocks
so the JSON payload and the HTTP request line are separately selectable and
properly syntax-highlighted.
- Line 191: The AsciiDoc uses the placeholder {ui} in the sentence "You can also
view metadata properties in {ui}." — replace that placeholder with an AsciiDoc
cross-reference using the xref: syntax pointing to the Schema Registry UI page
(e.g., xref:Schema-Registry-UI-Page[]), so the link renders the target title
automatically; update the text in schema-reg-overview.adoc where {ui} appears to
use xref:...[] instead of the raw variable.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 72001e41-62a3-461b-b5bd-051e338fbb01

📥 Commits

Reviewing files that changed from the base of the PR and between f45b216 and db82355.

📒 Files selected for processing (1)
  • modules/manage/pages/schema-reg/schema-reg-overview.adoc

Comment on lines +180 to +189
Metadata properties are returned on `GET /subjects/{subject}/versions/{version}` and `GET /schemas/ids/{id}` responses. Using rpk, pass metadata as `key=value` pairs with `--metadata-properties`, or as a JSON string with `-p`:

[source,bash]
----
# key=value pairs
rpk registry schema create my-subject --schema schema.avsc --metadata-properties owner=platform-team

# JSON string
rpk registry schema create my-subject --schema schema.avsc -p '{"owner":"platform-team","application.version":"2.1.0"}'
----
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Find authoritative docs references for schema-create flags and examples.
rg -n --iglob '*.adoc' -C3 '\brpk\s+registry\s+schema\s+create\b|--metadata-properties|(^|[[:space:]])-p([[:space:]]|$)|--print-metadata'

Repository: redpanda-data/docs

Length of output: 34818


🏁 Script executed:

# Read the flags section of rpk-registry-schema-create.adoc
cat -n modules/reference/pages/rpk/rpk-registry/rpk-registry-schema-create.adoc | sed -n '48,150p'

Repository: redpanda-data/docs

Length of output: 1543


🏁 Script executed:

# Check if there are more flags beyond line 76
wc -l modules/reference/pages/rpk/rpk-registry/rpk-registry-schema-create.adoc
# Also search for any mention of metadata in the entire file
rg -n 'metadata|^-p' modules/reference/pages/rpk/rpk-registry/rpk-registry-schema-create.adoc

Repository: redpanda-data/docs

Length of output: 138


🏁 Script executed:

# Search entire docs repo for metadata-properties or metadata in schema registry context
rg -n 'metadata-properties|--print-metadata' modules/manage/pages/schema-reg/ modules/reference/pages/rpk/rpk-registry/

Repository: redpanda-data/docs

Length of output: 713


Remove or verify these metadata flags against current rpk release; they are not documented in the authoritative rpk registry schema create reference.

The example at lines 185 and 188 uses --metadata-properties and -p for metadata JSON, but these flags do not appear in the official rpk reference documentation (modules/reference/pages/rpk/rpk-registry/rpk-registry-schema-create.adoc). The authoritative flag table lists only: -h/--help, --id, --references, --schema, --schema-version, --type, --config, -X/--config-opt, --format, --profile, and -v/--verbose. Confirm these metadata flags exist in the current rpk version before documenting them.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/manage/pages/schema-reg/schema-reg-overview.adoc` around lines 180 -
189, The example shows use of unsupported rpk flags (--metadata-properties and
-p) when creating a schema; verify against the current rpk implementation and
either remove or replace them with supported alternatives. Specifically, check
the rpk CLI implementation or docs for the commands used in the schema example
and update the sample in schema-reg-overview.adoc so it no longer references
--metadata-properties or -p (or annotate that metadata is unsupported), and
ensure the surrounding text about metadata on GET
/subjects/{subject}/versions/{version} and GET /schemas/ids/{id} remains
accurate.

-p is a shorthand for --metadata-properties (single flag, not two).
The flag accepts key=value or JSON, and can be passed multiple times.
Uses StringArrayVar to avoid comma conflicts with JSON values.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Comment thread modules/manage/pages/schema-reg/schema-reg-overview.adoc Outdated
Comment thread modules/manage/pages/schema-reg/schema-reg-overview.adoc Outdated
Co-authored-by: Joyce Fee <102751339+Feediver1@users.noreply.github.com>
Comment thread modules/manage/pages/schema-reg/schema-reg-overview.adoc Outdated
Comment thread modules/reference/pages/rpk/rpk-registry/rpk-registry-schema-create.adoc Outdated
- Use [,json]/[,bash] shorthand consistent with file conventions
- Move POST method/path to prose; JSON block now contains body only
- Fix dangling participial: "Using rpk" → "To set metadata using rpk"
- Fix NOTE: remove double blank line, use * list markers, fix trailing
  whitespace, distinguish schema-level features from config options,
  add link to Confluent Data Contracts spec
- Add line continuation to rpk reference examples for readability

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

== Metadata properties

Schema Registry lets you store and retrieve arbitrary key-value metadata properties alongside schemas. Properties such as `owner`, `team`, or `application.version` travel with the schema through its lifecycle. Send a `POST` request to `/subjects/{subject}/versions` with a `metadata.properties` object in the request body:
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'Send a 'POST' To do what? Needs rewording


To view metadata on an existing schema, add `--print-metadata` to `rpk registry schema get`. You can also view metadata properties in {ui}.

When you register a new schema version without a `metadata` field, the new version automatically inherits properties from the most recent version of that subject. To clear inherited metadata, send `"metadata": null`. Registering the same schema definition with different metadata properties creates a new schema version.
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not quite clear. You clear it when? when inserting the new version or later? need an example of clearing inherited metadata to clarify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants