Skip to content

Commit

Permalink
Fix headers code generation #752
Browse files Browse the repository at this point in the history
  • Loading branch information
Foso committed Feb 4, 2025
1 parent c48f37a commit 7b26b51
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ interface TestService {

val expectedQueriesArgumentText =
"url{\n" +
" takeFrom(_ktorfit.baseUrl + \"posts\")\n" +
" testQueryMap?.forEach { entry -> entry.value?.let{ parameter(entry.key, \"\${entry.value}\") } }\n" +
" testQueryMap2?.forEach { entry -> entry.value?.let{ encodedParameters.append(entry.key, \"\${entry.value}\") } }\n" +
" }"
" takeFrom(_ktorfit.baseUrl + \"posts\")\n" +
" testQueryMap?.forEach { entry -> entry.value?.let{ parameter(entry.key, \"\${entry.value}\") } }\n" +
" testQueryMap2?.forEach { entry -> entry.value?.let{ encodedParameters.append(entry.key, \"\${entry.value}\") } }\n" +
" }"

val compilation = getCompilation(listOf(source))
val result = compilation.compile()
Expand Down Expand Up @@ -184,11 +184,11 @@ fun example(@Query("name") testQuery: String, @QueryName testQueryName: String,

val expectedQueriesArgumentText =
"url{\n" +
" takeFrom(_ktorfit.baseUrl + \"posts\")\n" +
" testQuery?.let{ parameter(\"name\", \"\$it\") }\n" +
" parameters.appendAll(\"\$testQueryName\", emptyList())\n" +
" name?.forEach { entry -> entry.value?.let{ encodedParameters.append(entry.key, \"\${entry.value}\") } }\n" +
" }"
" takeFrom(_ktorfit.baseUrl + \"posts\")\n" +
" testQuery?.let{ parameter(\"name\", \"\$it\") }\n" +
" parameters.appendAll(\"\$testQueryName\", emptyList())\n" +
" name?.forEach { entry -> entry.value?.let{ encodedParameters.append(entry.key, \"\${entry.value}\") } }\n" +
" }"

val compilation = getCompilation(listOf(source))
val result = compilation.compile()
Expand Down

0 comments on commit 7b26b51

Please sign in to comment.