forked from OpenAPITools/openapi-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUG][KOTLIN] Sanitize names of the adapter variables in anyOf and on…
…eOf model template to avoid compilation errors (OpenAPITools#19981) * [kotlin] Sanitize one_of and any_of model variable names to avoid compilation errors (OpenAPITools#19942) * [kotlin] add missing validateJsonElement method to oneOf and anyOf model templates (OpenAPITools#19942)
- Loading branch information
1 parent
48e8375
commit 32bf99a
Showing
10 changed files
with
551 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/ClientLibrary.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package org.openapitools.codegen.kotlin; | ||
|
||
import lombok.Getter; | ||
import org.jetbrains.kotlin.com.intellij.openapi.util.text.Strings; | ||
|
||
@Getter | ||
enum ClientLibrary { | ||
JVM_KTOR("main/kotlin"), | ||
JVM_OKHTTP4("main/kotlin"), | ||
JVM_SPRING_WEBCLIENT("main/kotlin"), | ||
JVM_SPRING_RESTCLIENT("main/kotlin"), | ||
JVM_RETROFIT2("main/kotlin"), | ||
MULTIPLATFORM("commonMain/kotlin"), | ||
JVM_VOLLEY("gson", "main/java"), | ||
JVM_VERTX("main/kotlin"); | ||
private final String serializationLibrary; | ||
private final String libraryName; | ||
private final String sourceRoot; | ||
|
||
ClientLibrary(String serializationLibrary, String sourceRoot) { | ||
this.serializationLibrary = serializationLibrary; | ||
this.sourceRoot = sourceRoot; | ||
this.libraryName = Strings.toLowerCase(this.name()).replace("_", "-"); | ||
} | ||
|
||
ClientLibrary(String sourceRoot) { | ||
this("jackson", sourceRoot); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.