Generated-output differences

quicktype output changed between the PR base and tested PR merge revisions.
← Back to the pull request
4test cases
4files differ
4modified
0new
0deleted
18changed lines
+18 −0insertions / deletions
Base 9b2d0d5467539bf177a637050f0243f1937426a5 · PR merge 493adacd56f58df8ade353da9719c6c2e09572aa · Head 2b2423da0b948d19bded66dd192a4239f6f2b187 · raw patch
Test case

test/inputs/schema/minmaxlength.schema

1 generated file · +10 −0
Mschema-kotlindefault / TopLevel.kt+10 −0
@@ -27,6 +27,16 @@ data class TopLevel (
2727 val minMaxUnion: String,
2828 val union: String
2929 ) {
30+ init { require(intersection.length >= 4) }
31+ init { require(intersection.length <= 5) }
32+ init { require(maxlength.length <= 5) }
33+ init { require(minlength.length >= 3) }
34+ init { require(minMaxIntersection.length >= 3) }
35+ init { require(minMaxIntersection.length <= 5) }
36+ init { require(minmaxlength.length >= 3) }
37+ init { require(minmaxlength.length <= 5) }
38+ init { require(union.length >= 3) }
39+ init { require(union.length <= 6) }
3040 public fun toJson() = klaxon.toJsonString(this)
3141
3242 companion object {
Test case

test/inputs/schema/optional-const-ref.schema

1 generated file · +4 −0
Mschema-kotlindefault / TopLevel.kt+4 −0
@@ -19,8 +19,12 @@ data class TopLevel (
1919 ) {
2020 init { count?.let { require(it >= 1) } }
2121 init { count?.let { require(it <= 100) } }
22+ init { label?.let { require(it.length >= 2) } }
23+ init { label?.let { require(it.length <= 16) } }
2224 init { require(requiredCount >= 1) }
2325 init { require(requiredCount <= 100) }
26+ init { require(requiredLabel.length >= 2) }
27+ init { require(requiredLabel.length <= 16) }
2428 init { weight?.let { require(it >= 0.5) } }
2529 init { weight?.let { require(it <= 99.5) } }
2630 public fun toJson() = klaxon.toJsonString(this)
Test case

test/inputs/schema/optional-constraints.schema

1 generated file · +2 −0
Mschema-kotlindefault / TopLevel.kt+2 −0
@@ -19,6 +19,8 @@ data class TopLevel (
1919 init { optDouble?.let { require(it <= 99.5) } }
2020 init { optInt?.let { require(it >= 0) } }
2121 init { optInt?.let { require(it <= 100) } }
22+ init { optString?.let { require(it.length >= 3) } }
23+ init { optString?.let { require(it.length <= 10) } }
2224 init { require(reqZeroMin >= 0) }
2325 init { require(reqZeroMin <= 100) }
2426 public fun toJson() = klaxon.toJsonString(this)
Test case

test/inputs/schema/schema-constraints.schema

1 generated file · +2 −0
Mschema-kotlindefault / TopLevel.kt+2 −0
@@ -12,6 +12,8 @@ data class TopLevel (
1212 val minMaxLength: String,
1313 val percent: Double
1414 ) {
15+ init { require(minMaxLength.length >= 5) }
16+ init { require(minMaxLength.length <= 5) }
1517 init { require(percent >= 0) }
1618 init { require(percent <= 1) }
1719 public fun toJson() = klaxon.toJsonString(this)
No generated files match these filters.