Generated-output differences

quicktype output changed between the PR base and tested PR merge revisions.
← Back to the pull request
2test cases
2files differ
2modified
0new
0deleted
11changed lines
+11 −0insertions / deletions
Base 7cc8d8a58955a00fa24b69cb53f71f3a32fc4f5e · PR merge 158e0d1613081e9ad08d7c3197a221a915ef5522 · Head 0ee3572ebf21e07e508a9b84230310292913b181 · raw patch
Test case

test/inputs/schema/min-max-items.schema

1 generated file · +5 −0
Mschema-cjsondefault / TopLevel.c+5 −0
@@ -65,6 +65,7 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
6565 if (!cJSON_HasObjectItem(j, "maxOnly")) { cJSON_DeleteTopLevel(x); return NULL; }
6666 if (cJSON_HasObjectItem(j, "maxOnly")) {
6767 if (!cJSON_IsArray(cJSON_GetObjectItemCaseSensitive(j, "maxOnly"))) { cJSON_DeleteTopLevel(x); return NULL; }
68+ if (cJSON_GetArraySize(cJSON_GetObjectItemCaseSensitive(j, "maxOnly")) > 3) { cJSON_DeleteTopLevel(x); return NULL; }
6869 list_t * x1 = list_create(false, NULL);
6970 if (NULL != x1) {
7071 cJSON * e1 = NULL;
@@ -85,6 +86,8 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
8586 if (!cJSON_HasObjectItem(j, "minAndMax")) { cJSON_DeleteTopLevel(x); return NULL; }
8687 if (cJSON_HasObjectItem(j, "minAndMax")) {
8788 if (!cJSON_IsArray(cJSON_GetObjectItemCaseSensitive(j, "minAndMax"))) { cJSON_DeleteTopLevel(x); return NULL; }
89+ if (cJSON_GetArraySize(cJSON_GetObjectItemCaseSensitive(j, "minAndMax")) < 1) { cJSON_DeleteTopLevel(x); return NULL; }
90+ if (cJSON_GetArraySize(cJSON_GetObjectItemCaseSensitive(j, "minAndMax")) > 4) { cJSON_DeleteTopLevel(x); return NULL; }
8891 list_t * x1 = list_create(false, NULL);
8992 if (NULL != x1) {
9093 cJSON * e1 = NULL;
@@ -105,6 +108,7 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
105108 if (!cJSON_HasObjectItem(j, "minOnly")) { cJSON_DeleteTopLevel(x); return NULL; }
106109 if (cJSON_HasObjectItem(j, "minOnly")) {
107110 if (!cJSON_IsArray(cJSON_GetObjectItemCaseSensitive(j, "minOnly"))) { cJSON_DeleteTopLevel(x); return NULL; }
111+ if (cJSON_GetArraySize(cJSON_GetObjectItemCaseSensitive(j, "minOnly")) < 2) { cJSON_DeleteTopLevel(x); return NULL; }
108112 list_t * x1 = list_create(false, NULL);
109113 if (NULL != x1) {
110114 cJSON * e1 = NULL;
@@ -137,6 +141,7 @@ struct TopLevel * cJSON_GetTopLevelValue(const cJSON * j) {
137141 if (!cJSON_HasObjectItem(j, "unionItems")) { cJSON_DeleteTopLevel(x); return NULL; }
138142 if (cJSON_HasObjectItem(j, "unionItems")) {
139143 if (!cJSON_IsArray(cJSON_GetObjectItemCaseSensitive(j, "unionItems"))) { cJSON_DeleteTopLevel(x); return NULL; }
144+ if (cJSON_GetArraySize(cJSON_GetObjectItemCaseSensitive(j, "unionItems")) < 2) { cJSON_DeleteTopLevel(x); return NULL; }
140145 list_t * x1 = list_create(false, NULL);
141146 if (NULL != x1) {
142147 cJSON * e1 = NULL;
Test case

test/inputs/schema/vega-lite.schema

1 generated file · +6 −0
Mschema-cjsondefault / TopLevel.c+6 −0
@@ -9541,6 +9541,7 @@ struct BinParams * cJSON_GetBinParamsValue(const cJSON * j) {
95419541 }
95429542 if (cJSON_HasObjectItem(j, "divide")) {
95439543 if (!cJSON_IsArray(cJSON_GetObjectItemCaseSensitive(j, "divide"))) { cJSON_DeleteBinParams(x); return NULL; }
9544+ if (cJSON_GetArraySize(cJSON_GetObjectItemCaseSensitive(j, "divide")) < 1) { cJSON_DeleteBinParams(x); return NULL; }
95449545 list_t * x1 = list_create(false, NULL);
95459546 if (NULL != x1) {
95469547 cJSON * e1 = NULL;
@@ -9557,6 +9558,8 @@ struct BinParams * cJSON_GetBinParamsValue(const cJSON * j) {
95579558 }
95589559 if (cJSON_HasObjectItem(j, "extent")) {
95599560 if (!cJSON_IsArray(cJSON_GetObjectItemCaseSensitive(j, "extent"))) { cJSON_DeleteBinParams(x); return NULL; }
9561+ if (cJSON_GetArraySize(cJSON_GetObjectItemCaseSensitive(j, "extent")) < 2) { cJSON_DeleteBinParams(x); return NULL; }
9562+ if (cJSON_GetArraySize(cJSON_GetObjectItemCaseSensitive(j, "extent")) > 2) { cJSON_DeleteBinParams(x); return NULL; }
95609563 list_t * x1 = list_create(false, NULL);
95619564 if (NULL != x1) {
95629565 cJSON * e1 = NULL;
@@ -9597,6 +9600,7 @@ struct BinParams * cJSON_GetBinParamsValue(const cJSON * j) {
95979600 }
95989601 if (cJSON_HasObjectItem(j, "steps")) {
95999602 if (!cJSON_IsArray(cJSON_GetObjectItemCaseSensitive(j, "steps"))) { cJSON_DeleteBinParams(x); return NULL; }
9603+ if (cJSON_GetArraySize(cJSON_GetObjectItemCaseSensitive(j, "steps")) < 1) { cJSON_DeleteBinParams(x); return NULL; }
96009604 list_t * x1 = list_create(false, NULL);
96019605 if (NULL != x1) {
96029606 cJSON * e1 = NULL;
@@ -10086,6 +10090,8 @@ struct Predicate * cJSON_GetPredicateValue(const cJSON * j) {
1008610090 }
1008710091 if (cJSON_HasObjectItem(j, "range")) {
1008810092 if (!cJSON_IsArray(cJSON_GetObjectItemCaseSensitive(j, "range"))) { cJSON_DeletePredicate(x); return NULL; }
10093+ if (cJSON_GetArraySize(cJSON_GetObjectItemCaseSensitive(j, "range")) < 2) { cJSON_DeletePredicate(x); return NULL; }
10094+ if (cJSON_GetArraySize(cJSON_GetObjectItemCaseSensitive(j, "range")) > 2) { cJSON_DeletePredicate(x); return NULL; }
1008910095 list_t * x1 = list_create(false, NULL);
1009010096 if (NULL != x1) {
1009110097 cJSON * e1 = NULL;
No generated files match these filters.