Generated-output differences

quicktype output changed between the PR base and tested PR merge revisions.
← Back to the pull request
3test cases
3files differ
3modified
0new
0deleted
15changed lines
+15 −0insertions / deletions
Base e8ad5e678be79de693bd01c7881d85cbe75d9fac · PR merge 35014ac6aaaf2eefb935766d61f939eb78889a41 · Head fe8486a12fc5ef6706632c5b293f17981743aab1 · raw patch
Test case

test/inputs/schema/optional-constraints.schema

1 generated file · +3 −0
Mschema-kotlindefault / TopLevel.kt+3 −0
@@ -27,6 +27,9 @@ data class TopLevel (
2727 init {
2828 optInt?.let { require(it <= 100) }
2929 }
30+ init {
31+ optPattern?.let { require(Regex("^[a-z]+\$").containsMatchIn(it)) }
32+ }
3033 init {
3134 optString?.let { require(it.length >= 3) }
3235 }
Test case

test/inputs/schema/pattern.schema

1 generated file · +9 −0
Mschema-kotlindefault / TopLevel.kt+9 −0
@@ -13,6 +13,15 @@ data class TopLevel (
1313 val pattern2: String,
1414 val union: String
1515 ) {
16+ init {
17+ require(Regex("a[.]*").containsMatchIn(pattern1))
18+ }
19+ init {
20+ require(Regex("b[.]*").containsMatchIn(pattern2))
21+ }
22+ init {
23+ require(Regex("(b[.]*)|(c[.]*)").containsMatchIn(union))
24+ }
1625 public fun toJson() = klaxon.toJsonString(this)
1726
1827 companion object {
Test case

test/inputs/schema/renaming-bug.schema

1 generated file · +3 −0
Mschema-kotlindefault / TopLevel.kt+3 −0
@@ -23,6 +23,9 @@ data class TopLevel (
2323 val fruits: List<Fruit>? = null,
2424 val vehicles: List<Vehicle>? = null
2525 ) {
26+ init {
27+ version?.let { require(Regex("^\\d{1,5}.{1}\\d{1,5}.{1}\\d{1,5}\$").containsMatchIn(it)) }
28+ }
2629 public fun toJson() = klaxon.toJsonString(this)
2730
2831 companion object {
No generated files match these filters.