-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dereferencer should work with AsyncAPI "payload" #327
Comments
This is a good observation. Because the payload can be anything, it is not currently modeled (even when it's actually a Schema object). I think it would be great to update our support for AsyncAPI such that our reader/writer will parse the @SafarMirek any interest in this? |
I was looking into this and there's also a missing part in the Aai20IReferenceManipulationStrategy for message payloads because it only attaches the fetched nodes to I also listed the nodes from the AsyncAPI spec (as per 2.1.0) that are either something or a reference
+ The Channel Object has a $ref field but it does not look like it should be dereferenced (but rather be an additional definition that should cause no conflict) The Schema type ins't dereferenced yet in 1.1.16 (working on this) but there is also the AaiOperationBase class that implements IReferenceNode and I don't get why, perhaps this is because the specification snippets miss a message line (to be fixed soon in asyncapi/spec#620) |
What do you think @jsenko ? |
I know this is old, but I'm wondering @DyspC if you might be willing to revisit this for Apicurio Data Models 2.0. It's all new with a new codegen approach to the models. We might consider defining a union type for the |
Erm it looks really old to me and I don't understand what I've written anymore nor do I remember if I created a PR with what I was working on so digging it out would prove complicated Looking at the branches on my fork it could be this one but I'm no longer working on API design tooling (and actually pulling my hair out over some thrift tooling that gulps all my time) |
OK no problem! |
Hello, I've recently encounter this problem as well, the payload of the message doesn't accept anything, can't reference any data model. |
Hello,
I wanted to test Apicurio and the Apicurio Data Models library with a similar AsyncAPI definition to this example:
When checking the implementation of the Dereferencer class, I noticed that the references are only resolved for objects of type IReferenceNode. While AaiMessageBase is of type IReferenceNode, this is not the case for the payload object in AaiMessage which is only of type Object. Therefore, references within the payload object will not be resolved.
In contrast to that, a reference like that can be resolved by the AsyncAPI Playground. According to the AsyncAPI spec, the payload object is defaulting to a Schema object, but can also be a $ref to a remote file or any other type.
So payload should probably also be of type IReferenceNode to enable that external references are resolved?
I appreciate feedback and hope I got everything right. Thanks! :)
The text was updated successfully, but these errors were encountered: