Usage:

/**
* ResponseUtil extends FullResponseUtil extends BaseResponseUtil
*/
const simpleResponse = new ResponseUtil('TextResponse');
simpleResponse.setHeaders({
'X-Rate-Limit-Limit': {
description: 'The number of allowed requests in the current period',
schema: {
type: 'integer'
}
},
'X-Rate-Limit-Remaining': {
description: 'The number of remaining requests in the current period',
schema: {
type: 'integer'
}
},
'X-Rate-Limit-Reset': {
description: 'The number of seconds left in the current period',
schema: {
type: 'integer'
}
}
})
.setDescription('A simple string response')
.addMediaType('text/plain', {
schema: {
type: 'string',
example: 'whoa!'
}
});

Hierarchy (view full)

Constructors

Properties

code?: number
content?: Record<string, MediaTypeObject>
default?: boolean
description?: string
headers?: Record<string, ReferenceObject | HeaderObject>
links?: Record<string, ReferenceObject | LinkObject>
name: string
ref?: string

Methods