You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The parser api can show the Schema object via channel.messages().get("{messageId}").payload()
but unable to get the schema value from the Schema object where the payload is in $ref
asyncapi document:
asyncapi: 2.6.0
info:
title: Kafka Service
version: 1.0.0
description: This service is in charge of processing all events related to the Kafka topic.
servers:
local-broker:
url: 127.0.0.2:9092
protocol: kafka
protocolVersion: 2.6.0
description: local kafka cluster for development
bindings:
kafka:
schemaRegistryVendor: "confluent"
schemaRegistryUrl: "http://127.0.0.2:8081"
bindingVersion: "0.5.0"
channels:
TEST_CHANNEL_A:
description: Test Kafka channel created by AsyncAPI.
parameters:
action:
description: action of the topic
schema:
type: string
value: create
publish:
message:
messageId: userSignedUp
payload:
$ref: "#/components/schemas/ArvoSchema"
bindings:
kafka:
partitions: 2
replicas: 1
topicConfiguration:
min.insync.replicas: 1
retention.ms: 60480000
retention.bytes: -1
delete.retention.ms: 86400000
max.message.bytes: 1048588
components:
schemas:
ArvoSchema:
type: object
schemaFormat: "application/vnd.apache.avro+json"
schema:
$ref: https://raw.githubusercontent.com/ept/avrodoc/master/schemata/example.avsc
console.log the above both show the same result of a schema object but not able to access the schema object
Schema {
_json: {
type: 'object',
schemaFormat: 'application/vnd.apache.avro+json',
schema: {
type: 'record',
name: 'User',
namespace: 'com.example.avro',
doc: 'This is a user record in a fictitious to-do-list management app. It supports arbitrary grouping and nesting of items, and allows you to add items by email or by tweeting.\n' +
'\n' +
"Note this app doesn't actually exist. The schema is just a demo for [Avrodoc](https://github.com/ept/avrodoc)!",
fields: [Array]
},
'x-parser-schema-id': 'ArvoSchema'
},
Expected behavior
return schema properties inside schema object
Screenshots
channel.messages().get("userSignedUp").payload().schemaFormat()
return the below: Generator Error: asyncapi.allSchemas(...).get(...).schemaFormat is not a function
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request. Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
Describe the bug.
The parser api can show the Schema object via
channel.messages().get("{messageId}").payload()
but unable to get the schema value from the Schema object where the payload is in $ref
asyncapi document:
node parser
console.log the above both show the same result of a schema object but not able to access the schema object
Expected behavior
return schema properties inside schema object
Screenshots
channel.messages().get("userSignedUp").payload().schemaFormat()
return the below:
Generator Error: asyncapi.allSchemas(...).get(...).schemaFormat is not a function
channel.messages().get("userSignedUp").payload().schemaFormat
/channel.messages().get("userSignedUp").payload()['schemaFormat']
return
undefined
How to Reproduce
🥦 Browser
None
👀 Have you checked for similar open issues?
🏢 Have you read the Contributing Guidelines?
Are you willing to work on this issue ?
None
The text was updated successfully, but these errors were encountered: