Skip to content

Commit cf5a4cc

Browse files
authored
fix(scala): enable helpers snippets (#4510)
1 parent 352a01e commit cf5a4cc

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

templates/scala/snippets/method.mustache

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ class Snippet{{client}} {
1818
1919
{{#blocksRequests}}
2020
{{#snippets}}
21-
{{^isHelper}} {{! Helper tests are not supported yet}}
2221
/** Snippet for the {{method}} method.
2322
*
2423
* {{{description}}}
@@ -29,17 +28,15 @@ class Snippet{{client}} {
2928
{{> snippets/init}}
3029

3130
// Call the API
32-
{{#hasResponse}}val response = {{/hasResponse}}{{> tests/method}}
33-
31+
{{#hasResponse}}val response = {{/hasResponse}}{{#isAsyncMethod}}Await.result(
32+
{{/isAsyncMethod}}{{> tests/method}}{{#isAsyncMethod}},
33+
Duration(100, "sec")
34+
)
35+
{{/isAsyncMethod}}
3436
// >LOG
35-
{{#hasResponse}}
36-
// Use the response
37-
val value = Await.result(response, Duration(100, "sec"))
38-
{{/hasResponse}}
3937
// SEPARATOR<
4038
}
4139

42-
{{/isHelper}}
4340
{{/snippets}}
4441
{{/blocksRequests}}
4542
}

0 commit comments

Comments
 (0)