From c41a9a06858b6dbd688dc36fb46126bc5c94a272 Mon Sep 17 00:00:00 2001 From: adiglp <113613176+adiglp@users.noreply.github.com> Date: Tue, 10 Jun 2025 15:34:22 +0200 Subject: [PATCH] Update k_schemas.md --- .../k_schemas.md | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/asynchronous-api-guidelines/kafka-asynchronous-guidelines/k_schemas.md b/asynchronous-api-guidelines/kafka-asynchronous-guidelines/k_schemas.md index 7348b44..a17dff2 100644 --- a/asynchronous-api-guidelines/kafka-asynchronous-guidelines/k_schemas.md +++ b/asynchronous-api-guidelines/kafka-asynchronous-guidelines/k_schemas.md @@ -14,18 +14,24 @@ channels: publish: ... message: - $ref: '#/components/messages/topic1Payload' + $ref: '#/components/messages/namespace.source.event.topic-name' + components: ... - schemas: - ... - topic1SchemaValue: - schemaFormat: 'application/vnd.apache.avro;version=1.9.0' - payload: - $ref: https://sit-fdp-pivotal-schema-registry.api.3stripes.io/subjects/pea_fd_fdp.sample.test-value/versions/latest/schema messages: - topic1Payload: - $ref: '#/components/schemas/topic1SchemaValue' + namespace.source.event.topic-name: + $ref: '#/components/schemas/namespace.source.event.topic-name' + ... + schemas: + namespace.source.event.topic-name: + description: 'Schema[s] retrieved from Schema Registry' + schemaFormat: 'application/vnd.apache.avro;version=1.9.0' + payload: + $ref: 'https://dev-fdp-playground-schema-registry.api.3stripes.io/subjects/namespace.source.event.topic-name-value/versions/latest/schema' + bindings: + kafka: + key: + $ref: 'https://dev-fdp-playground-schema-registry.api.3stripes.io/subjects/namespace.source.event.topic-name-key/versions/latest/schema' ``` -**Important note** The used schema is a very simple one, it is only used to illustrate how to refer to it. +**Important note** The used schema is a very simple one, it is only used to illustrate how to refer to it. In case the message doesn't use schema for the key, _bindings_ field can be omitted from the schema.