Skip to content

Commit 8657f1c

Browse files
author
andrewwilsonnew
committed
next version
1 parent 53e5ba5 commit 8657f1c

13 files changed

Lines changed: 77 additions & 67 deletions

File tree

bin/configs/kotlin-misk-config.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ additionalProperties:
99
generateStubImplClasses: true
1010
addModelMoshiJsonAnnotation: true
1111
actionPathPrefix: "samplePrefix"
12-
actionAnnotations: "@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)"
13-
actionImports: |-
14-
import misk.web.actions.WebAction
15-
import misk.web.interceptors.LogRequestResponse
12+
actionAnnotations: "@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0);@Suppress(\"unused\")"
13+
actionImports: "misk.web.actions.WebAction;misk.web.interceptors.LogRequestResponse"
1614
actionParentClass: "WebAction"
1715
actionRequestContentType: "@RequestContentType"
1816
actionRequestContentTypePrefix: "MediaTypes"
17+
testingModule: ""

docs/generators/kotlin-misk.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ These options may be applied as additional-properties (cli) or configOptions (pl
1818

1919
| Option | Description | Values | Default |
2020
| ------ | ----------- | ------ | ------- |
21-
|actionAnnotations|Action Annotations| ||
22-
|actionImports|Imports for Actions| |import misk.web.actions.WebAction|
21+
|actionAnnotations|String Annotations for Actions separated by a semicolon(;)| |@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)|
22+
|actionImports|String Imports for Actions separated by a semicolon(;)| |misk.web.actions.WebAction;misk.web.interceptors.LogRequestResponse|
2323
|actionParentClass|Parent Class for Action| |WebAction|
2424
|actionPathPrefix|Prefix for action path| ||
2525
|actionRequestContentType|Request ContentType for Action| |@RequestContentType|
@@ -40,6 +40,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
4040
|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null|
4141
|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null|
4242
|sourceFolder|source folder for generated code| |src/main/kotlin|
43+
|testingModule|Testing module class| |OpenApiModule|
4344
|useBeanValidation|Use BeanValidation API annotations to validate data types| |true|
4445

4546
## IMPORT MAPPING

modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinMiskServerCodegen.java

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import org.slf4j.LoggerFactory;
3838

3939
import java.io.File;
40+
import java.util.Arrays;
4041
import java.util.EnumSet;
4142
import java.util.HashMap;
4243
import java.util.List;
@@ -60,6 +61,7 @@ public class KotlinMiskServerCodegen extends AbstractKotlinCodegen implements Be
6061
public static final String ACTION_PARENT_CLASS = "actionParentClass";
6162
public static final String ACTION_REQUEST_CONTENT_TYPE = "actionRequestContentType";
6263
public static final String ACTION_REQUEST_CONTENT_TYPE_PREFIX = "actionRequestContentTypePrefix";
64+
public static final String TESTING_MODULE = "testingModule";
6365

6466
private boolean useBeanValidation = true;
6567

@@ -74,11 +76,14 @@ public class KotlinMiskServerCodegen extends AbstractKotlinCodegen implements Be
7476

7577
@Setter protected String moduleClassName = "OpenApiModule";
7678
@Setter protected String actionPathPrefix = "";
77-
@Setter protected String actionAnnotations = "";
78-
@Setter protected String actionImports = "import misk.web.actions.WebAction";
79+
@Setter protected List<String> actionAnnotations =
80+
List.of("@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)");
81+
@Setter protected List<String> actionImports =
82+
List.of("misk.web.actions.WebAction","misk.web.interceptors.LogRequestResponse");
7983
@Setter protected String actionParentClass = "WebAction";
8084
@Setter protected String actionRequestContentType = "@RequestContentType";
8185
@Setter protected String actionRequestContentTypePrefix = "MediaTypes";
86+
@Setter protected String testingModule = moduleClassName;
8287

