typescript-rest-swagger
typescript-rest-swagger copied to clipboard
How to set examples on interfaces
Is there a way to use @Example on an interface, perhaps similar to how @IsInt works in the JSDoc?
Something like the docs doesn't work of course:
@Example...
effectiveDate?: Date;
+1
But I think that isn't possible at this moment.
The better aproach to this would be something like this:
/**
* Effective date
* @example "2022-06-29"
*/
effectiveDate?: Date;