Skip to content

Commit a6065fc

Browse files
committed
[swift5][client] deprecate Swift 5 generator
1 parent cc045ab commit a6065fc

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

docs/generators/swift5.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: Documentation for the swift5 Generator
77
| Property | Value | Notes |
88
| -------- | ----- | ----- |
99
| generator name | swift5 | pass this to the generate command after -g |
10-
| generator stability | STABLE | |
10+
| generator stability | DEPRECATED | |
1111
| generator type | CLIENT | |
1212
| generator language | Swift | |
1313
| generator default templating engine | mustache | |

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ public Swift5ClientCodegen() {
134134
this.useOneOfInterfaces = true;
135135

136136
generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata)
137-
.stability(Stability.STABLE)
137+
.stability(Stability.DEPRECATED)
138138
.build();
139139

140140
outputFolder = "generated-code" + File.separator + "swift";
@@ -430,6 +430,8 @@ protected void addAdditionPropertiesToCodeGenModel(CodegenModel codegenModel,
430430
public void processOpts() {
431431
super.processOpts();
432432

433+
LOGGER.warn("IMPORTANT: This generator has been deprecated. Please use `swift6` instead");
434+
433435
if (StringUtils.isEmpty(System.getenv("SWIFT_POST_PROCESS_FILE"))) {
434436
LOGGER.info("Environment variable SWIFT_POST_PROCESS_FILE not defined so the Swift code may not be properly formatted. To define it, try 'export SWIFT_POST_PROCESS_FILE=/usr/local/bin/swiftformat' (Linux/Mac)");
435437
LOGGER.info("NOTE: To enable file post-processing, 'enablePostProcessFile' must be set to `true` (--enable-post-process-file for CLI).");

0 commit comments

Comments
 (0)