diff --git a/packages/parser/src/models/v3/operation-reply.ts b/packages/parser/src/models/v3/operation-reply.ts index ec6f9d4b8..1fd1aa34b 100644 --- a/packages/parser/src/models/v3/operation-reply.ts +++ b/packages/parser/src/models/v3/operation-reply.ts @@ -14,7 +14,7 @@ import type { v3 } from '../../spec-types'; export class OperationReply extends BaseModel implements OperationReplyInterface { id(): string | undefined { - return this._meta.id; + return this._json.id; } hasAddress(): boolean { diff --git a/packages/parser/test/models/v3/operation-reply.spec.ts b/packages/parser/test/models/v3/operation-reply.spec.ts index c56cd46bb..bb743557b 100644 --- a/packages/parser/test/models/v3/operation-reply.spec.ts +++ b/packages/parser/test/models/v3/operation-reply.spec.ts @@ -9,7 +9,7 @@ import { assertExtensions } from './utils'; describe('OperationReply model', function() { describe('.id()', function() { it('should return id', function() { - const d = new OperationReply({}, { asyncapi: {} as any, pointer: '', id: 'reply' }); + const d = new OperationReply({id: 'reply'}, { asyncapi: {} as any, pointer: '' }); expect(d.id()).toEqual('reply'); }); });