Skip to content

Commit

Permalink
fix models
Browse files Browse the repository at this point in the history
  • Loading branch information
magicmatatjahu committed Sep 6, 2022
1 parent 4bd470d commit 18fea6c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/old-api/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ export class Channel extends SpecificationExtensionsModel<v2.ChannelObject> {

publish() {
if (!this._json.publish) return null;
return new Operation(this._json.publish);
return new Operation(this._json.publish, { kind: 'publish' });
}

subscribe() {
if (!this._json.subscribe) return null;
return new Operation(this._json.subscribe);
return new Operation(this._json.subscribe, { kind: 'subscribe' });
}

hasPublish() {
Expand Down
5 changes: 3 additions & 2 deletions src/old-api/schema.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Base } from './base';
import { SpecificationExtensionsModel } from './mixins';

import type { v2 } from '../spec-types';

export class Schema extends Base<v2.AsyncAPISchemaObject> {}
export class Schema extends SpecificationExtensionsModel<v2.AsyncAPISchemaObject, { parent?: Schema }> {
}

0 comments on commit 18fea6c

Please sign in to comment.