Skip to content

Commit

Permalink
feat: add an api property to the resource
Browse files Browse the repository at this point in the history
  • Loading branch information
0xfede committed Apr 8, 2022
1 parent 8dfb83d commit 9f707a0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/resource.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface ResourceDefinition {
}

export class Resource {
api: API;
protected operations: Operation[] = [];

constructor(public info: ResourceDefinition = {}, routes?: Routes) {
Expand Down Expand Up @@ -88,6 +89,8 @@ export class Resource {
}

attach(api: API) {
this.api = api;

let tag: OpenAPIV3.TagObject = {
name: '' + this.info.name,
};
Expand Down

0 comments on commit 9f707a0

Please sign in to comment.