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.
@ForwardGroups() forwards the groups one level deeper, at any lever in the hierarchy.:tada: This issue has been resolved in version 6.42.0 :tada:
The release is available on:
v6.42.0Your semantic-release bot :package::rocket:
Most helpful comment
Related code:
https://github.com/TypedProject/tsed/blob/production/packages/schema/src/utils/serializeJsonSchema.ts#L149