forked from lukeautry/tsoa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- update route schema and update type - change swagger enum inline type to enum definitions - add new rule for tslint - fix set status not work lukeautry#94 - support custom response header lukeautry#89
- Loading branch information
1 parent
bdcaa06
commit 79f0dfc
Showing
31 changed files
with
1,982 additions
and
2,987 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,25 @@ | ||
|
||
export class Controller { | ||
public statusCode?: number = undefined; | ||
private statusCode?: number = undefined; | ||
private headers = {} as { [name: string]: string | undefined }; | ||
|
||
public setStatus(statusCode: number) { | ||
this.statusCode = statusCode; | ||
} | ||
|
||
public getStatus() { | ||
return this.statusCode; | ||
} | ||
|
||
public setStatus(statusCode: number) { | ||
this.statusCode = statusCode; | ||
public setHeader(name: string, value?: string) { | ||
this.headers[name] = value; | ||
} | ||
|
||
public getHeader(name: string) { | ||
return this.headers[name]; | ||
} | ||
|
||
public getHeaders() { | ||
return this.headers; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.