lukeautry / tsoa

Build OpenAPI-compliant REST APIs using TypeScript and Node
MIT License
3.54k stars 499 forks source link

@Queries Can't support 'refObject' type #1499

Closed aramais21 closed 10 months ago

aramais21 commented 1 year ago

Sorting

export class SearchDto {
    @IsOptional()
    @IsString()
    value?: string;
}

export class ListQuery {
    @IsDefined()
    @IsNotEmptyObject()
    @IsObject()
    @ValidateNested()
    @Type(() => SearchDto)
    search: any;
}

Expected Behavior

The above could should not throw any error

Current Behavior

Currently the above code throws this error

Generate routes error.
 GenerateMetadataError: @Queries('query') nested property 'search' Can't support 'refObject' type. 
 in 'Controller.list'
      1. 4.

Context (Environment)

Version of the library: 5.1.1 Version of NodeJS: 18.16

github-actions[bot] commented 1 year ago

Hello there aramais21 👋

Thank you for opening your very first issue in this project.

We will try to get back to you as soon as we can.👀

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days

WoH commented 11 months ago

How would you serialize this? Or better, what should the url look like that you want to support?

github-actions[bot] commented 10 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days