Skip to content

Commit ae8da31

Browse files
authored
Minor improvement to swift-combine client generator (#15892)
* minor improvement to swift combine * update swift tc
1 parent 9f3d9a5 commit ae8da31

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1009,6 +1009,7 @@ Here is a list of template creators:
10091009
* Swift 3: @hexelon
10101010
* Swift 4: @ehyche
10111011
* Swift 5: @4brunu
1012+
* Swift Combine: @dydus0x14
10121013
* TypeScript (Angular1): @mhardorf
10131014
* TypeScript (Angular2): @roni-frantchi
10141015
* TypeScript (Angular6): @akehir
@@ -1164,7 +1165,7 @@ If you want to join the committee, please kindly apply by sending an email to te
11641165
| Ruby | @cliffano (2017/07) @zlx (2017/09) @autopp (2019/02) |
11651166
| Rust | @frol (2017/07) @farcaller (2017/08) @richardwhiuk (2019/07) @paladinzh (2020/05) @jacob-pro (2022/10) |
11661167
| Scala | @clasnake (2017/07), @jimschubert (2017/09) [:heart:](https://www.patreon.com/jimschubert), @shijinkui (2018/01), @ramzimaalej (2018/03), @chameleon82 (2020/03), @Bouillie (2020/04) |
1167-
| Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @4brunu (2019/11) |
1168+
| Swift | @jgavris (2017/07) @ehyche (2017/08) @Edubits (2017/09) @jaz-ah (2017/09) @4brunu (2019/11) @dydus0x14 (2023/06) |
11681169
| TypeScript | @TiFu (2017/07) @taxpon (2017/07) @sebastianhaas (2017/07) @kenisteward (2017/07) @Vrolijkx (2017/09) @macjohnny (2018/01) @topce (2018/10) @akehir (2019/07) @petejohansonxo (2019/11) @amakhrov (2020/02) @davidgamero (2022/03) @mkusaka (2022/04) |
11691170
| Xojo | @Topheee (2023/04) |
11701171

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
/*
22
* Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
3-
* Copyright 2018 SmartBear Software
43
*
54
* Licensed under the Apache License, Version 2.0 (the "License");
65
* you may not use this file except in compliance with the License.
@@ -303,7 +302,7 @@ public String getTypeDeclaration(Schema p) {
303302
}
304303
return "[String: " + getTypeDeclaration(inner) + "]";
305304
} else if (ModelUtils.isComposedSchema(target)) {
306-
List<Schema> schemas = ModelUtils.getInterfaces((ComposedSchema)target);
305+
List<Schema> schemas = ModelUtils.getInterfaces((ComposedSchema) target);
307306
if (schemas.size() == 1) {
308307
return getTypeDeclaration(schemas.get(0));
309308
} else {
@@ -562,6 +561,7 @@ public CodegenModel fromModel(String name, Schema schema) {
562561
public void setProjectName(String projectName) {
563562
this.projectName = projectName;
564563
}
564+
565565
@Override
566566
public String toEnumValue(String value, String datatype) {
567567
// for string, array of string
@@ -804,7 +804,9 @@ public void postProcess() {
804804
}
805805

806806
@Override
807-
public GeneratorLanguage generatorLanguage() { return GeneratorLanguage.SWIFT; }
807+
public GeneratorLanguage generatorLanguage() {
808+
return GeneratorLanguage.SWIFT;
809+
}
808810

809811
protected void addAnyDecoderIfNeeded() {
810812
if (!anyDecoderWasAdded) {

0 commit comments

Comments
 (0)