-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: avro parser now handles record reuse in definitions
- Loading branch information
Showing
7 changed files
with
217 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
asyncapi: 2.0.0 | ||
info: | ||
title: My API | ||
version: '1.0.0' | ||
channels: | ||
mychannel: | ||
publish: | ||
message: | ||
schemaFormat: application/vnd.apache.avro;version=1.9.0 | ||
payload: | ||
$ref: 'schemas/issue-111-testcase.avsc' |
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,11 @@ | ||
asyncapi: 2.0.0 | ||
info: | ||
title: My API | ||
version: '1.0.0' | ||
channels: | ||
mychannel: | ||
publish: | ||
message: | ||
schemaFormat: application/vnd.apache.avro;version=1.9.0 | ||
payload: | ||
$ref: 'schemas/issue-113-testcase.avsc' |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,103 @@ | ||
{ | ||
"type": "record", | ||
"name": "ConnectionRequested", | ||
"namespace": "com.foo.connections", | ||
"doc": "An example schema to illustrate the issue", | ||
"fields": [ | ||
{ | ||
"name": "metadata", | ||
"type": { | ||
"type": "record", | ||
"name": "EventMetadata", | ||
"namespace": "com.foo", | ||
"doc": "Metadata to be associated with every published event", | ||
"fields": [ | ||
{ | ||
"name": "id", | ||
"type": { | ||
"type": "string", | ||
"logicalType": "uuid" | ||
}, | ||
"doc": "Unique identifier for this specific event" | ||
}, | ||
{ | ||
"name": "timestamp", | ||
"type": { | ||
"type": "long", | ||
"logicalType": "timestamp-millis" | ||
}, | ||
"doc": "Instant the event took place (not necessary when it was published)" | ||
}, | ||
{ | ||
"name": "correlation_id", | ||
"type": [ | ||
"null", | ||
{ | ||
"type": "string", | ||
"logicalType": "uuid" | ||
} | ||
], | ||
"doc": "id of the event that resulted in this\nevent being published (optional)", | ||
"default": null | ||
}, | ||
{ | ||
"name": "publisher_context", | ||
"type": [ | ||
"null", | ||
{ | ||
"type": "map", | ||
"values": { | ||
"type": "string", | ||
"avro.java.string": "String" | ||
}, | ||
"avro.java.string": "String" | ||
} | ||
], | ||
"doc": "optional set of key-value pairs of context to be echoed back\nin any resulting message (like a richer\ncorrelationId.\n\nThese values are likely only meaningful to the publisher\nof the correlated event", | ||
"default": null | ||
} | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "auth_code", | ||
"type": { | ||
"type": "record", | ||
"name": "EncryptedString", | ||
"namespace": "com.foo", | ||
"doc": "A string that was encrypted with AES (using CTR mode), its key encrypted with RSA, and the nonce used for the encryption.", | ||
"fields": [ | ||
{ | ||
"name": "value", | ||
"type": "string", | ||
"doc": "A sequence of bytes that has been AES encrypted in CTR mode." | ||
}, | ||
{ | ||
"name": "nonce", | ||
"type": "string", | ||
"doc": "A nonce, used by the CTR encryption mode for our encrypted value. Not encrypted, not a secret." | ||
}, | ||
{ | ||
"name": "key", | ||
"type": "string", | ||
"doc": "An AES key, used to encrypt the value field, that has itself been encrypted using RSA." | ||
} | ||
] | ||
}, | ||
"doc": "Encrypted auth_code received when user authorizes the app." | ||
}, | ||
{ | ||
"name": "refresh_token", | ||
"type": "com.foo.EncryptedString", | ||
"doc": "Encrypted refresh_token generated by using clientId and clientSecret." | ||
}, | ||
{ | ||
"name": "triggered_by", | ||
"type": { | ||
"type": "string", | ||
"logicalType": "uuid" | ||
}, | ||
"doc": "ID of the user who triggered this event." | ||
} | ||
] | ||
} |
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,36 @@ | ||
[ | ||
{ | ||
"type": "record", | ||
"name": "Address", | ||
"namespace": "com.example", | ||
"fields": [ | ||
{ | ||
"name": "streetaddress", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "city", | ||
"type": "string" | ||
} | ||
] | ||
}, | ||
{ | ||
"type": "record", | ||
"name": "Person", | ||
"namespace": "com.example", | ||
"fields": [ | ||
{ | ||
"name": "firstname", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "lastname", | ||
"type": "string" | ||
}, | ||
{ | ||
"name": "address", | ||
"type": "com.example.Address" | ||
} | ||
] | ||
} | ||
] |
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