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 7cc8d8a58955a00fa24b69cb53f71f3a32fc4f5e · PR merge 0b93ba934718ed65479609168b47c862f958bd12 · Head 3e857376bc80b7c03d306b075265672a56de1a1d · raw patch
Test case

test/inputs/schema/optional-constraints.schema

1 generated file · +1 −0
Mschema-objective-cdefault / QTTopLevel.m+1 −0
@@ -80,6 +80,7 @@ NSString *_Nullable QTTopLevelToJSON(QTTopLevel *topLevel, NSStringEncoding enco
8080 - (instancetype)initWithJSONDictionary:(NSDictionary *)dict
8181 {
8282 if (self = [super init]) {
83+ if (dict[@"optPattern"] && [dict[@"optPattern"] rangeOfString:@"^[a-z]+$" options:NSRegularExpressionSearch].location == NSNotFound) return nil;
8384 [self setValuesForKeysWithDictionary:dict];
8485 }
8586 return self;
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.