Api description library
This library is used to generate api description in form of a builder pattern style
Usage
Create new instance of builder. Reset buffer and start chaining commands to create your description. Finally, call build() to return string representation.
const descriptionBuilder: ApiDescriptionBuilder = new ApiDescriptionBuilder();
export class DummyController {
@ApiOkResponse({
description: descriptionBuilder
.reset()
.addReason('Dummy reason why response was ok.')
.addMessage({ message: 'All good.' })
.addReason('Different reason why response was ok.')
.addMessage({ message: 'Its all good man.' })
.build(),
})
async yourMethod(@Res() response: Response): Promise<void> {
...
}
}