Skip to content

Commit

Permalink
[Kotlin] minor enhancements, remove KotlinServerDeprecatedGenerator (#…
Browse files Browse the repository at this point in the history
…15608)

* better code foramt, add library creator

* remove kotlin server deprecated generator
  • Loading branch information
wing328 authored May 23, 2023
1 parent 9358ab9 commit 833f649
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 275 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -984,6 +984,7 @@ Here is a list of template creators:
* Kotlin: @jimschubert [:heart:](https://www.patreon.com/jimschubert)
* Kotlin (MultiPlatform): @andrewemery
* Kotlin (Volley): @alisters
* Kotlin (jvm-spring-webclient): @stefankoppier
* Lua: @daurnimator
* N4JS: @mmews-n4
* Nim: @hokamoto
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -882,22 +882,22 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List<Mo
// match on first part in mediaTypes like 'application/json; charset=utf-8'
int endIndex = mediaTypeValue.indexOf(';');
String mediaType = (endIndex == -1
? mediaTypeValue
: mediaTypeValue.substring(0, endIndex)
? mediaTypeValue
: mediaTypeValue.substring(0, endIndex)
).trim();
return "multipart/form-data".equals(mediaType)
|| "application/x-www-form-urlencoded".equals(mediaType)
|| (mediaType.startsWith("application/") && mediaType.endsWith("json"));
|| "application/x-www-form-urlencoded".equals(mediaType)
|| (mediaType.startsWith("application/") && mediaType.endsWith("json"));
};
operation.consumes = operation.consumes == null ? null : operation.consumes.stream()
.filter(isSerializable)
.limit(1)
.collect(Collectors.toList());
.filter(isSerializable)
.limit(1)
.collect(Collectors.toList());
operation.hasConsumes = operation.consumes != null && !operation.consumes.isEmpty();

operation.produces = operation.produces == null ? null : operation.produces.stream()
.filter(isSerializable)
.collect(Collectors.toList());
.filter(isSerializable)
.collect(Collectors.toList());
operation.hasProduces = operation.produces != null && !operation.produces.isEmpty();
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ public void processOpts() {
if (AnnotationLibrary.SWAGGER1.equals(getAnnotationLibrary())) {
throw new IllegalArgumentException(AnnotationLibrary.SWAGGER1.getPropertyName() + " is not supported with Spring Boot > 3.x");
}
useJakartaEe=true;
useJakartaEe = true;
additionalProperties.put(USE_JAKARTA_EE, useJakartaEe);
applyJakartaPackage();
}
Expand Down

0 comments on commit 833f649

Please sign in to comment.