|
1 | 1 | package org.openapitools.codegen.languages; |
2 | 2 |
|
3 | 3 | import org.openapitools.codegen.CodegenConstants; |
| 4 | +import org.openapitools.codegen.CodegenOperation; |
4 | 5 | import org.openapitools.codegen.CodegenType; |
5 | 6 | import org.openapitools.codegen.SupportingFile; |
6 | 7 | import org.openapitools.codegen.meta.GeneratorMetadata; |
|
11 | 12 | import org.openapitools.codegen.meta.features.SchemaSupportFeature; |
12 | 13 | import org.openapitools.codegen.meta.features.SecurityFeature; |
13 | 14 | import org.openapitools.codegen.meta.features.WireFormatFeature; |
| 15 | +import org.openapitools.codegen.model.ModelMap; |
| 16 | +import org.openapitools.codegen.model.OperationMap; |
| 17 | +import org.openapitools.codegen.model.OperationsMap; |
14 | 18 | import org.slf4j.Logger; |
15 | 19 | import org.slf4j.LoggerFactory; |
16 | 20 |
|
17 | 21 | import java.io.File; |
18 | 22 | import java.util.EnumSet; |
| 23 | +import java.util.List; |
| 24 | +import java.util.Locale; |
| 25 | + |
| 26 | +import static org.openapitools.codegen.utils.StringUtils.camelize; |
19 | 27 |
|
20 | 28 | public class KotlinMiskServerCodegen extends AbstractKotlinCodegen { |
21 | 29 |
|
@@ -97,7 +105,17 @@ public KotlinMiskServerCodegen() { |
97 | 105 |
|
98 | 106 | } |
99 | 107 |
|
100 | | - |
| 108 | + @Override |
| 109 | + public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List<ModelMap> allModels) { |
| 110 | + OperationMap objectMap = objs.getOperations(); |
| 111 | + List<CodegenOperation> operations = objectMap.getOperation(); |
| 112 | + |
| 113 | + for (CodegenOperation operation : operations) { |
| 114 | + // http method verb conversion (e.g. PUT => Put) |
| 115 | + operation.httpMethod = camelize(operation.httpMethod.toLowerCase(Locale.ROOT)); |
| 116 | + } |
| 117 | + return objs; |
| 118 | + } |
101 | 119 | } |
102 | 120 |
|
103 | 121 |
|
0 commit comments