@nestjs/swagger#ApiModelProperty TypeScript Examples
The following examples show how to use
@nestjs/swagger#ApiModelProperty.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: oauth2-request.dto.ts From nestjs-oauth2-server-module with MIT License | 5 votes |
@ApiModelProperty({
type:String,
description: 'The type of grant you are requesting, must be "client_credentials"',
required: true
})
@IsNotEmpty()
@Expose({ name: "grant_type" })
grantType: string;
Example #2
Source File: oauth2-request.dto.ts From nestjs-oauth2-server-module with MIT License | 5 votes |
@ApiModelProperty({
type:String,
description: 'The API Key given by the application',
required: true
})
@IsNotEmpty()
@Expose({ name: "client_id" })
clientId: string;
Example #3
Source File: oauth2-request.dto.ts From nestjs-oauth2-server-module with MIT License | 5 votes |
@ApiModelProperty({
type:String,
description: 'The API Token given by the application',
required: true
})
@Expose({ name: "client_secret" })
clientSecret: string;
Example #4
Source File: oauth2-request.dto.ts From nestjs-oauth2-server-module with MIT License | 5 votes |
@ApiModelProperty({
type: Number,
description: 'The expiration time of the assertion, specified as seconds since 00:00:00 UTC, January 1, 1970. This value has a maximum of 1 hour after the issued time.',
})
@Expose({ name: "exp" })
exp?: number;
Example #5
Source File: oauth2-request.dto.ts From nestjs-oauth2-server-module with MIT License | 5 votes |
@ApiModelProperty({
type: Number,
description: 'The time the assertion was issued, specified as seconds since 00:00:00 UTC, January 1, 1970.',
})
@Expose({ name: "iat" })
iat?: number;
Example #6
Source File: oauth2-request.dto.ts From nestjs-oauth2-server-module with MIT License | 5 votes |
@ApiModelProperty({
type: String,
description: 'The list of the permissions (tpApps) that the application requests.',
isArray: true
})
@Expose({ name: "scopes"})
scopes?: string | string[];
Example #7
Source File: oauth2-request.dto.ts From nestjs-oauth2-server-module with MIT License | 5 votes |
@ApiModelProperty({
type: String,
description: 'The refresh token only when grant_type is set to "refresh_token"',
})
@Expose({ name: "refresh_token"})
refreshToken?: string;
Example #8
Source File: oauth2-request.dto.ts From nestjs-oauth2-server-module with MIT License | 5 votes |
@ApiModelProperty({
type: String,
description: 'The username only when grant_type is set to "refresh_token"',
})
@Expose({ name: "username"})
username?: string;
Example #9
Source File: oauth2-request.dto.ts From nestjs-oauth2-server-module with MIT License | 5 votes |
@ApiModelProperty({
type: String,
description: 'The password when grant_type is set to "password_grant"',
})
@Expose({ name: "password"})
password?: string;
Example #10
Source File: oauth2-response.dto.ts From nestjs-oauth2-server-module with MIT License | 5 votes |
@ApiModelProperty({
type:String,
description: 'The generated access token',
required: true
})
@Expose({name: 'access_token'})
accessToken: string;
Example #11
Source File: oauth2-response.dto.ts From nestjs-oauth2-server-module with MIT License | 5 votes |
@ApiModelProperty({
type:String,
description: 'The type of token, in our case should always be "bearer"',
required: true
})
@Expose({name: 'token_type'})
tokenType: string = 'bearer';
Example #12
Source File: oauth2-response.dto.ts From nestjs-oauth2-server-module with MIT License | 5 votes |
@ApiModelProperty({
type: String,
description: 'The generated refresh token',
required: true
})
@Expose({name: 'refresh_token'})
refreshToken: string;
Example #13
Source File: oauth2-response.dto.ts From nestjs-oauth2-server-module with MIT License | 5 votes |
@ApiModelProperty({
type: Number,
description: 'Number of seconds until the acess token expires',
required: true
})
@Expose({name: 'expires_in'})
accessTokenExp: number;
Example #14
Source File: oauth2-response.dto.ts From nestjs-oauth2-server-module with MIT License | 5 votes |
@ApiModelProperty({
type: Number,
description: 'The list of the permissions (tpApps) that the application requests.',
required: true
})
@Exclude()
refreshTokenExp: number;
Example #15
Source File: oauth2-response.dto.ts From nestjs-oauth2-server-module with MIT License | 5 votes |
@ApiModelProperty({
type: String,
description: 'Scopes you are allowed to use if any requested',
required: true
})
@Expose({name: 'scope'})
scope?: string;