Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit 0be709d

Browse files
committed
fix: Name collision in SchemaScopeBuilder
1 parent 6f7e420 commit 0be709d

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/main/kotlin/schema/ObjectSchema.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ interface ObjectSchema<T : Any> : Schema<T> {
5555
}
5656
}
5757
.filter { (field, fieldScope) ->
58-
fieldScope.filter(fieldScope.pathname) &&
58+
fieldScope.filterBlock(fieldScope.pathname) &&
5959
fieldScope.pathname !in scope.skip
6060
}
6161
.forEach { (field, fieldScope) ->
@@ -81,7 +81,7 @@ interface ObjectSchema<T : Any> : Schema<T> {
8181
}
8282
}
8383
.filter { (field, fieldScope) ->
84-
fieldScope.filter(fieldScope.pathname) &&
84+
fieldScope.filterBlock(fieldScope.pathname) &&
8585
fieldScope.pathname !in scope.skip
8686
}
8787
.forEach { (field, fieldScope) ->
@@ -106,7 +106,7 @@ interface ObjectSchema<T : Any> : Schema<T> {
106106
}
107107
}
108108
.filter { (field, fieldScope) ->
109-
fieldScope.filter(fieldScope.pathname) &&
109+
fieldScope.filterBlock(fieldScope.pathname) &&
110110
fieldScope.pathname !in scope.skip
111111
}
112112
.flatMap { (field, fieldScope) ->

src/main/kotlin/schema/SchemaScope.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ class SchemaScope<O, T> constructor(
6161
/**
6262
* Fields filter.
6363
*/
64-
val filter: (String) -> Boolean,
64+
val filterBlock: (String) -> Boolean,
6565
/**
6666
* Extra attributes.
6767
*/
@@ -168,7 +168,7 @@ open class SchemaScopeBuilder<O, T> {
168168
model = this.model,
169169
document = this.document,
170170
skip = this.skip.toList(),
171-
filter = this.filter,
171+
filterBlock = this.filter,
172172
attributes = this.attributes.toMap()
173173
)
174174
}
@@ -191,7 +191,7 @@ fun <O, T> SchemaScope(
191191
builder.model = it.model
192192
builder.document = it.document
193193
builder.skip += it.skip
194-
builder.filter = it.filter
194+
builder.filter = it.filterBlock
195195
builder.attributes += it.attributes
196196
}
197197
builder.apply(block)

0 commit comments

Comments
 (0)