Skip to content

Asyncapi: setting a reference on a message payload is not saved #801

Open
@ben-lc

Description

@ben-lc

Expected Behavior

When a reference is set on an asyncapi message payload, it should be saved.

Actual Behavior

Nothing is saved

Cause of the issue

ChangePayloadRefCommand_Aai20 command is called to update the payload ref, but the payload is not properly initialized when it is null :

Object payload = message.payload;
if (payload == null) {
   payload = JsonCompat.objectNode();  // it misses 'message.payload = payload' to set the newly created payload on the message
}
Object oldValue = JsonCompat.getProperty(payload, "$ref");

Steps to Reproduce the Problem

  1. Create a new asyncapi spec
  2. Create a new data type
  3. Create a new message
  4. Try to set the data type on the message payload reference

Specifications

  • apicurio studio: 0.2.62.Final
  • apicurio data models: 1.1.27

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions