Tsed: [FEAT] Add @ForwardGroups() annotation to forward groups to inner objects

Created on 2 Apr 2021  路  2Comments  路  Source: tsedio/tsed

Informations

Is your feature request related to a problem? Please describe.
I have @Groups() defined on sub models which is ignored when I do something like @Response(200, ResponseModel).Groups('group.name')

Describe the solution you'd like
Be able to specify @ForwardGroups() on the property of the sub model. Whether the sub model is an object, collection, etc it should pass the groups on.

@Generics('T')
export class ResponseModel<T> {
   @ForwardGroups('group')
   @Property('T')
   innerType: T;
}

export class InnerType {
  @Groups('group')
  id: number;
}

// Usage
@Response(200, ResponseModel).Of(InnerType).Groups('group')

Describe alternatives you've considered
No alternatives could be found.

Acceptance criteria

  • [ ] @ForwardGroups() forwards the groups one level deeper, at any lever in the hierarchy.
enhancement released

Most helpful comment

All 2 comments

:tada: This issue has been resolved in version 6.42.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dorian-kwon picture dorian-kwon  路  3Comments

teusemanuel picture teusemanuel  路  4Comments

thanhchuongitc picture thanhchuongitc  路  6Comments

denisprsa picture denisprsa  路  6Comments

yangukmo picture yangukmo  路  6Comments