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
5changed lines
+5 −0insertions / deletions
Base 1824a2856c8e527dec01320c8b65c0b85a447532 · PR merge 93a2beff5f2674f81908f35d1cf6df0681320918 · Head 471afc58817ba677d4a7052c8d27ea38862c4989 · raw patch
Test case

test/inputs/schema/optional-constraints.schema

1 generated file · +1 −0
Mschema-objective-cdefault / QTTopLevel.m+1 −0
@@ -84,6 +84,7 @@ NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding enco
8484 if (dict[@"optDouble"] && [dict[@"optDouble"] doubleValue] > 99.5) return nil;
8585 if (dict[@"optInt"] && [dict[@"optInt"] doubleValue] < 0) return nil;
8686 if (dict[@"optInt"] && [dict[@"optInt"] doubleValue] > 100) return nil;
87+ if (dict[@"optPattern"] && [dict[@"optPattern"] rangeOfString:@"^[a-z]+$" options:NSRegularExpressionSearch].location == NSNotFound) return nil;
8788 if (dict[@"reqZeroMin"] && [dict[@"reqZeroMin"] doubleValue] < 0) return nil;
8889 if (dict[@"reqZeroMin"] && [dict[@"reqZeroMin"] doubleValue] > 100) return nil;
8990 [self setValuesForKeysWithDictionary:dict];
Test case

test/inputs/schema/pattern.schema

1 generated file · +3 −0
Mschema-objective-cdefault / QTTopLevel.m+3 −0
@@ -78,6 +78,9 @@ NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding enco
7878 - (instancetype)initWithJSONDictionary:(NSDictionary *)dict
7979 {
8080 if (self = [super init]) {
81+ if (dict[@"pattern1"] && [dict[@"pattern1"] rangeOfString:@"a[.]*" options:NSRegularExpressionSearch].location == NSNotFound) return nil;
82+ if (dict[@"pattern2"] && [dict[@"pattern2"] rangeOfString:@"b[.]*" options:NSRegularExpressionSearch].location == NSNotFound) return nil;
83+ if (dict[@"union"] && [dict[@"union"] rangeOfString:@"(b[.]*)|(c[.]*)" options:NSRegularExpressionSearch].location == NSNotFound) return nil;
8184 [self setValuesForKeysWithDictionary:dict];
8285 }
8386 return self;
Test case

test/inputs/schema/renaming-bug.schema

1 generated file · +1 −0
Mschema-objective-cdefault / QTTopLevel.m+1 −0
@@ -231,6 +231,7 @@ NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding enco
231231 - (instancetype)initWithJSONDictionary:(NSDictionary *)dict
232232 {
233233 if (self = [super init]) {
234+ if (dict[@"version"] && [dict[@"version"] rangeOfString:@"^\\d{1,5}.{1}\\d{1,5}.{1}\\d{1,5}$" options:NSRegularExpressionSearch].location == NSNotFound) return nil;
234235 [self setValuesForKeysWithDictionary:dict];
235236 _fruits = map(_fruits, λ(id x, [QTFruit fromJSONDictionary:x]));
236237 _vehicles = map(_vehicles, λ(id x, [QTVehicle fromJSONDictionary:x]));
No generated files match these filters.