|
5 | 5 | import static io.quarkiverse.openapi.generator.deployment.CodegenConfig.getGlobalConfigName; |
6 | 6 | import static io.quarkiverse.openapi.generator.deployment.CodegenConfig.getSanitizedFileName; |
7 | 7 | import static io.quarkiverse.openapi.generator.deployment.CodegenConfig.getSpecConfigName; |
8 | | -import static io.quarkiverse.openapi.generator.deployment.CodegenConfig.ConfigName.API_NAME_SUFFIX; |
9 | | -import static io.quarkiverse.openapi.generator.deployment.CodegenConfig.ConfigName.BASE_PACKAGE; |
10 | | -import static io.quarkiverse.openapi.generator.deployment.CodegenConfig.ConfigName.DEFAULT_SECURITY_SCHEME; |
11 | | -import static io.quarkiverse.openapi.generator.deployment.CodegenConfig.ConfigName.EXCLUDE; |
12 | | -import static io.quarkiverse.openapi.generator.deployment.CodegenConfig.ConfigName.INCLUDE; |
13 | | -import static io.quarkiverse.openapi.generator.deployment.CodegenConfig.ConfigName.INPUT_BASE_DIR; |
14 | | -import static io.quarkiverse.openapi.generator.deployment.CodegenConfig.ConfigName.MODEL_NAME_PREFIX; |
15 | | -import static io.quarkiverse.openapi.generator.deployment.CodegenConfig.ConfigName.MODEL_NAME_SUFFIX; |
16 | | -import static io.quarkiverse.openapi.generator.deployment.CodegenConfig.ConfigName.TEMPLATE_BASE_DIR; |
17 | | -import static io.quarkiverse.openapi.generator.deployment.CodegenConfig.ConfigName.VALIDATE_SPEC; |
| 8 | +import static io.quarkiverse.openapi.generator.deployment.CodegenConfig.ConfigName.*; |
18 | 9 |
|
19 | 10 | import java.io.IOException; |
20 | 11 | import java.nio.file.Files; |
@@ -228,6 +219,9 @@ protected void generate(OpenApiGeneratorOptions options) { |
228 | 219 | getModelNamePrefix(config, openApiFilePath) |
229 | 220 | .ifPresent(generator::withModelNamePrefix); |
230 | 221 |
|
| 222 | + getRemoveOperationIdPrefix(config, openApiFilePath) |
| 223 | + .ifPresent(generator::withRemoveOperationIdPrefix); |
| 224 | + |
231 | 225 | getValues(config, openApiFilePath, CodegenConfig.ConfigName.MUTINY, Boolean.class) |
232 | 226 | .ifPresent(generator::withMutiny); |
233 | 227 |
|
@@ -350,6 +344,11 @@ private Optional<String> getModelNamePrefix(final Config config, final Path open |
350 | 344 | .getOptionalValue(getSpecConfigName(MODEL_NAME_PREFIX, openApiFilePath), String.class); |
351 | 345 | } |
352 | 346 |
|
| 347 | + private Optional<Boolean> getRemoveOperationIdPrefix(final Config config, final Path openApiFilePath) { |
| 348 | + return config |
| 349 | + .getOptionalValue(getSpecConfigName(REMOVE_OPERATION_ID_PREFIX, openApiFilePath), Boolean.class); |
| 350 | + } |
| 351 | + |
353 | 352 | private Optional<String> getInputBaseDirRelativeToModule(final Path sourceDir, final Config config) { |
354 | 353 | return config.getOptionalValue(getGlobalConfigName(INPUT_BASE_DIR), String.class).map(baseDir -> { |
355 | 354 | int srcIndex = sourceDir.toString().lastIndexOf("src"); |
|
0 commit comments