We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
The data type used in the generated app for many-to-many relations on the REST API controller is incorrect
@common.UseInterceptors(nestMorgan.MorganInterceptor("combined")) @common.UseGuards( defaultAuthGuard.DefaultAuthGuard, nestAccessControl.ACGuard ) @common.Patch("/:id/tags") @nestAccessControl.UseRoles({ resource: "Post", action: "update", possession: "any", }) async updateTags( @common.Param() params: PostWhereUniqueInput, @common.Body() body: PostWhereUniqueInput[], @nestAccessControl.UserRoles() userRoles: string[] ): Promise<void> {
In this example, when we update tags of a post, the body should be of type TagWhereUniqueInput and not PostWhereUniqueInput
TagWhereUniqueInput
PostWhereUniqueInput
@common.Body() body: TagWhereUniqueInput[],
Fix the generated app to use the correct data type
see above
0.11.1
n/a
This bug does not have any actual impact on the API, since the type anyway include only a single property which is the same for all types
class PostWhereUniqueInput { @ApiProperty({ required: true, type: String, }) @IsString() @Field(() => String) id!: string; }
No response
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
tupe12334
Successfully merging a pull request may close this issue.
What happened?
The data type used in the generated app for many-to-many relations on the REST API controller is incorrect
In this example, when we update tags of a post, the body should be of type
TagWhereUniqueInput
and notPostWhereUniqueInput
What you expected to happen
Fix the generated app to use the correct data type
How to reproduce
see above
Amplication version
0.11.1
Environment
n/a
Anything else
This bug does not have any actual impact on the API, since the type anyway include only a single property which is the same for all types
Are you willing to submit PR?
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered: