Compare commits

..

53 Commits

Author SHA1 Message Date
c3526dc807 fix(deps): update dependency com.charleskorn.kaml:kaml to v0.74.0 (#715)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-31 18:56:14 +00:00
a24abad7ad fix(deps): update kotestversion to v6.0.0.m3 (#714)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-31 06:25:34 +00:00
ef92254b99 fix(deps): update dependency joda-time:joda-time to v2.14.0 (#711)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-29 13:46:55 +00:00
0ef755a0f4 fix(deps): update ktor to v3.1.2 (#710)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-27 12:31:59 +00:00
1d16bcccd6 fix(deps): update dependency com.charleskorn.kaml:kaml to v0.73.0 (#709)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-20 21:59:12 +00:00
90d78a1898 fix(deps): update dependency org.jetbrains.kotlin:kotlin-reflect to v2.1.20 (#708)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-20 20:04:48 +00:00
797fdabf5d chore(deps): update plugin org.jetbrains.kotlin.jvm to v2.1.20 (#706)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-20 15:13:24 +00:00
140130fd34 chore(deps): update plugin org.jetbrains.kotlin.plugin.serialization to v2.1.20 (#707)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-20 11:59:45 +00:00
b449545460 chore(deps): update plugin com.vanniktech.maven.publish to v0.31.0 (#703)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-03-06 12:04:09 +00:00
8f711bbd62 fix(deps): update slf4j monorepo to v2.0.17 (#701)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-25 22:43:33 +00:00
1d0d18b254 chore(deps): update dependency gradle to v8.13 (#700)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-25 12:01:39 +00:00
e021efd8f2 fix(deps): update ktor to v3.1.1 (#699)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-24 18:33:31 +00:00
97a46ae8c6 fix(deps): update dependency io.gitlab.arturbosch.detekt:detekt-formatting to v1.23.8 (#698)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-21 16:10:09 +00:00
f7b90bc795 fix(deps): update dependency com.charleskorn.kaml:kaml to v0.72.0 (#697)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-12 07:39:52 +00:00
99b9addb00 fix(deps): update ktor to v3.1.0 (#696)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-11 20:09:06 +00:00
b452d95764 fix(deps): update dependency org.jetbrains.kotlinx:kotlinx-datetime to v0.6.2 (#695)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-11 12:38:34 +00:00
641ab78ebd fix(deps): update dependency com.charleskorn.kaml:kaml to v0.71.0 (#694)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-10 01:46:15 +00:00
60aa7b885a fix(deps): update kotestversion to v6.0.0.m2 (#693)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-04 14:47:02 +00:00
9fcb591795 fix(deps): update dependency joda-time:joda-time to v2.13.1 (#692)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-03 16:31:55 +00:00
1a70e66daf fix(deps): update dependency com.charleskorn.kaml:kaml to v0.70.0 (#691)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-01 21:09:35 +00:00
afc69f447d fix(deps): update dependency com.charleskorn.kaml:kaml to v0.68.0 (#690)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-02-01 04:33:51 +00:00
0fbf7361d0 fix(deps): update dependency com.charleskorn.kaml:kaml to v0.67.1 (#689)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-30 04:26:08 +00:00
05bf4475cc chore(deps): update plugin org.jetbrains.kotlin.jvm to v2.1.10 (#686)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-28 00:37:03 +00:00
bdea0de2c5 fix(deps): update dependency org.jetbrains.kotlin:kotlin-reflect to v2.1.10 (#688)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-27 22:25:46 +00:00
d0c91d1ec1 chore(deps): update plugin org.jetbrains.kotlin.plugin.serialization to v2.1.10 (#687)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-27 17:00:19 +00:00
819739d7f1 fix(deps): update dependency com.google.protobuf:protobuf-java to v3.25.6 (#685)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-25 00:46:47 +00:00
6ccefae81c chore(deps): update dependency gradle to v8.12.1 (#684)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-24 13:39:30 +00:00
6b7c789dd2 chore(deps): update plugin org.jetbrains.kotlinx.kover to v0.9.1 (#679)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-08 17:28:50 +00:00
054f6aad44 fix(deps): update dependency org.jetbrains.kotlinx:kotlinx-serialization-json to v1.8.0 (#678)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-01-07 19:13:42 +00:00
958beb1b9c chore(deps): update dependency gradle to v8.12 (#675)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-20 17:34:43 +00:00
a0489d4a00 fix(deps): update dependency com.charleskorn.kaml:kaml to v0.67.0 (#674)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-20 04:53:15 +00:00
20cdf6bcad fix(deps): update ktor to v3.0.3 (#673)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-18 22:59:50 +00:00
803d1c5451 fix(deps): update log4j2 monorepo to v2.24.3 (#671)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-13 13:08:16 +00:00
b9b26ea8eb chore(deps): update plugin org.jetbrains.kotlinx.kover to v0.9.0 (#670)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-12 20:20:30 +00:00
08c7ad08bc fix(deps): update ktor to v3.0.2 (#669)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-12-03 19:33:56 +00:00
506372b74c fix(deps): update dependency org.jetbrains.kotlin:kotlin-reflect to v2.1.0 (#668)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-28 00:07:39 +00:00
29a38f72b8 chore(deps): update plugin org.jetbrains.kotlin.plugin.serialization to v2.1.0 (#667)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-27 15:34:00 +00:00
fd1996bdd4 chore(deps): update plugin org.jetbrains.kotlin.jvm to v2.1.0 (#666)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-27 14:10:10 +00:00
2084828eec fix(deps): update dependency com.charleskorn.kaml:kaml to v0.66.0 (#665)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-25 06:57:50 +00:00
417e21c0a7 fix(deps): update dependency org.apache.logging.log4j:log4j-api to v2.24.2 (#663)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-22 17:35:12 +00:00
641c995171 fix(deps): update dependency org.apache.logging.log4j:log4j-core to v2.24.2 (#662)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-22 14:10:31 +00:00
a7d6b0dd70 chore(deps): update dependency gradle to v8.11.1 (#660)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-20 17:51:51 +00:00
c9eb45ff1d fix(deps): update dependency com.charleskorn.kaml:kaml to v0.65.0 (#658)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-14 04:24:42 +00:00
38081606f3 chore: prep for 4.0.3 2024-11-11 14:39:25 -05:00
4562c8f7e5 fix(deps): update dependency com.charleskorn.kaml:kaml to v0.63.0 (#657)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-11 19:36:28 +00:00
0e2f7acb24 chore(deps): update burrunan/gradle-cache-action action to v2 (#632)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-11 14:33:54 -05:00
636bf65c36 fix: add missing mapping of BooleanEnrichment to EnrichmentHandler (#655) 2024-11-11 14:33:45 -05:00
4a9165fd3a chore(deps): update dependency gradle to v8.11 (#656)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-11 18:11:31 +00:00
c2ce172024 fix: resources plugin not published 2024-11-04 14:39:31 -05:00
d94eae93ad fix(deps): update dependency com.charleskorn.kaml:kaml to v0.62.2 (#651)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-11-01 04:53:08 +00:00
f874cb74e3 chore: add stacktrace to release workflow 2024-10-31 11:47:03 -04:00
9bd3b2e1e6 fix: maybe actually fixed gradle publishing for real this time?? 2024-10-31 11:41:14 -04:00
0958d5a874 fix(deps): update dependency com.charleskorn.kaml:kaml to v0.62.1 (#649)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-31 00:09:06 +00:00
26 changed files with 636 additions and 480 deletions

View File

@ -11,7 +11,7 @@ jobs:
distribution: 'adopt' distribution: 'adopt'
java-version: '21' java-version: '21'
- name: Lint - name: Lint
uses: burrunan/gradle-cache-action@v1 uses: burrunan/gradle-cache-action@v2
with: with:
gradle-version: wrapper gradle-version: wrapper
arguments: detekt arguments: detekt
@ -25,7 +25,7 @@ jobs:
distribution: 'adopt' distribution: 'adopt'
java-version: '21' java-version: '21'
- name: Unit Tests - name: Unit Tests
uses: burrunan/gradle-cache-action@v1 uses: burrunan/gradle-cache-action@v2
with: with:
gradle-version: wrapper gradle-version: wrapper
arguments: test koverHtmlReport arguments: test koverHtmlReport

View File

@ -14,16 +14,16 @@ jobs:
distribution: 'adopt' distribution: 'adopt'
java-version: '21' java-version: '21'
- name: Publish to Maven Central - name: Publish to Maven Central
uses: burrunan/gradle-cache-action@v1 uses: burrunan/gradle-cache-action@v2
with: with:
gradle-version: wrapper gradle-version: wrapper
arguments: publishAndReleaseToMavenCentral arguments: publishAndReleaseToMavenCentral --no-configuration-cache --stacktrace
properties: | properties: |
SONATYPE_AUTOMATIC_RELEASE=true
release=true release=true
env: env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }} ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MAVEN_SIGNING_KEY }} ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.MAVEN_SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.MAVEN_SIGNING_KEY_ID }} # NOTE: FML https://stackoverflow.com/a/39573795
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.MAVEN_SIGNING_KEY_PASSPHRASE }} ORG_GRADLE_PROJECT_signingInMemoryKeyId: FF618132
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.MAVEN_SIGNING_PASSWORD }}

File diff suppressed because it is too large Load Diff

View File

@ -3,13 +3,13 @@ import io.bkbn.sourdough.gradle.library.jvm.LibraryJvmPlugin
import io.bkbn.sourdough.gradle.library.jvm.LibraryJvmExtension import io.bkbn.sourdough.gradle.library.jvm.LibraryJvmExtension
plugins { plugins {
kotlin("jvm") version "2.0.21" apply false kotlin("jvm") version "2.1.20" apply false
kotlin("plugin.serialization") version "2.0.21" apply false kotlin("plugin.serialization") version "2.1.20" apply false
id("io.bkbn.sourdough.library.jvm") version "0.13.0" apply false id("io.bkbn.sourdough.library.jvm") version "0.13.1" apply false
id("io.bkbn.sourdough.application.jvm") version "0.13.0" apply false id("io.bkbn.sourdough.application.jvm") version "0.13.1" apply false
id("com.vanniktech.maven.publish") version "0.30.0" apply false id("com.vanniktech.maven.publish") version "0.31.0" apply false
id("io.bkbn.sourdough.root") version "0.13.0" id("io.bkbn.sourdough.root") version "0.13.1"
id("org.jetbrains.kotlinx.kover") version "0.8.3" id("org.jetbrains.kotlinx.kover") version "0.9.1"
} }
dependencies { dependencies {

View File

@ -10,6 +10,7 @@ import io.bkbn.kompendium.core.fixtures.TestSimpleRequest
import io.bkbn.kompendium.core.metadata.GetInfo import io.bkbn.kompendium.core.metadata.GetInfo
import io.bkbn.kompendium.core.metadata.PostInfo import io.bkbn.kompendium.core.metadata.PostInfo
import io.bkbn.kompendium.core.plugin.NotarizedRoute import io.bkbn.kompendium.core.plugin.NotarizedRoute
import io.bkbn.kompendium.enrichment.BooleanEnrichment
import io.bkbn.kompendium.enrichment.CollectionEnrichment import io.bkbn.kompendium.enrichment.CollectionEnrichment
import io.bkbn.kompendium.enrichment.MapEnrichment import io.bkbn.kompendium.enrichment.MapEnrichment
import io.bkbn.kompendium.enrichment.NumberEnrichment import io.bkbn.kompendium.enrichment.NumberEnrichment
@ -63,6 +64,9 @@ fun Route.enrichedSimpleRequest() {
deprecated = true deprecated = true
} }
} }
TestSimpleRequest::c {
BooleanEnrichment("blah-blah-blah") { }
}
} }
) )
description("A test request") description("A test request")

View File

@ -109,11 +109,15 @@
"b": { "b": {
"type": "number", "type": "number",
"format": "int32" "format": "int32"
},
"c": {
"type": "boolean"
} }
}, },
"required": [ "required": [
"a", "a",
"b" "b",
"c"
] ]
} }
}, },

View File

@ -109,11 +109,15 @@
"b": { "b": {
"type": "number", "type": "number",
"format": "int32" "format": "int32"
},
"c": {
"type": "boolean"
} }
}, },
"required": [ "required": [
"a", "a",
"b" "b",
"c"
] ]
} }
}, },

View File

@ -109,11 +109,15 @@
"b": { "b": {
"type": "number", "type": "number",
"format": "int32" "format": "int32"
},
"c": {
"type": "boolean"
} }
}, },
"required": [ "required": [
"a", "a",
"b" "b",
"c"
] ]
} }
}, },

View File

@ -144,11 +144,15 @@
"b": { "b": {
"type": "number", "type": "number",
"format": "int32" "format": "int32"
},
"c": {
"type": "boolean"
} }
}, },
"required": [ "required": [
"a", "a",
"b" "b",
"c"
] ]
} }
}, },

View File

@ -111,11 +111,15 @@
"type": "number", "type": "number",
"format": "int32", "format": "int32",
"deprecated": true "deprecated": true
},
"c": {
"type": "boolean"
} }
}, },
"required": [ "required": [
"a", "a",
"b" "b",
"c"
] ]
} }
}, },

View File

@ -76,11 +76,15 @@
"type": "number", "type": "number",
"format": "int32", "format": "int32",
"deprecated": true "deprecated": true
},
"c": {
"type": "boolean"
} }
}, },
"required": [ "required": [
"a", "a",
"b" "b",
"c"
] ]
} }
}, },

View File

@ -111,11 +111,15 @@
"type": "number", "type": "number",
"format": "int32", "format": "int32",
"deprecated": true "deprecated": true
},
"c": {
"type": "boolean"
} }
}, },
"required": [ "required": [
"a", "a",
"b" "b",
"c"
] ]
}, },
"TestSimpleRequest-blah-blah": { "TestSimpleRequest-blah-blah": {
@ -129,11 +133,15 @@
"type": "number", "type": "number",
"format": "int32", "format": "int32",
"deprecated": true "deprecated": true
},
"c": {
"type": "boolean"
} }
}, },
"required": [ "required": [
"a", "a",
"b" "b",
"c"
] ]
}, },
"List-TestSimpleRequest-blah-blah": { "List-TestSimpleRequest-blah-blah": {

View File

@ -64,11 +64,15 @@
"type": "number", "type": "number",
"format": "int32", "format": "int32",
"deprecated": true "deprecated": true
},
"c": {
"type": "boolean"
} }
}, },
"required": [ "required": [
"a", "a",
"b" "b",
"c"
] ]
}, },
"TestSimpleRequest-blah": { "TestSimpleRequest-blah": {
@ -82,11 +86,15 @@
"type": "number", "type": "number",
"format": "int32", "format": "int32",
"deprecated": true "deprecated": true
},
"c": {
"type": "boolean"
} }
}, },
"required": [ "required": [
"a", "a",
"b" "b",
"c"
] ]
}, },
"Map-String-TestSimpleRequest-blah": { "Map-String-TestSimpleRequest-blah": {

View File

@ -23,7 +23,8 @@ data class TestRequest(
@Serializable @Serializable
data class TestSimpleRequest( data class TestSimpleRequest(
val a: String, val a: String,
val b: Int val b: Int,
val c: Boolean
) )
@Serializable @Serializable

View File

@ -1,9 +1,8 @@
# Kompendium # Kompendium
project.version=4.0.0-test project.version=4.0.3
# Kotlin # Kotlin
kotlin.code.style=official kotlin.code.style=official
#kotlin.experimental.tryK2=true
# Gradle # Gradle
org.gradle.vfs.watch=true org.gradle.vfs.watch=true
@ -12,8 +11,8 @@ org.gradle.jvmargs=-Xmx2000m
org.gradle.parallel=true org.gradle.parallel=true
# Dependencies # Dependencies
kotlinVersion=2.0.21 kotlinVersion=2.1.20
kotlinSerializeVersion=1.7.+ kotlinSerializeVersion=1.8.0
ktorVersion=3.0.1 ktorVersion=3.1.2
kotestVersion=6.0.0.M1 kotestVersion=6.0.0.M3
detektVersion=1.23.7 detektVersion=1.23.8

Binary file not shown.

View File

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

8
gradlew vendored
View File

@ -15,6 +15,8 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
# #
# SPDX-License-Identifier: Apache-2.0
#
############################################################################## ##############################################################################
# #
@ -55,7 +57,7 @@
# Darwin, MinGW, and NonStop. # Darwin, MinGW, and NonStop.
# #
# (3) This script is generated from the Groovy template # (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. # within the Gradle project.
# #
# You can find Gradle at https://github.com/gradle/gradle/. # You can find Gradle at https://github.com/gradle/gradle/.
@ -84,7 +86,7 @@ done
# shellcheck disable=SC2034 # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/} APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036) # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum MAX_FD=maximum
@ -203,7 +205,7 @@ fi
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command: # Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments, # * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped. # 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 # * 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. # treated as '${Hostname}' itself on the command line.

22
gradlew.bat vendored
View File

@ -13,6 +13,8 @@
@rem See the License for the specific language governing permissions and @rem See the License for the specific language governing permissions and
@rem limitations under the License. @rem limitations under the License.
@rem @rem
@rem SPDX-License-Identifier: Apache-2.0
@rem
@if "%DEBUG%"=="" @echo off @if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail

View File

@ -1,5 +1,6 @@
package io.bkbn.kompendium.json.schema.handler package io.bkbn.kompendium.json.schema.handler
import io.bkbn.kompendium.enrichment.BooleanEnrichment
import io.bkbn.kompendium.enrichment.CollectionEnrichment import io.bkbn.kompendium.enrichment.CollectionEnrichment
import io.bkbn.kompendium.enrichment.Enrichment import io.bkbn.kompendium.enrichment.Enrichment
import io.bkbn.kompendium.enrichment.MapEnrichment import io.bkbn.kompendium.enrichment.MapEnrichment
@ -15,6 +16,7 @@ import io.bkbn.kompendium.json.schema.definition.TypeDefinition
object EnrichmentHandler { object EnrichmentHandler {
fun Enrichment.applyToSchema(schema: JsonSchema): JsonSchema = when (this) { fun Enrichment.applyToSchema(schema: JsonSchema): JsonSchema = when (this) {
is BooleanEnrichment -> applyToSchema(schema)
is NumberEnrichment -> applyToSchema(schema) is NumberEnrichment -> applyToSchema(schema)
is StringEnrichment -> applyToSchema(schema) is StringEnrichment -> applyToSchema(schema)
is CollectionEnrichment<*> -> applyToSchema(schema) is CollectionEnrichment<*> -> applyToSchema(schema)
@ -39,6 +41,11 @@ object EnrichmentHandler {
else -> error("Incorrect enrichment type for enrichment id: ${this.id}") else -> error("Incorrect enrichment type for enrichment id: ${this.id}")
} }
private fun BooleanEnrichment.applyToSchema(schema: JsonSchema): JsonSchema = when (schema) {
is TypeDefinition -> schema.copyBooleanEnrichment(this)
else -> error("Incorrect enrichment type for enrichment id: ${this.id}")
}
private fun NumberEnrichment.applyToSchema(schema: JsonSchema): JsonSchema = when (schema) { private fun NumberEnrichment.applyToSchema(schema: JsonSchema): JsonSchema = when (schema) {
is TypeDefinition -> schema.copyNumberEnrichment(this) is TypeDefinition -> schema.copyNumberEnrichment(this)
else -> error("Incorrect enrichment type for enrichment id: ${this.id}") else -> error("Incorrect enrichment type for enrichment id: ${this.id}")
@ -49,6 +56,13 @@ object EnrichmentHandler {
else -> error("Incorrect enrichment type for enrichment id: ${this.id}") else -> error("Incorrect enrichment type for enrichment id: ${this.id}")
} }
private fun TypeDefinition.copyBooleanEnrichment(
enrichment: BooleanEnrichment
): TypeDefinition = copy(
deprecated = enrichment.deprecated,
description = enrichment.description,
)
private fun TypeDefinition.copyNumberEnrichment( private fun TypeDefinition.copyNumberEnrichment(
enrichment: NumberEnrichment enrichment: NumberEnrichment
): TypeDefinition = copy( ): TypeDefinition = copy(

View File

@ -7,10 +7,14 @@
"b": { "b": {
"type": "number", "type": "number",
"format": "int32" "format": "int32"
},
"c": {
"type": "boolean"
} }
}, },
"required": [ "required": [
"a", "a",
"b" "b",
"c"
] ]
} }

View File

@ -7,10 +7,14 @@
"b": { "b": {
"type": "number", "type": "number",
"format": "int32" "format": "int32"
},
"c": {
"type": "boolean"
} }
}, },
"required": [ "required": [
"a", "a",
"b" "b",
"c"
] ]
} }

View File

@ -9,10 +9,14 @@
"type": "number", "type": "number",
"format": "int32", "format": "int32",
"deprecated": true "deprecated": true
},
"c": {
"type": "boolean"
} }
}, },
"required": [ "required": [
"a", "a",
"b" "b",
"c"
] ]
} }

