From 921b6680f25095326af844db4c9d908f03225187 Mon Sep 17 00:00:00 2001 From: Weidong Xu Date: Wed, 7 Aug 2024 11:45:14 +0800 Subject: [PATCH] Revert "remove unnecessary query format; pending to change multi to explode" This reverts commit cd5dd2773e16c03ea16be6a9b60df37c634cd349. --- typespec-tests/tsp/enum.tsp | 48 +++++++++++++++++++++++++++++++++---- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/typespec-tests/tsp/enum.tsp b/typespec-tests/tsp/enum.tsp index 9323ac364c..9f5dca1e29 100644 --- a/typespec-tests/tsp/enum.tsp +++ b/typespec-tests/tsp/enum.tsp @@ -105,19 +105,59 @@ interface EnumOp { @post @route("operation/stringenumarray") - setStringEnumArray(colorArray: ColorModel[], colorArrayOpt?: ColorModel[]): string; + setStringEnumArray( + @query({ + format: "csv", + }) + colorArray: ColorModel[], + + @query({ + format: "csv", + }) + colorArrayOpt?: ColorModel[], + ): string; @post @route("operation/intenumarray") - setIntEnumArray(priorityArray: Priority[], priorityArrayOpt?: Priority[]): string; + setIntEnumArray( + @query({ + format: "csv", + }) + priorityArray: Priority[], + + @query({ + format: "csv", + }) + priorityArrayOpt?: Priority[], + ): string; @post @route("operation/stringarray") - setStringArray(stringArray: string[], stringArrayOpt?: string[]): string; + setStringArray( + @query({ + format: "csv", + }) + stringArray: string[], + + @query({ + format: "csv", + }) + stringArrayOpt?: string[], + ): string; @post @route("operation/intarray") - setIntArray(intArray: int32[], intArrayOpt?: int32[]): string; + setIntArray( + @query({ + format: "csv", + }) + intArray: int32[], + + @query({ + format: "csv", + }) + intArrayOpt?: int32[], + ): string; @post @route("operation/stringenummulti")