Skip to content

Commit

Permalink
Merge branch 'fix-openapi' of github.com:Rattlyy/klite
Browse files Browse the repository at this point in the history
  • Loading branch information
angryziber committed Dec 13, 2024
2 parents 08afbf4 + cb68bfa commit 794840e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* jdbc: @NoTransaction can now be used on jobs
* jdbc: fixed usage of multiple different DataSources when there is an active transaction
* json: TSGenerator will now use more type-safe string template types for java.time classes, e.g. `${number}-${number}-${number}` instead of `string`
* openapi: fix compliancy: output parameter types as lowercase in OpenAPI spec

# 1.6.9
* core: logger(name) is now accessible without a class instance context
Expand Down
2 changes: 1 addition & 1 deletion openapi/src/OpenAPI.kt
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ internal fun toOperation(route: Route): Pair<String, Any> {
fun toParameter(p: Param, op: Operation? = null) = mapOf(
"name" to p.name,
"required" to (!p.p.isOptional && !p.p.type.isMarkedNullable),
"in" to toParameterIn(p.source),
"in" to toParameterIn(p.source)?.name?.lowercase(),
"schema" to p.p.type.toJsonSchema(),
) + ((p.p.findAnnotation<Parameter>() ?: op?.parameters?.find { it.name == p.name })?.toNonEmptyValues() ?: emptyMap())

Expand Down

0 comments on commit 794840e

Please sign in to comment.