-
Notifications
You must be signed in to change notification settings - Fork 48
fix(DOC-2061): clarify schema reference name field per schema type #1613
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -648,7 +648,23 @@ A successful registration returns the schema's `id`: | |||||||||||
|
|
||||||||||||
| == Reference a schema | ||||||||||||
|
|
||||||||||||
| To build more complex schema definitions, you can add a reference to other schemas. The following example registers a Protobuf schema in subject `test-simple` with a message name `Simple`. | ||||||||||||
| To build more complex schema definitions, you can add a reference to other schemas. A reference identifies another schema using a `name`, `subject`, and `version`. The meaning of `name` depends on the schema type: | ||||||||||||
|
|
||||||||||||
| [cols="1,2"] | ||||||||||||
| |=== | ||||||||||||
| | Schema type | Reference name | ||||||||||||
|
|
||||||||||||
| | Protobuf | ||||||||||||
| | The import path used in the `.proto` file (for example, `import "simple";` uses name `simple`) | ||||||||||||
|
|
||||||||||||
| | Avro | ||||||||||||
| | The fully qualified schema name, combining the namespace and record name (for example, `com.example.Address`) | ||||||||||||
|
|
||||||||||||
|
Comment on lines
+660
to
+662
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avro wording should cover schemas without a namespace. Current phrasing implies namespace is always present. For Avro records without Suggested wording tweak-| The fully qualified schema name, combining the namespace and record name (for example, `com.example.Address`)
+| The schema name used by Avro resolution: fully qualified (`namespace.name`) when a namespace is defined, or just the record name when it is not (for example, `com.example.Address` or `Address`)📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
| | JSON Schema | ||||||||||||
| | A URI used in `$ref` to identify the referenced schema | ||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While this is true for Confluent's schema registry, we don't yet support external JSON schema references in redpanda's schema registry like this one. So I think we should explicitly call this out here that this is not yet supported.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Related to this, the https://docs.redpanda.com/redpanda-cloud/manage/schema-reg/schema-reg-overview/#limitations page is also slightly incorrectly worded. Could you please reword that section to the following (or equivalent): The current wording says that $ref, $defs/definitions, dependentSchemas/dependentRequired, and prefixItems are all rejected when compatibility is not NONE. This is too broad — internal $ref with definitions/$defs and bundled $id schemas all work correctly under BACKWARD compatibility. |
||||||||||||
| |=== | ||||||||||||
|
|
||||||||||||
| The following example registers a Protobuf schema in subject `test-simple` with a message name `Simple`. | ||||||||||||
|
|
||||||||||||
| [tabs] | ||||||||||||
| ==== | ||||||||||||
|
|
||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this would be a more realistic example