View File

@ -34,16 +34,16 @@ dependencies {
// Logging // Logging
implementation("org.apache.logging.log4j:log4j-api-kotlin:1.5.0") implementation("org.apache.logging.log4j:log4j-api-kotlin:1.5.0")
implementation("org.apache.logging.log4j:log4j-api:2.24.1") implementation("org.apache.logging.log4j:log4j-api:2.24.3")
implementation("org.apache.logging.log4j:log4j-core:2.24.1") implementation("org.apache.logging.log4j:log4j-core:2.24.3")
implementation("org.slf4j:slf4j-api:2.0.16") implementation("org.slf4j:slf4j-api:2.0.17")
implementation("org.slf4j:slf4j-simple:2.0.16") implementation("org.slf4j:slf4j-simple:2.0.17")
// YAML // YAML
implementation("com.charleskorn.kaml:kaml:0.62.0") implementation("com.charleskorn.kaml:kaml:0.74.0")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializeVersion") implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializeVersion")
implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.1") implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.6.2")
implementation("joda-time:joda-time:2.13.0") implementation("joda-time:joda-time:2.14.0")
} }

View File

@ -4,6 +4,7 @@ plugins {
id("io.bkbn.sourdough.library.jvm") id("io.bkbn.sourdough.library.jvm")
id("io.gitlab.arturbosch.detekt") id("io.gitlab.arturbosch.detekt")
id("com.adarshr.test-logger") id("com.adarshr.test-logger")
id("com.vanniktech.maven.publish")
id("java-library") id("java-library")
id("signing") id("signing")
id("org.jetbrains.kotlinx.kover") id("org.jetbrains.kotlinx.kover")
@ -22,7 +23,7 @@ dependencies {
val kotlinSerializeVersion: String by project val kotlinSerializeVersion: String by project
implementation(projects.kompendiumJsonSchema) implementation(projects.kompendiumJsonSchema)
implementation("com.google.protobuf:protobuf-java:3.25.5") implementation("com.google.protobuf:protobuf-java:3.25.6")
implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion") implementation("org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion")
implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializeVersion") implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializeVersion")

View File

@ -4,6 +4,7 @@ plugins {
id("io.bkbn.sourdough.library.jvm") id("io.bkbn.sourdough.library.jvm")
id("io.gitlab.arturbosch.detekt") id("io.gitlab.arturbosch.detekt")
id("com.adarshr.test-logger") id("com.adarshr.test-logger")
id("com.vanniktech.maven.publish")
id("java-library") id("java-library")
id("signing") id("signing")
id("org.jetbrains.kotlinx.kover") id("org.jetbrains.kotlinx.kover")