-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* #406 ensure schema references are ordered correctly. Added test to load a spec with Currency and also Trade - currency is ref'd by Trade, the sort will ensure that '0' ref schemas register first. hard to test due to channel names being stored in a map * remove test ordering * undo remove test ordering
- Loading branch information
1 parent
3bec34a
commit b8be16d
Showing
3 changed files
with
113 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
kafka/src/test/resources/schema-ref/com.example.single-spec-with-refs-api.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
asyncapi: '2.4.0' | ||
id: 'urn:com.example.refs' | ||
info: | ||
title: Common Data Set | ||
version: '1.0.0' | ||
description: | | ||
Contains both a TRADE and Currency - where Trade --> Currency, it will provision both - but should determine the ref and process the 0 refs first | ||
servers: | ||
mosquitto: | ||
url: mqtt://test.mosquitto.org | ||
protocol: kafka | ||
channels: | ||
_public.trade: | ||
bindings: | ||
kafka: | ||
envs: | ||
- staging | ||
- prod | ||
partitions: 3 | ||
replicas: 1 | ||
configs: | ||
cleanup.policy: delete | ||
retention.ms: 999000 | ||
publish: | ||
summary: Trade feed | ||
description: Doing clever things | ||
operationId: onTrade received | ||
message: | ||
bindings: | ||
kafka: | ||
schemaIdLocation: "header" | ||
key: | ||
type: string | ||
|
||
schemaFormat: "application/vnd.apache.avro+json;version=1.9.0" | ||
contentType: "application/octet-stream" | ||
payload: | ||
$ref: "/schema/com.example.trading.Trade.avsc" | ||
_public.currency: | ||
bindings: | ||
kafka: | ||
configs: | ||
retention.ms: 999000 | ||
publish: | ||
summary: Currency things | ||
operationId: onCurrencyUpdate | ||
message: | ||
schemaFormat: "application/vnd.apache.avro+json;version=1.9.0" | ||
contentType: "application/octet-stream" | ||
bindings: | ||
kafka: | ||
schemaIdLocation: "header" | ||
schemaLookupStrategy: "RecordNameStrategy" | ||
key: | ||
type: string | ||
payload: | ||
$ref: "/schema/com.example.shared.Currency.avsc" | ||
|