Add computed value in annotations
sikelio opened this issue ยท 3 comments
sikelio commented
Hi ! Amazing addon lib !
I would like to know if it's possible to add the possibility of getting @computed()
?
In my case i have the following:
/**
* @all
* @summary Returns a list of all users
* @responseBody <200> - <User[]> - List of users
*/
async all({ response }: HttpContext) {}
My model User
has some computed values like:
@computed()
get followingCount(): number {
return this.followings ? this.followings.length : 0;
}
@computed()
get followerCount(): number {
return this.followers ? this.followers.length : 0;
}
@computed()
get likesReceived(): number {
return this._likesReceived === null ? 0 : this._likesReceived;
}
But they didn't appear :'(
MuaDDuB commented
Hum, seems like a regression as it used to work in the past.
MuaDDuB commented
ad-on-is commented
I think I could add an additional clause checking for "get ", since it's always public