-
-
Notifications
You must be signed in to change notification settings - Fork 31
Open
Description
How to add a predefined type objects already defined in a Typescript file to render it for the POST body request via the comments? Similar feature is present in "gin-swagger" but that is for golang, I thought that kind of feature should also be added here.
Any ideas on it? @kevinccbsg @wbw20 @ciprian1234 @meabed
Like below is the comment I want to write which should generate the type defined (here Activity
is a Schema type object):
/**
* POST /activity/add
* @param {Activity} request.body.required - Activity type
**/
or just an additional line like this in the existing defined comments:
@schema Activity activity_description
The Activity
type is defined as follows:
export type Activity = {
wakeup: string;
goto: string;
runfor: number;
}
So, at last it should generate the whole Activity Schema without me defining each and every detail of the type again into the comments.
derrik-fleming, Tykok, sinhaugoh, baronnoraz and rilpiresTykok
Metadata
Metadata
Assignees
Labels
No labels