Generated-output differences

quicktype output changed between the PR base and tested PR merge revisions.
← Back to the pull request
6test cases
6files differ
6modified
0new
0deleted
144changed lines
+144 −0insertions / deletions
Base 645f27f9243d1d896ac7bb5534fae9bd63c5b0d4 · PR merge 450424e67b46e96fef2d588240f524af4d057777 · Head 8db938bb948e159584502d90ae1d7f13aee1f161 · raw patch
Test case

test/inputs/schema/integer-type.schema

1 generated file · +42 −0
Mschema-kotlindefault / TopLevel.kt+42 −0
@@ -35,6 +35,48 @@ data class TopLevel (
3535
3636 val unbounded: Long
3737 ) {
38+ init {
39+ require(aboveI32Max >= 0)
40+ }
41+ init {
42+ require(aboveI32Max <= 2147483648)
43+ }
44+ init {
45+ require(belowI32Min >= -2147483649)
46+ }
47+ init {
48+ require(belowI32Min <= 0)
49+ }
50+ init {
51+ require(i32Range >= -2147483648)
52+ }
53+ init {
54+ require(i32Range <= 2147483647)
55+ }
56+ init {
57+ require(largeBounds >= -9007199254740991)
58+ }
59+ init {
60+ require(largeBounds <= 9007199254740991)
61+ }
62+ init {
63+ require(onlyMaximum <= 0)
64+ }
65+ init {
66+ require(onlyMinimum >= 0)
67+ }
68+ init {
69+ require(smallNegative >= -100)
70+ }
71+ init {
72+ require(smallNegative <= 0)
73+ }
74+ init {
75+ require(smallPositive >= 0)
76+ }
77+ init {
78+ require(smallPositive <= 100)
79+ }
3880 public fun toJson() = klaxon.toJsonString(this)
3981
4082 companion object {
Test case

test/inputs/schema/minmax-integer.schema

1 generated file · +30 −0
Mschema-kotlindefault / TopLevel.kt+30 −0
@@ -18,6 +18,36 @@ data class TopLevel (
1818 val minMaxUnion: Long,
1919 val union: Long
2020 ) {
21+ init {
22+ require(intersection >= 4)
23+ }
24+ init {
25+ require(intersection <= 5)
26+ }
27+ init {
28+ require(max <= 5)
29+ }
30+ init {
31+ require(min >= 3)
32+ }
33+ init {
34+ require(minmax >= 3)
35+ }
36+ init {
37+ require(minmax <= 5)
38+ }
39+ init {
40+ require(minMaxIntersection >= 3)
41+ }
42+ init {
43+ require(minMaxIntersection <= 5)
44+ }
45+ init {
46+ require(union >= 3)
47+ }
48+ init {
49+ require(union <= 6)
50+ }
2151 public fun toJson() = klaxon.toJsonString(this)
2252
2353 companion object {
Test case

test/inputs/schema/minmax.schema

1 generated file · +30 −0
Mschema-kotlindefault / TopLevel.kt+30 −0
@@ -18,6 +18,36 @@ data class TopLevel (
1818 val minMaxUnion: Double,
1919 val union: Double
2020 ) {
21+ init {
22+ require(intersection >= 4)
23+ }
24+ init {
25+ require(intersection <= 5)
26+ }
27+ init {
28+ require(max <= 5)
29+ }
30+ init {
31+ require(min >= 3)
32+ }
33+ init {
34+ require(minmax >= 3)
35+ }
36+ init {
37+ require(minmax <= 5)
38+ }
39+ init {
40+ require(minMaxIntersection >= 3)
41+ }
42+ init {
43+ require(minMaxIntersection <= 5)
44+ }
45+ init {
46+ require(union >= 3)
47+ }
48+ init {
49+ require(union <= 6)
50+ }
2151 public fun toJson() = klaxon.toJsonString(this)
2252
2353 companion object {
Test case

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

1 generated file · +18 −0
Mschema-kotlindefault / TopLevel.kt+18 −0
@@ -17,6 +17,24 @@ data class TopLevel (
1717 val requiredLabel: String,
1818 val weight: Double? = null
1919 ) {
20+ init {
21+ count?.let { require(it >= 1) }
22+ }
23+ init {
24+ count?.let { require(it <= 100) }
25+ }
26+ init {
27+ require(requiredCount >= 1)
28+ }
29+ init {
30+ require(requiredCount <= 100)
31+ }
32+ init {
33+ weight?.let { require(it >= 0.5) }
34+ }
35+ init {
36+ weight?.let { require(it <= 99.5) }
37+ }
2038 public fun toJson() = klaxon.toJsonString(this)
2139
2240 companion object {
Test case

test/inputs/schema/optional-constraints.schema

1 generated file · +18 −0
Mschema-kotlindefault / TopLevel.kt+18 −0
@@ -15,6 +15,24 @@ data class TopLevel (
1515 val optString: String? = null,
1616 val reqZeroMin: Long
1717 ) {
18+ init {
19+ optDouble?.let { require(it >= 0.5) }
20+ }
21+ init {
22+ optDouble?.let { require(it <= 99.5) }
23+ }
24+ init {
25+ optInt?.let { require(it >= 0) }
26+ }
27+ init {
28+ optInt?.let { require(it <= 100) }
29+ }
30+ init {
31+ require(reqZeroMin >= 0)
32+ }
33+ init {
34+ require(reqZeroMin <= 100)
35+ }
1836 public fun toJson() = klaxon.toJsonString(this)
1937
2038 companion object {
Test case

test/inputs/schema/schema-constraints.schema

1 generated file · +6 −0
Mschema-kotlindefault / TopLevel.kt+6 −0
@@ -12,6 +12,12 @@ data class TopLevel (
1212 val minMaxLength: String,
1313 val percent: Double
1414 ) {
15+ init {
16+ require(percent >= 0)
17+ }
18+ init {
19+ require(percent <= 1)
20+ }
1521 public fun toJson() = klaxon.toJsonString(this)
1622
1723 companion object {
No generated files match these filters.