asyncapi/spec

Fix description of Operation Trait object

smoya opened this issue · 5 comments

smoya commented

The following sentence located in the description of the Operation Trait object is wrong:

This object MAY contain any property from the Operation Object, except the action, channel and traits ones.

Source: https://www.asyncapi.com/docs/reference/specification/v3.0.0-next-major-spec.16#operationTraitObject

If you take a look at the fields an Operation Trait object has, messages field is not included.

Google Chrome_QsRekblp@2x

You can confirm this is by design and expected by checking its corresponding JSON Schema definition at https://github.com/asyncapi/spec-json-schemas/blob/next-major-spec/definitions/3.0.0/operationTrait.json.

We should fix that sentence.

Originally posted by @smoya in #991 (comment)

hi @smoya , i am interested in working on this issue.

is the requirement to add messages to the operationTrait.json

something like;

    "messages": {
      "description": "A short summary of what the messages for this operation.",
      "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/messages"
    },
smoya commented

hi @smoya , i am interested in working on this issue.

is the requirement to add messages to the operationTrait.json

something like;

    "messages": {
      "description": "A short summary of what the messages for this operation.",
      "$ref": "http://asyncapi.com/definitions/3.0.0/operation.json#/properties/messages"
    },

No. We just should include the field messages in the list of exclusions mentioned in the specification. Something like:

This object MAY contain any property from the Operation Object, except the action, channel, messages, and traits ones.

oh okay..thank you @smoya for the clarity....i do see an open pr #1001 by @akkshitgupta ...please do have a look at it

Hi @smoya I am interested working on this issue. I think we just missing a "messages" word in Operationtrait.json file in descriptioon field.

smoya commented

Hi @smoya I am interested working on this issue. I think we just missing a "messages" word in Operationtrait.json file in descriptioon field.

There is already a PR #1001