Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use external json-dsl instead of the now obsolete internal one that we removed #126

Merged
merged 1 commit into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ allprojects {
mavenCentral()
maven("https://maven.tryformation.com/releases") {
content {
includeGroup("com.jillesvangurp")
includeGroup("com.github.jillesvangurp")
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion docs/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ val searchEngine: String = getProperty("searchEngine", "es-7").toString()
dependencies {
testImplementation(project(":search-dsls"))
testImplementation(project(":search-client"))
testImplementation("com.jillesvangurp:json-dsl:_")
testImplementation("com.github.jillesvangurp:json-dsl:_")

testImplementation(Kotlin.stdlib.jdk8)
testImplementation(KotlinX.coroutines.jdk8)
Expand Down
2 changes: 1 addition & 1 deletion search-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ kotlin {
dependencies {
api(kotlin("stdlib-common", "_"))
api(project(":search-dsls"))
api("com.jillesvangurp:json-dsl:_")
api("com.github.jillesvangurp:json-dsl:_")
api(KotlinX.datetime)
implementation(Ktor.client.core)
api(KotlinX.coroutines.core)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AliasAction: JsonDsl() {
}

class AliasUpdateRequest: JsonDsl() {
private var actions by property(mutableListOf<JsonDsl>())
private var actions by property("actions",mutableListOf<JsonDsl>())
fun add(block: AliasAction.()->Unit) {
actions.add(withJsonDsl {
this["add"] =AliasAction().apply(block)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ILMPhaseConfiguration : JsonDsl() {
}
}
}
var actions by property(defaultValue = ILMActions())
var actions by property("actions",defaultValue = ILMActions())

fun actions(block: ILMActions.() -> Unit) {
actions.apply(block)
Expand All @@ -76,11 +76,11 @@ class IMLPhases : JsonDsl() {
}

class IMLPolicy : JsonDsl() {
var phases by property(defaultValue = IMLPhases())
var phases by property("phases",defaultValue = IMLPhases())
}

class ILMConfiguration: JsonDsl() {
var policy by property(defaultValue = IMLPolicy())
var policy by property("policy",defaultValue = IMLPolicy())
}

suspend fun SearchClient.setIlmPolicy(policyId: String, block: IMLPhases.()->Unit): AcknowledgedResponse {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import com.jillesvangurp.searchdsls.mappingdsl.IndexSettingsAndMappingsDSL
import kotlinx.serialization.json.JsonObject

class ComponentTemplate: JsonDsl() {
var template by property(defaultValue = IndexSettingsAndMappingsDSL())
var template by property("template",defaultValue = IndexSettingsAndMappingsDSL())
}

suspend fun SearchClient.updateComponentTemplate(templateId: String, block: IndexSettingsAndMappingsDSL.()->Unit): JsonObject {
Expand All @@ -27,10 +27,10 @@ suspend fun SearchClient.deleteComponentTemplate(templateId: String): JsonObject
}

class IndexTemplate: JsonDsl() {
var indexPatterns by property(defaultValue = listOf<String>())
var indexPatterns by property("index_patterns",defaultValue = listOf<String>())
var dataStream by property<JsonDsl>()
var composedOf by property(defaultValue = listOf<String>())
var priority by property(defaultValue = 300)
var composedOf by property("composed_of",defaultValue = listOf<String>())
var priority by property("priority",defaultValue = 300)
var meta by property<Map<String,String>>(customPropertyName = "_meta")

}
Expand Down
2 changes: 1 addition & 1 deletion search-dsls/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ kotlin {
commonMain {
dependencies {
implementation(kotlin("stdlib-common", "_"))
implementation("com.jillesvangurp:json-dsl:_")
implementation("com.github.jillesvangurp:json-dsl:_")

}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ class GeoShapeQueryConfig : JsonDsl() {
fun shape(rawJson: String) {
this["shape"] = RawJson(rawJson)
}
var relation by property<GeoShapeQuery.Relation>(defaultValue = GeoShapeQuery.Relation.intersects)
var relation by property("relation", GeoShapeQuery.Relation.intersects)
}

class GeoShapeQuery(val field: String, block: GeoShapeQueryConfig.() -> Unit) : ESQuery("geo_shape") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ open class Field(name: String) : ESQuery(name) {
var boundaryScanner by queryDetails.property<BoundaryScanner>()
var boundaryScannerLocale by queryDetails.property<String>()
var encoder by queryDetails.property<Encoder>()
var fragmenter by queryDetails.property(Fragmenter.span)
var fragmenter by queryDetails.property("fragmenter",Fragmenter.span)
var fragmentOffset by queryDetails.property<Int>()
var fragmentSize by queryDetails.property<Int>()

Expand Down
4 changes: 2 additions & 2 deletions versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ version.ch.qos.logback..logback-classic=1.5.3

version.com.github.doyaaaaaken..kotlin-csv=1.9.3

version.com.github.jillesvangurp..kotlin4example=1.1.5
version.com.github.jillesvangurp..json-dsl=1.2.2

version.com.jillesvangurp..json-dsl=2.1.22
version.com.github.jillesvangurp..kotlin4example=1.1.5

version.io.github.microutils..kotlin-logging=3.0.5
## # available=4.0.0-beta-1
Expand Down
Loading