8388
@Override
8489
public CodegenType getTag() {
@@ -132,11 +137,12 @@ public KotlinMiskServerCodegen() {
132137

133138
addOption(MODULE_CLASS_NAME, "Name of the generated module class", moduleClassName);
134139
addOption(ACTION_PATH_PREFIX, "Prefix for action path", actionPathPrefix);
135-
addOption(ACTION_ANNOTATIONS, "Action Annotations", actionAnnotations);
136-
addOption(ACTION_IMPORTS, "Imports for Actions", actionImports);
140+
addOption(ACTION_IMPORTS, "String Imports for Actions separated by a semicolon(;)", String.join(";", actionImports));
141+
addOption(ACTION_ANNOTATIONS, "String Annotations for Actions separated by a semicolon(;)", String.join(";", actionAnnotations));
137142
addOption(ACTION_PARENT_CLASS, "Parent Class for Action", actionParentClass);
138143
addOption(ACTION_REQUEST_CONTENT_TYPE, "Request ContentType for Action", actionRequestContentType);
139144
addOption(ACTION_REQUEST_CONTENT_TYPE_PREFIX, "Request ContentType Prefix for Action", actionRequestContentTypePrefix);
145+
addOption(TESTING_MODULE, "Testing module class", testingModule);
140146

141147
apiTestTemplateFiles.clear();
142148
apiTestTemplateFiles.put("api_test.mustache", ".kt");
@@ -188,15 +194,11 @@ public void processOpts() {
188194
}
189195
writePropertyBack(ACTION_PATH_PREFIX, actionPathPrefix);
190196

191-
if (additionalProperties.containsKey(ACTION_ANNOTATIONS)) {
192-
setActionAnnotations((String) additionalProperties.get(ACTION_ANNOTATIONS));
193-
}
194-
writePropertyBack(ACTION_ANNOTATIONS, actionAnnotations);
197+
convertPropertyToTypeAndWriteBack(ACTION_ANNOTATIONS,
198+
it -> Arrays.asList(it.split(";")), this::setActionAnnotations);
195199

196-
if (additionalProperties.containsKey(ACTION_IMPORTS)) {
197-
setActionImports((String) additionalProperties.get(ACTION_IMPORTS));
198-
}
199-
writePropertyBack(ACTION_IMPORTS, actionImports);
200+
convertPropertyToTypeAndWriteBack(ACTION_IMPORTS,
201+
it -> Arrays.asList(it.split(";")), this::setActionImports);
200202

201203
if (additionalProperties.containsKey(ACTION_PARENT_CLASS)) {
202204
setActionParentClass((String) additionalProperties.get(ACTION_PARENT_CLASS));
@@ -213,6 +215,11 @@ public void processOpts() {
213215
}
214216
writePropertyBack(ACTION_REQUEST_CONTENT_TYPE_PREFIX, actionRequestContentTypePrefix);
215217

218+
if (additionalProperties.containsKey(TESTING_MODULE)) {
219+
setTestingModule((String) additionalProperties.get(TESTING_MODULE));
220+
}
221+
writePropertyBack(TESTING_MODULE, testingModule);
222+
216223
if (additionalProperties.containsKey(USE_BEANVALIDATION)) {
217224
this.setUseBeanValidation(convertPropertyToBoolean(USE_BEANVALIDATION));
218225
}

modules/openapi-generator/src/main/resources/kotlin-misk/apiAction.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import misk.web.RequestHeader
2828
import misk.web.ResponseContentType
2929
import misk.web.mediatype.MediaTypes
3030
{{#actionImports}}
31-
{{{.}}}
31+
import {{{.}}}
3232
{{/actionImports}}
3333
{{#imports}}
3434
import {{import}}

modules/openapi-generator/src/main/resources/kotlin-misk/api_test.mustache

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package {{package}}
22

3+
import {{{testingModule}}}
34
import {{javaxPackage}}.inject.Inject
45
import misk.testing.MiskTest
56
import org.junit.jupiter.api.Test
6-
77
import misk.web.HttpCall
88
import misk.web.PathParam
99
import misk.web.QueryParam
@@ -17,6 +17,10 @@ import {{import}}
1717
@MiskTest(startService = true)
1818
internal class {{classname}}Test {
1919
20+
@Suppress("unused")
21+
@MiskTestModule
22+
private val module = {{{testingModuleName}}}()
23+
2024
@Inject private lateinit var {{#lambda.camelcase}}{{classname}}{{/lambda.camelcase}}: {{classname}}Action
2125

2226
{{#operations}}

modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/misk/KotlinMiskServerCodegenOptionsTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ protected void verifyOptions() {
3939
verify(codegen).setUseBeanValidation(Boolean.valueOf(KotlinMiskServerCodegenOptionsProvider.USE_BEAN_VALIDATION));
4040
verify(codegen).setModuleClassName(KotlinMiskServerCodegenOptionsProvider.MODULE_CLASS_NAME);
4141
verify(codegen).setActionPathPrefix(KotlinMiskServerCodegenOptionsProvider.ACTION_PATH_PREFIX);
42-
verify(codegen).setActionImports(KotlinMiskServerCodegenOptionsProvider.ACTION_IMPORTS);
43-
verify(codegen).setActionAnnotations(KotlinMiskServerCodegenOptionsProvider.ACTION_ANNOTATIONS);
42+
verify(codegen).setActionImports(List.of("a.x","b.y"));
43+
verify(codegen).setActionAnnotations(List.of("@c()","@d()"));
4444
verify(codegen).setActionParentClass(KotlinMiskServerCodegenOptionsProvider.ACTION_PARENT_CLASS);
4545
verify(codegen).setActionRequestContentType(KotlinMiskServerCodegenOptionsProvider.ACTION_REQUEST_CONTENT_TYPE);
4646
verify(codegen).setActionRequestContentTypePrefix(KotlinMiskServerCodegenOptionsProvider.ACTION_REQUEST_CONTENT_TYPE_PREFIX);

modules/openapi-generator/src/test/java/org/openapitools/codegen/options/KotlinMiskServerCodegenOptionsProvider.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,12 @@ public class KotlinMiskServerCodegenOptionsProvider implements OptionsProvider {
2727
public static final String ADD_MODEL_MOSHI_JSON_ANNOTATION = "true";
2828
public static final String MODULE_CLASS_NAME = "OpenApiModule";
2929
public static final String ACTION_PATH_PREFIX = "samplePrefix<";
30-
public static final String ACTION_IMPORTS = "imports<";
31-
public static final String ACTION_ANNOTATIONS = "annotations<";
30+
public static final String ACTION_IMPORTS = "a.x;b.y";
31+
public static final String ACTION_ANNOTATIONS = "@c();@d()";
3232
public static final String ACTION_PARENT_CLASS = "class<";
3333
public static final String ACTION_REQUEST_CONTENT_TYPE = "contentType<";
3434
public static final String ACTION_REQUEST_CONTENT_TYPE_PREFIX = "contentTypePrefix<";
35+
public static final String TESTING_MODULE = "testingModule";
3536

3637
@Override
3738
public String getLanguage() {
@@ -67,6 +68,7 @@ public Map<String, String> createOptions() {
6768
.put(KotlinMiskServerCodegen.ACTION_REQUEST_CONTENT_TYPE_PREFIX, ACTION_REQUEST_CONTENT_TYPE_PREFIX)
6869
.put(KotlinMiskServerCodegen.ADD_MODEL_MOSHI_JSON_ANNOTATION, ADD_MODEL_MOSHI_JSON_ANNOTATION)
6970
.put(KotlinMiskServerCodegen.GENERATE_STUB_IMPL_CLASSES, GENERATE_STUB_IMPL_CLASSES)
71+
.put(KotlinMiskServerCodegen.TESTING_MODULE, TESTING_MODULE)
7072
.build();
7173
}
7274

samples/server/petstore/kotlin-misk-config/src/main/kotlin/org/openapitools/server/api/api/PetApiAction.kt

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,15 +41,17 @@ class PetApiAction @Inject constructor(
4141
@Description("Add a new pet to the store")
4242
@RequestContentType(MediaTypes.APPLICATION_JSON, MediaTypes.APPLICATION_XML)
4343
@ResponseContentType(MediaTypes.APPLICATION_XML, MediaTypes.APPLICATION_JSON)
44-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
44+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
45+
@Supress("unused")
4546
fun addPet(
4647
@Valid @RequestBody pet: Pet): Pet {
4748
TODO()
4849
}
4950

5051
@Delete("samplePrefix/pet/{petId}")
5152
@Description("Deletes a pet")
52-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
53+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
54+
@Supress("unused")
5355
fun deletePet(
5456
@PathParam("petId") petId: kotlin.Long,
5557
@RequestHeader(value = "api_key") apiKey: kotlin.String?) {
@@ -59,7 +61,8 @@ class PetApiAction @Inject constructor(
5961
@Get("samplePrefix/pet/findByStatus")
6062
@Description("Finds Pets by status")
6163
@ResponseContentType(MediaTypes.APPLICATION_XML, MediaTypes.APPLICATION_JSON)
62-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
64+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
65+
@Supress("unused")
6366
fun findPetsByStatus(
6467
@QueryParam(value = "status") status: kotlin.Array<kotlin.String>): kotlin.Array<Pet> {
6568
TODO()
@@ -68,7 +71,8 @@ class PetApiAction @Inject constructor(
6871
@Get("samplePrefix/pet/findByTags")
6972
@Description("Finds Pets by tags")
7073
@ResponseContentType(MediaTypes.APPLICATION_XML, MediaTypes.APPLICATION_JSON)
71-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
74+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
75+
@Supress("unused")
7276
fun findPetsByTags(
7377
@QueryParam(value = "tags") tags: kotlin.Array<kotlin.String>): kotlin.Array<Pet> {
7478
TODO()
@@ -77,7 +81,8 @@ class PetApiAction @Inject constructor(
7781
@Get("samplePrefix/pet/{petId}")
7882
@Description("Find pet by ID")
7983
@ResponseContentType(MediaTypes.APPLICATION_XML, MediaTypes.APPLICATION_JSON)
80-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
84+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
85+
@Supress("unused")
8186
fun getPetById(
8287
@PathParam("petId") petId: kotlin.Long): Pet {
8388
TODO()
@@ -87,7 +92,8 @@ class PetApiAction @Inject constructor(
8792
@Description("Update an existing pet")
8893
@RequestContentType(MediaTypes.APPLICATION_JSON, MediaTypes.APPLICATION_XML)
8994
@ResponseContentType(MediaTypes.APPLICATION_XML, MediaTypes.APPLICATION_JSON)
90-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
95+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
96+
@Supress("unused")
9197
fun updatePet(
9298
@Valid @RequestBody pet: Pet): Pet {
9399
TODO()
@@ -96,7 +102,8 @@ class PetApiAction @Inject constructor(
96102
@Post("samplePrefix/pet/{petId}")
97103
@Description("Updates a pet in the store with form data")
98104
@RequestContentType(MediaTypes.APPLICATION_FORM_URLENCODED)
99-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
105+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
106+
@Supress("unused")
100107
fun updatePetWithForm(
101108
@PathParam("petId") petId: kotlin.Long,
102109
@QueryParam(value = "name") name: kotlin.String? ,
@@ -108,7 +115,8 @@ class PetApiAction @Inject constructor(
108115
@Description("uploads an image")
109116
@RequestContentType(MediaTypes.FORM_DATA)
110117
@ResponseContentType(MediaTypes.APPLICATION_JSON)
111-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
118+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
119+
@Supress("unused")
112120
fun uploadFile(
113121
@PathParam("petId") petId: kotlin.Long,
114122
@QueryParam(value = "additionalMetadata") additionalMetadata: kotlin.String? ,

samples/server/petstore/kotlin-misk-config/src/main/kotlin/org/openapitools/server/api/api/StoreApiAction.kt

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ class StoreApiAction @Inject constructor(
3838

3939
@Delete("samplePrefix/store/order/{orderId}")
4040
@Description("Delete purchase order by ID")
41-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
41+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
42+
@Supress("unused")
4243
fun deleteOrder(
4344
@PathParam("orderId") orderId: kotlin.String) {
4445
TODO()
@@ -47,15 +48,17 @@ class StoreApiAction @Inject constructor(
4748
@Get("samplePrefix/store/inventory")
4849
@Description("Returns pet inventories by status")
4950
@ResponseContentType(MediaTypes.APPLICATION_JSON)
50-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
51+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
52+
@Supress("unused")
5153
fun getInventory(): kotlin.collections.Map<kotlin.String, kotlin.Int> {
5254
TODO()
5355
}
5456

5557
@Get("samplePrefix/store/order/{orderId}")
5658
@Description("Find purchase order by ID")
5759
@ResponseContentType(MediaTypes.APPLICATION_XML, MediaTypes.APPLICATION_JSON)
58-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
60+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
61+
@Supress("unused")
5962
fun getOrderById(
6063
@Min(1L) @Max(5L) @PathParam("orderId") orderId: kotlin.Long): Order {
6164
TODO()
@@ -65,7 +68,8 @@ class StoreApiAction @Inject constructor(
6568
@Description("Place an order for a pet")
6669
@RequestContentType(MediaTypes.APPLICATION_JSON)
6770
@ResponseContentType(MediaTypes.APPLICATION_XML, MediaTypes.APPLICATION_JSON)
68-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
71+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
72+
@Supress("unused")
6973
fun placeOrder(
7074
@Valid @RequestBody order: Order): Order {
7175
TODO()

samples/server/petstore/kotlin-misk-config/src/main/kotlin/org/openapitools/server/api/api/UserApiAction.kt

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ class UserApiAction @Inject constructor(
3939
@Post("samplePrefix/user")
4040
@Description("Create user")
4141
@RequestContentType(MediaTypes.APPLICATION_JSON)
42-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
42+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
43+
@Supress("unused")
4344
fun createUser(
4445
@Valid @RequestBody user: User) {
4546
TODO()
@@ -48,7 +49,8 @@ class UserApiAction @Inject constructor(
4849
@Post("samplePrefix/user/createWithArray")
4950
@Description("Creates list of users with given input array")
5051
@RequestContentType(MediaTypes.APPLICATION_JSON)
51-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
52+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
53+
@Supress("unused")
5254
fun createUsersWithArrayInput(
5355
@Valid @RequestBody user: kotlin.Array<User>) {
5456
TODO()
@@ -57,15 +59,17 @@ class UserApiAction @Inject constructor(
5759
@Post("samplePrefix/user/createWithList")
5860
@Description("Creates list of users with given input array")
5961
@RequestContentType(MediaTypes.APPLICATION_JSON)
60-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
62+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
63+
@Supress("unused")
6164
fun createUsersWithListInput(
6265
@Valid @RequestBody user: kotlin.Array<User>) {
6366
TODO()
6467
}
6568

6669
@Delete("samplePrefix/user/{username}")
6770
@Description("Delete user")
68-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
71+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
72+
@Supress("unused")
6973
fun deleteUser(
7074
@PathParam("username") username: kotlin.String) {
7175
TODO()
@@ -74,7 +78,8 @@ class UserApiAction @Inject constructor(
7478
@Get("samplePrefix/user/{username}")
7579
@Description("Get user by user name")
7680
@ResponseContentType(MediaTypes.APPLICATION_XML, MediaTypes.APPLICATION_JSON)
77-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
81+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
82+
@Supress("unused")
7883
fun getUserByName(
7984
@PathParam("username") username: kotlin.String): User {
8085
TODO()
@@ -83,7 +88,8 @@ class UserApiAction @Inject constructor(
8388
@Get("samplePrefix/user/login")
8489
@Description("Logs user into the system")
8590
@ResponseContentType(MediaTypes.APPLICATION_XML, MediaTypes.APPLICATION_JSON)
86-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
91+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
92+
@Supress("unused")
8793
fun loginUser(
8894
@QueryParam(value = "username") username: kotlin.String,
8995
@QueryParam(value = "password") password: kotlin.String): kotlin.String {
@@ -92,15 +98,17 @@ class UserApiAction @Inject constructor(
9298

9399
@Get("samplePrefix/user/logout")
94100
@Description("Logs out current logged in user session")
95-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
101+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
102+
@Supress("unused")
96103
fun logoutUser() {
97104
TODO()
98105
}
99106

100107
@Put("samplePrefix/user/{username}")
101108
@Description("Updated user")
102109
@RequestContentType(MediaTypes.APPLICATION_JSON)
103-
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 1.0)
110+
@LogRequestResponse(bodySampling = 1.0, errorBodySampling = 2.0)
111+
@Supress("unused")
104112
fun updateUser(
105113
@PathParam("username") username: kotlin.String,
106114
@Valid @RequestBody user: User) {

0 commit comments

Comments
 (0)