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 645f27f9243d1d896ac7bb5534fae9bd63c5b0d4 · PR merge a82daa4a80c526b466b8ac2fa26fdeaaa0e8b7dc · Head 0b3c85d697df5fd580663a55dcdd2ffeb156bd78 · raw patch
Test case

test/inputs/schema/optional-constraints.schema

1 generated file · +3 −0
Mschema-phpdefault / TopLevel.php+3 −0
@@ -178,6 +178,9 @@ class TopLevel {
178178 */
179179 public static function validateOptPattern(?string $value): bool {
180180 if (!is_null($value)) {
181+ if (preg_match('~^[a-z]+$~u', $value) !== 1) {
182+ throw new Exception("Attribute Error");
183+ }
181184 }
182185 return true;
183186 }
Test case

test/inputs/schema/pattern.schema

1 generated file · +9 −0
Mschema-phpdefault / TopLevel.php+9 −0
@@ -45,6 +45,9 @@ class TopLevel {
4545 * @throws Exception
4646 */
4747 public static function validatePattern1(string $value): bool {
48+ if (preg_match('~a[.]*~u', $value) !== 1) {
49+ throw new Exception("Attribute Error");
50+ }
4851 return true;
4952 }
5053
@@ -92,6 +95,9 @@ class TopLevel {
9295 * @throws Exception
9396 */
9497 public static function validatePattern2(string $value): bool {
98+ if (preg_match('~b[.]*~u', $value) !== 1) {
99+ throw new Exception("Attribute Error");
100+ }
95101 return true;
96102 }
97103
@@ -139,6 +145,9 @@ class TopLevel {
139145 * @throws Exception
140146 */
141147 public static function validateUnion(string $value): bool {
148+ if (preg_match('~(b[.]*)|(c[.]*)~u', $value) !== 1) {
149+ throw new Exception("Attribute Error");
150+ }
142151 return true;
143152 }
Test case

test/inputs/schema/renaming-bug.schema

1 generated file · +3 −0
Mschema-phpdefault / TopLevel.php+3 −0
@@ -54,6 +54,9 @@ class TopLevel {
5454 */
5555 public static function validateVersion(?string $value): bool {
5656 if (!is_null($value)) {
57+ if (preg_match('~^\\d{1,5}.{1}\\d{1,5}.{1}\\d{1,5}$~u', $value) !== 1) {
58+ throw new Exception("Attribute Error");
59+ }
5760 }
5861 return true;
5962 }
No generated files match these filters.