Skip to content

Instantly share code, notes, and snippets.

@M3lkior
Last active October 12, 2020 08:48
Show Gist options
  • Save M3lkior/e282c8ebd3ac94759d4f58ebefdb8f49 to your computer and use it in GitHub Desktop.
Save M3lkior/e282c8ebd3ac94759d4f58ebefdb8f49 to your computer and use it in GitHub Desktop.
AsyncAPI / Avro generation issue with avro enum type
asyncapi: 2.0.0
info:
title: Test Async API
version: '0.1.0'
channels:
example:
publish:
message:
schemaFormat: 'application/vnd.apache.avro;version=1.9.0'
payload:
$ref: 'test.avsc'
{
"type": "record",
"name": "Type Array with Record items not working",
"namespace": "test",
"version": 1,
"fields": [
{"name": "MyArray", "type": {
"type": "array", "doc": "Array docs", "items": {
"name": "ArrayContent",
"type": "record",
"fields": [
{"name": "FIELD1", "type": "string", "doc": "doc 1"},
{"name": "FIELD2", "type": "string", "doc": "doc 2"},
{"name": "FIELD3", "type": "string", "doc": "doc 3"},
{"name": "FIELD4", "type": "boolean", "doc": "doc4"}
]
}
}
}
]
}
{
"type": "record",
"name": "Type Array not working",
"namespace": "test",
"version": 1,
"fields": [
{"name": "MyArray", "type": "array", "doc": "Array Docs", "items": "string"}
]
}
{
"type": "record",
"name": "Test",
"namespace": "test",
"version": 1,
"fields": [
{
"name": "WH_INBOUND_TYPE",
"type":
{
"type": "enum",
"name": "WH_INBOUND_TYPE_VALUES",
"doc": "The WH inbound unit of measure",
"symbols" : ["Unit", "Inner", "Master", "Pallet"]
}
},
{"name": "SUPPLIER_PRICE", "type": "float", "doc": "The article price (purchasing price)."}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment