Skip to content

Commit

Permalink
chore: update dependency versions
Browse files Browse the repository at this point in the history
  • Loading branch information
utybo committed Oct 19, 2024
1 parent eb71e75 commit dd8e5f1
Show file tree
Hide file tree
Showing 34 changed files with 1,792 additions and 276 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ bin
!.idea/icon.png
.sgp
dev.db
.kotlin
56 changes: 28 additions & 28 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
[versions]
coroutines = "1.7.3"
detekt = "1.23.1"
dokka = "1.8.20"
gradleTestLogger = "3.2.0"
hoplite = "2.7.5"
jackson = "2.15.2"
coroutines = "1.9.0"
detekt = "1.23.7"
dokka = "1.9.20"
gradleTestLogger = "4.0.0"
hoplite = "2.8.2"
jackson = "2.18.0"
jimfs = "1.3.0"
junit = "5.10.0"
kotlin = "1.9.10"
kotlinBcv = "0.13.2"
ktor = "2.3.3"
logback = "1.4.7"
mockk = "1.13.5"
nodeGradle = "5.0.0"
slf4j = "2.0.7"
versions = "0.47.0"
junit = "5.11.2"
kotlin = "2.0.21"
kotlinBcv = "0.16.3"
ktor = "3.0.0"
logback = "1.5.10"
mockk = "1.13.13"
nodeGradle = "7.1.0"
slf4j = "2.0.16"
versions = "0.51.0"
licenserPlugin = "0.6.1"
swaggerCore = "2.2.15"
swaggerUi = "5.3.1"
clikt = "4.2.0"
exposed = "0.42.0"
kotlinPoet = "1.14.2"
sqlite = "3.42.0.0"
testcontainers = "1.18.3"
postgresql = "42.6.0"
mysql = "8.1.0"
lang3 = "3.13.0"
shadow = "8.1.1"
swaggerCore = "2.2.25"
swaggerUi = "5.17.14"
clikt = "5.0.1"
exposed = "0.55.0"
kotlinPoet = "1.18.1"
sqlite = "3.46.1.3"
testcontainers = "1.20.2"
postgresql = "42.7.4"
mysql = "9.0.0"
lang3 = "3.17.0"
shadow = "8.3.3"

[libraries]
# Dependencies
Expand Down Expand Up @@ -79,7 +79,7 @@ exposed-javatime = { module = "org.jetbrains.exposed:exposed-java-time", version

kotlinPoet = { module = "com.squareup:kotlinpoet", version.ref = "kotlinPoet" }

sqlite = { module = "org.xerial:sqlite-jdbc", version.ref = "sqlite" }
sqlite = { module = "org.xerial:sqlite-jdbc", version.ref = "sqlite" }

# Test dependencies

Expand Down Expand Up @@ -113,4 +113,4 @@ gradleTestLogger = { id = "com.adarshr.test-logger", version.ref = "gradleTestLo
kotlinBcv = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlinBcv" }
nodeGradle = { id = "com.github.node-gradle.node", version.ref = "nodeGradle" }
licenser = { id = "org.cadixdev.licenser", version.ref = "licenserPlugin" }
shadow = { id = "com.github.johnrengelman.shadow", version.ref = "shadow" }
shadow = { id = "com.gradleup.shadow", version.ref = "shadow" }
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
22 changes: 13 additions & 9 deletions gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#

##############################################################################
#
Expand Down Expand Up @@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
Expand Down Expand Up @@ -83,7 +85,9 @@ done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
' "$PWD" ) || exit

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
Expand Down Expand Up @@ -144,15 +148,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -201,11 +205,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
22 changes: 12 additions & 10 deletions gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@rem SPDX-License-Identifier: Apache-2.0
@rem

@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
Expand Down Expand Up @@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import com.sksamuel.hoplite.fp.Validated
import com.sksamuel.hoplite.fp.flatMap
import com.sksamuel.hoplite.fp.invalid
import com.sksamuel.hoplite.fp.valid
import com.sksamuel.hoplite.transformer.PathNormalizer
import kotlin.reflect.KClass
import kotlin.reflect.KType
import kotlin.reflect.full.isSubtypeOf
Expand Down Expand Up @@ -70,7 +71,7 @@ class SectionedConfigurationDecoder<T : SectionedConfiguration>(

val sectionValues = mutableMapOf<ConfigurationSection<*>, Any>()
for ((key, value) in node.map) {
val section = sections.find { it.name == key }
val section = sections.find { PathNormalizer.normalizePathElement(it.name) == key }
val sectionType = section!!.kclass.starProjectedType

val decodedSection = context.decoder(sectionType)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ class SectionedConfigurationTest {
val fs = setupFs("/test.toml", content)

return configLoader(sections.toList())
.allowEmptySources()
.allowEmptyConfigFiles()
.build()
.loadConfigOrThrow(
SectionedConfigurationContainer::class,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package guru.zoroark.tegral.openapi.cli
import ch.qos.logback.classic.Level
import com.github.ajalt.clikt.core.CliktCommand
import com.github.ajalt.clikt.core.ProgramResult
import com.github.ajalt.clikt.core.main
import com.github.ajalt.clikt.parameters.arguments.argument
import com.github.ajalt.clikt.parameters.options.default
import com.github.ajalt.clikt.parameters.options.flag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package guru.zoroark.tegral.openapi.cli

import com.github.ajalt.clikt.core.ProgramResult
import com.github.ajalt.clikt.core.parse
import com.google.common.jimfs.Configuration
import com.google.common.jimfs.Jimfs
import org.junit.jupiter.api.Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class OpenApiConversionTest {
assertEquals(
"""
{"openapi":"3.1.0","info":{"title":"My API","version":"0.0.0"},
"jsonSchemaDialect":"https://json-schema.org/draft/2020-12/schema"}
"jsonSchemaDialect":"https://spec.openapis.org/oas/3.1/dialect/base"}
""".trimIndent().replace("\n", ""),
json
)
Expand Down Expand Up @@ -75,7 +75,7 @@ class OpenApiConversionTest {
info:
title: My API
version: 0.0.0
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
jsonSchemaDialect: https://spec.openapis.org/oas/3.1/dialect/base
""".trimIndent() + "\n",
yaml
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,61 +25,61 @@ import io.ktor.server.resources.options
import io.ktor.server.resources.patch
import io.ktor.server.resources.post
import io.ktor.server.resources.put
import io.ktor.server.routing.Route
import io.ktor.server.routing.*
import io.ktor.util.pipeline.PipelineContext

/**
* Defines a `get` route handler for the given resource, additionally registering its
* [description][ResourceDescription].
*/
inline fun <reified T : Any> Route.getD(
noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit
noinline body: suspend RoutingContext.(T) -> Unit
): Route = get(body) describeWith descriptionFromResource<T> { get }

/**
* Defines an `options` route handler for the given resource, additionally registering its
* [description][ResourceDescription].
*/
inline fun <reified T : Any> Route.optionsD(
noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit
noinline body: suspend RoutingContext.(T) -> Unit
): Route = options(body) describeWith descriptionFromResource<T> { options }

/**
* Defines a `head` route handler for the given resource, additionally registering its
* [description][ResourceDescription].
*/
inline fun <reified T : Any> Route.headD(
noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit
noinline body: suspend RoutingContext.(T) -> Unit
): Route = head(body) describeWith descriptionFromResource<T> { head }

/**
* Defines a `post` route handler for the given resource, additionally registering its
* [description][ResourceDescription].
*/
inline fun <reified T : Any> Route.postD(
noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit
noinline body: suspend RoutingContext.(T) -> Unit
): Route = post(body) describeWith descriptionFromResource<T> { post }

/**
* Defines a `put` route handler for the given resource, additionally registering its
* [description][ResourceDescription].
*/
inline fun <reified T : Any> Route.putD(
noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit
noinline body: suspend RoutingContext.(T) -> Unit
): Route = put(body) describeWith descriptionFromResource<T> { put }

/**
* Defines a `delete` route handler for the given resource, additionally registering its
* [description][ResourceDescription].
*/
inline fun <reified T : Any> Route.deleteD(
noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit
noinline body: suspend RoutingContext.(T) -> Unit
): Route = delete(body) describeWith descriptionFromResource<T> { delete }

/**
* Defines a `patch` route handler for the given resource, additionally registering its
* [description][ResourceDescription].
*/
inline fun <reified T : Any> Route.patchD(
noinline body: suspend PipelineContext<Unit, ApplicationCall>.(T) -> Unit
noinline body: suspend RoutingContext.(T) -> Unit
): Route = patch(body) describeWith descriptionFromResource<T> { patch }
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import guru.zoroark.tegral.openapi.ktor.openApi
import io.ktor.resources.Resource
import io.ktor.server.application.ApplicationCall
import io.ktor.server.resources.Resources
import io.ktor.server.routing.Route
import io.ktor.server.routing.*
import io.ktor.server.testing.testApplication
import io.ktor.util.pipeline.PipelineContext
import io.swagger.v3.oas.models.Operation
Expand All @@ -37,7 +37,7 @@ class Hello(val name: String) {
})
}

typealias RouteBuilder = Route.(suspend PipelineContext<Unit, ApplicationCall>.(Hello) -> Unit) -> Route
typealias RouteBuilder = Route.(suspend RoutingContext.(Hello) -> Unit) -> Route

class OperationDRouteHandlersTest {
private fun testResourceOperation(
Expand Down
1 change: 0 additions & 1 deletion tegral-openapi/tegral-openapi-ktor/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ dependencies {
api libs.ktor.server.core

testImplementation libs.ktor.server.test
testImplementation libs.ktor.server.locations
}

ext.humanName = "Tegral OpenAPI Ktor"
Expand Down
Loading

0 comments on commit dd8e5f1

Please sign in to comment.