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
We have multiple asyncapi files in our project that share the same components. If i try to seperate them into multiple yaml files to reuse them, I either get an error that findValue(String) is null or that "properties" is null.
This is an example asyncapi spec file:
# asyncapi.yamlasyncapi: 2.6.0info:
title: Account Serviceversion: "1.0.0"channels:
user/signedup:
subscribe:
operationId: userSignedUpmessage:
$ref: "#/components/messages/UserSignedUp"components:
messages:
UserSignedUp:
payload:
# this works:$ref: "#/components/schemas/user"# this leads to the error# `Cannot invoke "com.fasterxml.jackson.databind.JsonNode.get(String)" because the return value of "com.fasterxml.jackson.databind.JsonNode.findValue(String)" is null`:$ref: "./user-message.yaml"schemas:
user:
# this works:type: objectproperties:
firstName:
type: stringdescription: "foo"lastName:
type: stringdescription: "bar"# this leads to the error# `Cannot invoke "com.fasterxml.jackson.databind.JsonNode.has(String)" because "properties" is null`:$ref: "./user.yaml"# user-message.yamlpayload:
type: objectproperties:
firstName:
type: stringdescription: "foo"lastName:
type: stringdescription: "bar"# user.yamltype: objectproperties:
firstName:
type: stringdescription: "foo"lastName:
type: stringdescription: "bar"
It works with referencing parameters from a local file though, e. g.:
I'm sorry for not getting back to you sooner.
I will take a look at it. I guess part of this problem is solved with the refactoring I recently made. But I think we force to keep the component structure inside the files, at least for now.
We have multiple asyncapi files in our project that share the same components. If i try to seperate them into multiple yaml files to reuse them, I either get an error that
findValue(String) is null
or that"properties" is null
.This is an example asyncapi spec file:
It works with referencing parameters from a local file though, e. g.:
Is this just not supported currently or is this perhaps a bug?
The text was updated successfully, but these errors were encountered: